Skip to main content

Solana AgentKit Documentation

Welcome to the Solana AgentKit documentation! This Python package provides tools and utilities for building AI agents that can interact with the Solana blockchain.

Quick Start

Installation

# Basic installation
pip install solana-agentkit

# With development tools
pip install solana-agentkit[dev]

# With documentation tools
pip install solana-agentkit[docs]

Basic Usage

from solana_agentkit import SolanaAgent
from solana_agentkit.tools import transfer_tokens, get_balance

# Initialize agent
agent = SolanaAgent(
    private_key="your_private_key",
    rpc_url="https://api.mainnet-beta.solana.com"
)

# Check balance
balance = await agent.get_balance()
print(f"Current balance: {balance} SOL")

# Transfer tokens
result = await agent.transfer(
    to="recipient_address",
    amount=1.0
)
print(f"Transfer successful: {result.signature}")

Features

Core Components

  • Agent Framework: Build and deploy AI agents on Solana
  • Transaction Tools: Simplified transaction creation and management
  • NFT Utilities: Create and manage NFT collections
  • Token Tools: Deploy and manage SPL tokens
  • Domain Management: Register and manage .sol domains

AI Integration

  • LangChain integration for AI capabilities
  • OpenAI integration for image generation
  • Custom agent behaviors and personalities
  • Natural language processing for commands

Blockchain Features

  • Wallet management
  • Transaction building
  • Priority fee handling
  • Multi-signature support

Development

Setup Development Environment

# Clone repository
git clone https://github.com/arhansuba/solana-agentkit
cd solana-agentkit

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Unix
# or
.\venv\Scripts\activate  # Windows

# Install development dependencies
pip install -r requirements.txt

Running Tests

# Run all tests
pytest tests/

# Run with coverage
pytest --cov=solana_agentkit tests/

Code Style

We use Black for code formatting and isort for import sorting:

# Format code
black src/ tests/

# Sort imports
isort src/ tests/

Project Structure

solana-agentkit/
├── docs/               # Documentation
├── src/               # Source code
│   └── solana_agentkit/
│       ├── agent/     # Agent implementations
│       ├── tools/     # Blockchain tools
│       └── utils/     # Utility functions
├── tests/             # Test suite
└── examples/          # Usage examples

Missing Core Features:

plaintextCopysolana_agentkit/ ├── protocols/ # New module for additional DeFi protocols │ ├── jupiter/ # Jupiter DEX integration │ ├── orca/ # Orca DEX integration │ └── solend/ # Lending protocol integration ├── analytics/ # New module for on-chain analytics │ ├── price/ # Price analysis and feeds │ ├── volume/ # Volume analysis │ └── metrics/ # General protocol metrics ├── security/ # New module for security features │ ├── validation/ # Input validation │ └── verification/ # Transaction verification └── monitoring/ # New module for monitoring ├── events/ # Event monitoring └── alerts/ # Alert system

Missing Tool Categories:

plaintextCopysolana_agentkit/tools/ ├── defi/ # DeFi-specific tools │ ├── yield_farming.py │ └── liquidity_mining.py ├── governance/ # Governance tools │ ├── proposal.py │ └── vote.py ├── analytics/ # Analytics tools │ ├── market_analysis.py │ └── portfolio_tracking.py └── automation/ # Automation tools ├── strategy.py └── scheduler.py

Utility Enhancements:

plaintextCopysolana_agentkit/utils/ ├── cache/ # Caching utilities ├── rate_limiting/ # Rate limiting ├── error_handling/ # Enhanced error handling └── logging/ # Logging utilities

Testing Infrastructure:

plaintextCopytests/ ├── unit/ # Unit tests ├── integration/ # Integration tests ├── e2e/ # End-to-end tests └── fixtures/ # Test fixtures

Documentation:

plaintextCopydocs/ ├── api/ # API documentation ├── tutorials/ # Usage tutorials ├── examples/ # Example implementations └── protocols/ # Protocol documentation Key missing features:

Protocol Integrations:

Jupiter integration for optimal routing Orca integration for concentrated liquidity Solend integration for lending operations Marinade integration for liquid staking

Analytics & Monitoring:

Price feed integration Market analytics Portfolio tracking Event monitoring Alert system

Enhanced Security:

Input validation framework Transaction simulation Risk assessment Rate limiting

Advanced Tools:

Yield farming strategies Liquidity mining tools Portfolio management Governance integration Automated trading strategies

Infrastructure:

Caching system Error handling framework Logging system Rate limiting Performance monitoring

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

  • Solana Foundation
  • LangChain team
  • All contributors# solana-agentkit

Metadata

Release files for solana-agentkit 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solana-agentkit 0.1.3
File Size Uploaded Provenance Actions
solana_agentkit-0.1.3.tar.gz 94.7 kB Without provenance Details for solana_agentkit-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solana-agentkit 0.1.3
File Interpreter ABI Platform Actions
solana_agentkit-0.1.3-py3-none-any.whl Python 3 none any Details for solana_agentkit-0.1.3-py3-none-any.whl

Total release size: 213.6 kB

Release files / solana_agentkit-0.1.3.tar.gz

Download URL solana_agentkit-0.1.3.tar.gz
Size 94.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3c5ca21ff78a0503c461987aa8cbb01432b3b72673cfb7ec5fdee95cad03cbb
BLAKE2b-256 checksum
How to use checksums
be42ed1000412c045e5f3e6530b4e20c60bc1ccee0f9dc3ee8eaf2e47bcc6e76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.0

Release files / solana_agentkit-0.1.3-py3-none-any.whl

Download URL solana_agentkit-0.1.3-py3-none-any.whl
Size 118.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2944bfdd68deef94b64e240c51218fc96a468da9902bcd950b70ef50a19e6cd2
BLAKE2b-256 checksum
How to use checksums
96deb08736dceb69227a9b8e08243456fdb3f9ae4d603b8dce88da95b21ece88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.0

Security for solana-agentkit 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page