Open-source runtime control plane for AI coding agents
Think "cloud firewall for AI agents." AgentControl sits between your agent and its tools β intercepting every tool call, enforcing policy, requiring human approval for risky operations, and logging everything.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AgentControl Dashboard β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Agents β ON β Name β Risk β Actions β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β β ON β repo-mnt β Repo Bot β HIGH β [βΈ] [π] β β
β β β― OFF β safe-bot β Safe Bot β LOW β [βΆ] [π] β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β Policy: block rm -rf, require_approval for PR merges β
β Audit: 47 tool calls logged, 12 blocked, 3 approvals β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Record a live demo:npm install -g terminalizer && terminalizer record demo
npm install
cp .env.example .env
npm run dev
Open ** http://localhost:8080** β the dashboard is live. That's it.
| Problem | Solution |
|---|---|
Agent runs rm -rf / |
|
| Blocked by dangerous-command guardrails | |
| Agent wants to merge a PR | Requires human approval in the dashboard |
Agent accesses .env secrets |
|
| Blocked by path-traversal guardrails | |
| You need an audit trail | Every tool call logged with decision, approval, and result |
| Multiple agents, different trust levels | Risk-level enforcement: low auto-allows, high requires approval, critical blocks all |
| You want to an agent | Toggle on/off from dashboard or CLI |
Policy Engineβ YAML-defined rules that decideallow
,block
, orrequire_approval
per tool callAgent Registryβ Register agents with identities, allowed tools, and risk levels** Human-in-the-Loop**β Approve or deny risky tool calls from the dashboard or API** Audit Timeline**β Complete replay of every tool call, decision, and approval** Dashboard UI**β Single-page HTML app: monitor agents, approve calls, view audit logs** CLI**β Full command-line interface for scripting and automation** API Key Management**β Create and revoke scoped API keys via the dashboard or CLI** Risk Levels**βlow
/medium
/high
/critical
β each enforces different policiesEnable/Disable Agentsβ Stop or start agents without deleting them** Docker**β One-command deploy withdocker compose up -d
Self-Hostedβ Your data stays on your infrastructure. No cloud dependency.
ββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββ
β Agent ββββββΆβ AgentControl Gateway ββββββΆβ Tools β
β (LLM) β β β β (shell, β
ββββββββββββ β ββββββββββββ ββββββββββββ ββββββββββ β β files, β
β β Policy ββββ Approval ββββ Audit β β β github) β
β β Engine β β Queue β β Log β β ββββββββββββ
β ββββββββββββ ββββββββββββ ββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β ββββββββββββββββββββββββββββββββββββββββ β
β β Agent Registry β β
β β (SQLite: agents, policies, runs) β β
β ββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββ
Every tool call passes through the gateway:
Policy Engine evaluates the call against YAML rules and risk levelApproval Queue holds calls that need human reviewAudit Log records the full decision + execution trace
npm run cli -- agent register \
--id repo-maintainer \
--name "Repo Maintainer" \
--owner engineering \
--environment development \
--purpose "Safely maintain repository tasks" \
--tools shell.run,filesystem.read,filesystem.write,github.mock_merge_pr \
--risk medium
npm run cli -- tools call --agent repo-maintainer --tool shell.run --input '{"command":"npm test"}'
npm run cli -- tools call --agent repo-maintainer --tool shell.run --input '{"command":"rm -rf /"}'
npm run cli -- tools call --agent repo-maintainer --tool github.mock_merge_pr --input '{"repo":"company/api","pr":42}'
npm run cli -- approvals list
npm run cli -- approvals approve <id> --by secops-admin --reason "Verified"
npm run cli -- agent toggle --id repo-maintainer --disable
npm run cli -- agent toggle --id repo-maintainer --enable
npm run cli -- runs replay <run-id>
npm run cli -- agent delete --id repo-maintainer
npm run cli -- keys create --name "My Key"
npm run cli -- keys list
npm run cli -- keys delete <key-id>
Windows PowerShell:Replace single quotes with escaped double quotes:
--input "{""command"":""npm test""}"
All endpoints require x-api-key
header or Authorization: Bearer <key>
.
| Method | Path | Description |
|---|---|---|
GET |
||
/health |
||
| Health check | ||
GET |
||
/v1/stats |
||
| Dashboard metrics | ||
POST |
||
/v1/agents |
||
| Register an agent | ||
GET |
||
/v1/agents |
||
| List agents | ||
GET |
||
/v1/agents/:id |
||
| Get agent details | ||
PATCH |
||
/v1/agents/:id |
||
| Enable/disable agent | ||
DELETE |
||
/v1/agents/:id |
||
| Delete an agent | ||
POST |
||
/v1/tools/call |
||
| Execute or evaluate a tool call | ||
GET |
||
/v1/approvals |
||
| List approval requests | ||
POST |
||
/v1/approvals/:id/approve |
||
| Approve a pending call | ||
POST |
||
/v1/approvals/:id/deny |
||
| Deny a pending call | ||
GET |
||
/v1/runs |
||
| List audit runs | ||
GET |
||
/v1/runs/:id |
||
| Run replay timeline | ||
GET |
||
/v1/policies |
||
| View active policy | ||
POST |
||
/v1/policies/reload |
||
| Reload policy from disk | ||
POST |
||
/v1/api-keys |
||
| Create API key | ||
GET |
||
/v1/api-keys |
||
| List API keys | ||
DELETE |
||
/v1/api-keys/:id |
||
| Delete API key |
export API_KEY=your-secure-key
docker compose up -d
npm test
Runs 18 tests across core engine, HTTP API, and CLI end-to-end flow.
| Feature | AgentControl | Portkey | Guardrails AI |
|---|---|---|---|
| Open source | β MIT | β | β Apache 2.0 |
| Self-hosted | β | β | β |
| Human-in-the-loop | β Native | β | Partial |
| Audit timeline | β Full replay | β | β |
| Risk levels | β 4-tier | β | β |
| Dashboard | β Built-in | β | β |
| API key management | β | β | β |
| CLI | β | β | β |
| Install time | <30s | SaaS | 5min |
| Framework | Guide |
|---|---|
| OpenAI SDK | |
examples/langchain.mdexamples/crewai.mdCopy .env.example
to .env
and set your API_KEY
. See .env
for all available options.
PRs welcome! Check open issues for community-requested features.
MIT