Agent Framework Selection: AgentKit vs Eliza vs LangGraph
Summary
infra-todo-003 "Deploy agent framework (AgentKit, Eliza, LangGraph)" is PENDING and blocks nothing yet, but every stream that wants autonomous onchain action (DeFi vault actions, prediction-market bets, escrow releases) needs a decision. Compared the three candidates against this stack: Node.js 22 runtime, viem wallet tooling already present, CDP/x402 payment rails already integrated (infra-todo-001 COMPLETED), and smart-wallet setup (s1-todo-001) BLOCKED on credentials. Key result: Coinbase AgentKit is the best primary fit — it is framework- and wallet-agnostic, Node.js-first (Node 22+), ships 50+ onchain action providers (DeFi, social, NFT, Pyth oracles), has first-party CDP wallet integration matching the existing x402/CDP usage, and wraps into LangChain/OpenAI Agents SDK/MCP if a heavier orchestration layer is later needed. LangGraph is the durable-execution fallback for long-running concurrent streams; Eliza is deprioritized (Bun-centric app/cloud stack, lighter onchain-native action set).
Key Findings
- AgentKit (coinbase/agentkit, CDP docs): TypeScript/Python toolkit giving agents a wallet + onchain actions. Wallet-provider agnostic (CDP non-custodial, Privy, viem, hardware), framework-agnostic, model-agnostic. Action providers group actions (wallet: get_wallet_details/native_transfer/get_balance; cdp/defi, cdp/social; erc721; pyth; farcaster; twitter; zerodev examples exist). Framework extensions: LangChain, OpenAI Agents SDK, Eliza, Vercel AI SDK, MCP, Autogen, Pydantic-AI, Strands. Requires CDP API keys; Node.js 22+. Security warning: AgentKit does not gate transfers behind human approval, enforce spend caps, or allowlist destinations — prompt injection reaching a funded wallet can cause onchain transfers.
- LangGraph (langchain-ai/langgraph, LangChain docs): low-level orchestration runtime for stateful, long-running agents (StateGraph nodes/edges, Send API orchestrator-worker, checkpointers + stores for short/long-term memory, human-in-the-loop interrupts, LangSmith tracing). More code to write; no built-in crypto actions — would need viem/CDP tooling wired in as tools. Trusted by Klarna, Replit, Elastic; Deep Agents builds on it.
- Eliza (elizaOS) (ai16z/eliza): open-source agentic OS/TypeScript framework, model-agnostic via plugins (@elizaos/core AgentRuntime, memory/state primitives, plugin contracts), non-custodial EVM + Solana wallet ops with approval boundaries, local inference (Eliza-1) and Eliza Cloud. 19.6k stars. Bun-centric, app/cloud-first product stack; no longer accepting third-party plugins. Less onchain-native action coverage than AgentKit for this stack's DeFi/prediction/escrow needs.
- Fit with existing stack: repo uses Node.js 22 (built-in test runner), viem, CDP/x402 already wired; AgentKit reuses CDP credentials already configured for s2-todo-001 and the smart-wallet research (#001) evaluated ZeroDev/Safe which AgentKit can also consume via its ZeroDev example or viem wallet provider.
| Criterion | AgentKit | LangGraph | Eliza |
|---|---|---|---|
| Primary strength | Onchain actions + wallet | Durable orchestration/memory | Agent OS + plugins + chat |
| Language/runtime | TS/Python, Node 22+ | Python (JS port available) | TS, Bun |
| Crypto-native actions | 50+ (transfers, swaps, DeFi, NFT) | None built-in (bring your own tools) | Wallet ops via plugins |
| Wallet integration | CDP, Privy, viem, ZeroDev example | Custom (viem/CDP as tools) | Non-custodial EVM/Solana |
| Persistence / HITL | Basic | Checkpointers, stores, interrupts | Runtime memory + schedulers |
| Fit for infra-todo-003 | Best primary | Fallback for complex streams | Deprioritize |
Recommendations
Impact on Streams / Todos
- Infra: resolves infra-todo-003 (deploy agent framework) — move from PENDING to IN_PROGRESS with AgentKit selected; decision recorded here.
- Stream 1 (DeFi): vault-monitor/flashloan scanners can later execute real actions (not just fixtures) once s1-todo-001 credentials unblock the smart wallet.
- Stream 5 (Prediction): oracle feeds + bet placement become expressible as AgentKit actions (Pyth price provider exists).
- Stream 8 (Escrow): conditional escrow releases map to gated transfer actions under Rec 2 guardrails.
Sources
- Coinbase AgentKit repository (50+ TS actions, wallet providers, framework extensions)
- AgentKit architecture: action providers, wallet providers, framework extensions
- AgentKit wallet management (CDP, Privy, viem)
- LangGraph repository (stateful agent orchestration)
- LangGraph overview (durable execution, HITL, memory)
- elizaOS/eliza (agentic OS, plugins, EVM/Solana wallet ops)
Unblocks
infra-todo-001 infra-todo-003 s1-todo-001 s2-todo-001