Agent Decision Gate is an AI governance gateway and monitoring dashboard.
It sits between agent output (Copilot, autonomous bots, IDE/devops automations) and execution, then decides whether to APPROVE, REVISE, or BLOCK.
- Accepts proposed AI actions through an API.
- Runs a multi-stage decision pipeline (planner, execution analysis, governance policy checks, critic).
- Produces a decision with reasoning, policy violations, confidence, and risk scores.
- Tracks integrations (Copilot, agent gateways, enterprise tools) and shows monitoring metrics.
- Captures audit records for traceability.
- Supports Sentry telemetry and runtime resource alerting (CPU/memory thresholds).
- Decision gate for risky AI actions (
/proposed-action) - Audit log (
/audit) - Integration registry (
/monitor/integrations) - Monitoring overview (
/monitor/overview) - Admin auth + tenant settings (
/auth/*,/admin/*) - Bot dashboard in UI (
/bots)
- Framework:
axum+tokio - Entry point:
src/main.rs - Domain modules:
agents/multi-agent stagesgovernance/policy engineapi/handlers, models, monitoring, auth/admin settingsmcp/MCP adapters for tool integrations
- Persistence:
- Local encrypted tenant settings file
- Local admin users file (argon2 password hashes)
- Optional Cosmos integration hooks
- Framework: Next.js App Router (
console/) - Primary pages:
/decision console/loginadmin login/settingstenant + integration controls/botsbot/integration tracking dashboard/auditaudit viewer
- Frontend API client:
console/lib/api.ts
This project is implemented as a policy-first control plane:
- Externalized policies in
config/policies.yamlinstead of hardcoding rule logic in handlers. - Layered decision pipeline to separate planning, execution analysis, governance checks, and final critique.
- Monitoring model added on top of decisions so every integration has operational visibility.
- Tenant/admin settings modeled separately from action flow to support enterprise controls.
- UI built as an operator console for real-time decisions, auditability, and integration management.
- Observability added with Sentry hooks and runtime metric thresholds for safety operations.
There is no exposed default password in the UI/docs. Admin login is controlled by environment variables:
ADMIN_USERNAMEADMIN_PASSWORD
On startup, if these are set, the backend upserts that admin user (useful for rotating credentials or fixing stale local hashes).
From repo root:
export ADMIN_USERNAME='your_admin_user'
export ADMIN_PASSWORD='your_strong_password'
cargo runIn another terminal:
cd console
npm install
npm run devOpen:
- Console:
http://localhost:3000 - Login:
http://localhost:3000/login - API:
http://localhost:8080 - Health:
http://localhost:8080/healthz
POST /proposed-actionGET /auditGET /monitor/overviewPOST /monitor/integrationsGET /monitor/integrationsPOST /auth/loginGET /admin/tenantsGET/POST /admin/settings/:tenant_id
- Login as admin in
/login. - Go to
/settingsand configureAgent Link Settings:- Active + Connected
- Integration name (for example
vscode-copilotorclawbot) - Agent ID and autonomous flag
- GitHub repo and Azure MCP endpoint
- Save settings.
- Confirm integration appears in
/botsand/monitor/integrations. - Submit actions with integration metadata so monitoring attributes decisions correctly.
Set these environment variables on backend:
SENTRY_DSNSENTRY_ENVIRONMENT(optional, defaultdevelopment)SENTRY_TRACES_SAMPLE_RATE(optional)RUNTIME_MONITOR_INTERVAL_SECS(optional)SENTRY_CPU_ALERT_THRESHOLD(optional)SENTRY_MEMORY_ALERT_MB(optional)
src/main.rsAPI bootstrap + routesapi/admin/auth/settings/monitoring/engine wiringagents/decision stagesgovernance/policy evaluationmcp/integration adapter contractsconfig/policies + model routerconsole/Next.js operator dashboardinfra/deployment manifests/docs
The repo includes deployment workflows for Azure:
- Backend API to Azure Container Apps: .github/workflows/azure-container-apps-api.yml
- Frontend console to Azure Static Web Apps: .github/workflows/azure-static-web-apps-console.yml
- CI validation: .github/workflows/ci.yml
For setup details, see infra/deployment.md and console/DEPLOYMENT.md.
For a step-by-step local run guide, see RUNNING.md.