Policy-based governance for AI agent tool calls.
Aegis
<strong>The simplest way to govern AI agent actions. No infra. No lock-in. Just Python.</strong>
<code>pip install agent-aegis</code> → YAML policy → governance in 5 minutes.
<strong>Works with LangChain, CrewAI, OpenAI, Anthropic, MCP, and more.</strong>
Try it Live in Your Browser • Quick Start • How It Works • Documentation • Integrations • Contributing
English • 한국어
The Problem
AI agents are getting real-world access. Without governance, a hallucinating agent can:
- Bulk-delete your CRM contacts
- Submit wrong forms to government portals
- Trigger irreversible API calls at 3am
- Run up cloud bills with infinite loops
There's no sudo for AI agents. Until now.
The Solution
Aegis is a Python middleware that sits between your AI agent and the actions it takes. It's not a separate server you have to run -- you import it directly into your agent code and it wraps every action with policy checks, approval gates, and audit logging.
Your Agent Aegis Real World
| | |
|-- "delete all users" ---> | |
| [Policy check] |
| risk=CRITICAL |
| approval=BLOCK |
| |--- X (blocked, logged) -----> |
| | |
|-- "read contacts" ------> | |
| [Policy check] |
| risk=LOW |
| approval=AUTO |
| |--- execute (logged) --------> |
| | |
|-- "bulk update 500" ----> | |
| [Policy check] |
| risk=HIGH |
| approval=APPROVE |
| |--- ask human (Slack/CLI) ---> |
| |<-- "approved" --------------- |
| |--- execute (logged) --------> |
Copy, paste, run — zero config needed:
from aegis import Action, Policy
policy = Policy.from_dict({
"version": "1",
"defaults": {"risk_level": "low", "approval": "auto"},
"rules": [{"name": "block_delete", "match": {"type": "delete_*"},
Tools (1)
check_policyEvaluates an agent action against defined YAML policies to determine risk level and approval requirements.Configuration
{"mcpServers": {"aegis": {"command": "python", "args": ["-m", "aegis.mcp"]}}}