Skip to main content

Solana AI Agent

Project description

Solana Swarm

PyPI - Version

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 a token by name or symbol from Jupiter strict list
  • Lookup USD price for a token (requires free AlphaVybe account)
  • Lookup trading info for a token (requires free AlphaVybe account)
  • Lookup OHLC prices for a token (requires free AlphaVybe account)
  • Calculate gain/losses for a token (1-day resolution) (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 = devnet
  • solana-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


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.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

solana_swarm-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file solana_swarm-0.1.1.tar.gz.

File metadata

  • Download URL: solana_swarm-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for solana_swarm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5f1a74751ba33c3d2e99c89efc0498995c1c8876c5114826ab61cf104eefeb81
MD5 15c779ba325a4069173062c4409a4869
BLAKE2b-256 22430185c285ec3824aa4cb2a1c537a0cad5215fc6ea3b95f5993ba4dea06e96

See more details on using hashes here.

File details

Details for the file solana_swarm-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for solana_swarm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffad1f1fc51fc552574ff227a40ab400c01a7e4495bd7919ec1eb5d11a2f9860
MD5 0307d1ed32fd84eedb8136ad81ccc291
BLAKE2b-256 f15a1e8ba376c303e8bdbf55e923b747c41ecae7d007113f330c3a8485b39615

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page