sonic-agent-kit
v1.0.42
Published
connect any ai agents to sonic protocol
Readme
Sonic Agent Kit
An open-source toolkit for connecting AI agents to Sonic. Now, any agent, using any model can autonomously perform any onchain action:
- Trade tokens
- Launch new tokens
- Transfer assets
- Get token info
- And more...
🔧 Core Blockchain Features
- Token Operations
- Deploy token on sonic chain
- Transfer assets
- DeFi Integration
- OpenOcean integration for Swap
- Market Data Integration
- CoinGecko Pro API integration
- Real-time token price data
🤖 AI Integration Features
LangChain Integration
- Ready-to-use LangChain tools for blockchain operations
- Autonomous agent support with React framework
- Memory management for persistent interactions
- Streaming responses for real-time feedback
Autonomous Modes
- Interactive chat mode for guided operations
- Autonomous mode for independent agent actions
- Configurable action intervals
- Built-in error handling and recovery
📦 Installation
npm install sonic-agent-kitQuick Start
import { SonicAgentKit, createSonicTools } from "sonic-agent-kit";
// Initialize with private key and optional RPC URL
const agent = new SonicAgentKit(
"your-wallet-private-key",
"your-sonic-rpc-url",
"your-openai-api-key"
);
// Create LangChain tools
const tools = createSonicTools(agent);
## Test integration
check /test/index.ts for more details
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on how to contribute to this project.
## License
Apache-2 License
## Security
This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.