Welcome to the Solana AgentKit documentation! This Python package offers a robust toolkit for building AI-powered agents capable of interacting seamlessly with the Solana blockchain.
# Basic installation
pip install solana-agentkit
# With development tools
pip install solana-agentkit[dev]
# With documentation tools
pip install solana-agentkit[docs]
from solana_agentkit import SolanaAgent
# Initialize the 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}")
- Agent Framework: Easily build and deploy AI agents on Solana.
- Transaction Tools: Simplified methods for creating and managing transactions.
- NFT Utilities: Tools for creating and managing NFT collections.
- Token Tools: Deploy and manage SPL tokens with ease.
- Domain Management: Register and manage
.sol
domains.
- LangChain Support: Integrate advanced AI capabilities.
- OpenAI Integration: Use AI for image generation and natural language processing.
- Custom Behaviors: Define agent-specific personalities and tasks.
- Command Understanding: Enable natural language commands for blockchain operations.
- Wallet management and transaction building.
- Priority fee handling for faster transactions.
- Multi-signature support for enhanced security.
# Clone the repository
git clone https://github.com/arhansuba/solana-agentkit
cd solana-agentkit
# Create a virtual environment
python -m venv venv
source venv/bin/activate # Unix
# or
.\venv\Scripts\activate # Windows
# Install development dependencies
pip install -r requirements.txt
# Run all tests
pytest tests/
# Run with coverage
pytest --cov=solana_agentkit tests/
We enforce consistent code quality with:
- Black for code formatting.
- isort for import sorting.
- Pre-commit Hooks: Ensure all code changes meet the project's quality standards.
# Format code
black src/ tests/
# Sort imports
isort src/ tests/
solana-agentkit/
├── docs/ # Documentation
├── src/ # Source code
│ └── solana_agentkit/
│ ├── agent/ # Agent implementations
│ ├── tools/ # Blockchain tools
│ └── utils/ # Utility functions
├── tests/ # Test suite
└── examples/ # Usage examples
- DEX Integration: Jupiter and Orca for seamless trading.
- Lending: Solend integration for borrowing and lending.
- Staking: Marinade integration for liquid staking.
- On-Chain Metrics: Price feeds, market volume, and portfolio tracking.
- Alerts: Event-based monitoring and notifications.
- Input validation framework.
- Transaction simulation and risk assessment.
- Advanced rate limiting and error handling.
- Yield farming and liquidity mining utilities.
- Governance tools for proposal creation and voting.
- Automation modules for trading and portfolio rebalancing.
We welcome contributions from the community! To get started:
- Fork the repository.
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request for review.
Telegram @Immutal0`