decidio (Python)
The one-line approval gate for AI-agent actions — the agent suspends for human approval and resumes, sealing a portable Authority Receipt the customer owns. Decidio gates (proceed | route | block) + records; the agent executes its own action on resume. Decidio never executes and holds no downstream credentials. Python-first, with a TS twin (@decidio/sdk) that emits an identical request + receipt (conformance-asserted).
from decidio import guard
# one line — same surface in every runtime
create_opp = guard.protect(
create_opp_raw,
lambda o: {"action": "createOpportunity", "amount": o["Amount"], "scope": "Opportunity"},
)
- proceed → runs immediately (auto-approved under a named, versioned policy rule), sealed.
- route → suspends (
DecidioSuspended): parks the call args in an agent-side store, the process may exit; resumes when a human approves and re-runs your function. - block → raises
DecidioBlocked; your function never runs.
Setup
pip install decidio
python -m decidio init # sign in, register the agent, mint its API token, write .env, doctor
python -m decidio doctor (config + connectivity), python -m decidio approvals (list/approve/reject pending). The core is stdlib-only; engine adapters and the verifier are optional extras.
Durable resume (real approvals take minutes to days)
A routed action suspends; on approval Decidio POSTs a signed verdict to your resume URL and your function re-runs. Mount the resume handler (fail-closed on a bad/absent signature):
# FastAPI
@app.post("/decidio/resume")
async def decidio_resume(req: Request):
return guard.resume.handle(await req.body(), req.headers.get("x-decidio-signature"))
No inbound URL? guard.resume.worker() polls instead (a durable worker, not the request path blocking). Re-execution is single-use (no double-write).
Engine adapters (durable suspend on the engine you already run)
Thin translators onto each engine's native durable wait — pip install decidio[langgraph|temporal|openai]:
# LangGraph — true drop-in (interrupt() is contextvar-based)
create_opp = guard.protect(create_opp_raw, describe, adapter="langgraph")
# Inngest / Temporal / OpenAI Agents — pass the engine handle:
await decidio.adapters.inngest.gate(step, guard, ctx, run=lambda: create_opp_raw(o))
await decidio.adapters.temporal.gate(wf, guard, ctx, run=..., )
resolved, pending = decidio.adapters.openai.gate_interruptions(guard, run_state, describe)
Own the record — verify it yourself
Every outcome is a sealed W3C-VC (Ed25519 did:key), tamper-evident and offline-verifiable with no Decidio dependency:
pip install decidio[verify]
python -m decidio.verify receipt.json
Invariants
Decidio never executes downstream / holds no downstream credentials (the only downstream touch is the opt-in, read-only read-back tier) · holds none of the parked payload · fail-closed signatures · single-use idempotent resume · deny-by-default policy · request-bound identity proof. The agent executes; Decidio gates, records, and signals.
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 decidio-0.1.0.tar.gz.
File metadata
- Download URL: decidio-0.1.0.tar.gz
- Upload date:
- Size: 41.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c7df34735a6fbb04a7629f43b51c9957300f18b18d040c0f629c4bfd57b7c38
|
|
| MD5 |
4cbc59cb1693aff93f6ff7436974d1c9
|
|
| BLAKE2b-256 |
e3023dd77012321d510aba59d636ac4e8321ce256868c2fbeb3b062fc8b9dace
|
File details
Details for the file decidio-0.1.0-py3-none-any.whl.
File metadata
- Download URL: decidio-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7cc1ebbbbf8d8a1b38d21f508afd9a0404d39c4dfcf3909982978e3f335af16
|
|
| MD5 |
a93bfba0e3349481907a33a27b138f4b
|
|
| BLAKE2b-256 |
41827a6eab559ded0953e7ed18238116ef21fa59c49b369734a2d0b1fafa27dd
|