Official Python SDK for AgentX (https://www.agentx.so/)
Project description
A fast way to build AI Agents and create agent workforces
The official AgentX Python SDK for AgentX
Why build AI agents with AgentX?
- Simplicity — Agent → Conversation → Message structure.
- Chain-of-thought built in.
- Choose from most open and closed-source LLM vendors.
- Built-in Voice (ASR, TTS), Image Gen, Document, CSV/Excel, OCR, and more.
- Support for all running MCP (Model Context Protocol) servers.
- RAG with built-in re-rank.
- Multi-agent workforce orchestration.
- Multiple agents working together with a designated manager agent.
- Cross-LLM-vendor, multi-agent orchestration.
- A2A — agent-to-agent protocol (coming soon)
Installation
pip install --upgrade agentx-python
Quick Start
from agentx import AgentX
client = AgentX(api_key="your-api-key-here")
agents = client.list_agents()
print(f"You have {len(agents)} agents")
if agents:
agent = agents[0]
conversation = agent.new_conversation()
response = conversation.chat("Hello! What can you help me with?")
print(response)
Usage
Provide an api_key inline or set AGENTX_API_KEY as an environment variable.
Get your API key at https://app.agentx.so
Agent
from agentx import AgentX
client = AgentX(api_key="<your api key here>")
print(client.list_agents())
Conversation
my_agent = client.get_agent(id="<agent id here>")
existing_conversations = my_agent.list_conversations()
last_conversation = existing_conversations[-1]
msgs = last_conversation.list_messages()
print(msgs)
Chat
a_conversation = my_agent.get_conversation(id="<conversation id here>")
response = a_conversation.chat_stream("Hello, what is your name?")
for chunk in response:
print(chunk)
*cot stands for chain-of-thought
Workforce
from agentx import AgentX
client = AgentX(api_key="<your api key here>")
workforces = client.list_workforces()
workforce = workforces[0]
print(f"Workforce: {workforce.name}")
print(f"Manager: {workforce.manager.name}")
print(f"Agents: {[agent.name for agent in workforce.agents]}")
Chat with Workforce
conversation = workforce.new_conversation()
response = workforce.chat_stream(conversation.id, "How can you help me with this project?")
for chunk in response:
if chunk.text:
print(chunk.text, end="")
Custom Agent Evaluations
See EVALUATIONS.md for full documentation — installation, dataset builder, framework examples (OpenAI, Anthropic, Google, LangChain, CrewAI, AutoGen, LlamaIndex, HTTP endpoints), and the complete API reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentx_python-0.4.9.tar.gz.
File metadata
- Download URL: agentx_python-0.4.9.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbe7116d9104532e7e6b5337a13df86988605169b8e8f3dfc5e5a467ff3aeaae
|
|
| MD5 |
3e2de86663f35cbef1c524829ea5000a
|
|
| BLAKE2b-256 |
eeec22c1677b5446c2c7ab0aee1a8f1b2829c043514cdda15a83fededb6e3dd6
|
File details
Details for the file agentx_python-0.4.9-py3-none-any.whl.
File metadata
- Download URL: agentx_python-0.4.9-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6710c21d74593b69f82e1693ff5f90f9bbd31ee6e5116858a97c48635bca0a
|
|
| MD5 |
c501e4530e895d46f0e10ae105dc9570
|
|
| BLAKE2b-256 |
761f7c520bd1eb01f58dac9dbe0b67154911138d85fc57e87aed1305170671f6
|