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 isBLOCK(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sigmodx-0.2.0.tar.gz.
File metadata
- Download URL: sigmodx-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da4142c0596859e5d66edae2e3ddd8d094e5c3911a68d48f5270e437085674c5
|
|
| MD5 |
0c6331fabf5afde9c2eb80cc6d4b6d54
|
|
| BLAKE2b-256 |
75fa5ba9158112639a738c48594cc785471c686805f6b68b72e83f64ffe834c8
|
File details
Details for the file sigmodx-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sigmodx-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ed8d098c5ab4fdd5fb20d338a2b5936019ade9ff5da4d43696a195cf1b84ff3
|
|
| MD5 |
395fe056247ae485c9effaf6df04be50
|
|
| BLAKE2b-256 |
19aaec63ead36ceb02ecded6d76126f0feb7c56f7e9c3ea2e6285b8cb7e343e6
|