Skip to content

IQAIcom/coinbase-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coinbase Agent

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.

How it works

  • AgentKit → MCP: AgentKit's MCP package exposes its action providers as MCP tools plus a handler.
  • MCP → ADK: Those MCP tools are converted to ADK BaseTools and attached to an AgentBuilder.
  • Model: Uses OpenRouter if OPEN_ROUTER_KEY is set; otherwise falls back to the model string configured in LLM_MODEL.

Quick start

  1. Install
pnpm install
  1. Configure environment Create a .env with the essentials:
DEBUG=false
OPEN_ROUTER_KEY=your_openrouter_key
LLM_MODEL=gpt-4.1-mini

# Required for AgentKit / CDP
# Get these 2 from: https://portal.cdp.coinbase.com/projects/api-keys
CDP_API_KEY_ID=...
CDP_API_KEY_SECRET=...

WALLET_PRIVATE_KEY=0x...
# get it from: https://zerion.io/api
ZERION_API_KEY=...
  1. Run

Run the predefined set of agent prompts src/index.ts

pnpm dev

Have a full on conversation using the adk cli (requires adk-cli package installed )

# Spins up chat interface on cli
adk run
# (or)
# Opens up web interface to chat with the agent
adk web

Included tools (via AgentKit)

  • defillamaActionProvider (Querying defi llama platform for coin data & details)
  • pythActionProvider (Retrieves price data from Pyth price feed)
  • walletActionProvider (getting wallet details & enables native token transfer)
  • erc20ActionProvider (enables transfer & get balance of erc20 token)
  • x402ActionProvider (enables http requests)
  • zerionActionProvider (provides portfolio overview & fungible token positions, requires API key)

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.

Project layout

src/
  env.ts                      # env + model selection (OpenRouter optional)
  index.ts                    # simple demo prompt
  agents/coinbase/
    agent.ts                  # ADK agent wiring
    tools/
      agentkit.ts            # AgentKit + providers setup & MCP → ADK tool adapter

References

License

MIT

About

ai agent 🤖

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published