Runtime AI Governance - govern any AI agent tool call
Project description
PhronEdge
Constitutional AI governance for every agent, every tool, every call.
pip install phronedge
What it does
PhronEdge wraps your AI agent tool calls with 7 governance checkpoints. Under 50ms. Your data stays in your runtime. Works with any framework.
from phronedge import PhronEdge
pe = PhronEdge(agent_id="fraud-analyst")
@pe.govern("claim_lookup", action="read", jurisdiction="DE")
def claim_lookup(claim_id: str) -> str:
"""Look up an insurance claim by ID."""
return db.query(claim_id)
# This call passes through 7 checkpoints before executing
result = claim_lookup("CLM-2026-001")
Frameworks
Works with every major agent framework. One decorator. Same pattern.
| Framework | Tested | Decorator order |
|---|---|---|
| LangGraph | Yes | @tool outside, @pe.govern inside |
| CrewAI | Yes | @tool("name") outside, @pe.govern inside |
| OpenAI Agents | Yes | @function_tool outside, @pe.govern inside |
| LlamaIndex | Yes | @pe.govern only (no framework decorator needed) |
| Google ADK | Yes | @pe.govern only (no framework decorator needed) |
Multi-agent
One API key. Multiple agents. Each with independent credentials, tools, and clearances.
pe_fraud = PhronEdge(agent_id="fraud-analyst")
pe_kyc = PhronEdge(agent_id="agt-kyc-orch-v1")
pe_settle = PhronEdge(agent_id="agt-settle-v1")
7 checkpoints
Every governed tool call passes through:
- Credential validation : ECDSA P-256 signature verified
- Tool permission : Is this tool in the signed credential?
- Data classification : Does agent clearance match the data level?
- PII detection : Input scanned for personal data
- Jurisdiction check : Is this jurisdiction allowed for this tool?
- Behavioral analysis : Is this call within normal baseline?
- Output constraints : Response scanned before return
CLI
# Code quality
phronedge scan my_agent.py # Find ungoverned tools
phronedge scan my_agent.py --strict # CI gate: exit 1 if ungoverned
phronedge verify # Test connection + credential
# Policy lifecycle
phronedge policy build policy.yaml # Preview (no deploy)
phronedge policy deploy policy.yaml # Sign + deploy + issue credentials
phronedge policy status # Show agents and tools
# Agent lifecycle
phronedge agent list # List all governed agents
phronedge agent quarantine <id> <reason> # Block all tool calls
phronedge agent reinstate <id> <reason> # Resume tool calls
# Audit chain
phronedge chain verify # Verify hash chain integrity
phronedge chain events --limit 20 # Show recent events
# Export
phronedge export rego -o policy.rego # OPA Rego
phronedge export yaml -o policy.yaml # YAML
phronedge export json -o policy.json # JSON
Enterprise
Deploy PhronEdge on your own infrastructure. Same SDK. Same @pe.govern(). One env var change.
# SaaS (default)
export PHRONEDGE_API_KEY=pe_live_xxx
# Enterprise (your k8s, your KMS, your Postgres)
export PHRONEDGE_API_KEY=pe_live_xxx
export PHRONEDGE_GATEWAY_URL=https://governance.internal.bank.com/api/v1
Per-tenant ECDSA P-256 signing keys. Independent verification via public key endpoint. Multi-cloud KMS (AWS, GCP, Azure). Storage abstraction (Firestore or Postgres). Helm chart for k8s. Docker, ECS, Cloud Run. Your developer's code doesn't change.
196 jurisdictions. 30 controls. SHA-256 hash-chained audit trail. Tamper-proof. Mathematically verifiable.
Documentation
- Quickstart
- LangGraph
- CrewAI
- Google ADK
- OpenAI Agents
- LlamaIndex
- SDK Reference
- CLI Reference
- API Reference
- Multi-Agent
- Console Guide
License
MIT
Project details
Release history Release notifications | RSS feed
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 phronedge-2.4.4.tar.gz.
File metadata
- Download URL: phronedge-2.4.4.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
077653f21ed91e80aeb81c8821f9cfc2bf7b6ed5eb6602543bed541e61a36676
|
|
| MD5 |
50e0997ff6a08df9211e0abee55f0cbb
|
|
| BLAKE2b-256 |
4e19216a8c23d7ab5e30d24c1d83619024f4361bffc8dc5f740fafbe9f9fe187
|
File details
Details for the file phronedge-2.4.4-py3-none-any.whl.
File metadata
- Download URL: phronedge-2.4.4-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef0d78a6060b72d5ed5629032ec6c4d61a5827b58d841db5d55935d1fc23a29b
|
|
| MD5 |
8da0c065845ef524a10ed79507ec7af3
|
|
| BLAKE2b-256 |
364de372253cc258a04cf5af0d00e3f578ee1ca375b36e47c2b3d96ab21f867a
|