solana-agentkit


Namesolana-agentkit JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/arhansuba/solana-agentkit
SummaryA Python toolkit for building AI agents on Solana
upload_time2024-12-31 12:51:45
maintainerNone
docs_urlNone
authorArhan Subaşı
requires_python>=3.8
licenseNone
keywords solana blockchain artificial-intelligence ai-agents cryptocurrency web3 defi nft
VCS
bugtrack_url
requirements solana anchorpy base58 aiohttp langchain openai python-dotenv rsa web3 ape numpy Pillow pydantic requests cryptography black pytest pytest-asyncio sphinx sphinx-rtd-theme sphinx-autodoc-typehints jupyter ipython python pydantic langchain tweepy standard-imghdr ruff python-lsp-server ruff-lsp pytest pytest-cov mypy myst-parser sphinx sphinx-autobuild sphinxcontrib-napoleon sphinx-autodoc-typehints langchain-openai langgraph tweepy construct anchorpy spl solders
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
# Basic installation
pip install solana-agentkit

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

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

### Basic Usage

```python
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

```bash
# 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

```bash
# 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:

```bash
# 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

- GitHub Issues: [Report bugs](https://github.com/arhansuba/solana-agentkit/issues)
- Documentation: [Read the docs](https://solana-agentkit.readthedocs.io/)
- Discord: [Join our community](#)

## Acknowledgments

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/arhansuba/solana-agentkit",
    "name": "solana-agentkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "solana, blockchain, artificial-intelligence, ai-agents, cryptocurrency, web3, defi, nft",
    "author": "Arhan Suba\u015f\u0131",
    "author_email": "subasiarhan3@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/be/42/ed1000412c045e5f3e6530b4e20c60bc1ccee0f9dc3ee8eaf2e47bcc6e76/solana_agentkit-0.1.3.tar.gz",
    "platform": null,
    "description": "# Solana AgentKit Documentation\n\nWelcome to the Solana AgentKit documentation! This Python package provides tools and utilities for building AI agents that can interact with the Solana blockchain.\n\n## Quick Start\n\n### Installation\n\n```bash\n# Basic installation\npip install solana-agentkit\n\n# With development tools\npip install solana-agentkit[dev]\n\n# With documentation tools\npip install solana-agentkit[docs]\n```\n\n### Basic Usage\n\n```python\nfrom solana_agentkit import SolanaAgent\nfrom solana_agentkit.tools import transfer_tokens, get_balance\n\n# Initialize agent\nagent = SolanaAgent(\n    private_key=\"your_private_key\",\n    rpc_url=\"https://api.mainnet-beta.solana.com\"\n)\n\n# Check balance\nbalance = await agent.get_balance()\nprint(f\"Current balance: {balance} SOL\")\n\n# Transfer tokens\nresult = await agent.transfer(\n    to=\"recipient_address\",\n    amount=1.0\n)\nprint(f\"Transfer successful: {result.signature}\")\n```\n\n## Features\n\n### Core Components\n\n- **Agent Framework**: Build and deploy AI agents on Solana\n- **Transaction Tools**: Simplified transaction creation and management\n- **NFT Utilities**: Create and manage NFT collections\n- **Token Tools**: Deploy and manage SPL tokens\n- **Domain Management**: Register and manage .sol domains\n\n### AI Integration\n\n- LangChain integration for AI capabilities\n- OpenAI integration for image generation\n- Custom agent behaviors and personalities\n- Natural language processing for commands\n\n### Blockchain Features\n\n- Wallet management\n- Transaction building\n- Priority fee handling\n- Multi-signature support\n\n## Development\n\n### Setup Development Environment\n\n```bash\n# Clone repository\ngit clone https://github.com/arhansuba/solana-agentkit\ncd solana-agentkit\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # Unix\n# or\n.\\venv\\Scripts\\activate  # Windows\n\n# Install development dependencies\npip install -r requirements.txt\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest tests/\n\n# Run with coverage\npytest --cov=solana_agentkit tests/\n```\n\n### Code Style\n\nWe use Black for code formatting and isort for import sorting:\n\n```bash\n# Format code\nblack src/ tests/\n\n# Sort imports\nisort src/ tests/\n```\n\n## Project Structure\n\n```\nsolana-agentkit/\n\u251c\u2500\u2500 docs/               # Documentation\n\u251c\u2500\u2500 src/               # Source code\n\u2502   \u2514\u2500\u2500 solana_agentkit/\n\u2502       \u251c\u2500\u2500 agent/     # Agent implementations\n\u2502       \u251c\u2500\u2500 tools/     # Blockchain tools\n\u2502       \u2514\u2500\u2500 utils/     # Utility functions\n\u251c\u2500\u2500 tests/             # Test suite\n\u2514\u2500\u2500 examples/          # Usage examples\n```\n\n## Missing Core Features:\n\nplaintextCopysolana_agentkit/\n\u251c\u2500\u2500 protocols/            # New module for additional DeFi protocols\n\u2502   \u251c\u2500\u2500 jupiter/         # Jupiter DEX integration\n\u2502   \u251c\u2500\u2500 orca/           # Orca DEX integration\n\u2502   \u2514\u2500\u2500 solend/         # Lending protocol integration\n\u251c\u2500\u2500 analytics/           # New module for on-chain analytics\n\u2502   \u251c\u2500\u2500 price/          # Price analysis and feeds\n\u2502   \u251c\u2500\u2500 volume/         # Volume analysis\n\u2502   \u2514\u2500\u2500 metrics/        # General protocol metrics\n\u251c\u2500\u2500 security/           # New module for security features\n\u2502   \u251c\u2500\u2500 validation/     # Input validation\n\u2502   \u2514\u2500\u2500 verification/   # Transaction verification\n\u2514\u2500\u2500 monitoring/         # New module for monitoring\n    \u251c\u2500\u2500 events/         # Event monitoring\n    \u2514\u2500\u2500 alerts/         # Alert system\n\nMissing Tool Categories:\n\nplaintextCopysolana_agentkit/tools/\n\u251c\u2500\u2500 defi/               # DeFi-specific tools\n\u2502   \u251c\u2500\u2500 yield_farming.py\n\u2502   \u2514\u2500\u2500 liquidity_mining.py\n\u251c\u2500\u2500 governance/         # Governance tools\n\u2502   \u251c\u2500\u2500 proposal.py\n\u2502   \u2514\u2500\u2500 vote.py\n\u251c\u2500\u2500 analytics/          # Analytics tools\n\u2502   \u251c\u2500\u2500 market_analysis.py\n\u2502   \u2514\u2500\u2500 portfolio_tracking.py\n\u2514\u2500\u2500 automation/         # Automation tools\n    \u251c\u2500\u2500 strategy.py\n    \u2514\u2500\u2500 scheduler.py\n\nUtility Enhancements:\n\nplaintextCopysolana_agentkit/utils/\n\u251c\u2500\u2500 cache/             # Caching utilities\n\u251c\u2500\u2500 rate_limiting/     # Rate limiting\n\u251c\u2500\u2500 error_handling/    # Enhanced error handling\n\u2514\u2500\u2500 logging/          # Logging utilities\n\nTesting Infrastructure:\n\nplaintextCopytests/\n\u251c\u2500\u2500 unit/             # Unit tests\n\u251c\u2500\u2500 integration/      # Integration tests\n\u251c\u2500\u2500 e2e/             # End-to-end tests\n\u2514\u2500\u2500 fixtures/        # Test fixtures\n\nDocumentation:\n\nplaintextCopydocs/\n\u251c\u2500\u2500 api/             # API documentation\n\u251c\u2500\u2500 tutorials/       # Usage tutorials\n\u251c\u2500\u2500 examples/        # Example implementations\n\u2514\u2500\u2500 protocols/       # Protocol documentation\nKey missing features:\n\nProtocol Integrations:\n\n\nJupiter integration for optimal routing\nOrca integration for concentrated liquidity\nSolend integration for lending operations\nMarinade integration for liquid staking\n\n\nAnalytics & Monitoring:\n\n\nPrice feed integration\nMarket analytics\nPortfolio tracking\nEvent monitoring\nAlert system\n\n\nEnhanced Security:\n\n\nInput validation framework\nTransaction simulation\nRisk assessment\nRate limiting\n\n\nAdvanced Tools:\n\n\nYield farming strategies\nLiquidity mining tools\nPortfolio management\nGovernance integration\nAutomated trading strategies\n\n\nInfrastructure:\n\n\nCaching system\nError handling framework\nLogging system\nRate limiting\nPerformance monitoring\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support\n\n- GitHub Issues: [Report bugs](https://github.com/arhansuba/solana-agentkit/issues)\n- Documentation: [Read the docs](https://solana-agentkit.readthedocs.io/)\n- Discord: [Join our community](#)\n\n## Acknowledgments\n\n- Solana Foundation\n- LangChain team\n- All contributors# solana-agentkit\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python toolkit for building AI agents on Solana",
    "version": "0.1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/arhansuba/solana-agentkit/issues",
        "Documentation": "https://solana-agentkit.readthedocs.io/",
        "Homepage": "https://github.com/arhansuba/solana-agentkit",
        "Source Code": "https://github.com/arhansuba/solana-agentkit"
    },
    "split_keywords": [
        "solana",
        " blockchain",
        " artificial-intelligence",
        " ai-agents",
        " cryptocurrency",
        " web3",
        " defi",
        " nft"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96deb08736dceb69227a9b8e08243456fdb3f9ae4d603b8dce88da95b21ece88",
                "md5": "d8f8eddddd455a5692c0fe9dcd7d2081",
                "sha256": "2944bfdd68deef94b64e240c51218fc96a468da9902bcd950b70ef50a19e6cd2"
            },
            "downloads": -1,
            "filename": "solana_agentkit-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d8f8eddddd455a5692c0fe9dcd7d2081",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 118864,
            "upload_time": "2024-12-31T12:51:42",
            "upload_time_iso_8601": "2024-12-31T12:51:42.241022Z",
            "url": "https://files.pythonhosted.org/packages/96/de/b08736dceb69227a9b8e08243456fdb3f9ae4d603b8dce88da95b21ece88/solana_agentkit-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be42ed1000412c045e5f3e6530b4e20c60bc1ccee0f9dc3ee8eaf2e47bcc6e76",
                "md5": "1120d61a922dd2ddf5d5d0749925e8f3",
                "sha256": "d3c5ca21ff78a0503c461987aa8cbb01432b3b72673cfb7ec5fdee95cad03cbb"
            },
            "downloads": -1,
            "filename": "solana_agentkit-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1120d61a922dd2ddf5d5d0749925e8f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 94715,
            "upload_time": "2024-12-31T12:51:45",
            "upload_time_iso_8601": "2024-12-31T12:51:45.182721Z",
            "url": "https://files.pythonhosted.org/packages/be/42/ed1000412c045e5f3e6530b4e20c60bc1ccee0f9dc3ee8eaf2e47bcc6e76/solana_agentkit-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-31 12:51:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "arhansuba",
    "github_project": "solana-agentkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "solana",
            "specs": [
                [
                    ">=",
                    "0.30.0"
                ]
            ]
        },
        {
            "name": "anchorpy",
            "specs": [
                [
                    ">=",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "base58",
            "specs": [
                [
                    ">=",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "langchain",
            "specs": [
                [
                    ">=",
                    "0.0.200"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "rsa",
            "specs": []
        },
        {
            "name": "web3",
            "specs": [
                [
                    "==",
                    "7.6.0"
                ]
            ]
        },
        {
            "name": "ape",
            "specs": [
                [
                    "==",
                    "0.4.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.21.0"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    ">=",
                    "9.0.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "1.8.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.26.0"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    ">=",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "22.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "6.2.5"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.18.0"
                ]
            ]
        },
        {
            "name": "sphinx",
            "specs": [
                [
                    ">=",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "sphinx-rtd-theme",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "sphinx-autodoc-typehints",
            "specs": [
                [
                    ">=",
                    "1.18.0"
                ]
            ]
        },
        {
            "name": "jupyter",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    ">=",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "python",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.9.2"
                ]
            ]
        },
        {
            "name": "langchain",
            "specs": [
                [
                    "==",
                    "0.3.7"
                ]
            ]
        },
        {
            "name": "tweepy",
            "specs": [
                [
                    "==",
                    "4.14.0"
                ]
            ]
        },
        {
            "name": "standard-imghdr",
            "specs": [
                [
                    "==",
                    "3.13.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "python-lsp-server",
            "specs": [
                [
                    "==",
                    "1.12.0"
                ]
            ]
        },
        {
            "name": "ruff-lsp",
            "specs": [
                [
                    "==",
                    "0.0.58"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.3"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.13.0"
                ]
            ]
        },
        {
            "name": "myst-parser",
            "specs": [
                [
                    "==",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "sphinx",
            "specs": [
                [
                    "==",
                    "8.0.2"
                ]
            ]
        },
        {
            "name": "sphinx-autobuild",
            "specs": [
                [
                    "==",
                    "2024.9.19"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-napoleon",
            "specs": [
                [
                    "==",
                    "0.7"
                ]
            ]
        },
        {
            "name": "sphinx-autodoc-typehints",
            "specs": [
                [
                    "==",
                    "2.4.4"
                ]
            ]
        },
        {
            "name": "langchain-openai",
            "specs": [
                [
                    "==",
                    "0.2.4"
                ]
            ]
        },
        {
            "name": "langgraph",
            "specs": [
                [
                    "==",
                    "0.2.39"
                ]
            ]
        },
        {
            "name": "tweepy",
            "specs": [
                [
                    "==",
                    "4.14.0"
                ]
            ]
        },
        {
            "name": "construct",
            "specs": [
                [
                    "==",
                    "2.10.67"
                ]
            ]
        },
        {
            "name": "anchorpy",
            "specs": []
        },
        {
            "name": "spl",
            "specs": []
        },
        {
            "name": "solders",
            "specs": []
        }
    ],
    "lcname": "solana-agentkit"
}
        
Elapsed time: 0.45700s