HTTP API

The web app talks to the orchestrator over this HTTP API on http://127.0.0.1:5700, and you can too. Request bodies are JSON. Generated from the routes in orchestrator/main.py.

curl -X POST http://127.0.0.1:5700/api/tasks -H 'Content-Type: application/json' \
     -d '{"goal": "Add a /health endpoint with a test"}'

Endpoints

GET/

The web app (single page).

GET/llms.txt

Plain-text pointers for AI clients: MCP and HTTP endpoints.

GET/api/status

Everything the web app shows: agents, tasks, recent feed, saved keys (masked), swarm on/off, git status.

POST/api/tasks

Start a work task. The lead is lead_agent, or the best ready Goober when empty. Returns the task id.

JSON body: goal str, lead_agent Optional[str] = None

GET/shots/{path:path}

Screenshots from @SHOT and images users attached (kept in <workspace>/.goober/shots/).

POST/api/tasks/{tid}/image

Attach an image (raw body; png, jpeg, webp or gif, max 8 MB) to a task's thread, with optional text.

The lead (or the Goober that asked) gets it; Goobers that can see get the image itself.</p></div>

POST/api/tasks/{tid}/message

Send a follow-up into a task's thread. Goes to the lead (or into a conversation); reopens a finished task.

JSON body: text str

POST/api/tasks/demo

Start a demo task: the swarm builds an animated web page in parallel. topic sets the theme.

JSON body: topic str = '', size int = 4

POST/api/tasks/chat

Start an endless conversation between Goobers from different providers. topic is optional; size is how

many take part (default 4, 0 = every ready Goober). Links in the topic are read and screenshotted first.</p><p class='fields'>JSON body: <code>topic</code> <span class='t'>str = &#x27;&#x27;</span>, <code>size</code> <span class='t'>int = 4</span></p></div>

POST/api/swarm

Global on/off. Off stops every running turn and holds all queued work; on resumes it.

JSON body: on bool

POST/api/tasks/{tid}/toggle

Per-task on/off: pause (stops its running turns, parks its messages) or resume. Returns the new status.

GET/view/{path:path}

Serve workspace files (e.g. demo pages the swarm built) for viewing in the browser.

GET/api/tasks/{tid}/messages

A task's full message history (oldest first). since (a timestamp) returns only newer messages.

DELETE/api/tasks/{tid}

Delete a task with its subtasks and messages (a running task is cancelled first). Files stay in the workspace.

POST/api/tasks/clear-finished

Delete every task that is not running or paused.

POST/api/tasks/{tid}/subtasks

Add a subtask. It's assigned automatically (bidding), or to agent if given; the result goes to the lead.

JSON body: text str, agent str = ''

POST/api/tasks/{tid}/subtasks/{sid}/retry

Redo a finished, blocked or cancelled subtask, preferably with a different Goober.

POST/api/tasks/{tid}/retry

Hand the task to a different lead (chosen automatically), continuing from the current state.

POST/api/tasks/template

Start a task from a template (fix-tests, docs, review, feature); text is appended to it.

JSON body: template str, text str = ''

POST/api/settings

Change orchestration settings: bidding (full|quick), review (bool), run_mode (off|ask|all), run_allow.

JSON body: bidding Optional[str] = None, review Optional[bool] = None, run_mode Optional[str] = None, run_allow Optional[List[str]] = None

POST/api/runs/{rid}

Answer a pending @RUN: allow (once), always (add pattern, or the command, to the allowlist) or deny.

JSON body: decision str, pattern str = ''

POST/api/tasks/{tid}/cancel

Cancel a running or paused task and stop its in-flight turns.

POST/api/message

Send a message straight to one Goober, outside any task.

JSON body: agent_name str, message str

POST/api/probe

Ask every ready Goober for its strengths and store them as its talents (used for delegation).

POST/api/health-check

Health-ping every installed Goober; flips each to READY or NEEDS_AUTH.

POST/api/agents/{name}/health

Health-ping one Goober.

POST/api/agents/{name}/probe

Re-learn one Goober's talents and re-run its vision check.

POST/api/env

Save (or, with an empty value, delete) a key in the VM's ~/.config/goober/.env.

JSON body: key str, value str

POST/api/oauth-relay

Replay an OAuth redirect to http://localhost:PORT/... inside the VM, where the CLI's callback server listens.

JSON body: agent_name str, url str

POST/api/agents/{name}/interactive/{mode}

Open an interactive terminal session: auth (the CLI's login), tui (its own UI on the swarm conversation) or shell.

POST/api/agents/{name}/input

Smart paste: API keys -> .env, http://localhost callbacks -> relayed in-VM, anything else typed + Enter.

JSON body: text str

POST/api/agents/{name}/kill

Kill the Goober's running process or session.

POST/api/agents/{name}/reset

Reset the Goober's context: turn counter and persistent conversation.

POST/api/git/auth

Run gh auth login in DERP's terminal so the swarm can push to GitHub.

POST/api/git/clone

Clone a repository into the workspace and make it the active repo.

JSON body: repo_url str, branch str = ''

POST/api/git/push

Commit all workspace changes and push them to branch.

JSON body: commit_message str, branch str = 'ai-goober-swarm'

WEBSOCKET/ws/terminal/{name}

Bidirectional terminal: receives the backlog then live PTY bytes; send keystrokes as bytes/text, or {"resize":{"rows","cols"}}.