Observed since 20 Oct, 20:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Runtime policy enforcement for AI agents
Runtime policy enforcement for AI agents. One line to protect your users.
AgentProof ensures your AI agents never take unauthorized actions. Write policies in the Aegis language, compile them, and enforce them at runtime with <10ms latency.
pip install agentproof
Requires Python 3.9+. The package includes a pre-compiled Rust native extension — no Rust toolchain needed for installation.
from agentproof import enforce
import openai
client = openai.OpenAI()
safe_client = enforce(client, policy="guard.aegisc")
# Use exactly as before — AgentProof intercepts every tool call
response = safe_client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Check the weather"}],
tools=[...],
)
If the agent tries to call an unauthorized tool:
agentproof.EnforcementError: AgentProof: External HTTP calls are not permitted
from agentproof import AgentProofCallbackHandler
handler = AgentProofCallbackHandler(policy="guard.aegisc")
agent = create_react_agent(llm, tools, callbacks=[handler])
For custom frameworks or advanced use cases:
from agentproof import PolicyEngine
engine = PolicyEngine.from_file("guard.aegisc")
result = engine.evaluate("tool_call", {
"tool": "http_request",
"url": "https://api.external.com/data",
"method": "POST",
})
print(result.verdict) # "deny"
print(result.reason) # "External request to unapproved destination"
print(result.eval_time_us) # 42 (microseconds)
Wrap individual tool functions:
from agentproof import intercept_tool_call
engine = PolicyEngine.from_file("guard.aegisc")
@intercept_tool_call(engine)
def send_email(to: str, subject: str, body: str):
...
Policies are written in the Aegis language and compiled with the aegisc CLI:
policy DataGuard {
severity high
scope tool_call, data_access
on tool_call {
when event.tool contains "http"
deny with "External HTTP calls blocked"
}
proof NoDataLeaks {
invariant InternalOnly {
always(
none(context.tool_calls, c =>
c.url starts_with "http://external"
)
)
}
}
}
aegisc compile guard.aegis -o guard.aegisc
The compiler transforms temporal invariants (always, eventually, until, never) into deterministic state machines. At runtime, the verifier advances these automata on every event — no regex, no string matching, no validators. Mathematical guarantees.
Agent → tool call → AgentProof intercepts → Policy engine evaluates → Verdict
↓
allow / deny / audit / redact
The enforce() wrapper supports three modes:
# Raise an exception on deny (default)
safe_client = enforce(client, policy="guard.aegisc", on_deny="raise")
# Block silently (same behavior, different semantics)
safe_client = enforce(client, policy="guard.aegisc", on_deny="block")
# Monitor mode — log denials but allow all actions
safe_client = enforce(client, policy="guard.aegisc", on_deny="log")
Monitor mode is useful for deploying AgentProof alongside an existing agent to see what would be blocked before turning on enforcement.
The base package has zero Python dependencies beyond the compiled Rust extension. Framework integrations are optional:
pip install agentproof[openai] # adds openai>=1.0
pip install agentproof[langchain] # adds langchain-core>=0.1
If the Rust engine returns an error or the pyo3 bridge fails for any reason, the default behavior is to deny the action, not allow it. This is a security product — silent failures must not become silent permissions.
If you want to build the native extension yourself:
# Prerequisites: Rust stable toolchain + maturin
pip install maturin
# Build in development mode
cd agentproof-python
maturin develop
# Run tests
pytest
This SDK is the Python interface to AgentProof's compiler and runtime verifier. The full project, including the Aegis language specification, is at github.com/ScottsSecondAct/agentproof.
Apache 2.0
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 31 Mar 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d7a28e55a6be2161f74ff00269431898c95f405dd9c336cedde8fd243be50760