A DeFi agent built using Langchain and powered by CDP SDK, operating over the XMTP messaging protocol.
- Process blockchain payments using natural language commands
- Advanced language processing using LangChain and OpenAI
- User-specific wallet management with flexible storage options (Redis or local file)
- XMTP messaging for secure, decentralized chat interactions
- Powered by CDP SDK for reliable blockchain operations and Langchain for AI Agent
- Node.js (v20+)
- XMTP
node-sdk
- OpenAI API key
- Coinbase Developer Platform (CDP) API credentials
- Yarn package manager
Once the agent is running, you can interact with it using natural language commands:
- "Send 0.01 USDC to 0x1234..."
- "Check my wallet balance"
This agent combines key technologies:
- XMTP protocol: Secure decentralized messaging
- Langchain: AI processing and conversation management
- CDP SDK: Blockchain transaction handling
- Storage: Redis or local file options
- OpenAI: Natural language understanding
- Verify XMTP environment settings (
local
,dev
, orproduction
) - Check API credentials and connection strings
- Ensure sufficient wallet balance
- Verify network settings (default: base-sepolia)
- For testnets, obtain tokens from faucets
- System falls back to local storage if Redis fails
- Check permissions and connection URLs
# git clone repo
git clone https://github.com/ephemeraHQ/xmtp-agent-examples.git
# go to the folder
cd xmtp-agent-examples
cd examples/coinbase-langchain
# install packages
yarn
# generate random xmtp keys (optional)
yarn gen:keys
# run the example
yarn dev