Catalog PyPI
PACKAGE EXPLORERView in registry

agentrust-py

PyPI

AgentTrust Edge — Full Governance Platform. Policy Engine + MAD Classifier + HITL + Kill Switch.

agentsaiauditcompliancegovernancellmsafetytrust
Versions collected1
Direct dependencies15From release 0.0.4
Last observed20 Oct, 23:15 UTC

README

Version 0.0.4 documentation

agentrust-py

PyPI License Python

Python SDK for AgentTrust Edge — runtime AI agent governance with zero-config startup and env-only rollback.


Install

pip install "agentrust-py[embedded,retry]"

30-second quickstart

from  import harness, embed_gateway

# Optional: start an in-process SQLite gateway (dev / air-gap)
embed_gateway()

@harness
def my_agent(user: str, input: str) -> dict:
    """Decorated agent. Governance happens automatically after each call."""
    return {"answer": "42"}

result = my_agent(user="alice", input="What is the meaning of life?")
print(result)   # {"answer": "42"} — or BlockedError if policy rejects it

Note on imports: The PyPI package name is agentrust-py; the Python module is agentrust_sdk. All imports use from agentrust_sdk import ....


Rollback (no code change, no image rebuild)

export AGENTRUST_ENABLED=false
# restart process — @harness becomes a no-op identity wrapper

Configuration

Every tunable is an env var — no config file required for basic usage.

VariableDefaultPurpose
AGENTRUST_ENABLEDtrueMaster kill-switch
AGENTRUST_GATEWAY_URLhttp://localhost:8000Gateway URL
AGENTRUST_FAILURE_MODEopenopen | closed | queue
AGENTRUST_TIMEOUT_SEC10Request timeout
AGENTRUST_RETRY_ATTEMPTS3Retries (needs [retry])
AGENTRUST_KEY—API key

Deployment ladder (env-only)

# Dev — embedded SQLite, no external services
AGENTRUST_ENABLED=true
# (call embed_gateway() at startup)

# Staging — remote gateway, fail safe
AGENTRUST_GATEWAY_URL=https://agentrust-staging.internal:8000
AGENTRUST_KEY=at_...
AGENTRUST_FAILURE_MODE=closed

# Production
AGENTRUST_GATEWAY_URL=https://agentrust.internal:8000
AGENTRUST_FAILURE_MODE=open
AGENTRUST_RETRY_ATTEMPTS=5

App code is identical across all three environments.


Failure modes

ModeGateway unreachable behaviour
open (default)Log warning, return approve response — agent continues
closedRaise GatewayUnavailableError — agent is blocked
queueWrite request to local SQLite buffer; return approve response

Queue mode note: The local buffer is written but not automatically replayed in the current release. Use agentrust export to inspect buffered records. A background drain/replay worker is on the roadmap.


Extras

ExtraInstalls
embeddeduvicorn, fastapi — in-process gateway via embed_gateway()
retrytenacity — exponential backoff
otelopentelemetry-sdk, opentelemetry-api — traces + metrics
langgraphLangGraph AgentTrustNode adapter
crewaiCrewAI AgentTrustCallback adapter
fullAll of the above

Tiers

TierCapabilities
OSSLocal schema validation, no API key
FreeEvidence, tool trust, auto-decision, local audit
DeveloperConfidence scoring, risk engine, built-in policies
TeamFramework adapters, custom policies, analytics, review queue
EnterpriseLLM judge, trust chain, SSO, self-hosted, SOC2 export

CLI

agentrust init              # create ~/.agentrust/config.yaml
agentrust status            # tier + gateway reachability
agentrust export ./out.jsonl
agentrust purge --confirm
agentrust disable

License

Apache-2.0. Framework adapters and enterprise features require a paid subscription.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.429 Sept 202615

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
agent-trust-os/agent-trust-sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:15 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ee5ad405b24e5ba8ca4e0fe6ccd40b5c778e911517006413624bad9521d674d5