Skip to main content

Sigmodx SDK for invoice approval agent instrumentation

Project description

Sigmodx Python SDK

Install:

pip install sigmodx

Quickstart

from decimal import Decimal
from sigmodx import SigmodxClient, InvoiceDecision, hash_inputs

payload = {
    "invoice_amount": 142500.00,
    "vendor_id": "VENDOR-4821",
    "po_reference": "PO-4821",
    "invoice_reference": "INV-2026-0042",
}

client = SigmodxClient(api_key="sk_...", agent_id="your-agent-uuid")
decision = InvoiceDecision(
    decision_type="approve",
    input_hash=hash_inputs(payload),
    rationale="Within delegated authority; PO matches contract.",
    confidence=0.94,
    invoice_amount=Decimal("142500.00"),
    vendor_name="Acme Consulting LLC",
    vendor_id="VENDOR-4821",
    po_reference="PO-4821",
    invoice_reference="INV-2026-0042",
    delegated_authority_limit=Decimal("500000.00"),
)

result = client.submit_invoice_decision(decision)
print(result.decision_event_id, result.requires_human_approval)
client.close()

hash_inputs()

Include structural fields your agent used to decide (amounts, references, field names). Keys are sorted before hashing so the digest is stable.

Security: Never include sensitive field values in hash_inputs() if you do not want them derivable. Hash the structural payload — field names, amounts, references. Sigmodx stores only the hash.

Error handling

  • AgentBlockedError — agent reliability state is BLOCK (HTTP 403).
  • SigmodxError — other API failures.

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.3.0.tar.gz (5.2 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.3.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigmodx-0.3.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sigmodx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 add70d0f719f303fd425215c45b68f17b5e59d27bfc917cb66385ef0bed3eefb
MD5 dfe1449aa291e7345f0597e75cdbf769
BLAKE2b-256 0dace03d22fb1cf31f3109c636c2331d792d6db4a61b9fc9715f92a0675ace0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sigmodx-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sigmodx-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dac5ae138ba5d08903e26a411c4d465b02a8441fc5839d711d2821180fd951cc
MD5 39d62cdf468662f1dd210969041372e1
BLAKE2b-256 f13cb76fc521d7171630e60ba4ed71386b1e9bd28113d161f09b4bb47e1fa31f

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