{"_id":"@elizaos/openclaw-adapter","_rev":"4-7698dfc86716c0d65f19762d2d0158d8","name":"@elizaos/openclaw-adapter","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@elizaos/openclaw-adapter","version":"0.1.0","keywords":["openclaw","eliza","elizaos","ai-agent","plugin-adapter","evm","solana","wallet","discord","telegram"],"license":"MIT","_id":"@elizaos/openclaw-adapter@0.1.0","maintainers":[{"name":"shawticus","email":"shawmakesmagic@gmail.com"},{"name":"shakkernerd","email":"shakkerdroid@gmail.com"},{"name":"wtfsayo","email":"hi@sayo.wtf"},{"name":"odilitime","email":"janesmith@airmail.cc"},{"name":"cjft","email":"cjft@trimboli.io"}],"homepage":"https://github.com/elizaos/eliza-workspace#readme","bugs":{"url":"https://github.com/elizaos/eliza-workspace/issues"},"dist":{"shasum":"ceac585b6be26aa7fb80924b9cf16b51be746f81","tarball":"https://registry.npmjs.org/@elizaos/openclaw-adapter/-/openclaw-adapter-0.1.0.tgz","fileCount":63,"integrity":"sha512-2hccm7UG/8zfZCgWDCZOieRf312iHN6g5RFUul6ShsHc6xkiOUKdWde9lqBWR3s5npm0m9yHFR5l9izj7ZDzdA==","signatures":[{"sig":"MEQCICr4YOocKHBzFodKeqKWb1Wy0PrzpzU1amVeDg/aokj4AiAinlMsuAAU3cRJuw8NVzaMHCGRH3JyIQOzAQfXhXqKjw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":216588},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ebe57304016aaadf69c0357d49ec1e36df6a5daa","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"shawticus","email":"shawmakesmagic@gmail.com"},"openclaw":{"extensions":["./index.ts"]},"repository":{"url":"git+https://github.com/elizaos/eliza-workspace.git","type":"git","directory":"openclaw/extensions/eliza-adapter"},"_npmVersion":"11.7.0","description":"Run Eliza (@elizaos) plugins inside OpenClaw — wallets, connectors, services, and more","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@sinclair/typebox":"0.34.48"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.0.18","openclaw":"workspace:*","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-adapter_0.1.0_1770598117177_0.27991940701987583","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-02-09T00:48:36.841Z","modified":"2026-06-16T05:13:47.231Z","0.1.0":"2026-02-09T00:48:37.332Z"},"bugs":{"url":"https://github.com/elizaos/eliza-workspace/issues"},"license":"MIT","homepage":"https://github.com/elizaos/eliza-workspace#readme","keywords":["openclaw","eliza","elizaos","ai-agent","plugin-adapter","evm","solana","wallet","discord","telegram"],"repository":{"url":"git+https://github.com/elizaos/eliza-workspace.git","type":"git","directory":"openclaw/extensions/eliza-adapter"},"description":"Run Eliza (@elizaos) plugins inside OpenClaw — wallets, connectors, services, and more","maintainers":[{"email":"shawmakesmagic@gmail.com","name":"shawticus"},{"email":"janesmith@airmail.cc","name":"odilitime"}],"readme":"# @openclaw/eliza-adapter\n\nRun [Eliza](https://github.com/elizaos/eliza) plugins inside [OpenClaw](https://github.com/openclaw/openclaw). Wraps Eliza actions as OpenClaw tools, providers as lifecycle hooks, services, routes, and evaluators — letting the two agent ecosystems interoperate.\n\n## What it does\n\n| Eliza concept | OpenClaw equivalent | How it works |\n|---|---|---|\n| Action | Tool | Parameters converted to TypeBox schema, handler wrapped in execute() |\n| Provider | `before_agent_start` hook | Provider output injected as prepended context |\n| Service | Service | Started eagerly, injected into RuntimeBridge for other components |\n| Route | HTTP route | Request/response translated, paths prefixed with `/eliza` |\n| Evaluator | `message_received` / `agent_end` hook | Pre-evaluators → message hooks, post-evaluators → agent-end hooks |\n| Event | Lifecycle hook | Mapped where semantics align (MESSAGE_RECEIVED → message_received, etc.) |\n\n## Install\n\n### Inside the OpenClaw monorepo\n\nAlready in place at `extensions/eliza-adapter/`. Enable it in your OpenClaw config.\n\n### Standalone (npm)\n\n```bash\nnpm install @openclaw/eliza-adapter\n```\n\nThen register as an OpenClaw extension (see Configuration below).\n\n## Configuration\n\nAdd to your OpenClaw config:\n\n```json\n{\n  \"plugins\": {\n    \"eliza-adapter\": {\n      \"plugins\": [\"@elizaos/plugin-evm\"],\n      \"settings\": {\n        \"EVM_PRIVATE_KEY\": \"${EVM_PRIVATE_KEY}\",\n        \"EVM_PROVIDER_URL\": \"https://mainnet.infura.io/v3/YOUR_KEY\"\n      },\n      \"agentName\": \"WalletBot\"\n    }\n  }\n}\n```\n\n### Config fields\n\n| Field | Required | Description |\n|---|---|---|\n| `plugins` | Yes | Array of Eliza plugin package names or file paths to load |\n| `settings` | No | Key-value settings passed to plugins via `runtime.getSetting()`. Supports `${ENV_VAR}` expansion. |\n| `agentName` | No | Agent display name (default: `\"Eliza\"`) |\n\n## What gets registered\n\nWhen you configure `plugins: [\"@elizaos/plugin-evm\"]`, the adapter:\n\n1. **Starts** the EVMService (connects wallet, sets up RPC)\n2. **Registers tools**: `eliza_send_tokens`, `eliza_swap_tokens`, `eliza_cross_chain_transfer`, etc.\n3. **Registers hooks**: Wallet balance and token balance injected into agent context before each run\n4. **Registers routes**: Any HTTP endpoints the plugin exposes, under `/eliza/...`\n\nThe tools appear in OpenClaw's agent like any native tool. The agent can call `eliza_send_tokens` with `{ toAddress: \"0x...\", amount: \"1.5\", chain: \"base\" }` and the adapter handles execution through the Eliza plugin's action handler.\n\n## Supported Eliza plugins\n\nAny Eliza plugin that exports the standard `Plugin` shape works. Tested patterns:\n\n- **Wallet plugins** (plugin-evm, plugin-solana) — actions become transfer/swap/bridge tools\n- **Service plugins** — started and available via `runtime.getService()`\n- **Provider plugins** — context injected into agent prompts\n\n### Known limitations\n\n- **LLM methods** (`useModel`, `generateText`) throw `NotImplementedError`. Actions that rely on conversational parameter extraction need explicit parameters or known schemas.\n- **Channel plugins** (Discord, Telegram) register as tools only, not as native OpenClaw channels.\n- **Database** is in-memory (10K memories/table cap with LRU eviction). No persistence.\n- **Embeddings** are not generated. Vector search works if embeddings are provided but none are created automatically.\n\n## Plugin resolution\n\nEliza plugins are loaded via dynamic `import()`. They must be resolvable from the OpenClaw runtime context:\n\n```bash\n# Install the Eliza plugin you want to use\nnpm install @elizaos/plugin-evm\n\n# Or use a file path\n{\n  \"plugins\": [\"./path/to/my-eliza-plugin/index.js\"]\n}\n```\n\n## Development\n\n```bash\n# Run tests (418 tests)\npnpm test\n\n# Type-check\npnpm typecheck\n\n# Build for publishing\npnpm build\n```\n\n## Architecture\n\n```\nindex.ts                    Entry point — loads plugins, orchestrates registration\nsrc/\n  runtime-bridge.ts         IAgentRuntime implementation backed by InMemoryStore\n  in-memory-store.ts        Full IDatabaseAdapter with eviction (memories, rooms, entities, etc.)\n  action-to-tool.ts         Eliza Action → OpenClaw tool (with schema conversion)\n  provider-to-hook.ts       Eliza Provider → before_agent_start hook\n  service-adapter.ts        Eliza Service → OpenClaw service lifecycle\n  route-adapter.ts          Eliza Route → OpenClaw HTTP route\n  evaluator-to-hook.ts      Eliza Evaluator → message_received/agent_end hook\n  schema-converter.ts       JSON Schema → TypeBox conversion + known wallet schemas\n  event-mapper.ts           Eliza EventType → OpenClaw PluginHookName\n  config.ts                 Config parsing with ${ENV_VAR} resolution\n  eliza-types.ts            Local type definitions (no @elizaos/core dependency)\n  logger-adapter.ts         OpenClaw logger → Eliza logger shape\n  memory-builder.ts         Memory object construction from OpenClaw contexts\n  types.ts                  Adapter config types + NotImplementedError\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}