Build your first Web3 AI agent in a few minutes.
A minimal starter for @abstraxn/agent-kit — create an agent with an auto-provisioned wallet, set a spend policy, and connect to MCP tools.
Click the green Use this template button at the top of this repo to create your own copy, then clone it.
npm install
cp .env.example .env
# set ABSTRAXN_API_KEY in .env (get it from the dashboard)
npm run devYou should see your agent get created, a wallet address, the spend policy applied, and the list of MCP tools it can use.
| File | What it does |
|---|---|
agent.ts |
The one file you customise — name, system prompt, spend limit, allowed tools. |
index.ts |
Creates the agent, applies the spend policy, connects to MCP. You rarely edit this. |
.env.example |
Copy to .env and add your API key. |
- Edit
agent.tsto describe your use case. - Add an LLM loop (OpenAI, Anthropic, or any provider via the Vercel AI SDK) so the agent can decide which tool to call.
- See full, runnable agents (web crawling, trading, monitoring, x402 payments) in abstraxn-agent-examples.
Never commit your .env or your wallet accessKey. Store the accessKey in a secrets manager — it is the only way to sign for the agent's wallet and cannot be retrieved again.