Python SDK
The AxonPush Python SDK lets you publish, subscribe, and trace events from your AI agent applications.
Installation
bash
pip install axonpushWith framework integrations:
bash
pip install "axonpush[langchain]" # LangChain / LangGraph
pip install "axonpush[openai-agents]" # OpenAI Agents SDK
pip install "axonpush[anthropic]" # Anthropic / Claude
pip install "axonpush[crewai]" # CrewAI
pip install "axonpush[websocket]" # WebSocket supportQuick Start
python
from axonpush import AxonPush, EventType
with AxonPush(
api_key="ak_...",
tenant_id="1",
base_url="https://api.axonpush.xyz",
) as client:
event = client.events.publish(
identifier="task.started",
payload={"task": "summarize article"},
channel_id=1,
agent_id="research-agent",
event_type=EventType.AGENT_START,
)
print(f"Published event {event.id}")Resources
| Resource | Description |
|---|---|
client.events | Publish and list events |
client.channels | Manage channels, subscribe via SSE |
client.apps | Create and manage apps |
client.traces | List traces and get summaries |
client.webhooks | Manage webhook endpoints |
Environment Variables
The SDK reads credentials from environment variables when using the wizard:
| Variable | Description |
|---|---|
AXONPUSH_API_KEY | Your API key (starts with ak_) |
AXONPUSH_TENANT_ID | Organization/tenant ID |
AXONPUSH_BASE_URL | API base URL (default: https://api.axonpush.xyz) |