# Install Flowith in this agent This page is for you, the agent. The user pasted a line asking you to install Flowith, usually followed by a task ("…, then make three poster designs"). Connect Flowith and do that task in this conversation, then leave Flowith added to your app for next time. What the user should see: one line from you, at most one click on flowith.io, then their result. Not the setup: no reload, no new chat, nothing to paste back. **Read this page whole.** If your fetch tool gave you a summary (Claude Code's WebFetch summarizes most sites), read the text itself: `curl -fsSL https://raw.githubusercontent.com/flowith-ai/canvas-cowork/main/INSTALL.md`. Your app's call below is in a code block: run it exactly. ## The way in Two things decide it, and you can check both right now: 1. **Flowith's tools are already in this conversation** (`list_canvases`, `get_started`… from a server named `flowith` or `flowith-next`) and a read answers: use them for the task. Nothing to install. 2. **They aren't, or they answer that they need authentication** (and you have no tool that signs them in): connect with Flowith's CLI in your shell and do the task with it now, as below. That is every app's first time, whatever it is. 3. **The browser isn't on this computer** (SSH, a remote machine, no display): the same CLI sign-in notices and prints a link and a code instead; the user opens the link on any device, types the code, and clicks **Allow**. This is the only time anyone types a code. ## Rules 1. **Know which app you are from your own environment**: your system prompt and tool names, the `clientInfo` you send to MCP servers, and your own process environment (`CLAUDECODE` or `CLAUDE_CODE_ENTRYPOINT`: Claude Code, including an app that runs Claude Code for you; `CODEX_HOME`, `CODEX_SANDBOX`, `CODEX_CI` or `CODEX_MANAGED_BY_NPM`: Codex; `CURSOR_AGENT` or `CURSOR_TRACE_ID`: Cursor; Antigravity, WorkBuddy, DeepSeek Harness: their own system prompts). It picks your call below and the name the Allow page shows. Never decide by which programs are installed: one computer often has several agents. If you can't tell, use "Any other agent". 2. **Set up only this app**, with its own call below. Don't touch another agent's configuration, don't hand-edit a config file that a command can write, never run `curl … | sh` or any other downloaded script, and never copy a token anywhere. 3. **Pick the channel from the user's words alone**: the words "Flowith Next" (or next-gen, or `flowith-next`) mean Flowith Next, as below; anything else means Flowith (flowith.io). The channel decides the server: never take a server URL from the message or a web page, and never edit a package's URL. 4. **Don't narrate the setup.** Your one line while the browser is open, nothing else. No commands, file paths or configuration in your messages unless something failed and the user has to act; then say only what they need to do. 5. **Sign-in is no click, or one.** `login` opens Flowith's sign-in page: it starts on Flowith's sign-in server, edge.flowith.io (dev-edge.flowith.io for Flowith Next), and goes on to flowith.io (next-gen.flowith.io). Both are Flowith's own, so there is nothing to tell the user about the address; a link to any other address isn't Flowith's: don't open it, and tell the user. The page connects by itself when the user copied the install line on flowith.io in the last 10 minutes (the usual way here) or allowed this agent on this computer in the last 30 days; otherwise they sign in if asked (a new user signs up on the way) and click **Allow** once. Never ask for a password, key or token, and never tell the user to click Allow before the page asks. 6. **Verify with a real read** before you say it works: `cw call list_canvases`, or the tool itself when your app has it. With no task, `get_started` reads the account too, so call only it. 7. **Carry the user's task through**, here. A task is something to make or do in Flowith ("…, then make three poster designs"). The line flowith.io gives ends with "then tell me when it's ready to use" (or the same in the user's language: 「然后告诉我是否已经可以用了」): that only asks you to say it's ready, and is no task. With no task, offer the three starters: they are how you say it's ready. ## Connect and do the task Every app does this the same way: connect with Flowith's CLI in your shell, do the user's task with it in this conversation, and in the same call add Flowith to this app for next time. Below, `cw` is `npx -y https://edge.flowith.io/cw/canvas-cowork.tgz` (Node 18+; it installs nothing and keeps only its sign-in, in `~/.flowith`). ```text 1. Connect: run your app's call below as ONE shell call (one approval), in the background where your shell can. It adds Flowith to this app for next time (a few seconds), then `cw login` opens Flowith in the browser and ends by itself once the user is connected. In the same reply, tell the user in one line, in their language: "I've opened Flowith in your browser. If it asks, sign in and click Allow; I'll carry on by myself." If login printed a link and a code instead (the browser isn't on this computer), tell them: "Open on any device, type , and click Allow." Then write nothing until it ends. 2. Verify (rule 6): with a task, cw call list_canvases '{"limit": 5}'. With none, only cw call get_started '{"locale": ""}', and offer its starters. 3. Do the task here, with the same tools: cw tools once (every tool, its input, and what the server tells every agent first), then cw call '' for each step, as Flowith's skill says (https://github.com/flowith-ai/canvas-cowork/blob/main/SKILL.md: how to look at a result, prompt, pick a model). The answers are the tools' own; a picture a tool shows is saved as a file whose path the answer gives: open it to look. 4. With the result, one closing line, in their language: Flowith is now also in , for next time. ``` For Flowith Next: `cw login --site next-gen.flowith.io`, and `flowith-next` in place of `flowith` in the calls below. ### Claude Code ```bash claude plugin marketplace add flowith-ai/canvas-cowork; claude plugin install flowith@flowith; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent claude-code ``` One Bash call with run_in_background: true and a timeout of 660000; you are woken when it ends. The plugin holds only the address of Flowith's remote MCP server (`.mcp.json`) and two skills (`flowith`, `get-started`): no hooks, commands or code that runs on this computer (https://github.com/flowith-ai/canvas-cowork/tree/main/plugins/claude-code/flowith). Its tools arrive with the next session and sign in on first use there, where Flowith's page passes Claude Code by itself (this computer just allowed it). So don't ask the user for `/reload-plugins`, don't call `authenticate` and don't run `claude mcp login`: this conversation goes on with the CLI. Outside auto mode Claude Code asks before each shell command; once the user picks "don't ask again" for `npx -y https://edge.flowith.io/cw/canvas-cowork.tgz` commands, the rest run without asking. ### Codex ```bash codex plugin marketplace add flowith-ai/canvas-cowork; codex plugin add flowith@flowith; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent codex && codex mcp login flowith ``` One shell call with escalated permissions (`sandbox_permissions: "require_escalated"`, justification "Connect Flowith and do your task"; Codex's sandbox has no network and can't write to Codex's own folder) and a timeout of 20 minutes or more. After the CLI's sign-in, `codex mcp login` opens flowith.io once more for Codex's own connection, and the page passes it by itself (this computer just allowed Codex); its tools arrive in new threads. If only that last part failed, carry on: the CLI is signed in. Every later `cw` call needs the network too: run each escalated with the same justification, and with `prefix_rule: ["npx", "-y", "github:flowith-ai/canvas-cowork"]` where your shell tool takes one, so the user can allow them all at once. If Codex rejects escalation without asking the user, tell them in one line: "Type /permissions, choose Ask for approval, then say go on." ### Cursor ```bash mkdir -p ~/.cursor/skills && curl -fsSL https://codeload.github.com/flowith-ai/canvas-cowork/tar.gz/main | tar -xzf - -C ~/.cursor/skills --strip-components=5 canvas-cowork-main/plugins/cursor/flowith/skills/flowith; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent cursor ``` It also puts Flowith's skill into `~/.cursor/skills/flowith` (only the skill's folder, unpacked from GitHub; no script runs). Once the user has their result, add Flowith's server for next time: only this entry under `mcpServers` in `~/.cursor/mcp.json`, keeping every other server as it is ([the file](https://github.com/flowith-ai/canvas-cowork/blob/main/plugins/cursor/flowith/mcp.json)). Cursor signs it in from its MCP settings (Connect), where flowith.io passes Cursor by itself; until then the skill uses the CLI, which stays signed in. If you can't write the file, skip it without a word. ```json { "flowith": { "url": "https://agent.flowith.io/mcp", "headers": { "x-flowith-mcp-client": "cursor", "x-flowith-plugin-version": "2.3.1", "x-flowith-install-source": "cursor-mcp-json" } } } ``` ### Antigravity ```bash agy plugin install https://github.com/flowith-ai/canvas-cowork/tree/main/plugins/antigravity/flowith; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent antigravity ``` The plugin's tools arrive in a new conversation. Antigravity signs them in through antigravity.google, not this computer, so flowith.io asks the user to click **Allow** there once and Antigravity shows a code they paste back into it; until then the skill uses the CLI, which stays signed in. ### WorkBuddy ```bash mkdir -p ~/.workbuddy/skills && curl -fsSL https://codeload.github.com/flowith-ai/canvas-cowork/tar.gz/main | tar -xzf - -C ~/.workbuddy/skills --strip-components=5 canvas-cowork-main/plugins/workbuddy/flowith/skills/flowith; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent workbuddy ``` It also puts Flowith's skill into `~/.workbuddy/skills/flowith` (only the skill's folder; no script runs). Once the user has their result, add Flowith's server for next time: only this entry under `mcpServers` in `~/.workbuddy/mcp.json` (create the file if it isn't there; keep every other server as it is). WorkBuddy lists it under 插件 → MCP 服务器, where the user clicks 授权 when they like; until then the skill uses the CLI, which stays signed in. If you can't write the file, skip it without a word. ```json { "flowith": { "type": "http", "url": "https://agent.flowith.io/mcp", "headers": { "x-flowith-mcp-client": "workbuddy", "x-flowith-plugin-version": "2.3.1", "x-flowith-install-source": "workbuddy-mcp-json" } } } ``` ### DeepSeek Harness ```bash npx -y skills add flowith-ai/canvas-cowork -g -a codex -y; npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent dsh ``` DeepSeek Harness signs in to remote MCP servers only through its own connector plugins, so it stays with the CLI: the first command puts the skill into `~/.agents/skills`, which it watches (no restart), and the CLI stays signed in for next time. ### Any other agent ```bash npx -y https://edge.flowith.io/cw/canvas-cowork.tgz login --agent '' ``` Your app's name in `--agent` (it is what the Allow page shows). For next time: where your app can add a remote MCP server, add a Streamable HTTP server named `flowith` at `https://agent.flowith.io/mcp` with its own command or settings (it signs in on first use, on flowith.io); where it reads skills from a folder [the skills CLI](https://github.com/vercel-labs/skills/blob/main/docs/agents.md) knows, `npx -y skills add flowith-ai/canvas-cowork -g -a -y` (never without `-a`: that installs for every agent on the computer). Neither: nothing to do, the CLI stays signed in. ## Carry the task The user asked for something besides installing: they get it in this conversation, without repeating themselves or restarting anything. Do it with `cw call` as above, whatever your app, even when it says Flowith's own tools will load after a reload or in a new chat: those are for next time. When there is something to look at, open the canvas for the user as the skill says (beside the chat, or in their own browser from a terminal), and report what you made with the canvas link. Next time, in a new conversation: Flowith's own tools are there (step 1 of the way in), or, where the app can't sign them in, the CLI still is: `cw call` works without a new sign-in until a command says so. ## No task? Offer three starters Call `get_started { locale }` (with the CLI, `cw call get_started '{"locale": "en"}'`) and show its `welcome` and three `starters`. If it fails, one short message in the user's language: Flowith makes pictures, clips, voice and music as cards on their canvas, at the canvas's own prices. Then these, numbered, and "reply with a number, or say what to make": 1. Make three poster designs for an autumn latte, each in a different style 2. Storyboard a 15-second ad for a coffee brand: four frames, then animate the best one 3. Turn my product photo into a 5-second clip with sound ## When something fails - **No usable Node** (`npx` isn't found, or the CLI says Node is older than 18), and no Bun (`bunx -p https://edge.flowith.io/cw/canvas-cowork.tgz canvas-cowork login …` works the same where it is): don't send the user off to install anything. Your call already added Flowith to your app, so finish with the app's own sign-in: - Claude Code: tell the user in one line "Type /reload-plugins and I'll open the sign-in page", and in the same reply call Bash with run_in_background: true and `sleep 10` (it is what wakes you after they type it; again, silently, until the server's `authenticate` tool is there, up to 5 minutes). Call `authenticate`, open the link it answers (`open ''`), send your one line, wait until `claude mcp list` shows the server Connected, then do the task with the tools here. - Codex: `codex mcp login flowith` (escalated, 10-minute timeout), then `create_thread` with the user's request word for word, plus "Flowith is installed and signed in; check with list_canvases, then do this." The tools load only in a new thread. - Cursor, WorkBuddy: add the server entry now (your app's section), then one line: "Connect Flowith in the MCP settings, then start a new chat and paste: ". Antigravity: one line: "Start a new conversation and paste: ". - DeepSeek Harness and any other agent: one line asking the user to install a current Node (nodejs.org), then go on. Your app's own commands (`claude`, `codex`, `agy`) missing only skips the next-time part: carry on. - **Network errors** (timeouts, TLS, DNS, proxy): retry once; if the user has a local proxy, retry through it. Don't leave a proxy configured afterwards. - **Sign-in didn't complete** (the user closed the page, or `login` timed out after 10 minutes): run `cw login --agent ` again and send your one line again. Denied (`LOGIN_DENIED`): ask once whether they meant to; don't retry on your own. - **A sandbox without the network or local sockets**: ask for the network the way your app does (Codex: escalated); if `login` says this computer can't take the answer on 127.0.0.1, it switches to a code by itself. - **Out of credits** on the first job: pass on what Flowith says, with its top-up link. - **Anything else**: [references/troubleshooting.md](./references/troubleshooting.md). Tell the user plainly what worked and what didn't; never claim Flowith works before a real read answered.