
Impact Preview
io.github.agent-polisPublished by GitHub account agent-polisv0.2.1Updated Oct 24, 2026
Impact preview for AI agents - see what changes before any action executes.
Overview
Local MCP server that previews an AI agent's proposed file, shell, database or API actions with diffs and risk levels before anything runs.
- What you can do
- Preview file writes and deletes, showing the diff and what would be lost
- Preview shell commands and flag dangerous ones
- Run a quick risk check on any path
- Submit actions for approval, then approve, reject or execute them through the server's API
- Retrieve an audit trail of proposed and executed actions
- When to use it
- Useful when you let an agent edit files, run shell commands or touch databases and want a review step with diffs and risk warnings before changes take effect. It suits developers who want a plan-and-approve gate rather than direct execution.
- Requirements
- Runs locally as a Python package installed with pip; the README also shows a Docker Compose option. The full approval workflow needs a running server with a database and Redis, plus a SECRET_KEY, DATABASE_URL and REDIS_URL in a .env file, and API keys for the HTTP API. Desktop client only.
Installation
In SourceWeft
- Open Impact Preview in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 600e309
Tools
0Version history
1- v0.2.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts