Repository navigation
v0.1.0 — research preview
Pre-release
Pre-release
Capgate is a runtime authority boundary for autonomous AI agents: the agent proposes, the harness authorizes, the executor acts. Every consequential action — a tool call or an inter-agent message — passes through one deterministic, deny-by-default policy engine before anything executes, and every decision lands in a tamper-evident audit trail.
⚠️ Research preview. The core holds under the tested attacks and runs in CI, but this is not yet production-grade — see the threat model and roadmap. Outside security review is invited: SECURITY.md.
Highlights
- Deny-by-default policy with reason-coded decisions; non-transitive delegation (asking another agent never transfers authority); hash-chained audit.
- Short-lived signed credentials (rotation + revocation), required per-contract budgets, per-client and per-principal rate limiting.
- Reference isolated deployment (
deploy/): internal networks + an iptables egress allowlist confine a compromised agent to the harness API; secrets it cannot read; an nginx edge in front of uvicorn. Attacked from inside the agent sandbox in CI. - Persistent authority state (SQLite): budgets, permits, approvals and revocations survive restarts.
- MCP gateway (
/mcp) and upstream MCP tools, exercised with the official MCP SDK — an agent's tool calls flow throughauthorize → permit → executor. capgate inspect— a local UI for simulation, the audit trail, escalations and policy.
Verification
- 262 unit/integration/adversarial/fuzz tests, green on Python 3.10–3.13 × both HTTP transports.
- 15 Docker isolation tests: a compromised agent attacks the containerised deployment from inside its sandbox — every route blocked, one authorized side effect.
- Property-based fuzzing of the API, policy engine and both transports.
Install
git clone https://github.com/jersonboydmilan/capgate && cd capgate
pip install -e ".[dev]"
capgate simulate examples/simulation/task.yaml
python examples/mcp/demo.py # drive the MCP gateway with the official SDK client
python deploy/demo.py # attack the isolated deployment (needs Docker)Full changelog: CHANGELOG.md.