Great Onchain Agent Toolkit — open-source, lightweight, plugin-based framework that exposes onchain actions as tool calls for LangChain, Vercel AI SDK, OpenAI Agents SDK, ElizaOS, and Mastra. Wallet-agnostic across EVM and Solana with 200+ DeFi/NFT plugins.
- 01tool-calling agents
- 02LangChain agents that swap/bridge/transfer
- 03Vercel AI SDK chat with onchain tools
- 04modular plugin-based agent finance
- 05multi-framework portability
- pnpm add @goat-sdk/core @goat-sdk/wallet-viem @goat-sdk/adapter-vercel-ai
- pnpm add @goat-sdk/plugin-erc20 @goat-sdk/plugin-uniswap
| Variable | Scope | Description |
|---|---|---|
| WALLET_PRIVATE_KEY | Server | Hex-encoded EVM private key used by the agent's viem wallet client. Server-only. |
| RPC_PROVIDER_URL | Server | JSON-RPC endpoint the agent should transact through. |
| OPENAI_API_KEY | Server | LLM provider key for the agent's reasoning loop. |
Use GOAT SDK to expose onchain actions as tool calls. Build a viem wallet client and wrap it with `viem(walletClient)` from `@goat-sdk/wallet-viem`, then call `getOnChainTools({ wallet, plugins: [erc20({ tokens: [USDC, PEPE] }), uniswap({ apiKey })] })`. For Vercel AI SDK use the `@goat-sdk/adapter-vercel-ai` adapter and pass tools straight into `streamText({ tools })`; for LangChain use `@goat-sdk/adapter-langchain` and bind to a `createReactAgent`. Each plugin is a separate package, so install only the plugins you need to keep the tool surface small. Run with a dedicated agent EOA — never the user's wallet — and gate signing through a policy layer.
- ⚑GOAT signs with whatever wallet you hand it — give the agent its own EOA with a hard balance cap, not the user's wallet.
- ⚑Tool descriptions are sent to the LLM on every call; importing too many plugins blows up context size and increases hallucinated tool calls.
- ⚑Solana plugins require `@goat-sdk/wallet-solana` — the EVM `viem` wallet path will silently skip Solana tools.
- ⚑Some plugins (Uniswap, 0x) require their own API keys; missing keys fail at runtime, not init.
- ⚑Pin a per-run iteration limit on the agent executor — looped tool calls with a live wallet can drain funds before the LLM stops.
- ⚑Adapter packages (`@goat-sdk/adapter-*`) are versioned independently; mismatched core/adapter versions break tool serialization.