Other agents
docs/integrations.md has worked examples for Gemini CLI, OpenCode and Grok Build, none of them tried against a real install.
Anything that can make an HTTP request can put a session on the panel, ask for a decision, post a note or ask a question. None of this needs setting up in the app. The four addresses:
| Request | Body | Answer |
|---|---|---|
POST /hooks/agent/<name> | session_id (required), and any of state, cwd, model, context_pct, activity (what it is doing this moment, up to 120 characters, shown on the card while it is running; an empty string clears it), reports_end (true if the agent will say when the session ends, so its silences are not taken for its going). A field left out keeps its last value. "ended": true removes the session. | 204, or 400 with the reason |
POST /hooks/agent/<name>/permission | session_id (required), tool, summary (the text to show and to read before approving), cwd, hold_seconds | Held open until someone taps: 200 {"behavior":"allow"} or {"behavior":"deny"}. 200 with an empty body if nobody decided in time. |
POST /hooks/agent/<name>/card | title (required, up to 80 characters), and any of text (up to 400), progress (0 to 100), id (to change a card posted before: letters, digits, dots, hyphens and underscores, up to 64), ttl_seconds (5 to 86400; 900 if left out), session_id. {"id": "...", "remove": true} takes a card away. | 200 {"id": "..."}; 400 or 429 with {"error": "..."} |
POST /hooks/agent/<name>/ask | question (required, up to 300 characters), choices (two to four different answers, each up to 40 characters), and any of hold_seconds (590 at most; 300 if left out), session_id, cwd | Held open until an answer is tapped: 200 {"choice": "<the answer>", "index": <its place, from 0>}, or 200 with an empty body if nobody answered; 409 if that session already has a question open |
<name> is the agent's name as the card shows it: lower-case letters, digits and hyphens, up to 32 characters. state is running, waiting_permission, needs_input, idle or completed. The project name on the card is the last part of cwd.
Sessions and permission requests
Report a session:
curl -s -H 'Content-Type: application/json' \
-d '{"session_id":"abc","cwd":"'"$PWD"'","model":"my-model","state":"running"}' \
http://127.0.0.1:7317/hooks/agent/my-agent
A card for "my-agent" appears on the Agents widget. A running or idle session that sends nothing for two minutes is dimmed and its card reads "Quiet" with how long it has been, and after ten it is taken off the panel, so report at least that often. A session that is waiting for you is kept however quiet it is.
Ask and wait:
curl -s -H 'Content-Type: application/json' \
-d '{"session_id":"abc","tool":"Bash","summary":"rm -rf build/","hold_seconds":120}' \
http://127.0.0.1:7317/hooks/agent/my-agent/permission
The card turns to the accent colour with Approve and Deny, and the curl returns when one is tapped. Its badge reads Advisory approval: nothing but the agent's own good behaviour makes it wait for the answer or obey it, unlike a request that comes through Claude Code's or Codex's hooks, so keep the agent's own permission settings as the real guard. The request is held for hold_seconds, 590 at most and by default. An empty answer is not a refusal: it means nobody decided, and the agent should fall back to asking its own way. The session's card goes on reading "Needs approval" until the agent reports another state. A summary over 20,000 characters is cut, and can then be denied from the panel but not approved.
Cards and questions
Neither needs a session to have been reported first.
curl -s -H 'Content-Type: application/json' \
-d '{"id":"deploy","title":"Deploying storefront","text":"Uploading assets.","progress":40}' \
http://127.0.0.1:7317/hooks/agent/deployer/card
curl -s -H 'Content-Type: application/json' \
-d '{"question":"Which environment first?","choices":["Staging","Production","Stop here"],"hold_seconds":120}' \
http://127.0.0.1:7317/hooks/agent/deployer/ask
Cards show in the Messages widget, which you add to a page from the layout editor; without it on a page they are not shown anywhere. Each can be dismissed with a tap, and leaves by itself when its time is up. A question shows on the Agents widget as a card of its own; see Questions from agents. An agent sends words and a number and nothing more: it cannot say what a button does, and an answer goes only to the request that asked. One agent may post 60 cards a minute and keeps 20 at most.
For agents that call tools (MCP)
The app is also a Model Context Protocol server, so an agent that can call tools gets cards and questions without any scripting. To set it up for Claude Code:
- Choose Copy MCP Setup Command, under Claude Code in the menu. The line is shown only when Wingmirror is running as an app, since the command names the app's own program.
- A message says "Setup command copied". Paste the command into a terminal.
With the app in /Applications the command is
claude mcp add --scope user wingmirror -- "/Applications/Wingmirror.app/Contents/MacOS/Wingmirror" mcp
and with a build from source the path is under ~/Applications instead: it is always the path of the copy that is running.
Any other MCP client can be pointed at the same program with the one argument mcp. To undo it, remove the wingmirror server from the client, in the way that client provides.
The three tools:
| Tool | Arguments | What it does |
|---|---|---|
show_card | title (required), text, progress (0 to 100), id (to change a card shown before), minutes (1 to 1440; 15 if left out) | Puts a note on the panel or changes one, and returns its id |
remove_card | id (required) | Takes a note away before its time is up |
ask_owner | question and choices (both required; two to four answers), wait_seconds (1 to 590; 300 if left out) | Asks a question on the panel and waits for a tap. With no tap in time the result says there was no answer, which is not a refusal. |
The server speaks the 2025-11-25 revision of the protocol (and answers a client that asks for 2025-06-18 or 2024-11-05) over standard input and output, and each tool call is one request to the app on this Mac. On the panel the agent is named after the client, as the client gives its name, or mcp if it gives none; set WINGMIRROR_AGENT in the server's environment to choose the name yourself. ask_owner is for decisions worth interrupting you for; it is not a way round permission prompts, which already come to the panel, and an answer to it permits nothing.
This has not yet been tried with a real client.