Python SDK for Sigmodx — audit and verification infrastructure for AI agents making consequential decisions.
pip install sigmodxfrom sigmodx import SigmodxClient
client = SigmodxClient(
api_key="your-api-key", # from sigmodx.com org dashboard
agent_id="your-agent-uuid" # agent registered in Sigmodx
)
# Hash your agent's inputs before deciding
# Your invoice data never leaves your environment
input_hash = client.hash_inputs({
"invoice_id": "INV-2026-0042",
"vendor_id": "VENDOR-4821",
"amount": 32000,
"po_ref": "PO-4821"
})
# Submit the decision
result = client.submit_invoice_decision(
decision_type="approve",
input_hash=input_hash,
rationale="Invoice matches PO. Vendor in good standing. Within limit.",
invoice_amount=32000,
vendor_id="VENDOR-4821"
)
print(result.decision_event_id) # record this
print(result.agent_state) # ALLOW | LIMIT | BLOCK
print(result.requires_human_approval)
# Record the outcome later
client.record_outcome(
decision_event_id=result.decision_event_id,
outcome="processed"
)-
Hash inputs —
hash_inputs()creates a SHA-256 fingerprint of what your agent consumed. The raw data never leaves your environment. -
Submit decision — the decision type, hash, and rationale are recorded in Sigmodx's append-only audit trail.
-
Record outcome — after execution, record what happened. Immutable once set.
-
Attestation — at the end of each period, your org admin generates an attestation. Auditors verify it at sigmodx.com/verify.
If the agent's reliability state is BLOCK, submit_invoice_decision()
raises AgentBlockedError. Handle it explicitly:
from sigmodx import SigmodxClient, AgentBlockedError
try:
result = client.submit_invoice_decision(...)
except AgentBlockedError as e:
# Agent is blocked — do not proceed with execution
log.warning(f"Agent blocked: {e.reason}")
return escalate_to_human(invoice)