
Impact Preview
io.github.agent-polis由 GitHub 帳號 agent-polis 發布v0.2.1更新於 Oct 24, 2026
Impact preview for AI agents - see what changes before any action executes.
概覽
本機 MCP 伺服器,在 AI 代理提出的動作執行前顯示檔案差異與風險等級,供人工審核。
- 可以做什麼
- 預覽檔案寫入與刪除,顯示差異和將遺失的內容
- 預覽 shell 指令並標示危險指令
- 對任意路徑做快速風險檢查
- 透過伺服器 API 提交動作,並進行核准、拒絕或執行
- 查詢已提出與已執行動作的稽核紀錄
- 適用情境
- 當你允許代理編輯檔案、執行 shell 指令或操作資料庫,並希望在變更生效前先看差異與風險提示時適用。適合想要「先計畫、再核准」而非直接執行的開發者。
- 執行需求
- 以 pip 安裝的本機 Python 套件執行,README 也提供 Docker Compose 方式。完整核准流程需要執行伺服器,並設定資料庫與 Redis,在 .env 中提供 SECRET_KEY、DATABASE_URL 和 REDIS_URL,HTTP API 另需 API 金鑰。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Impact Preview,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
🔍 Agent Polis
Impact Preview for AI Agents - "Terraform plan" for autonomous AI actions
See exactly what will change before any AI agent action executes.
Agent Polis intercepts proposed actions from autonomous AI agents, analyzes their impact, shows you a diff preview of what will change, and only executes after human approval. Stop worrying about your AI agent deleting your production database.
🎯 The Problem
Autonomous AI agents are powerful but dangerous. Recent incidents:
- Replit Agent deleted a production database, then lied about it
- Cursor YOLO mode deleted an entire system including itself
- Claude Code learned to bypass safety restrictions via shell scripts
Developers want to use AI agents but don't trust them. Current solutions show what agents want to do, not what will happen. There's no "terraform plan" equivalent for AI agent actions.
🚀 The Solution
✨ Features
- Impact Preview: See file diffs, risk assessment, and warnings before execution
- Approval Workflow: Approve, reject, or modify proposed actions
- Risk Assessment: Automatic detection of high-risk operations (production data, system files, etc.)
- Audit Trail: Event-sourced log of every proposed and executed action
- SDK Integration: Easy
@require_approvaldecorator for your agent code - Dashboard: Streamlit UI for reviewing and approving actions
🚀 Quick Start (2 minutes)
The fastest way to try Agent Polis is the MCP server with Claude Desktop or Cursor.
1. Install & Run
2. Configure Claude Desktop
Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
3. Try It
Ask Claude to edit a file - it now has these tools:
Example prompt:
"Preview what would happen if you changed the database URL in config.yaml to point to production"
Claude will show you the diff and risk assessment before making changes.
📦 Full Server Installation
For the complete approval workflow with dashboard and API:
Register an Agent
Submit Action → Review → Approve
Audit Trail (Events)
You can retrieve the complete audit trail for an action:
ActionPreviewGenerated event payload includes machine-readable governance context:
data.governance.policy.decision/data.governance.policy.matched_rule_iddata.governance.scanner.reason_ids/data.governance.scanner.max_severity
🐍 SDK Integration
Wrap your agent's dangerous operations:
🖥️ Dashboard
Launch the Streamlit dashboard to review pending actions:
📚 API Reference
Actions API
Action Types
file_write- Write content to a filefile_create- Create a new filefile_delete- Delete a filefile_move- Move/rename a filedb_query- Execute a database query (read)db_execute- Execute a database statement (write)api_call- Make an HTTP requestshell_command- Run a shell commandcustom- Custom action type
Risk Levels
- Low: Read operations, safe changes
- Medium: Write operations to non-critical files
- High: Delete operations, system files
- Critical: Production data, irreversible changes
🔧 Configuration
🗺️ Roadmap
🤝 Contributing
📄 License
MIT License - see LICENSE for details.
Built for developers who want AI agents they can actually trust.
來源:README.md,提交 600e309
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分