Skip to main content
AI Intervention Agent

AI Intervention Agent

Real-time user intervention for MCP agents: pause, course-correct, resume.

English  简体中文

PyPI GitHub release Python 3.11+ MCP Compatible Tests OpenSSF Scorecard License: MIT

Quick start · Screenshots · Key features · VS Code extension · Configuration · Documentation


AI Intervention Agent gives you a Web UI to pause the agent at key moments, review what it's about to do, type a course-correction, attach screenshots, and resume it. Everything goes through the MCP interactive_feedback tool, without ending the conversation.

Works with Cursor, VS Code, Claude Code, Augment, Windsurf, Trae, and more.

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"]
    }
  }
}

Install in Cursor Install in VS Code

Then add the prompt snippet below to your agent rules / system prompt, so the agent asks you through interactive_feedback instead of finishing 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

Desktop - feedback page (multi-task tabs, Markdown table, code highlighting, math, predefined options) Mobile - feedback page

Feedback page · auto switches between dark/light · multi-task tabs with independent countdowns

More screenshots (empty state + settings)

Desktop - empty state Mobile - empty state

Empty state · waiting for the next interactive request

Desktop - settings (notifications, Bark, feedback) Mobile - settings

Settings · notifications · Bark · sound · feedback countdown · auto switches between dark/light

Key features

  • Real-time intervention: the agent pauses and waits for your input via interactive_feedback
  • Web UI: Markdown, code highlighting, and math rendering out of the box
  • Multi-task tabs: concurrent requests with independent countdowns, per-task draft autosave, and auto re-submit that keeps long sessions alive (your typed text and checked options are submitted at zero, never an empty prompt)
  • Typing-hold: the countdown auto-extends while you type and never fires mid-input (web page and VS Code extension alike)
  • Skill and command picker: type / in the feedback box to insert an installed Agent Skill or custom command (Cursor / Claude Code / Codex layouts, auto-detected or set with [feedback] skill_dirs)
  • Local images in prompts: write ![alt](path/to/image.png) in the message and the Web UI shows the file; only images inside your workspace folders and the temp directory are read (adjust with [feedback] local_image_dirs)
  • Agent-loop context: per-task header_label context chips, feedback_placeholder hints, and loop engineering metadata (loop_id, loop_phase, success_criteria)
  • Notifications: web / sound / system / Bark (iOS push), plus custom notification sound upload
  • SSH / LAN friendly: works behind port forwarding; mDNS publishes a <host>.local URL when supported
  • i18n: Web UI + VS Code extension shipped in en / zh-CN / zh-TW
  • PWA, offline-aware, WCAG 2.1 AA accessible: installable from the browser, with contrast / focus / reduced-motion audited and locked by invariant tests
  • Stable install: built on Flask 3.x with conservative dependency pins; not affected by the Starlette 1.0 breaking change that broke several MCP feedback servers in early 2026

Architecture overview

AIIA runs as a single Python process bridging three surfaces: an MCP stdio server exposing interactive_feedback, a Flask web server with an SSE event bus, and a persistent task queue feeding the notification stack. The component diagram, the interaction and failure-recovery sequence diagrams, the agent-side MCP parameter table, and the runtime invariant catalogue live in docs/architecture.md.

VS Code extension (optional)

Open VSX version Open VSX downloads Open VSX rating

Embeds the interaction panel into VS Code's sidebar so you never switch to a browser.

  • Install: from Open VSX (the extension registry that Cursor, VSCodium, Windsurf and other VS Code-based editors use), or download the VSIX from GitHub Releases. Microsoft's VS Code does not search Open VSX, so install the VSIX there: Command Palette → Extensions: Install from VSIX...
  • Key setting: ai-intervention-agent.serverUrl must match your Web UI URL (e.g. http://localhost:8080; change the port via web_ui.port in config.toml.default)
  • More: ai-intervention-agent.logLevel and macOS native notifications (on by default, toggle in the sidebar's Notification Settings panel). The full settings list and the AppleScript executor security model are in packages/vscode/README.md

Configuration

On first run, config.toml is created from config.toml.default in your OS user config directory (the full TOML reference is in docs/configuration.md):

OS User config directory
Linux ~/.config/ai-intervention-agent/
macOS ~/Library/Application Support/ai-intervention-agent/
Windows %APPDATA%/ai-intervention-agent/

For uvx, Docker, systemd, or SSH-remote runtimes where editing the file is awkward, the most-used web_ui settings can be overridden by env var at startup (invalid values log a WARNING and fall back safely; full surface in docs/configuration.md#environment-variable-overrides):

export AI_INTERVENTION_AGENT_WEB_UI_HOST=0.0.0.0      # listen address, default 0.0.0.0 (all interfaces)
export AI_INTERVENTION_AGENT_WEB_UI_PORT=8181         # default 8080, range [1, 65535]
export AI_INTERVENTION_AGENT_WEB_UI_LANGUAGE=en       # auto / en / zh-CN / zh-TW
uvx ai-intervention-agent

CLI inspection: --version, --help, and --print-config. The last one dumps the effective merged config as jq-friendly JSON, with secret-like fields redacted, and answers "is my port from env or from config.toml?" in one pipeline.

On iPhone, the smoothest setup wraps the Web UI in a Shortcuts automation and points Bark notification taps at it. The step-by-step guide is in docs/configuration.md#recommended-iphone-setup-shortcuts--bark.

Documentation

Project Stars (approx.) Focus
mcp-feedback-enhanced (Minidoracat) ~3.8k Largest sibling; Web UI + Tauri desktop app, auto-command execution, SSH Remote / WSL detection.
cunzhi (imhuso) ~1.4k Chinese-language project focused on preventing premature task completion.
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 WebSocket UI and Speech-to-Text via OpenAI Whisper.
interactive-feedback-mcp (junanchn) ~30 Win32-native always-on-top window, auto-reply rules.
interactive-feedback-mcp (poliva) ~310 Direct ancestor fork (see Acknowledgements); minimal Python MCP, single feedback dialog.
interactive-feedback-mcp (Pursue-LLL) ~30 Independent smaller-scale fork emphasising minimal dependencies.

Where AIIA sits on the spectrum: AIIA targets the operationally deep end. The Web UI and the VS Code extension share one backend, and observability comes from a /api/system/metrics Prometheus endpoint plus a reference Grafana dashboard. The Web UI ships in three languages and the docs in two, the project follows an invariant test discipline (13,000+ tests + 1,300+ subtests across 40 audit cycles), and releases run through a 4-job pipeline. If you want the smallest drop-in, use poliva's fork; for a desktop app, mcp-feedback-enhanced; for voice input or a multi-tab UI, Relay or the Node.js fork.

Feature gaps (contributions welcome): Speech-to-Text input, always-on-top native window, Cursor usage monitoring, multi-tab session merging UI.

Star counts are approximate snapshots (last reviewed 2026-10); check each upstream for current numbers. Submit a PR if you'd like another related project listed.

Acknowledgements

The MCP interactive_feedback tool surface comes from two earlier projects: Fábio Ferreira's original noopstudios/interactive-feedback-mcp (2024) and Pau Oliva's poliva/interactive-feedback-mcp (2025). Their copyright notices are kept in LICENSE, as the MIT license requires. The v1.5.x line is a substantial rewrite (Web UI, VS Code extension, i18n, notification stack, CI/CD pipeline), owned and maintained by @xiadengma, the publisher on PyPI and Open VSX.

License

MIT License

Metadata

Release files for ai-intervention-agent 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-intervention-agent 1.9.0
File Size Uploaded Provenance Actions
ai_intervention_agent-1.9.0.tar.gz 3.3 MB With provenance Details for ai_intervention_agent-1.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-intervention-agent 1.9.0
File Interpreter ABI Platform Actions
ai_intervention_agent-1.9.0-py3-none-any.whl Python 3 none any Details for ai_intervention_agent-1.9.0-py3-none-any.whl

Total release size: 6.7 MB

Release files / ai_intervention_agent-1.9.0.tar.gz

Download URL ai_intervention_agent-1.9.0.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9cdc5877522111cb101476b44f61be8e9ac5a77cf02abefa4cc09b2a4c3ce85f
BLAKE2b-256 checksum
How to use checksums
17628e6cdc472dabbea1fe80b01ea518c58b08405cacdd839fa46886a5bbaef2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 24, 2026.

Transparency log

Release files / ai_intervention_agent-1.9.0-py3-none-any.whl

Download URL ai_intervention_agent-1.9.0-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
21b93206316e59323e45b1edb8c753a258656ab3d8c5045289155bfb5014a963
BLAKE2b-256 checksum
How to use checksums
3c3a578b49f634f7c3353edce9e0a38b8173a29d5a39f4c44ccb8719f53c1849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 24, 2026.

Transparency log

Security for ai-intervention-agent 1.9.0

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.

Select from 2 files

Attestation for ai_intervention_agent-1.9.0.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 Oct 24, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page