AgentX-Core is the foundational Python framework for building autonomous AI agents that run on decentralized infrastructure, with native Solana integration via the AgentX Protocol.
AgentX Protocol enables autonomous AI agents to operate on-chain — owning wallets, executing transactions, and coordinating with other agents in a trustless swarm. AgentX-Core is the Python SDK that makes building these agents as easy as writing a few lines of code.
from agentx import Agent, SolanaRuntime
agent = Agent(
name="trader-01",
runtime=SolanaRuntime(rpc_url="https://api.mainnet-beta.solana.com"),
model="gpt-4o",
)
result = agent.run("Analyze SOL/USDC price action and propose a trade strategy.")
print(result.output)- Autonomous decision loop — agents perceive, plan, and act without human-in-the-loop
- LLM-agnostic — works with OpenAI, Anthropic, Mistral, or local models via Ollama
- Solana-native — agents can sign transactions, hold SPL tokens, and call on-chain programs
- Swarm coordination — agents communicate via AgentX's peer-to-peer message bus
- Tool use — plug in any Python function as an agent tool in one decorator
- Observability — structured logging, tracing, and a web dashboard
pip install agentx-coreOr from source:
git clone https://github.com/agentx-protocol/AgentX-Core.git
cd AgentX-Core
pip install -r requirements.txt
pip install -e .Requirements: Python 3.10+, a Solana RPC endpoint (devnet or mainnet).
from agentx import Agent
from agentx.tools import web_search, calculator
agent = Agent(
name="research-agent",
tools=[web_search, calculator],
system_prompt="You are a research assistant that finds accurate information.",
)
response = agent.run("What is the current market cap of Solana?")
print(response.output)from agentx import Agent
from agentx.memory import ShortTermMemory
agent = Agent(
name="task-planner",
memory=ShortTermMemory(max_tokens=4096),
max_iterations=10,
)
# Agent will loop until task is complete or max_iterations reached
result = agent.run_until_done("Plan and draft a report on DeFi trends in 2025.")from agentx import Agent
from agentx.runtime import SolanaRuntime
runtime = SolanaRuntime(
rpc_url="https://api.devnet.solana.com",
wallet_keypair_path="~/.config/solana/id.json",
)
agent = Agent(name="on-chain-agent", runtime=runtime)
agent.deploy() # Registers agent on AgentX program
print(f"Agent deployed at: {agent.on_chain_address}")AgentX-Core/
├── src/
│ └── agentx/
│ ├── __init__.py # Public API
│ ├── core.py # Agent class and decision loop
│ ├── utils.py # Logging, HTTP helpers, retry logic
│ ├── memory.py # Short/long-term memory backends
│ ├── tools.py # Built-in tool definitions
│ └── runtime.py # Solana runtime adapter
├── tests/
│ ├── test_core.py # Unit tests for Agent class
│ ├── test_utils.py # Utility function tests
│ └── fixtures/ # Mock data
├── examples/
│ ├── simple_agent.py
│ ├── multi_agent_swarm.py
│ └── solana_trading_agent.py
├── requirements.txt
├── setup.py
├── pyproject.toml
└── README.md
We welcome contributions! Please read our Contributing Guide before submitting a PR.
- Fork the repo and create your branch:
git checkout -b feat/my-feature - Write tests for your changes
- Ensure all tests pass:
pytest tests/ - Lint your code:
ruff check src/ - Submit a pull request
We use ruff for linting and black for formatting. Run before committing:
black src/ tests/
ruff check src/ tests/- Core agent decision loop
- OpenAI / Anthropic LLM backends
- Solana wallet integration
- Multi-agent swarm protocol (v0.3)
- Persistent agent memory on Arweave (v0.4)
- Agent marketplace / registry (v0.5)
MIT License — see LICENSE for details.
Built with ❤️ by the AgentX community.