Inspect
Query the API server to explore stored conversations. The /v1/* surface splits into two views: sessions — one row per harness/agent session, UUID-keyed — and stems — the Merkle leaf-chain, forensic view, hash-keyed. A stem is a single root-to-leaf path through the Merkle DAG; earlier versions of the API called a leaf path a “session.”
System
/ping Health check endpoint /metrics Prometheus RED metrics (unauthenticated) /v1/stats Aggregate counts, tokens, cost, duration, tool calls Sessions
The product session view, backed by the sessions table populated by the session-tracking ingest path.
/v1/sessions One harness/agent session per row, newest-first, cursor-paginated (?limit, ?cursor) /v1/sessions/:id A session plus the selected stem of turns and a summary of every stem in it (?stem=longest|all, ?root=<hash>) Stems
The Merkle leaf-chain, forensic view. Filterable by project, agent_name, model, provider, since, and until.
/v1/stems Per-leaf-chain aggregates: cost, tokens, status, duration /v1/stems/:hash A leaf’s ancestry chain, root-first (supports ?depth=N) /v1/stems/:hash/graph Graph-shaped DAG projection for visualization Search & agents
/v1/search Semantic search across stored sessions (requires embeddings) /v1/mcp MCP server for agent integration (requires embeddings) API server runs on port 8081 by default when using tapes serve. The /metrics endpoint is intentionally unauthenticated so an in-cluster Prometheus can scrape it — see tapes serve metrics. For MCP endpoint details, see MCP API Reference.
Migrating from the older API
The leaf-chain endpoints moved under /v1/stems so /v1/sessions could become the product session view. Response shapes for the moved endpoints are unchanged.
| Before | After |
|---|---|
GET /v1/sessions (leaf-node list) | GET /v1/sessions now returns one row per harness/agent session; the leaf list is removed |
GET /v1/sessions/summary | GET /v1/stems |
GET /v1/sessions/:hash | GET /v1/stems/:hash |
GET /v1/sessions/:hash/graph | GET /v1/stems/:hash/graph |
| — | GET /v1/sessions/:id (new) |
OpenAPI Spec
The API server ships its own generated reference. With tapes serve running:
/swagger Interactive Scalar UI rendered from the OpenAPI spec /swagger/doc.json OpenAPI 3 spec (JSON) — feed it to your client codegen of choice Open http://localhost:8081/swagger in a browser for the live reference.
DAG visualization web UI
The API server ships an optional browser UI that renders the Merkle DAG of a session — useful for stepping through conversation turns visually. It is off by default; enable it explicitly so an unintentionally exposed API server doesn't serve a UI.
# Standalone API server
tapes serve api --web-ui --postgres "$DSN"
# All-in-one
tapes serve --api-web-ui --postgres "$DSN" With the flag set, the API server serves the UI at / and exposes a graph-shaped projection of each stem at:
GET /v1/stems/:hash/graph The graph endpoint returns nodes and edges suitable for client-side rendering. It's the same data the bundled web UI reads, so you can build your own front end against it.