Skip to main content

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:

  1. Credential validation : ECDSA P-256 signature verified
  2. Tool permission : Is this tool in the signed credential?
  3. Data classification : Does agent clearance match the data level?
  4. PII detection : Input scanned for personal data
  5. Jurisdiction check : Is this jurisdiction allowed for this tool?
  6. Behavioral analysis : Is this call within normal baseline?
  7. Output constraints : Response scanned before return

CLI

# ─────────────────────────────────────────────
# SETUP (prereqs)
# ─────────────────────────────────────────────
pip install phronedge
export PHRONEDGE_API_KEY=pe_live_your_key_here
# Optional: override for enterprise / local
# export PHRONEDGE_GATEWAY_URL=http://localhost:8080/api/v1

# ─────────────────────────────────────────────
# PRE-FLIGHT (existing in 2.3.0)
# ─────────────────────────────────────────────
phronedge verify
phronedge verify --agent fraud-analyst

# ─────────────────────────────────────────────
# POLICY LIFECYCLE (new in 2.4.0)
# ─────────────────────────────────────────────
phronedge policy build policy.yaml
phronedge policy deploy policy.yaml
phronedge policy status

# ─────────────────────────────────────────────
# EXPORT (existing in 2.3.0)
# ─────────────────────────────────────────────
phronedge export rego -o policy.rego
phronedge export yaml -o gov.yaml
phronedge export json -o policy.json
# With agent scope
phronedge export rego --agent fraud-analyst -o fraud.rego

# ─────────────────────────────────────────────
# AGENT LIFECYCLE (new in 2.4.0)
# ─────────────────────────────────────────────
phronedge agent list
phronedge agent quarantine fraud-analyst "suspicious behavior detected"
phronedge agent reinstate fraud-analyst "investigation cleared"

# ─────────────────────────────────────────────
# CHAIN & AUDIT (new in 2.4.0)
# ─────────────────────────────────────────────
phronedge chain verify
phronedge chain events --limit 20

# ─────────────────────────────────────────────
# CODE QUALITY (existing in 2.3.0)
# ─────────────────────────────────────────────
phronedge scan my_agent.py
phronedge scan my_agent.py --strict

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

License

MIT

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

phronedge-2.5.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phronedge-2.5.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file phronedge-2.5.0.tar.gz.

File metadata

  • Download URL: phronedge-2.5.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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

Hashes for phronedge-2.5.0.tar.gz
Algorithm Hash digest
SHA256 c46b68b6af95d5fdbb6be1f69d85baf21d75d2948b95d577ff494e6531c5f235
MD5 16ab37027072f9e61d59a93b1b59ecc4
BLAKE2b-256 342f0c8be833c129f7d2380f5732546a5f935910c821ae4a5cddb02da055c42a

See more details on using hashes here.

File details

Details for the file phronedge-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: phronedge-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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

Hashes for phronedge-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff52bd5e9f64be07d5faea8f71b001637fe3ae5b3bb84f0d8163cd40f54b4243
MD5 0416070661f7e13b8c2dad339d4d9cf8
BLAKE2b-256 92e03c2e1c48b4d19267d08a6408abe6871afffae646c66f5324c19c4b9797bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page