autoflow-agent
v3.0.18Let Claude Code, Codex, Antigravity or any MCP client control the AutoFlow Chrome extensions (Queue Manager and Studio).
Lets an AI agent on your computer — Claude Code, Codex, Antigravity, Cursor, Claude Desktop or any other MCP client — drive the AutoFlow Chrome extensions: The agent asks; the extension does the work with the same code as its own buttons. So an agent's run is checked against your plan's limits, charged the same way, and shows up in the panel as it happens. The server listens on 127.0.0.1 only. The extensions connect to it; it accepts only AutoFlow's own extensions (by the Origin a browser sets and a web page cannot change), so no website can use it.
Summary extracted from the README.
AutoFlow agent server (autoflow-agent)
Lets an AI agent on your computer — Claude Code, Codex, Antigravity, Cursor, Claude Desktop or any other MCP client — drive the AutoFlow Chrome extensions:
- Queue Manager: add queues of prompts (with reference images and Flow characters), change settings, run, pause, stop, retry, and read the results.
- Studio: build workflows from a plan, open templates and saved workflows, edit nodes, run, retry, stop, and read every node's result.
The agent asks; the extension does the work with the same code as its own buttons. So an agent's run is checked against your plan's limits, charged the same way, and shows up in the panel as it happens.
How it fits together
Claude Code / Codex / Antigravity your browser
─────────────────────────────── ───────────────────────────────
agent ──stdio (MCP)──► autoflow-agent ◄──ws://127.0.0.1:8124── Queue Manager
◄───────────────────── Studio
The server listens on 127.0.0.1 only. The extensions connect to it; it accepts only AutoFlow's own extensions (by the Origin a browser sets and a web page cannot change), so no website can use it. Several agent sessions can run at once: the first holds the port and the others relay through it.
1. Switch it on in the extension
Agent control is off until you turn it on, in each extension:
- Queue Manager and Studio: the Agent switch at the top of the panel (the same setting as Settings → AI agents → Let AI agents control AutoFlow). Pressing Agent shows what it does and a Watch how video.
The line under the switch says Waiting for the agent server until step 2 is done, then Connected.
2. Add the server to your agent
Claude Code
claude mcp add autoflow -s user -- npx -y autoflow-agent
Codex (CLI or IDE extension)
codex mcp add autoflow -- npx -y autoflow-agent
or in ~/.codex/config.toml:
[mcp_servers.autoflow]
command = "npx"
args = ["-y", "autoflow-agent"]
Antigravity: Agent panel → ⋯ → MCP Servers → Manage MCP Servers → View raw config, and add:
{
"mcpServers": {
"autoflow": { "command": "npx", "args": ["-y", "autoflow-agent"] }
}
}
Cursor / Claude Desktop: the same mcpServers entry, in .cursor/mcp.json or claude_desktop_config.json.
On Windows, if the agent cannot start npx, use "command": "cmd", "args": ["/c", "npx", "-y", "autoflow-agent"].
Then ask your agent something like "Check AutoFlow is connected, then queue these five prompts in portrait on Veo 3.1 Fast and run them."
3. The AutoFlow skill (optional, recommended)
The server already tells every agent the rules when it connects, and the autoflow_guide tool returns the full guide: what costs credits, making videos from a script, settings, characters, clips that continue each other, what to do when Flow refuses a prompt, and Studio plans.
For Claude Code, Codex and Antigravity, install it as a skill too, so the agent loads it whenever AutoFlow comes up:
npx -y autoflow-agent install-skill
It writes autoflow/SKILL.md into the skill folder of each of those agents found on the computer (~/.claude/skills, ~/.codex/skills, ~/.agents/skills, ~/.gemini/antigravity/skills). --all installs for every one of them, --dir <folder> into a folder you name; an existing skill called autoflow that is not this one is left alone unless you add --force. Run it again after an update. Restart the agent afterwards.
Tools
| Tool | What it does |
|---|---|
autoflow_status |
Which extensions are connected. Call first. |
autoflow_guide |
The full guide for agents (the skill). Read before a first run. |
autoflow_watch |
Everything as it happens, in every browser: clips done / failed (with Flow's reason), characters ready / failed, Studio steps done / failed / waiting for your decision, and problems (Flow window minimized, account limited, no credits). Loop it with since; it answers the moment something lands. Use it instead of polling. |
autoflow_use |
Choose the browser (Chrome or Multilogin profile, usually one per Google account) this agent session uses, by its name. Any tool also takes browser to name one for a single call. |
queue_status |
Signed in?, today's allowance, open Flow tabs, the running queue. |
queue_get_settings / queue_update_settings |
Read or change the saved settings; lists every allowed value. |
queue_list / queue_get |
Queues and their prompts, statuses, errors, output files; a refused prompt carries lastFailure (reason, kind, what to do). |
queue_add |
New queue from prompts (text, image files, characters). Each queue runs in its own new Flow project. |
queue_run |
Spends credits. Start a queue on Google Flow. |
queue_control |
Pause, resume, stop, skip, retry_failed. |
queue_download |
A queue's finished videos from its own Flow project, numbered by its prompts, into Downloads/AutoFlow/. |
queue_replace |
New words for failed prompts in the same prompt numbers (the panel's Replace), then runs them. Spends credits unless run: false. |
queue_watch |
Each clip as it happens: returns the moment a prompt is sent, done (media id, file) or failed (reason, kind, advice), with a tally; pass back since and loop until finished. Every event is also a line in ~/.autoflow/events.jsonl, for agents that follow a file (Claude Code's Monitor: tail -n 0 -F). |
queue_wait |
Wait until a queue stops running; lists every clip's moment during the wait. |
queue_delete, queue_logs |
|
queue_character_list |
The Character maker's characters, Flow's 30 voices, the image models. |
queue_character_write |
An AI writes a character from a short idea (needs a Gemini key in the panel). |
queue_character_create |
Spends credits (one portrait). Save and make a character in one call: name, look, voice. fullBody: true also draws a full body (one more image). |
queue_character_save |
Create or change a character: name, look, personality, voice, custom voice, full body. |
queue_character_make |
Spends credits (one portrait). Makes the character in Flow, once; every queue borrows it. |
queue_character_import, queue_character_delete |
Bring in the open Flow project's characters; remove one. |
studio_status |
The open workflow, run state, node counts. |
studio_plan_guide |
The brief for writing a plan. Read before studio_build. |
studio_check_plan / studio_build |
Check a plan; build it onto the canvas. |
studio_get_workflow, studio_list_workflows, studio_open_workflow |
|
studio_list_templates, studio_open_template |
|
studio_set_node |
Change a node's fields (prompt text, model, enabled…). |
studio_run / studio_retry |
Spends credits. Run the workflow; retry failed nodes. review: "errors" (default) pauses on a failed step for the agent, "every" pauses after every step. |
studio_wait |
Until the run ends or a step waits for the agent (waitingForYou). |
studio_look |
The pictures a step made (or a clip's first and last frames), for the agent to see. |
studio_decide |
For a waiting step: continue, redo (after changing it with studio_set_node), skip or stop. With no decision in 10 minutes the run continues. |
studio_download |
The final results (or every step) into Downloads/AutoFlow Studio//, with a manifest.json. |
studio_control, studio_outputs, studio_logs |
Tools that start generations say Spends in their description, so your agent — and you, approving its tool calls — can see which calls cost credits.
Watching what it does
While an agent is connected, the Queue Manager's panel and Studio's canvas show a bar naming it (Claude Code is controlling AutoFlow) with a Stop button that switches agent control off. Each extension's Agent page (the link under the switch) shows which agents are connected, this server's version and port, the settings or workflow the agent works with, marking what it changed, and every call it made with what it asked and the answer.
The agent's name is the one its MCP client gives at startup; servers before 3.0.1 do not pass it on, and the extensions say An AI agent.
Troubleshooting
-
"… is not connected": switch on Let AI agents control AutoFlow in that extension. Since 3.0.10 a call waits up to 45 s for the extension to connect, so the first call after the agent starts simply works; there is no need to switch the extension off and on. The extension's Agent page has a Connect now button.
-
Multilogin, AdsPower or another proxied profile: add
127.0.0.1to the profile's proxy bypass list. -
"Port 8124 is taken by something that is not an AutoFlow agent hub": an older AutoFlow MCP server is still running. Close it.
-
Another port: set
AUTOFLOW_AGENT_PORTfor the server, and the same number asautoflow_agent_portin the extension's storage. -
An unpacked (developer) build of an extension: its id is not a store id, so the server refuses it. The extension says The agent server refused this build with its id and a copy button (servers 3.0.5+), and
autoflow_statuslists it too. Allow it once:npx -y autoflow-agent allow <the id>The id goes in
~/.autoflow/allowed-ids.json, which the server reads on every connection: it works whichever agent started the server, with no restart.npx -y autoflow-agent allowedlists the ids,disallow <id>removes one. Or set it in your agent's MCP config and restart that agent (any agent's config counts, since 3.0.5):"autoflow": { "command": "npx", "args": ["-y", "autoflow-agent"], "env": { "AUTOFLOW_EXTENSION_IDS": "<the id>" } }On Windows:
"command": "cmd", "args": ["/c", "npx", "-y", "autoflow-agent"]with the sameenv. -
Several agents, several versions: the first server to start holds the port and the others relay through it. Since 3.0.5 a newer server takes the port from an older one, and
autoflow_statusnames the version holding it.The server never accepts an extension on its own say-so: whatever connects as AutoFlow receives your agent's prompts and the image files it sends.
Develop
npm install
npm test # builds, then runs the hub, relay and MCP tests
Source: src/protocol.ts (the wire), src/hub.ts (the port and who may use it), src/link.ts (hub or relay), src/tools.ts (what agents see).