AI Intervention Agent
Real-time user intervention for MCP agents: pause, course-correct, resume.
Quick start · Screenshots · Key features · Architecture overview · VS Code extension · Configuration · Documentation
AI Intervention Agent is an MCP server with a Web UI. When your AI agent needs a decision, it calls interactive_feedback. The question shows up in a web page or in the VS Code sidebar, and the agent waits for your reply, screenshots, or option picks. You stay in control, and the agent does not guess or finish on its own.
It helps when an agent skips confirmation, picks the wrong branch because a requirement is unclear, or goes quiet after a failed tool call. Works with Cursor, VS Code, Claude Code, Augment, Windsurf, Trae, and other MCP clients.
Quick start
Point your AI tool at the MCP server via uvx (installs and runs the latest version automatically):
{
"mcpServers": {
"ai-intervention-agent": {
"command": "uvx",
"args": ["ai-intervention-agent"],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}
Add the prompt snippet below to your agent rules so the agent uses interactive_feedback instead of ending tasks silently.
Prompt snippet (copy/paste)
- Only ask me through the MCP `ai-intervention-agent` tool; do not ask directly in chat or ask for end-of-task confirmation in chat.
- If a tool call fails, keep asking again through `ai-intervention-agent` instead of making assumptions, until the tool call succeeds.
ai-intervention-agent usage details:
- If requirements are unclear, use `ai-intervention-agent` to ask for clarification with predefined options.
- If there are multiple approaches, use `ai-intervention-agent` to ask instead of deciding unilaterally.
- If a plan/strategy needs to change, use `ai-intervention-agent` to ask instead of deciding unilaterally.
- Before finishing a request, always ask for feedback via `ai-intervention-agent`.
- Do not end the conversation/request unless the user explicitly allows it via `ai-intervention-agent`.
Alternative: install with pip
Install the package (needs Python 3.11 or newer; remember to pip install --upgrade ai-intervention-agent periodically):
pip install ai-intervention-agent
Then configure your AI tool to launch the installed entry point:
{
"mcpServers": {
"ai-intervention-agent": {
"command": "ai-intervention-agent",
"args": [],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}
Alternative: let your AI set it up for you
If your IDE/CLI has an AI agent (Cursor, Claude Code, VS Code, Windsurf, Trae, Augment, ...), paste this prompt in chat and let it write the config:
Please configure my IDE / AI tool to use the `ai-intervention-agent` MCP server:
1. Locate the correct MCP config file for my current IDE
(e.g. `.cursor/mcp.json` or `~/.cursor/mcp.json` for Cursor,
`~/.claude.json` for Claude Code,
`.vscode/mcp.json` for VS Code).
2. Add this entry under `mcpServers`:
- command: `uvx`
- args: `["ai-intervention-agent"]`
- timeout: 600
- autoApprove: `["interactive_feedback"]`
Keep every other server and setting in the file exactly as it is.
If an `ai-intervention-agent` entry already exists, show me the
difference and ask before replacing it.
3. Open the link below and append the rules from its
"Prompt snippet (copy/paste)" block to my agent rules / system prompt,
so the agent always asks me through `interactive_feedback`
instead of ending tasks silently:
https://raw.githubusercontent.com/xiadengma/ai-intervention-agent/main/README.md
If you cannot open that link, ask me to paste the block.
4. Verify by listing MCP servers and confirming `ai-intervention-agent` is loaded
(tell me if I need to restart or reload the tool).
5. Finish by telling me which files you changed and what the check showed.
Screenshots
Question page · one tab per question · Markdown and code in the message
More screenshots (empty state and settings page)
Empty state · waiting for the next question from the AI
Settings page · notifications, sound and more
Key features
- Real-time intervention: the agent pauses and waits for your input through
interactive_feedback. - Markdown, code highlighting, and math in every question.
- One tab for each question. Each tab has its own countdown and saves your draft. When the countdown ends, it sends your typed text and attached images, plus the options you checked when they differ from the agent's recommendation. A recommendation you left alone is never sent as your answer.
- Typing-hold: while you type, the countdown adds a minute at a time instead of sending your answer. This happens up to 30 times per question, apart from the 3 manual extensions. After that it sends what you typed. The web page and the VS Code extension behave the same.
- Skill and command picker: type
/in the reply box to insert an installed Agent Skill or custom command (Cursor, Claude Code, and Codex folder layouts, found automatically or set with[feedback] skill_dirs). - Local images in questions: when the AI writes
in its question, the web page and the VS Code panel show the file. They read only images inside your workspace folders and the temp directory (change this with[feedback] local_image_dirs). Click an image to enlarge it. - Tab names and loop context from the AI:
header_labelnames the tab,feedback_placeholdersets the hint, andloop_id,loop_phase, andsuccess_criteriadescribe the loop. - Different wording for each auto-reply: from the 2nd auto-reply on, the AI can read a different sentence each time (
[feedback] resubmit_followups), and the text added to every reply can follow the task'sloop_phaseorheader_label([feedback] prompt_suffix_presets). Edit both under Replies on the settings page or in the VS Code panel. - Notifications on the web page, by sound, through the system, and as Bark pushes to your iPhone (with Bark's level, sound, group, and other push options). You can upload your own sound.
- SSH and LAN use: works through port forwarding. It listens on this computer only by default. When
network_security.bind_interfaceis not a loopback address (0.0.0.0or a LAN address), other devices must shownetwork_security.api_token, and mDNS publishes a<host>.localURL where supported. - Three languages: the web page and the VS Code extension come in
en,zh-CN, andzh-TW. - Installable and accessible: install the page as an app (PWA) from the browser. Text colors meet WCAG 2.1 AA contrast in both themes.
The core features and the path of one question are in docs/product.md. The tool parameters (header_label, loop_id, and others) are in docs/mcp_tools.md. Diagrams are in docs/architecture.md.
Architecture overview
One MCP stdio server per IDE window exposes interactive_feedback. A shared Flask process serves the Web UI and SSE event bus; a task queue drives notifications. The VS Code extension embeds the same UI in the sidebar.
Component diagrams, sequence flows, MCP parameter tables, and deployment notes are in docs/architecture.md and docs/deployment.md.
VS Code extension (optional)
Install from Open VSX, or use the VSIX from GitHub Releases (required for Microsoft VS Code: Command Palette → Extensions: Install from VSIX...).
Set ai-intervention-agent.serverUrl to your Web UI URL (default http://localhost:8080; port from web_ui.port in config.toml.default). Settings and macOS banner behavior are in packages/vscode/README.md.
Configuration
On first run, config.toml is created from config.toml.default in your OS user config directory:
| OS | User config directory |
|---|---|
| Linux | ~/.config/ai-intervention-agent/ |
| macOS | ~/Library/Application Support/ai-intervention-agent/ |
| Windows | %APPDATA%/ai-intervention-agent/ |
Full keys and defaults: docs/configuration.md. Environment variables override some values. The host overrides network_security.bind_interface, the port overrides web_ui.port, and the push language overrides web_ui.language:
export AI_INTERVENTION_AGENT_WEB_UI_HOST=0.0.0.0 # listen address, default 127.0.0.1 (this computer only); 0.0.0.0 = all interfaces, and other devices need api_token
export AI_INTERVENTION_AGENT_WEB_UI_PORT=8181 # default 8080, range [1, 65535]
export AI_INTERVENTION_AGENT_WEB_UI_LANGUAGE=en # language of the push titles: auto / en / zh-CN / zh-TW
uvx ai-intervention-agent
CLI: --version, --help, --print-config (merged config as redacted JSON). iPhone + Bark setup: docs/configuration.md#recommended-iphone-setup-shortcuts--bark.
Documentation
- Docs index:
docs/README.md·docs/README.zh-CN.md - Product overview:
docs/product.md - Configuration:
docs/configuration.md - MCP tools:
docs/mcp_tools.md - Architecture:
docs/architecture.md - Deployment:
docs/deployment.md - Troubleshooting:
docs/troubleshooting.md - Performance:
docs/performance.md - API reference:
docs/api/index.md - Release notes:
CHANGELOG.md, and for the VS Code extension (the Open VSX listing)packages/vscode/CHANGELOG.md - Contributing:
CONTRIBUTING.md·CODE_OF_CONDUCT.md· scripts indexscripts/README.md· i18n guidedocs/i18n.md - Support and security:
SUPPORT.md·SECURITY.md - Release recovery:
docs/release-recovery.md - Ask questions about the repo:
Related projects
| Project | Stars (approx.) | Focus |
|---|---|---|
| mcp-feedback-enhanced (Minidoracat) | ~3.8k | The largest sibling. Web UI and Tauri desktop app, automatic command execution, SSH Remote and WSL detection. |
| cunzhi (imhuso) | ~1.4k | Chinese-language project that stops an agent from ending a task too early. |
| Relay (andeya) | new | Multi-IDE relay, multi-tab session merging, native desktop window, Cursor usage monitoring. |
| interactive-feedback-mcp (Node.js) | new | Node.js port with a WebSocket UI and speech-to-text through OpenAI Whisper. |
| interactive-feedback-mcp (junanchn) | ~30 | Win32 native always-on-top window, auto-reply rules. |
| interactive-feedback-mcp (poliva) | ~310 | The direct ancestor fork (see Acknowledgements). A minimal Python MCP with one feedback dialog. |
| interactive-feedback-mcp (Pursue-LLL) | ~30 | A smaller independent fork with minimal dependencies. |
Where AIIA fits: it goes deep on operations. The Web UI and the VS Code extension share one backend. A /api/system/metrics Prometheus endpoint and a reference Grafana dashboard cover observability. The Web UI ships in three languages and the docs in two. The project pins its rules with invariant tests (23,600+ tests and 3,600+ subtests), and releases run through a 4-job pipeline. For the smallest drop-in, use poliva's fork. For a desktop app, use mcp-feedback-enhanced. For voice input or a multi-tab UI, look at Relay or the Node.js port.
Feature gaps (contributions welcome): speech-to-text input, an always-on-top native window, Cursor usage monitoring, and a multi-tab session merging UI.
Star counts are approximate snapshots (last reviewed 2026-10); check each upstream for current numbers. Submit a PR to add another related project.
Acknowledgements
The interactive_feedback tool surface builds on noopstudios/interactive-feedback-mcp and poliva/interactive-feedback-mcp. Copyright notices remain in LICENSE. Current maintainers: @xiadengma (PyPI and Open VSX publisher).
License
MIT License
Metadata
Release files for ai-intervention-agent 1.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_intervention_agent-1.9.2.tar.gz | 3.6 MB | With provenance | Details for ai_intervention_agent-1.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_intervention_agent-1.9.2-py3-none-any.whl | Python 3 | none | any | Details for ai_intervention_agent-1.9.2-py3-none-any.whl |
Total release size: 7.2 MB
Release files / ai_intervention_agent-1.9.2.tar.gz
| Download URL | ai_intervention_agent-1.9.2.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa69cb563e9331676509b60377d5b0dd0acefbb9fcbb285bb5693c1db2120e6b
|
|
BLAKE2b-256 checksum How to use checksums |
3a0f118ef55bd2376e5af4840e10d8bb3e12e227382dec6df2a87296f87a24da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ai_intervention_agent-1.9.2-py3-none-any.whl
| Download URL | ai_intervention_agent-1.9.2-py3-none-any.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fd5548ad86fbc98d094e4bb71d280dd94eb89ff7bdd9a8f08f218bed9bd4d80
|
|
BLAKE2b-256 checksum How to use checksums |
f4aef6bbbdd10981d73e3ce49c995d8f6b1d95bce4697031f8aa2fa024af32ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for ai-intervention-agent 1.9.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ai_intervention_agent-1.9.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.