Skip to main content

Python SDK for Sigmodx — AI agent audit infrastructure

Project description

sigmodx — Python SDK

Python SDK for Sigmodx — audit and verification infrastructure for AI agents making consequential decisions.

Installation

pip install sigmodx

Quickstart

from 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"
)

How it works

  1. Hash inputshash_inputs() creates a SHA-256 fingerprint of what your agent consumed. The raw data never leaves your environment.

  2. Submit decision — the decision type, hash, and rationale are recorded in Sigmodx's append-only audit trail.

  3. Record outcome — after execution, record what happened. Immutable once set.

  4. Attestation — at the end of each period, your org admin generates an attestation. Auditors verify it at sigmodx.com/verify.

Agent state

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)

Links

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

sigmodx-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

sigmodx-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file sigmodx-0.1.0.tar.gz.

File metadata

  • Download URL: sigmodx-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sigmodx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 042b9e111cf640d7ad026837ea3a9210cd2e5636db6fc50b61f4b51b5da5058c
MD5 ff81d7610ba527264d94c81e4fa36a93
BLAKE2b-256 1736b94a4f0d8f5a2be9f9c178675d523e285562f7da7ddf5724b6b906a2a906

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigmodx-0.1.0.tar.gz:

Publisher: publish.yml on Sigmodx/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sigmodx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sigmodx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sigmodx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b4600779461eb81242b628551773913a7c7331c66e35a0db92fe8b33c0bf7c6
MD5 458ceb9c64efe5e39a6ecdb7cd17b6eb
BLAKE2b-256 e6639ef0c44c515fd02d1bc7ee3795bc6e0f7801cc84627c10139c07c32bdd1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigmodx-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Sigmodx/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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