Overview
Cambrian Agent Kit is a developer SDK to build autonomous AI agents and agentic chatbots on Sei. It lets you interact with DeFi protocols (Takara, Silo, Citrex, Symphony), manage SEI tokens and NFTs, and integrate AI workflows. This tutorial shows how to set up the kit, run your first agent, and adapt it to real DeFi use cases. For details about how the kit works internally, see the Cambrian Agent Kit documentation.Supported features
For blockchain agent development, you can use the kit to:- Manage ERC-20 and ERC-721 tokens on Sei
- Interact with the Sei DeFi ecosystem
- Swap tokens through the Symphony aggregator
- Add and remove liquidity with DragonSwap
- Lend and borrow with the Takara protocol
- Stake and unstake SEI tokens with Silo
- Build AI agents with LangChain and LangGraph
What this guide teaches you:
- Install and configure the kit, and connect your wallet and API keys.
- Understand the core concepts: agents, supported protocols, and how these components fit together.
- Run end-to-end code examples to:
- Check your token and NFT balances.
- Swap tokens with Symphony.
- Stake and unstake SEI in Silo.
- Lend and borrow with Takara.
- Trade perpetuals with Citrex.
- Adapt the kit for your own protocol or workflow.
Example use cases:
- Autonomous DeFi agents: Agents that can automatically manage token positions, provide liquidity, or take part in lending
- AI-assisted wallets: Conversational interfaces for blockchain operations
- Financial assistant agents: AI agents that can analyze market conditions and execute trades
- Portfolio management agents: Agents that manage crypto asset portfolios automatically
Hands-on tutorial
1. Prerequisites
- Node.js and npm installed
- A private key for your Sei wallet
- An OpenAI API key (for AI integrations)
- Enough SEI in your wallet to pay for gas
2. Project setup
.env:
3. Running your first agent
About the transaction:
- SEI address:
0x0represents the native SEI token in the agent kit. - Transaction hash: You can verify it on Seiscan.
- Transaction fees: Fees are calculated automatically and deducted from your balance.
4. Explore core features & protocols
a) Check token balance with error handling
b) Safe token swapping with Symphony
c) Liquid staking with Silo protocol
Silo staking details:
- iSEI token: Represents your staked SEI plus auto-compounded rewards
- No unbonding period: Immediate liquidity, unlike traditional staking
- 5% fee: Annual management fee of 5% on rewards
- MEV benefits: Validators share MEV profits with stakers
d) Lending/borrowing with Takara protocol
e) Perpetual trading with Citrex Markets
For more advanced protocol integrations, see
/tools/.Error handling & troubleshooting
Common error types
Error handling examples:
Transaction monitoring
Troubleshooting guide
Debug commands: