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.5
# local dev: pip install -e packages/python-sdk

Quick start (with intent anchor)

High-risk actions require 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,
    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.

Public surface

client.create_intent
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.5.tar.gz (4.4 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.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: auctra-0.2.5.tar.gz
  • Upload date:
  • Size: 4.4 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.5.tar.gz
Algorithm Hash digest
SHA256 5d8086a519b9f4b0ce465255162c5d6a09fba91223699056e75dd5a0714a49b4
MD5 6b260d92e43f2582dc61504c3cc66519
BLAKE2b-256 c56cee44d398067fe7db590209f6d6aa52c19817303597a0ffd1f42a25e94eb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: auctra-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 33f7f75aacb400d1216d4f31ca868387df79e9eb2731163e45579c5dcad03d4a
MD5 5656c647cf3337aedbc5e5073eb31c3b
BLAKE2b-256 a404341cd9200b30a9ff2197cdeaa36e37bd59c0403cdb79e10ef1da9637816e

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

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

This release

0.2.5 This release

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