What is Aegis
Every AI agent framework reinvents the same governance primitives — and each one does it slightly differently. Aegis is the abstraction layer that unifies them.
에이전트 강화
게시자의 자체 명령입니다. PlugMCP 엔드포인트가 아닙니다.
Host a copy with our keys and logs.
uvx agent-aegis==0.1.6Claude Code에는 로컬 명령용 설치 링크가 없습니다. 아래 명령을 복사해 터미널에서 실행합니다.
AEGIS_POLICY_PATH=<value> claude mcp add io.github.acacian-aegis -- uvx agent-aegis==0.1.6터미널에서 실행합니다.
{ "mcpServers": { "io.github.acacian-aegis": { "command": "uvx", "args": [ "agent-aegis==0.1.6" ], "env": { "AEGIS_POLICY_PATH": "<value>" } } }}claude_desktop_config.json
원격 URL인가요, 내 컴퓨터에서 실행하는 명령인가요? 두 설치 방식의 차이
PlugMCP에서 실행
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
실행게시자 제공
Every AI agent framework reinvents the same governance primitives — and each one does it slightly differently. Aegis is the abstraction layer that unifies them.
Policy-based governance for AI agent tool calls. YAML policy, approval gates, audit logging.
| Examples |
|---|
| 1. Primitives | A universal contract for every tool call | Action, ActionClaim, Policy, Result, DelegationChain, AuditEvent |
| 2. Adapters | Auto-instrument any framework through its own hooks | LangChain callbacks, CrewAI BeforeToolCallHook, OpenAI Agents tracing, Google ADK BasePlugin, MCP transport, DSPy modules, httpx middleware, Playwright context |
| 3. Governance | Declarative primitives you compose into policy | Prompt injection / PII / leak / toxicity guardrails, RBAC, rate limit, cost budget, drift detection, anomaly scoring, trust delegation, justification gap, selection audit, Merkle audit chain |
| 4. Lifecycle | One runtime, every stage of agent ops | Scan → Instrument → Policy CI/CD → Runtime → Proxy → Audit |
import aegis
aegis.auto_instrument() # 12 frameworks governed. No other code changes.
You don't write a LangChain guardrail and a CrewAI guardrail and an OpenAI guardrail — you write one Policy and every framework inherits it.
They solve a different problem, and mostly a text-shaped one. Guardrails AI validates model output against a hub of validators; NeMo Guardrails scripts conversational and tool policy in the Colang DSL; Snyk Agent Scan — Invariant Labs' mcp-scan, since the Snyk acquisition — scans MCP servers and agent skills for known risk patterns and can proxy them at runtime; LLM Guard chained input/output scanners until it was archived in July 2026. Each one you wire in yourself, at a call site you choose. Aegis starts from the other end: auto_instrument() finds the frameworks already installed and instruments them in place, so one Policy covers all of them without a line of agent code changing. What it enforces is agent-shaped rather than prompt-shaped — delegation chains under a monotone trust constraint, audits of what an agent excluded rather than what it picked, the distance between an agent's declared intent and its measured impact, and a tamper-evident audit chain. All of it is deterministic, so there is no second model sitting in the request path. These are not exclusive choices: a semantic or model-based detector drops into GuardrailEngine.add() alongside the built-ins.
The contract every adapter maps into. Framework-agnostic by design.
Every governance feature in Aegis — anomaly detection, cost budgets, drift, cascade guards, kill switches — is a composition of these primitives. Read the Concepts guide to see how they fit together.
One API. 12 agent frameworks + 3 protocol-level adapters.
auto_instrument() detects what's installed and patches only those — no hard dependencies. Custom adapters use the same BaseAdapter interface. Every adapter above is exercised against the current upstream release daily by the integration workflow, which drives each framework's real entrypoint and asserts a guardrail fires — the unit suite fakes these frameworks, so it cannot see upstream drift on its own.
Integration policy. Native extension points win wherever one exists that can actually block — Google ADK's BasePlugin and CrewAI's BeforeToolCallHook both do, and there auto_instrument() patches only enough to install the native object. Pydantic AI and the OpenAI Agents SDK ship native implementations you opt into (AbstractCapability, tool_input_guardrail) alongside a patch-based path for the zero-code case. Everything else is patched because no blocking hook exists: the raw OpenAI/Anthropic SDKs and DSPy expose none, and LlamaIndex's instrumentation dispatcher emits events but swallows handler exceptions, so it can observe and not enforce.
The Pydantic AI integration is the reason this policy is written down. It was monkey-patched until core maintainer DouweM reviewed it — "It doesn't look like those features are actually exposed as Pydantic AI capabilities?" — and was rebuilt on the native extension API in response (src/aegis/contrib/pydantic_ai.py; the review is pydantic-ai#4888).
Patching is the fallback, not the preference — it is the part most exposed to upstream change, which is why the integration workflow exists.
Deterministic regex — no LLM calls, no network. 2.65ms cold / <1µs warm per check.
The same primitives, five different entry points. Pick whichever matches your workflow.
One line. Any framework.
import aegis
aegis.auto_instrument()
Or zero code changes — AEGIS_INSTRUMENT=1 python my_agent.py. Injection blocking, PII masking, prompt-leak warnings, audit trail, and policy enforcement become active for every LangChain / CrewAI / OpenAI / Anthropic / LiteLLM / ADK / DSPy / LlamaIndex / Pydantic AI call.
Pydantic AI native capability — no monkey-patching, explicit per-agent control:
from pydantic_ai import Agent
from aegis.contrib.pydantic_ai import AegisCapability
agent = Agent(
"openai:gpt-4o-mini",
capabilities=[AegisCapability.default()], # injection, PII, toxicity, prompt-leak, hallucination
)
result = await agent.run("What is AI governance?")
Find ungoverned AI calls before they ship.
pip install agent-aegis
aegis scan .
Aegis Governance Scan
=====================
Scanned: 47 files in ./src
Found 5 ungoverned tool call(s):
agent.py:12 OpenAI function call with tools= — no governance wrapper [ASI02]
tools.py:8 LangChain @tool "search_db" — no policy check [ASI02]
llm.py:21 LiteLLM litellm.completion() — no governance wrapper [ASI02]
run.py:5 subprocess subprocess.run — direct shell execution [ASI08]
api.py:14 HTTP requests.post — raw HTTP in agent code [ASI07]
Governance Score: D (5 ungoverned call(s))
Supports --format json|sarif|suggest, --threshold A-F, .aegisscanignore, and inline # aegis: ignore pragmas. Auto-fix with aegis scan --fix.
Security tools protect at runtime. Aegis also manages the policy lifecycle — the same way you test and ship code.
aegis plan current.yaml proposed.yaml --audit-db aegis_audit.db
# Policy Impact Analysis
# Rules: 2 added, 1 removed, 3 modified
# Impact (replayed 1,247 actions):
# 23 actions would change from AUTO → BLOCK
aegis test policy.yaml tests.yaml # Run in CI
aegis test policy.yaml --generate # Auto-generate test suite
aegis test new.yaml tests.yaml --regression old.yaml # Regression check
# .github/workflows/policy-check.yml
- uses: Acacian/aegis@main
with:
policy: aegis.yaml
tests: tests.yaml
fail-on-regression: true
Or block ungoverned calls at PR time:
- uses: Acacian/[email protected]
with:
command: scan
fail-on-ungoverned: true
Every call is logged to a tamper-evident Merkle chain, with mappings to EU AI Act / NIST AI RMF / SOC2 built in.
aegis audit
ID Session Action Target Risk Decision Result
1 a1b2c3d4... read crm LOW auto success
2 a1b2c3d4... bulk_update crm HIGH approved success
3 a1b2c3d4... delete crm CRITICAL block blocked
SQLite + JSONL + webhook sinks. Ed25519 signing for long-term evidence. See the Compliance guide.
Centralized governance for multiple agents. Each agent connects via SDK, server handles policy, guardrails, audit, and compliance.
pip install 'agent-aegis[server]'
aegis-server
37 REST endpoints + WebSocket audit streaming + web dashboard. Agents auto-register, send heartbeats, and query policy over HTTP. See Governance Framework Server.
pip install agent-aegis
import aegis
aegis.auto_instrument()
# All 12 frameworks now governed with default guardrails.
Or use a YAML policy for full control:
aegis init # Creates aegis.yaml
# aegis.yaml
guardrails:
pii: { enabled: true, action: mask }
injection: { enabled: true, action: block, sensitivity: medium }
policy:
version: "1"
defaults:
risk_level: medium
approval: approve
rules:
- name: read_safe
match: { type: "read*" }
risk_level: low
approval: auto
- name: no_deletes
match: { type: "delete*" }
risk_level: critical
approval: block
pip install agent-aegis # Core (includes auto_instrument for all frameworks)
pip install langchain-aegis # LangChain standalone integration
pip install 'agent-aegis[mcp]' # MCP server + proxy
pip install 'agent-aegis[server]' # REST API + dashboard
pip install 'agent-aegis[all]' # Everything
{
"mcpServers": {
"filesystem": {
"command": "uvx",
"args": ["--from", "agent-aegis[mcp]", "aegis-mcp-proxy",
"--wrap", "npx", "-y",
"@modelcontextprotocol/server-filesystem", "/home"]
}
}
}
Works with Claude Desktop, Cursor, VS Code, Windsurf. STDIO injection protection, tool poisoning detection, rug-pull detection, argument sanitization, policy evaluation, full audit trail.
Run Aegis as a dedicated governance server with REST API, WebSocket streaming, and web dashboard.
pip install 'agent-aegis[server]'
aegis-server --init # Generate aegis-server.yaml
aegis-server # Start server on :8000
37 REST endpoints covering the full governance lifecycle:
Connect with the Python SDK (sync or async):
from aegis import AegisClient
with AegisClient("http://localhost:8000", agent_id="my-agent") as client:
result = client.evaluate("delete", "user_data")
# result["risk_level"] == "CRITICAL", result["is_allowed"] == False
from aegis import AsyncAegisClient
async with AsyncAegisClient("http://localhost:8000", agent_id="my-agent") as client:
result = await client.evaluate("read", "reports")
Config-driven via aegis-server.yaml — guardrails, webhooks (Slack/PagerDuty), rate limiting, cost budgets, and auth all declarative. See aegis-server.example.yaml.
Other tools check inputs and outputs. Aegis governs the decision itself — with primitives no other governance runtime exposes.
aegis scan ./src/ # Detect ungoverned AI calls
aegis score ./src/ --policy policy.yaml # Governance score (0-100)
aegis init # Generate starter policy
aegis validate policy.yaml # Validate syntax
aegis plan current.yaml proposed.yaml # Preview policy changes
aegis test policy.yaml tests.yaml # Policy regression testing
aegis check policy policy.yaml read:crm # Policy decision per action (CI gate)
aegis audit # View audit log
aegis serve policy.yaml # REST API + dashboard
aegis probe policy.yaml # Adversarial policy testing
aegis autopolicy "block deletes" # Natural language → YAML
Original measurements on public agent trace datasets. Stdlib-only, reproducible in 30 seconds.
max-only override limitation discovered during the study.Run the same signal on your own trace:
aegis check drift --trace path/to/trace.jsonl
The CLI reads only the tool_name field — never args, CoT, or prompts — so enterprise users can score prod traces without exfiltrating PII.
We also ran aegis scan across 39 public agent repositories and graded their governance posture: 92% scored an F. That is a finding about the ecosystem, not about any one project — most agent code has no tool-call policy at all.
Full documentation at acacian.github.io/aegis:
git clone https://github.com/Acacian/aegis.git && cd aegis
make dev # Install deps + hooks
make test # Run tests
make lint # Lint + format check
MIT -- see LICENSE for details.
Copyright (c) 2026 구동하 (Dongha Koo, @Acacian). Created March 21, 2026.
Policy-based governance for AI agent tool calls. YAML policy, approval gates, audit logging.
{ "mcpServers": { "io.github.acacian-aegis": { "command": "uvx", "args": [ "agent-aegis==0.1.6" ], "env": { "AEGIS_POLICY_PATH": "<value>" } } }}도구
아직 도구 목록이 없습니다. 원격 서버는 첫 상태 확인 후에 도구 목록이 생깁니다.
FAQ
이 페이지에서 Cursor, Claude Desktop, Claude Code 또는 VS Code용 stdio 설정을 복사합니다. PlugMCP 프록시가 아니라 게시자의 설치 방식을 사용합니다.
게시자가 등록한 환경 변수: AEGIS_POLICY_PATH.
Aegis — AI Agent Governance은(는) stdio를 통해 로컬에서 실행됩니다.
마지막 확인: 2026-11-08. Policy-based governance for AI agent tool calls. YAML policy, approval gates, audit logging.