
AgentGate
io.github.agentkitai由 GitHub 帳號 agentkitai 發布v0.0.3更新於 Oct 25, 2026
Human-in-the-loop approval gateway for AI agents over MCP: request, decide, approve.
概覽
AgentGate 是一個人在迴路審批閘道,讓 AI 代理在執行動作前提交請求,經政策判定與人工核准後再執行。
- 可以做什麼
- 提交、讀取與列出審批請求,包括依 ID 查詢狀態以及依狀態等條件篩選,並對待處理請求作出核准或拒絕並附上理由。建立、取代與刪除審批政策,並依優先順序列出政策。依條件分頁讀取稽核日誌,並列出稽核記錄中的不同操作者。請求可路由到儀表板、Slack、Discord 或電子郵件,Webhook 會向外部系統通知請求事件。
- 適用情境
- 適用於代理可能執行寄信、刪檔或部署等有後果的動作時,希望由政策自動核准安全動作、自動拒絕危險動作,其餘交由人工決定。也適合需要保留代理決策稽核記錄的團隊。
- 執行需求
- 透過 npx 作為 MCP 伺服器在本機執行,但需要一個可連線的 AgentGate 伺服器(以 Docker 或從原始碼自架,資料庫為 SQLite 或 PostgreSQL)。MCP 用戶端設定需提供 AGENTGATE_URL 與 AGENTGATE_API_KEY,API 金鑰在初始化時產生且只顯示一次。選用的 Slack、Discord 與 SMTP 憑證可啟用其他審批管道。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AgentGate,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AgentGate
Human-in-the-loop approval system for AI agents.
Agents request. Policies decide. Humans approve.
Keep humans in control of what AI agents can do.
[npm version] [MIT License] [CI] [TypeScript]
Your AI agent wants to send an email, delete a file, or deploy to production. Should it? AgentGate lets you define policies that auto-approve safe actions, auto-deny dangerous ones, and route everything else to a human — via dashboard, Slack, Discord, or email.
✨ Highlights
- 🛡️ Policy engine — auto-approve, auto-deny, or route to humans based on rules
- 👥 Multi-channel approvals — Slack, Discord, email, or web dashboard
- 🔌 TypeScript SDK + MCP — works with any agent framework or Claude Desktop
- 🪝 Webhooks with retry — real-time notifications with exponential backoff
- 📝 Full audit trail — every request, decision, and action logged, each policy decision tagged with the OWASP LLM Top-10 risk it mitigates (compliance evidence)
- 🐳 Docker-ready — one
docker-compose upfor the full stack - 🔐 Production-hardened — SSRF protection, ReDoS defense, structured logging, graceful shutdown
- 🔗 One-click decision links — approve or deny directly from notification emails and webhooks
- ♿ Accessible UI — keyboard-navigable approval modals, focus trapping, ARIA labels
- 💀 Skeleton loading — smooth loading states across every dashboard page
- ⚡ Fast & lightweight — Hono server, SQLite or PostgreSQL
Quickstart
Drop AgentGate into an MCP client (Claude Desktop / Cursor / VS Code) — point it at the gateway:
Dashboard
See all pending requests at a glance, color-coded by urgency so you know what needs attention first.
Approval Requests
Review, approve, or deny requests — filter by status to focus on what matters.
Audit Log
Search through every decision with filters for event type, action, actor, and date range.
Request Detail
Drill into any request to see parameters, context, timeline, and audit trail — with one-click Approve/Deny buttons.
API Keys
Manage API keys with fine-grained scopes, rate limits, and usage tracking. Create, edit, or revoke keys from the dashboard.
Webhooks
Configure webhook endpoints for real-time notifications. Add URLs, pick events, and let AgentGate handle retries automatically.
Login
Sign in with your API key — create one via the CLI or ask your admin.
Table of Contents
- Quick Start
- Architecture
- Packages
- SDK Usage
- CLI
- MCP Integration
- Authentication
- API Endpoints
- Rate Limiting
- Webhooks
- Configuration
- Docker Deployment
- Development
- Troubleshooting
- Contributing
- License
Quick Start
1. Install dependencies
2. Run database migrations
3. Bootstrap (create admin API key)
Save the API key - it's shown once only! Set it in your environment:
4. Start the development environment
5. Run the demo
In a new terminal (with API key set):
6. Open the dashboard
Visit http://localhost:5173 to view and manage approval requests.
Architecture
Packages
SDK Usage
CLI
AgentGate includes a command-line interface for managing approval requests.
Installation
Configuration
Configure the CLI with your server URL and API key:
Configuration is stored in ~/.agentgate/config.json. You can also use environment variables:
Commands
Examples
MCP Integration
AgentGate includes a Model Context Protocol (MCP) server for integration with Claude Desktop and other MCP-compatible clients.
Claude Desktop Configuration
Add to your claude_desktop_config.json:
Available MCP Tools
Authentication
AgentGate uses API keys for authentication. All API requests (except /health) require a valid API key.
API Key Scopes
Using API Keys
HTTP Header:
SDK:
Creating Additional API Keys
API Endpoints
Rate Limiting
AgentGate supports per-API-key rate limiting to prevent abuse and ensure fair usage.
How It Works
- Rate limits use a sliding window algorithm (requests per minute)
- Limits are configured per API key
- When exceeded, requests return
429 Too Many Requests - Rate limit headers are included in all authenticated responses
Rate Limit Headers
Configuring Rate Limits
Set rate limits when creating or updating API keys:
Dashboard
Rate limits can also be managed from the web dashboard under Settings → API Keys.
Webhooks
AgentGate can notify external systems when request events occur.
Setting Up Webhooks
Webhook Events
Webhook Payload
Webhook Signatures
If you provide a secret, requests are signed with HMAC-SHA256:
Verify by computing HMAC-SHA256(secret, body) and comparing.
Webhook Retry
Failed webhook deliveries are retried automatically with exponential backoff. The server scans for pending deliveries and retries them with increasing delays (2^attempts * 1000ms) until successful or the maximum retry count is reached.
Configuration
Environment Variables
File-Based Secrets (_FILE suffix)
For Docker secrets or Kubernetes secret mounts, AgentGate supports a _FILE suffix convention. Instead of setting a secret directly in an environment variable, point to a file containing the value:
Behavior:
- File contents are trimmed of leading/trailing whitespace
- If both the env var and the
_FILEvariant are set, the explicit env var takes precedence - Missing or unreadable files produce a warning but do not crash the server
Example with Docker Compose:
Policy Configuration
Policies are stored in the database and can be managed via API:
Docker Deployment
AgentGate provides Docker images for easy self-hosted deployments.
Quick Start
- Copy the example environment file:
- Generate secure credentials:
- Start all services:
- Access the services:
- Dashboard: http://localhost:3003
- API Server: http://localhost:3002
- Health Check: http://localhost:3002/health
Host ports are configurable via
SERVER_PORT(default3002) andDASHBOARD_PORT(default3003); both map to the container's internal port 3000/80.
Services
* PostgreSQL and Redis are on an internal Docker network (
agentgate-internal) and are not exposed to the host by default. During development,docker-compose.override.ymlis auto-loaded and exposes them on ports 5432/6379. For production, rundocker-compose -f docker-compose.yml up -dto skip the override.
With Slack or Discord Bots
To include the bot services, use the bots profile:
Configuration
All configuration is done via environment variables. See .env.example for all options.
Required variables:
ADMIN_API_KEY— Admin API key (min 16 characters)
Recommended for production:
JWT_SECRET— JWT signing secret (min 32 characters)CORS_ALLOWED_ORIGINS— Restrict to your domain(s)POSTGRES_PASSWORD— Use a strong password
Building Images
Build all images locally:
Build a specific service:
Database Migrations
Migrations run automatically when the server starts. For manual control:
Viewing Logs
Stopping Services
Production Considerations
- Use a reverse proxy (nginx, Caddy, Traefik) for TLS termination
- Set strong passwords for PostgreSQL
- Restrict CORS origins to your domain
- Use Docker secrets for sensitive values in production
- Set up backups for PostgreSQL data volume
- Monitor health endpoints for uptime checks
Development
Testing
AgentGate uses Vitest for testing across all packages.
Coverage reports are generated per-package and include line, branch, and function coverage.
Code Quality
Project Structure
Contributing
Contributions are welcome! To get started:
- Fork the repository
- Clone and install dependencies (
pnpm install) - Follow the Development section above to set up your local environment
- Create a feature branch and make your changes
- Run
pnpm build && pnpm testto verify everything works - Open a pull request
Please make sure all tests pass and code is formatted (pnpm format:check && pnpm lint) before submitting.
🧰 AgentKit Ecosystem
License
MIT
來源:README.md,提交 abb46ee
工具
0版本歷史
1- v0.0.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分