
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 分