Skip to content

Caliper API v0

Caliper API v0 is an HTTP interface to the running app, on the loopback address and behind tokens, that lists and launches applets, returns a capture, serves a stream and runs the commands of the command layer.

Field Value
ID AGT-01
Status Shipped
Scope Core
Pillar Agents and Automation
Sprint None
Depends On Host (COR-01)
Command Layer (SPC-05)
Unblocks MCP Server (AGT-02)
Widget Agent (AGT-05)
Spec Page (EMB-06)
Streaming, the Hub and Caliper API on Windows (PLT-08)
Docs HTTP API
Branches None
Design None

Coverage Ledger

  • Branch sprint3-int-api, 0 commits that main lacks (96 ahead of the merge base). Work on the command endpoints of Caliper API, which reached main through a pull request (patch ids and subjects match).
  • design/acp-integration.md, under Approvals and diffs for every agent. The origin comes from the token: api.json holds the mcp token and each agent session gets its own agent token, with stream access limited to watching.
  • design/acp-integration.md, under The side chat in the app. The side chat starts Caliper API on loopback when the app runs without --api, visibly, with a per-session agent token, and stops it when the agent ends unless Open in browser gave out a link.
  • design/applet-builder.md, under Safety in every option. Control port on localhost with a session token, read-only SQL, approvals for deleting or overwriting commands.
  • design/builder-overview.md, under What is built. caliper-mcp against Caliper API v0 and the command endpoints.
  • design/builder-overview.md, under What is built. The API server serves the command endpoints through a CommandGateway with approvals held.
  • design/builder-overview.md, under The integration order after sprint 2. Item 1: the command endpoints of Caliper API, built.
  • design/builder-pane.md, under Decisions. Open in browser keeps the API running until the app quits and the link carries only the viewer token.
  • design/builder-session.md, under What is built and what is planned. The spec page that draws the open spec with the spec runtime, panel.render through the offscreen renderer and the app's API server serving the command endpoints.
  • design/builder-session.md, under Caliper API. AppSession::command_gateway() serves the command table at once and opens the workspace on a first command.
  • design/builder-session.md, under The stand-in host. caliper-builder-host serves GET /v0/commands and POST /v0/commands/{name} with strict HTTP/1.1, origin by token, approval holds and options for review and approval; a development tool, not part of the product.
  • design/byok-agent.md, under Widget sessions. Tool calls go through Caliper API with origin agent and a per-turn group so a prompt's edits undo as one step.
  • design/command-layer.md, under What is built and what is planned. The command endpoints of Caliper API served by the app through CommandGateway and the session gateway.
  • design/command-layer.md, under app. app.info, app.applets and app.launch, bound by the running app.
  • design/command-layer.md, under Caliper API. GET /v0/commands, POST /v0/commands/{name} with origin, group and preview headers, approval holds of 120 seconds and GET /v0/approvals/{id}, plus how the server holds a request without a thread.
  • design/command-layer.md, under Which origin a call has. The origin belongs to the token, not the request, so a request cannot raise its own rights.
  • design/command-layer.md, under Open items. Approvals from api never expire and could fill the 64 pending slots; a long expiry and a share of slots per origin would bound it.
  • design/command-layer.md, under Open items. Holding a launch of a workspace spec applet as one command under review, so it waits on a card like other held commands.
  • design/mcp-server.md, under Where a call goes. Routing of the four v0 tools to their v0 endpoints and of every other tool to POST /v0/commands/{name}.
  • design/mcp-server.md, under Results. The held launch answer: a launch that would replace unsaved changes answers PENDING_APPROVAL with a note so the agent checks rather than believes.
  • design/mcp-server.md, under The API file. api.json holds the outside-agent token, is read strictly at every call, and is read again after a 401 or refused connection so a restarted app works.
  • design/mcp-server.md, under What works against API v0. What works against API v0 on sprint2: the four v0 tools only, with other tools answering mcp.no_command_layer.
  • design/roadmap.md, under Where things stand. Streaming to notebooks, browsers and the app, the hub, Caliper API v0 and caliper build are built.
  • design/roadmap.md, under Phase 3: agent-built panels. Status paragraph says the libraries are not yet wired into the app: command endpoints, spec runtime and applet kind, drag and drop, builder pane, side chat and widget inline surface.
  • design/roadmap.md, under API. Caliper LIB, Caliper Embed and Caliper API v0 are built.
  • design/roadmap.md, under API. The full API comes later with the command layer, so a program can drive the app's state from outside.
  • design/roadmap.md on the branch sprint4, under API. The API subsection describes API v0 as planned work; main already ships it, so this is the older base.
  • design/spec-format.md, under What is built of the browser viewer. Opening it: with --api the app prints the page link and writes spec_url to the API file; the link carries a viewer token that opens only the page and read-only commands from the origin viewer.
  • design/spec-format.md, under The spec applet in the loader. check_spec parses and validates a spec when the applet is checked or launched; caliper list and caliper check print the kind and the validator's diagnostics, caliper install refuses a spec applet and GET /v0/applets has a kind field.
  • design/windows-parity.md, under Where Windows stands. The network stream, hub, Caliper API, caliper build, web viewer and notebook widget are built and tested on macOS; the WebSocket layer, hub and API are compiled, not tested on Windows.
  • design/windows-parity.md on the branch sprint4-pr1-main2, under 4. Streaming, the hub and Caliper API. GET /v0/capture.png in the windowed app on Vulkan (2 days).
  • CLI, Caliper API. The --api, --api-port and --allow-control options that serve Caliper API from the running app.
  • HTTP API, Startup. Caliper API starts with --api or CALIPER_API=1, and from the app for Open in browser and the side chat.
  • HTTP API, App Startup. The app starts the API on its own for the browser viewer and the side chat.
  • HTTP API, Windowless Mode. Caliper API with caliper shot and the hidden app runs without a visible window.
  • HTTP API, Security. Loopback only, behind tokens that say who sends each command.
  • HTTP API, GET /v0/info. GET /v0/info returns what caliper info prints, as JSON.
  • HTTP API, GET /v0/applets. GET /v0/applets returns what caliper list prints.
  • HTTP API, POST /v0/applets/{id}/launch. POST /v0/applets/{id}/launch opens an applet page.
  • HTTP API, GET /v0/capture.png. GET /v0/capture.png returns a capture of the frame the app draws.
  • HTTP API, GET /v3/stream. GET /v3/stream serves wire protocol v3 as a hub.
  • HTTP API, POST /v0/commands/{name}. POST /v0/commands/{name} runs a command.
  • HTTP API, Threads and Limits. Threads and limits of the API.
  • HTTP API, Errors. The error codes of the API.
  • HTTP API, Worked Examples. Examples of calls.
  • Pull request #14. Pull request 14 (merged) delivers sprint 2: wire protocol v3 and 3.1, Caliper LIB serving, data views, browser views, the hub, the app attaching to a stream, interactive controls, Caliper API v0, macOS 14 target and CI for the browser views.
  • Pull request #14. Known gaps recorded in pull request 14. The notebook widget is untested in VS Code notebooks, the capture is Metal only, and the cost goal of 3 percent is missed for three views with two viewers (4.6 percent).
  • Pull request #17. Pull request 17 (merged) delivers sprint 3: the builder libraries, spec format, loaders, catalog, command layer and session, caliper-mcp, the side chat, the widget agent, command endpoints of Caliper API, the spec runtime and applets, the builder pane, drag and drop, approval cards and the first slice of the browser spec page.
  • Pull request #17. Review findings deferred in pull request 17: how Accept treats preview.commit, edge cases in the life cycle of the API the chat starts, approvals from the API that never expire, and a command joining another origin's undo step through its group.
  • Orchestrators' notes, _notes/HANDOFF-sprint3.md. Deferred review items for the chat: the life cycle of the API the chat starts, and a second app overwriting api.json.
  • Orchestrators' notes, _notes/HANDOFF-sprint3.md. A launch carries the caller's origin and answers PENDING_APPROVAL; the design for holding a launch as one approval command is an open item and was not built, by decision.
  • Orchestrators' notes, sprint3-integration/PR.md. In the app: command endpoints of Caliper API, spec runtime and spec applet kind, catalog providers, builder pane, drag and drop, approval cards and stacked previews; in the browser GET /v0/spec, panel.data and a viewer token.
  • Orchestrators' notes, sprint3-integration/PR.md. Behaviour changes: api.json holds an mcp token, the origin comes from the token, and mcp and agent tokens watch only on the stream.
  • Orchestrators' notes, sprint3-integration/PR3.md. A launch carries the caller's origin; an agent's launch over unsaved changes is held and answers PENDING_APPROVAL.
  • Orchestrators' notes, sprint2/PR.md. Caliper API v0 and the caliper serve and caliper build subcommands.
  • Orchestrators' notes, sprint2/PR.md. Window capture through GET /v0/capture.png works on Metal only and answers 501 on the other renderers.

Roadmap Graph Feature in Graph