statis-ai
The trust layer for production AI agents. One decorator turns any function into a policy-gated, audit-logged tool call. No agent framework lock-in, no proxy in front of your model, no rewrites.
statis-ai is the Python SDK for Statis. Drop it in
front of any side-effectful function your agent calls — Stripe refunds,
internal APIs, database writes — and Statis evaluates a deterministic policy
before the function executes, then writes a signed receipt of the decision.
from statis import gate
@gate(action_name="issue_refund")
def issue_refund(charge_id: str, recipient_email: str, cents: int) -> dict:
return stripe.Refund.create(charge=charge_id, amount=cents)
The decorator does three things on every call:
- Context In — Strips prompt injections, redacts PII, meters tokens
before the model call. (Re-exported from
statis-kit, our open-source pre-call hygiene library.) - Action Out — Sends the proposed call to the Statis policy engine.
Approved → executes. Denied → raises
ActionDeniedErrorwith a receipt. Escalated → human approves in the console; agent resumes. - Receipt Through — Every decision is recorded in an Ed25519-signed,
hash-chained ledger. Verifiable offline with the public key at
/.well-known/aarm-pubkey.
Install
pip install statis-ai
# optional: receipt signature verification (offline)
pip install "statis-ai[verify]"
Set your API key:
export STATIS_API_KEY=st_...
(Get one for free during beta at statis.dev.)
Quick start — gate a function
from statis import gate, ActionDeniedError
@gate(
action_name="issue_refund",
entity=lambda: {"customer_id": "CUST-7781"},
target_system="stripe",
timeout_s=10,
)
def issue_refund(charge_id: str, recipient_email: str, cents: int) -> dict:
"""Issue a Stripe refund. Only runs after the policy engine approves."""
return {"id": f"re_{charge_id[-6:]}", "amount": cents, "status": "succeeded"}
try:
result = issue_refund(
charge_id="ch_3PxOrder9921",
recipient_email="alice@bigcustomer.com",
cents=4999,
)
print("approved:", result)
except ActionDeniedError as e:
print(f"denied by rule {e.receipt.rule_id}: {e}")
# e.receipt has receipt_id, hash, signature — audit-ready, no extra wiring.
Policy as code
Rules are deterministic YAML, evaluated server-side per call. No LLM in the decision path:
- rule_id: refund_recipient_must_match_state
action_type: issue_refund
conditions:
recipient_matches_customer_of_record: true
decision: APPROVED
priority: 100
Apply with the CLI:
statis policy apply policies.yaml
What you get out of the box
@statis.gatedecorator — sync + async, idempotent, with timeout + escalationStatisClient— lower-level access for custom flowsprocess_context()— re-exported fromstatis-kitfor one-line pre-call hygiene (Guard + Compressor + Meter)- CLI —
statis init,statis policy apply,statis receipts list,statis receipts verify - Distributed lock + at-most-once execution semantics
- Console (web UI) for approvals, escalations, kill-switch, and receipt verification
Free during beta
The Developer Cloud (policy engine, ledger, console) is free while in beta — no Stripe at launch. Self-hosted Enterprise (SSO, SCIM, VPC, compliance exports) is contract-driven.
Links
- Homepage → statis.dev
- Source → github.com/statis-ai/statis-core
- OSS kit →
statis-kit(the Context-In primitives — works offline, no API key required) - TypeScript SDK →
npm install statis-ai
License
MIT.
Metadata
Release files for statis-ai 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| statis_ai-0.4.2.tar.gz | 26.9 kB | Without provenance | Details for statis_ai-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| statis_ai-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for statis_ai-0.4.2-py3-none-any.whl |
Total release size: 53.0 kB
Release files / statis_ai-0.4.2.tar.gz
| Download URL | statis_ai-0.4.2.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11da941aab129713bbfa204c131190a5dbedb849d1d8ae8a8f6ed60e4be9e9cf
|
|
BLAKE2b-256 checksum How to use checksums |
a714326d10b500d4f6216290181c5dbe84c2bf843f27781df4f131b864b7acc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / statis_ai-0.4.2-py3-none-any.whl
| Download URL | statis_ai-0.4.2-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8836b99cbfe9496edccdccc5b119e0367d1042ffc0d681cdbf73ff42a30c59f6
|
|
BLAKE2b-256 checksum How to use checksums |
18736aec29da823a548549ffbb25fd3d289b3981b730df7ee443ce17dbdfced5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for statis-ai 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.