Skip to content

Python SDK

The axonpush Python SDK lets you publish, subscribe, and trace events from your AI agent applications.

Terminal window
pip install axonpush

paho-mqtt and aiomqtt ship as runtime dependencies, so client.connect_realtime() works out of the box — see Realtime.

With framework integrations:

Terminal window
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[deepagents]" # LangChain Deep Agents
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}")
ResourceDescription
client.eventsPublish and list events
client.channelsManage channels
client.connect_realtime()Open an MQTT-over-WSS subscription — see Realtime
client.appsCreate and manage apps
client.tracesList traces and get summaries
client.webhooksManage webhook endpoints

The SDK reads credentials from environment variables when using the wizard:

VariableDescription
AXONPUSH_API_KEYYour API key (starts with ak_)
AXONPUSH_TENANT_IDOrganization/tenant ID
AXONPUSH_BASE_URLAPI base URL (default: https://api.axonpush.xyz)

github.com/axonpush · PyPI