Solgent is an AI-powered agent platform for Solana blockchain interactions, built using LangGraph.js. It provides a comprehensive suite of tools for DeFi operations, market analysis, and blockchain interactions.
- Token Swaps: Execute token swaps using Jupiter Exchange
- Token Transfers: Send tokens between Solana wallets
- Cross-Chain Bridging: Bridge assets between Solana, Base, and other chains using Wormhole
- Lending & Staking:
- Stake SOL tokens on Jupiter protocol
- Lend USDC on Lulo protocol
- Token Creation: Launch meme coins and tokens using Pump.Fun
- Top Traders Analysis: Track and analyze top-performing traders
- Trending Tokens: Monitor trending tokens and market movements
- Market Statistics: Access comprehensive market data and trends
The platform uses a multi-agent system with specialized components:
- Chief Router: Main entry point that classifies and routes queries
- DeFi Manager: Handles all DeFi-related operations
- Read Manager: Processes market data and analytics requests
- Generalist: Handles general blockchain queries
- Specialized Agents: Dedicated agents for specific tasks (bridging, lending, etc.)
- Node.js 20 or higher
- Yarn package manager
- Required API keys:
- Solana RPC endpoint
- OpenAI API key
- Anthropic API key (optional)
- Birdeye API key
- Lulo API key (for lending features)
- Clone the repository:
git clone [repository-url]
cd solgent
- Install dependencies:
yarn install
- Create and configure environment variables:
cp .env.example .env
Required environment variables:
SOLANA_PRIVATE_KEY=
SOLANA_MAINNET_RPC=
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
BIRDEYE_API_KEY=
LULO_API_KEY=
The platform can be used through the LangGraph Studio interface or programmatically:
import { graph } from "./src/index";
const result = await graph.invoke({
messages: [new HumanMessage("swap 1 USDC to SOL")],
});
const swapMessage = {
messages: [new HumanMessage("swap 1 USDC to SOL")],
};
const transferMessage = {
messages: [
new HumanMessage(
"transfer 1000 BONK to DZbJiJ2Uiwe3g53KBhJZ4ftdcUJGaVZNyp1ua2saguXC",
),
],
};
const pumpFun = {
messages: [
new HumanMessage(
"mint a meme coin called catsAreGods with the ticker $CATGOD",
),
],
};
src/
├── agent/ # Agent implementations
├── prompts/ # System prompts and templates
├── router/ # Routing logic
├── tools/ # DeFi and analytics tools
└── utils/ # Utility functions and configurations
# Unit tests
yarn test
# Integration tests
yarn test:int
# All tests and linting
yarn test:all
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with LangGraph.js
- Uses Solana Agent Kit
- Integrates with Jupiter, Lulo, and Pump.Fun protocols