Skip to main content

Official Python SDK for Axme APIs.

Project description

axme-sdk-python

Python SDK for AXME - send intents, listen for deliveries, resume workflows. Durable execution without polling or webhooks.

Alpha PyPI License

Quick Start · Docs · Examples


Install

pip install axme

Requires Python 3.11+.


Quick Start

from axme import AxmeClient, AxmeClientConfig

client = AxmeClient(AxmeClientConfig(api_key="axme_sa_..."))

# Send an intent - survives crashes, retries, timeouts
intent = client.create_intent({
    "intent_type": "order.fulfillment.v1",
    "to_agent": "agent://myorg/production/fulfillment-service",
    "payload": {"order_id": "ord_123"},
}, idempotency_key="fulfill-ord-123-001")

# Wait for resolution - blocks until done, even across process restarts
result = client.wait_for(intent["intent_id"])
print(result["status"])

Connect an Agent

for delivery in client.listen("agent://myorg/production/my-agent"):
    intent = client.get_intent(delivery["intent_id"])
    result = process(intent["payload"])
    client.resume_intent(delivery["intent_id"], result)

Human Approvals

intent = client.create_intent({
    "intent_type": "intent.budget.approval.v1",
    "to_agent": "agent://myorg/prod/agent_core",
    "payload": {"amount": 32000},
    "human_task": {
        "task_type": "approval",
        "notify_email": "approver@example.com",
        "allowed_outcomes": ["approved", "rejected"],
    },
})
result = client.wait_for(intent["intent_id"])  # waits until human acts

8 task types: approval, confirmation, review, assignment, form, clarification, manual_action, override. Full reference: axme-docs.


Observe Lifecycle Events

for event in client.observe(intent["intent_id"]):
    print(event["event_type"], event["status"])
    if event["status"] in {"RESOLVED", "CANCELLED", "EXPIRED"}:
        break

Agent Mesh - Monitor and Govern

# Start heartbeat - agent appears in dashboard with live health
client.mesh.start_heartbeat()  # background thread, every 30s

# Report metrics after each task
client.mesh.report_metric(success=True, latency_ms=230, cost_usd=0.02)

# List all agents with health status
agents = client.mesh.list_agents()

# Kill a misbehaving agent - blocks all intents instantly
client.mesh.kill(address_id="addr_...")

# Resume it
client.mesh.resume(address_id="addr_...")

Set action policies (allowlist/denylist intent types) and cost policies (intents/day, $/day limits) per agent via dashboard or API. Agent Mesh overview.

Open the live dashboard at mesh.axme.ai or run axme mesh dashboard from the CLI.


Examples

export AXME_API_KEY="axme_sa_..."
python examples/basic_submit.py

More: axme-examples


Development

python -m pip install -e ".[dev]"
pytest

Related

axme-docs API reference and integration guides
axme-examples Runnable examples
axp-spec Protocol specification
axme-cli CLI tool
axme-conformance Conformance suite

hello@axme.ai · Security · License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axme-0.2.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axme-0.2.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file axme-0.2.0.tar.gz.

File metadata

  • Download URL: axme-0.2.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axme-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b82cd33ac66201512df952552d4b21626c0ed8c5eaf25df2aa0ec6922c60b845
MD5 e7471c90340b564a75ded87e004d1882
BLAKE2b-256 474da0357688cdca6252f2253c54019bb0c41230b6421b6eb547034fd75d1c0b

See more details on using hashes here.

File details

Details for the file axme-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: axme-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axme-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a245bb6b7b056bd425addd937b248ba14d3b8254799e7dca6ea09d473ef02eea
MD5 3fa632417c47f85110a433c9302abcb2
BLAKE2b-256 03ea82ef9b44660ee52f5824bbccf5d90a7a2d2ea0029238b0c13bcc01fd4614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page