Welcome to AgentKit! This toolkit provides a collection of scripts and a Next.js server to help you build an on-chain AI agent. You can see active agents at AgentKit.
- Clone this repository to your local machine:
git clone git@github.com:resolverworks/agentkit-typescript.git- Install dependencies:
npm install-
Environment Setup
- Copy
example.envto a new.envfile:cp example.env .env
- Copy
-
Get API Keys
-
Configure Coinbase
- Run the encoding script:
bun scripts/encode-coinbase-api-key.ts
- Copy the output to your
.envfile
- Run the encoding script:
-
Set Up Wallet
- Generate wallet information:
bun scripts/create-wallet.ts
- Add the wallet details to your
.envfile
- Generate wallet information:
-
Configure Agent
- Fill in agent details in
.envfile - Set your agent's name:
bun scripts/set-name.ts
- You can rerun this script anytime to update description or avatar URL
- Fill in agent details in
The example agent creates poetry based on wallet balance. See it in action at: https://agentkit-example.onrender.com/
To create your own agent, modify these Next.js files:
app/page.tsx- Frontend interfaceapp/api/agent-response/route.tsx- Agent logic
-
Deploy to your preferred hosting service
-
Configure public settings:
- Set
PUBLISH_AGENT="true"in.env - Add your deployment URL to
AGENT_WEBSITEin.env - Run:
bun scripts/set-name.ts
- Set
-
Verify your setup:
- Check your ENS name:
https://app.ens.domains/${your-name-here}.agentkit.eth - Find your agent on AgentKit
- Check your ENS name: