Impri
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Human-in-the-loop approval inbox for AI agents.**
Your agent wants to send the email, post the reply, run the migration.
You want to see it before it happens, from your phone if you're not at a desk.
Impri is the inbox in between.
Watch as MP4
The problem
Agents that only read and draft are safe by construction. The moment one can send an email, post a reply, or run a write against a database, "ask the user first" becomes a system-prompt instruction — and a instruction is something a capable model can reason its way past, forget under load, or misjudge on an edge case you didn't anticipate.
Impri turns that instruction into a data dependency instead. The agent pushes a proposed action to an inbox and polls for a decision; the execution branch is only reachable once the API actually returns status: "approved". There's nothing to talk the model past — the gate lives outside the model, not inside its prompt.
60-second install
No install at all — connect straight to the hosted endpoint if your client supports a remote MCP server:
Or run the local package (needed if you're pointing at a self-hosted server instead of the cloud):
**Claude Code:**
**Codex:**
**Cursor** — add to .cursor/mcp.json:
**Windsurf** — add the same block to mcp_config.json:
Get an im_... key with one curl call — no signup form:
IMPRI_BASE_URL defaults to http://localhost:8484 (self-host) if you omit it — set it to https://api.impri.dev for the hosted cloud, as above. Self-hosting instead of the cloud? See Self-host or cloud below.
What the agent can do
| Tool | What it does |
|---|---|
| impri_push_action | Submit a proposed action — title, formatted preview, optional editable fields |
| impri_await_decision | Poll until a human approves, rejects, or the timeout elapses |
| impri_report_result | Report whether the approved action actually succeeded |
| impri_inbox_status | Check how many actions are waiting, before starting a big batch |
| impri_create_watcher | Create a watcher (RSS / Reddit search / URL diff) that feeds matching items into the inbox |
| impri_list_watchers | List configured watchers, optionally filtered by status |
| impri_list_watcher_presets | List the 18 ready-made watcher templates (Hacker News, GitHub releases, npm, arXiv, …) |
| impri_create_watcher_from_preset | Create a watcher from a preset by id + params, no config schema to write |
The loop
Or in plain REST, the same three calls:
The human doesn't have to be staring at a dashboard: an action can notify Slack, Discord, Telegram, ntfy, email, or a generic webhook, and the reviewer can edit the draft before approving — the agent receives that edited text back.
Why not just a prompt instruction?
| "Please ask before sending" in the system prompt | Impri |
|---|---|
| The model has to remember, every time | Execution is unreachable without status: "approved" from the API |
| No record of who decided what, or when | Every decision is in the audit log |
| Can't fix a typo without a new draft | Edit-before-approve — the agent gets the edited version back |
| One-off per agent, per project | One inbox, six notification channels, 18 watcher presets, all agents |