Solana AI Agent
Project description
Solana Swarm
https://github.com/user-attachments/assets/16e7ec5e-a0a7-4bab-afca-dc621de1aa37
Solana Swarm is a stateful AI agent for the CLI that can perform actions on the Solana blockchain.
Fork it to create your own Solana Agent!
Actions
- Create new accounts
- Get balances of accounts
- Transfer between accounts
- Lookup token address for name or symbol of token from Jupiter strict list
- Lookup USD price for name or symbol of token (requires free AlphaVybe account)
- Lookup trading info for name or symbol of token (requires free AlphaVybe account)
- Lookup OHLC prices for name or symbol of token (requires free AlphaVybe account)
Setup
- Install OpenAI API KEY for zsh shell:
echo 'export OPENAI_API_KEY="YOUR_API_KEY"' >> ~/.zshrc
- Install AlphaVybe API KEY for zsh shell
echo 'export VYBE_API_KEY="YOUR_API_KEY"' >> ~/.zshrc
Install
pip install solana-swarm
Usage
Rate-Limited Public RPCs
solana-swarm
= devnetsolana-swarm --network mainnet-beta
= mainnet-beta
Custom RPC
solana-swarm --rpc https://my-custom-rpc.com/123
Example Test Flow on Devnet
solana-swarm
- Tell the AI to:
create 2 new accounts
- Go to https://faucet.solana.com/ and airdrop 0.5 SOL into account 1 (cut and paste public key from CLI into site)
- Tell the AI to:
Check the balance of account 1
- should be 0.5 SOL - Tell the AI to:
Transfer 0.25 SOL from account 1 to account 2
- should complete and show new balances
Contributing
Contributions to Solana Swarm are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
solana_swarm-0.1.0.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file solana_swarm-0.1.0.tar.gz
.
File metadata
- Download URL: solana_swarm-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013f67426b31ffc7b4e8b0efca0ce66914881448dff6fcd3f2bc68cb338b3661 |
|
MD5 | 21cdda923043accf22f45598eef7cf47 |
|
BLAKE2b-256 | 3bb309462a446b57d12c6de9aed19d5533c6ac2d8df7241179a560e6041fc0c5 |
File details
Details for the file solana_swarm-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: solana_swarm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 890f3c4d701babe65e6bc0bbbc24182419844f361fef1066740d6c929a391ca6 |
|
MD5 | ef0086a73a2b1aafe8086020f21e1614 |
|
BLAKE2b-256 | 81c2c85702e55ed678eae13880366efe76020114c4aeb94ec16caeb5e859cfeb |