Skip to content

HTTP API shapes, streams, git and WebSockets

This page lists what the API serves besides its JSON routes. The JSON routes are on the area pages.

GET /v1/shape/<name> streams a table’s rows from Electric, filtered by the API. People and machines each have their own list of names, and a name outside the caller’s list answers 404 with no shape named <name>. Only GET reads a shape.

The API forwards the query keys offset, handle, live and cursor to Electric and drops the rest. A key starting with subset answers 400 with subset reads are not served. A shape’s argument is a query parameter that holds an id, such as ?session=<id>. A missing argument answers 400 with <name> must be an id. Only a request with live set may be cached.

Shape Table Argument What it holds
people people None The team’s people.
instances instances None The team’s machines, without token hashes.
seats seats None The seats of the team’s computers and the agent holding each.
invites invites None Admins only.
join_requests join_requests None Logins waiting to join. Admins only.
claude_logins claude_logins None The person’s own Claude sign-ins.
agents agents None The team’s agents that are not archived.
named_agents agents None Every agent of the team, archived or not, with the same columns.
conversations conversations None The conversations the person may see.
conversation_members conversation_members None Members of the team’s conversations.
messages messages conversation A conversation’s messages.
attachments attachments conversation or session The files in a chat or a task’s session. A file nobody has sent is its uploader’s alone.
reactions reactions conversation or session Reactions in a chat or a task’s session.
pins pins conversation The messages pinned in a conversation.
sessions sessions of Sessions the person may see. of is conversations, tasks or folders.
connected_folders connected_folders None The connected folders the person may see.
events events session A session’s events.
asks asks None Open asks the person may see.
tasks tasks None The tasks the person may see that are not archived.
repos repos None The team’s repos.
projects projects None The team’s projects that are not archived.
repo_requests repo_requests None Requests to make repos on GitHub.
project_artifacts artifacts project The documents and links of a project’s tasks.
pipelines pipelines None The team’s pipelines.
proposals proposals None The team’s proposals.
proposal_hunks proposal_hunks None The hunks of the team’s proposals.
skills skills None The team’s agents’ skills.
plugins plugins None The team’s agents’ plugins.
routines routines None The team’s agents’ routines.
agent_hooks agent_hooks None The team’s agents’ hooks.
memories memories None The team’s memories.
templates templates None The team’s templates.
secrets secrets None Secret names the team’s agents need, never values.
turn_waits turns task or conversation Turns that wait for their machine, or run and went quiet, without their prompts.
secret_sets secret_sets None Where a secret was set from the app and when, never the value.
comments comments artifact A document’s comments.
pipeline_versions pipeline_versions None The versions of the team’s pipelines.
runs runs None Runs of tasks the person may see.
run_stages run_stages run A run’s stages.
artifacts artifacts task A task’s documents and links.
artifact_versions artifact_versions artifact A document’s versions.
task_blocks task_blocks task or blocker The tasks blocking a task, or with blocker, the tasks it blocks.
task_holds task_holds task A task’s hold, current or lapsed.
task_repos task_repos task, optional A task’s repos. Without task, the repos of every task the person may see.
file_changes file_changes task A task’s changed files, without their contents.
unlisted_changes unlisted_changes task A task’s repos whose changes are not listed, and why.
file_change file_changes id One changed file with its contents.
documents artifacts None Every document of every task the person may see, without contents.
links artifacts None Every link of every task the person may see, with its id, task, title, address and state. If someone stops seeing a task, the row can stay in their copy as it was, since the app’s client does not apply the removal Electric sends, and later changes and new rows do not reach them.
task_attempts task_attempts task A task’s attempts.
pushes pushes task Each request to open a task’s pull requests and how it went.
Shape Table What it holds
commands commands The machine’s queued commands.
connected_folders connected_folders The folders connected on this Mac.
claude_logins claude_logins The sign-ins under way on this box.
seats seats This box’s seats.

/v1/streams/sessions/<session id> carries a session’s live tokens. A machine reads and writes the streams of its own sessions. A person may only read, and only for sessions they can see. A write from a person answers 403 with people can only read live streams. The API proxies to a stream server that listens on 127.0.0.1 at AGENTS_STREAMS_PORT.

A machine reaches a repo through the API with its instance token. These paths are on the machine port.

Method Path What it does
GET /v1/git/<repo id>.git/info/refs Advertises the repo’s refs.
POST /v1/git/<repo id>.git/git-upload-pack Fetches and clones.
POST /v1/git/<repo id>.git/git-receive-pack Pushes. A push to the repo’s default branch answers 403. On a repo with a policy, a machine may push only to the branches task/<slug> and replay/<slug> of tasks that have a workspace on that machine. A refused push answers 403 and is recorded in refused_pushes.

These paths take a POST on the machine port and answer 401 with bad signature when the signature does not match.

Path Signature header What it does
/v1/hooks/forge X-Gitea-Signature Takes the forge’s push, issues and label events. A push syncs the repo’s pipelines. An opened or labeled issue starts the runs of pipelines that trigger on it.
/v1/hooks/pipelines/<pipeline id> X-Agents-Signature Starts a run of one pipeline. The body is {title, body, repo, id?}, where repo is the forge path such as <team>/<repo>. An id makes a repeated delivery start one run. The secret derives from AGENTS_HOOK_SECRET and the pipeline id.

POST /v1/connectors/<connector id>/mcp?session=<session id> on the machine port is the MCP endpoint an agent’s session uses to call a connector’s tools. Any other method answers 405. It works only in a session with a turn running on the calling machine. A tools/call runs only for the tool call whose id its _meta carries as claudecode/toolUseId, which the session’s machine reported as a tool_call of mcp__<connector>__<tool> with the same arguments and no result yet, waiting up to 30 s for that report. Any other call gets a tool error that says why. A tool that asks spends only the yes on the ask that same call raised.

GET /v1/downloads/mac.zip on the people socket streams the Mac app that AGENTS_MAC_APP names. GET /f/<ticket> on the views socket serves one connector view page for a ticket, for GET and HEAD only. A ticket is good for AGENTS_FRAME_TICKET_SEC seconds, 600 by default.

Listener Path What it carries
People /v1/screens/<instance id> and /v1/screens/<instance id>/seats/<number> A person watching a seat’s screen, and taking it over. The page’s Origin must be listed in AGENTS_PEOPLE_ORIGINS, or the upgrade answers 403 with Only the app may open a screen.
People /v1/voice/conversations/<conversation id> Voice chat with a conversation. The page’s Origin must be listed in AGENTS_PEOPLE_ORIGINS. The server hears through AssemblyAI and speaks through ElevenLabs.
Machines /v1/instance/control A machine’s control connection, which carries the frames of shared/link.ts as JSON text.
Machines /v1/instance/screen A box’s screen control connection.
Machines /v1/instance/screen/tunnels/<tunnel id> The tunnel a box opens for one viewer.