An intelligent AI-powered agent designed to provide real-time token and swap information in the Solana ecosystem. Built using the Eliza Framework, Jupiter APIs, Discord Bot Integration, and the OpenAI API, this project allows users to access seamless token swaps and real-time token data directly through Discord.
This AI agent provides an interactive and automated way to access token and swap information via Discord. It uses the Eliza Framework for conversational AI capabilities, the Jupiter API for accessing the best token swap routes on the Solana blockchain, Discord Bot Integration for communication, and the OpenAI API to enhance the bot’s conversational abilities with natural language processing.
- Real-Time Token Data: Fetch token details, market information, and trading pairs.
- Token Swapping: Enable users to find the best swap routes and execute token swaps on the Solana blockchain.
- The bot listens to user queries, provides detailed token information, and answers swap-related questions directly in Discord.
- Integration with OpenAI enables the bot to process natural language queries and respond intelligently to user requests.
- Powered by the Eliza Framework, the bot offers AI-powered conversational responses, ensuring a natural and engaging experience for users.
- Get real-time prices, liquidity, and available routes for token swaps via Jupiter APIs.
- OpenAI API integration enables the bot to handle complex queries and provide intelligent answers with natural language understanding.
Follow the steps below to set up and run this AI-powered agent.
Start by cloning the project repository to your local machine:
git clone https://github.com/Immutal0/solana-ai-token-swap-agent-eliza.git
cd solana-ai-token-swap-agent-eliza
Install all the necessary dependencies using yarn
or npm
:
yarn install
# or
npm install
Create a .env
file in the project root and add the required API keys:
DISCORD_TOKEN=your_discord_bot_token
JUPITER_API_KEY=your_jupiter_api_key
OPENAI_API_KEY=your_openai_api_key
To start the bot and begin interacting with it on Discord, run the following:
yarn start
# or
npm start
The Eliza Framework provides a lightweight, conversational AI engine for handling natural language queries. It processes incoming messages and enables dynamic conversations with users.
Jupiter is a decentralized exchange (DEX) aggregator for the Solana blockchain. It finds the best token swap routes across various liquidity pools, providing optimized transaction routes to users. The bot leverages the Jupiter API to query token prices and facilitate swaps.
The bot interacts with users directly in Discord. By integrating with the Discord API, the bot listens to user messages, fetches token and swap information, and responds in real-time. It also supports commands for a more structured interaction.
The OpenAI API is used to enrich the conversational abilities of the bot. It helps the bot understand and respond to complex or ambiguous queries with natural, human-like responses.
Users can request information about any token, including its current price, liquidity, and best swap routes.
Example command:
!token <token-symbol>
The bot can recommend the best swap routes and execute token swaps.
Example command:
!swap <from-token> <to-token> <amount>
Ask general questions about the Solana ecosystem, tokenomics, or ask the bot to help you swap tokens. The bot will intelligently answer using both the Eliza Framework and OpenAI's natural language understanding.
Example query:
How do I swap USDC to SOL?
- Eliza Framework: Provides conversational AI capabilities to handle natural language queries.
- Jupiter API: Solana DEX aggregator to find optimized token swap routes.
- Discord Bot: Real-time interaction with users through Discord channels.
- OpenAI API: Enhances the bot's conversational abilities and response quality.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request. Ensure that your contributions adhere to the following:
- Proper documentation for new features.
- Well-written and tested code.
- Consistent code style.
To contribute, simply follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Run tests.
- Create a pull request.
The AI-Powered Token & Swap Information Agent enhances your Solana experience by providing an interactive and intelligent way to query token data and perform token swaps. Built on the Eliza Framework, Jupiter APIs, Discord Bot Integration, and OpenAI API, this tool offers a seamless way to manage your Solana assets and engage with the community on Discord.
If you have any question contact to me.