|
1 | | -# 🤖 ADK Agent Starter |
| 1 | +# Coinbase Agent |
2 | 2 |
|
3 | | -This is a starter template to start building your own agent with `@iqai/adk` library. |
| 3 | +A tiny proof‑of‑concept that wires Coinbase AgentKit into the IQAI ADK (adk-ts) using the Model Context Protocol (MCP). AgentKit providers are exposed as MCP SDK tools, then adapted into ADK tools so your ADK agent can call on-chain actions through Coinbase. |
4 | 4 |
|
5 | | -## 🚀 Get Started |
6 | | -Start by cloning the repository or clicking on use as template button on github ui. |
| 5 | +## How it works |
| 6 | + |
| 7 | +- **AgentKit → MCP**: AgentKit's MCP package exposes its action providers as MCP tools plus a handler. |
| 8 | +- **MCP → ADK**: Those MCP tools are converted to ADK `BaseTool`s and attached to an `AgentBuilder`. |
| 9 | +- **Model**: Uses OpenRouter if `OPEN_ROUTER_KEY` is set; otherwise falls back to the model string configured in `LLM_MODEL`. |
| 10 | + |
| 11 | +### Quick start |
| 12 | + |
| 13 | +1. Install |
7 | 14 |
|
8 | 15 | ```bash |
9 | | -git clone https://github.com/IQAICOM/adk-agent-starter.git |
| 16 | +pnpm install |
10 | 17 | ``` |
11 | 18 |
|
12 | | -📦 Install the dependencies |
| 19 | +2. Configure environment |
| 20 | +Create a `.env` with the essentials: |
13 | 21 |
|
14 | 22 | ```bash |
15 | | -pnpm install |
| 23 | +# Optional |
| 24 | +DEBUG=false |
| 25 | +OPEN_ROUTER_KEY=your_openrouter_key |
| 26 | +LLM_MODEL=gpt-4.1-mini |
| 27 | + |
| 28 | +# Required for AgentKit / CDP |
| 29 | +CDP_API_KEY_ID=... |
| 30 | +CDP_API_KEY_SECRET=... |
| 31 | +CDP_WALLET_SECRET=... |
| 32 | +# Defaults to "fraxtal" if not set |
| 33 | +NETWORK_ID=fraxtal |
| 34 | + |
| 35 | +# Optional: if not set, a throwaway key is generated at runtime |
| 36 | +PRIVATE_KEY=0x... |
16 | 37 | ``` |
17 | 38 |
|
18 | | -▶️ Run the agent |
| 39 | +3. Run |
19 | 40 |
|
20 | 41 | ```bash |
21 | 42 | pnpm dev |
| 43 | +# or |
| 44 | +pnpm build && pnpm start |
22 | 45 | ``` |
23 | 46 |
|
24 | | -## 📁 Folder Structure |
25 | | -The main agent code lives in `index.ts` where the subagents live inside the `agents` folder. The agents can have tools which reside in the `tools` folder. |
| 47 | +The sample entry (`src/index.ts`) asks the agent: "Convert 100 USD to EUR." This is just a placeholder & i would rather recommend using the `adk cli` or `adk web` for better testing environment 👍. |
| 48 | + |
| 49 | +### Included tools (via AgentKit) |
| 50 | + |
| 51 | +- `wethActionProvider` |
| 52 | +- `pythActionProvider` |
| 53 | +- `walletActionProvider` |
| 54 | +- `erc20ActionProvider` |
| 55 | +- `cdpApiActionProvider` |
| 56 | + |
| 57 | +These are automatically adapted into ADK tools; you can add or remove providers in `src/agents/coinbase/tools/agentkit.ts`. Check for more providers on the AgentKit repo if needed. |
| 58 | + |
| 59 | +### Project layout |
26 | 60 |
|
27 | 61 | ``` |
28 | | -├── src/ |
29 | | -│ ├── agents/ |
30 | | -│ │ └── financial-agent/ |
31 | | -│ │ ├── index.ts |
32 | | -│ │ └── tools/ |
33 | | -│ │ └── currency-converter-tool.ts |
34 | | -│ ├── services/ |
35 | | -│ │ └── wallet.ts |
36 | | -│ ├── env.ts |
37 | | -│ └── index.ts |
| 62 | +src/ |
| 63 | + env.ts # env + model selection (OpenRouter optional) |
| 64 | + index.ts # simple demo prompt |
| 65 | + agents/coinbase/ |
| 66 | + agent.ts # ADK agent wiring |
| 67 | + tools/ |
| 68 | + agentkit.ts # AgentKit + providers setup |
| 69 | + index.ts # MCP → ADK tool adapter |
38 | 70 | ``` |
39 | 71 |
|
40 | | -## ⚙️ Environment Setup |
41 | | -Make sure to configure your environment variables: |
| 72 | +### Notes |
42 | 73 |
|
43 | | -```bash |
44 | | -cp .env.example .env |
45 | | -``` |
| 74 | +- This is a PoC: minimal glue code aimed at clarity, not completeness. |
| 75 | +- Keep your CDP keys and any `PRIVATE_KEY` safe. A generated key is not persisted. |
| 76 | + |
| 77 | +### References |
| 78 | + |
| 79 | +- [IQAI ADK (adk-ts)](https://adk.iqai.com) |
| 80 | +- [Coinbase AgentKit](https://docs.cdp.coinbase.com/agent-kit) |
| 81 | + |
| 82 | +### License |
46 | 83 |
|
47 | | -## 🧰 Dev Tools |
48 | | -This starter includes: |
49 | | -- 🐕 **Husky**: Git hooks for code quality |
50 | | -- 🎨 **Biome**: Linting and formatting |
51 | | -- 🚀 **GitHub Actions**: CI/CD pipeline |
52 | | -- 📦 **PNPM**: Fast package manager |
53 | | - |
54 | | -## 🏗️ Building Your Agent |
55 | | -1. **Create new agents** in the `src/agents/` directory |
56 | | -2. **Add tools** to your agents in the `tools/` subdirectory |
57 | | -3. **Configure services** in the `src/services/` directory |
58 | | -4. **Update environment** variables in `src/env.ts` |
59 | | - |
60 | | -## 📚 Links |
61 | | -- [ADK Library](https://github.com/IQAICOM/adk-ts) |
62 | | - |
63 | | -## 🤝 Contributing |
64 | | -1. Fork the repository |
65 | | -2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
66 | | -3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
67 | | -4. Push to the branch (`git push origin feature/amazing-feature`) |
68 | | -5. Open a Pull Request |
69 | | - |
70 | | -## 📄 License |
71 | | -MIT License - see the [LICENSE](LICENSE) file for details. |
72 | | - |
73 | | -## 🆘 Support |
74 | | -If you encounter any issues or have questions: |
75 | | -- 📝 [Create an issue](https://github.com/IQAICOM/adk-agent-starter/issues) |
| 84 | +MIT |
0 commit comments