Skip to main content

auctra (Python SDK)

Stage 0/1 Python client — same Authority Protocol as @auctra/sdk.

Requires Python 3.9+.

pip install auctra==0.2.10
# local dev: pip install -e packages/python-sdk

Quick start (with intent anchor)

Every governed action requires create_intent first, then pass the returned intent (id + anchor_token) on execute:

from auctra import Auctra

client = Auctra(api_key="auctra_...", base_url="https://app.auctra.tech")

agent_id = "your-agent-uuid"
expires_at = "2027-01-01T00:00:00Z"

client.authority.issue(
    subject=agent_id,
    capabilities=["send_payment"],
    expires_at=expires_at,
    max_amount=500,
    max_lifetime_actions=100,
    max_lifetime_amount=10_000,
    currency="USD",
)

created = client.create_intent(
    title="Pay matched vendor invoices",
    intent_type="payment",
    risk_level="high",
    max_risk_level="critical",
    allowed_action_types=["send_payment"],
    expires_at=expires_at,
)
intent = created["intent"]

preview = client.action.evaluate(
    agent_id=agent_id,
    action_type="send_payment",
    payload={"amount": 50, "currency": "USD"},
    intent=intent,
)

decision = client.action.execute(
    agent_id=agent_id,
    action_type="send_payment",
    payload={"amount": 50, "currency": "USD", "target": "vendor:acme"},
    intent=intent,
    action={
        "target": "vendor:acme",
        "description": "Net-30 invoice payment",
        "risk_level": "medium",
    },
)

print(decision["decision"])
client.evidence.verify(payload=decision["evidence_payload"], evidence=decision["evidence"])

New-client gotcha

Sending only claimed_intent_id (without intent_anchor_token or the intent object) returns require_approval with a reason about the missing anchor. Pass intent= from create_intent, or set both claimed_intent_id and intent_anchor_token explicitly.

See docs/integrations/intent-anchors.md.

Threat-engine helpers (Engine 03 + 12)

Lifetime budgets — cap total actions or spend across the delegation lifetime:

client.authority.issue(
    subject=agent_id,
    capabilities=["send_payment"],
    expires_at=expires_at,
    max_lifetime_actions=50,
    max_lifetime_amount=25_000,
    currency="USD",
)

Untrusted tool/MCP outputs — declare provenance so tool responses cannot authorize the next action:

from auctra import action_metadata_with_inputs, declare_tool_response_input

tool_input = declare_tool_response_input(
    tool_name="fetch_invoice",
    content_hash="sha256:…",
)

decision = client.action.execute(
    agent_id=agent_id,
    action_type="send_payment",
    payload={"amount": 50, "currency": "USD"},
    intent=intent,
    action={
        "target": "vendor:acme",
        "metadata": action_metadata_with_inputs(tool_input),
    },
)

Pass multiple inputs: action_metadata_with_inputs(a, b) or {"inputs": [a, b]} in action["metadata"].

Public surface

declare_tool_response_input | action_metadata_with_inputs | InputProvenance
client.create_intent | list_intents
client.list_agents | create_agent | get_agent
client.list_api_keys
client.approve_action_request | reject_action_request
client.list_policies | create_policy | simulate_policy | publish_policy
client.get_authority_graph | list_action_types | list_workload_identities
client.list_siem_endpoints | create_siem_endpoint | delete_siem_endpoint
client.list_incidents | open_incident | resolve_incident
client.list_compliance_packs | run_compliance_pack | list_compliance_runs
client.authority.issue | verify | delegate | revoke
client.action.evaluate | execute
client.get_action_request
client.evidence.verify

Download files

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

Source Distribution

auctra-0.2.10.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

auctra-0.2.10-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file auctra-0.2.10.tar.gz.

File metadata

  • Download URL: auctra-0.2.10.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for auctra-0.2.10.tar.gz
Algorithm Hash digest
SHA256 50c0754b97c4ee2a1bfbdd88d311daea9772873d2b44db7867cda0ea7902a18e
MD5 d82a5dbabf750afe8ee440b9f7af6729
BLAKE2b-256 766d191cb0fed792249cfe900a63eb6db26496d18882aca55a306d9889040946

See more details on using hashes here.

File details

Details for the file auctra-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: auctra-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for auctra-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 508e1dfdb86f56fc49da8f636d2d9b3273e9e302ffc697de05020f5a7eff5a94
MD5 ac0fb9dd74ecc653b2f25ec301e48323
BLAKE2b-256 a2ace3da5b83cfe68b176a260d51ca10d849ed0805422bb1e74b20130b59ad08

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.0

2 files

This release

0.2.10 This release

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page