Setup your project
1
Install ICP Agent Kit
Install the package via npm:
2
Choose Your Approach
Initialize with OpenAI for natural language:
3
Start Building
Use simple commands to interact with the blockchain:
Complete Examples
Here are complete examples for both approaches:Running the Example
Environment Setup
OpenAI API Key (for Natural Language)
OpenAI API Key (for Natural Language)
To use natural language features, you need an OpenAI API key:Or pass it directly in the configuration:
- Get your API key from OpenAI Platform
- Set it as an environment variable:
Local Development Setup
Local Development Setup
For local development with dfx:
- Install dfx:
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
- Start local replica:
dfx start --clean
- Use
network: 'local'
in your agent configuration
Important: In production, store your seed phrases securely and never log them. The examples
above are for demonstration only.
Next Steps
Natural Language Guide
Master natural language commands and conversations
LangChain Tools
Explore all 10 available tools
Plugin Documentation
Deep dive into each plugin’s capabilities
Examples
See real-world examples and workflows
Try Sample Applications
Want to see ICP Agent Kit in action? Check out our production-ready sample applications:🤖 Trading Bot
AI-Powered Decentralized Trading BotSee natural language trading commands in action:Features:
- Real-time market analysis
- AI-powered decision making
- On-chain trade recording
- Natural language interface
🏛️ DAO Voting
AI-Assisted DAO Governance SystemExperience AI-powered governance:Features:
- AI proposal analysis
- Automated voting with reasoning
- Cryptographic verification
- Real-time governance metrics
Live Demonstrations: Both applications include working JavaScript demos that you can run immediately without setup. Try
node simple-trading-bot.js
or node simple-dao-voting.js
for instant results!Getting Help
Common Issues
Common Issues
- Network Connection: Make sure you have internet connectivity for mainnet operations
- TypeScript Errors: Ensure you have TypeScript installed:
npm install -g typescript
- Permission Errors: Check that your project has proper write permissions for identity storage
- OpenAI API Key: For natural language features, ensure your OpenAI API key is set correctly
Need Support?
Need Support?
- Check our troubleshooting guide
- Try the sample applications for working examples
- Open an issue on GitHub
- Join our Discord community