Reference for the CLI, the installers, the hook script, the HTTP API, and the MCP server. For step-by-step setup per agent, start with Getting started. Every section is also plain Markdown.
You are viewing archived documentation for v0.1 (CLI & Overlay 0.1.0, schema 23step.step/v2).
23step is one static binary for macOS (arm64, amd64) and Linux (amd64, arm64). It runs the capture daemon, talks to it over a 0600 socket in its state directory, reconciles local agent transcripts, and updates itself. Install it with the installer.
The CLI never takes a key as an argument. start reads it from STEP23_TOKEN or --token-file PATH; the file must be mode 600 and the key at least 16 characters. Use a key with the runs:write scope, created on Account.
reconcile also looks at STEP23_OTEL_KEY, STEP23_OTEL_KEY_FILE, ~/.config/23step-otel-key, and ~/.config/23step/token, in that order, so it works with the key the hooks already use.
Set the server with --api or STEP23_API (https://api.23step.com). The state directory defaults to $XDG_DATA_HOME/23step or ~/.local/share/23step; pass --state-dir to run more than one daemon at a time.
On an X11 display the daemon takes a full-screen frame on each click and typing burst. Key presses are classified (letter, digit, enter, …) and never stored. With --headless it captures Chrome through the DevTools Protocol instead and needs no display. It only ever connects to DevTools on 127.0.0.1 or localhost.
23step note lets an agent explain a frame while it works. 23step feedback is the other direction: when someone comments on a running step or pins a spot on a frame, the item is waiting for the agent. The hooks call it for you and add the comment to the agent's context on the next tool call; your own scripts can poll it the same way.
feedback prints JSON by default and marks the items it returns as seen. --peek leaves them unseen; --json=false prints one line per item.
Terminal
23step note "Checkout total verified at $42.10"
23step feedback --peek
Hooks can miss a turn: the agent was killed, the laptop slept, or a turn went idle without a stop event. reconcile reads the local session stores and makes the server match them. The hooks start 23step reconcile --watch --idle-exit 15m in the background, and the desktop overlay runs it every 20 seconds. Set STEP23_DISABLE_RECONCILER=1 to turn that off.
Release builds check https://api.23step.com/dist/manifest.json in the background at most every 15 minutes and install a newer version on their own. Every download is checked against its SHA-256. 23step update --check only reports; 23step update installs now.
Update settings
Env
Meaning
STEP23_AUTO_UPDATE
0 turns background updates off; 1 forces them on.
STEP23_UPDATE_CHECK_INTERVAL
How often to check, as a Go duration (default 15m).
STEP23_UPDATE_URL
Where to read the manifest from instead of STEP23_API.
https://api.23step.com/install.sh installs 23step and 23step-mcp into ~/.local/bin, and optionally the desktop overlay or the Grok Bot turn adapter. It never asks for or stores your API key, except in --grokbot mode. It is POSIX sh and needs curl plus sha256sum or shasum.
Each file is downloaded with its .sha256 sidecar and installed only when the hash matches. Binaries are replaced atomically, so running the installer again is how you repair an install. Add ~/.local/bin to PATH if it is not already there.
Files
Platform
Installed
macOS arm64 / amd64
~/.local/bin/23step, ~/.local/bin/23step-mcp; with --overlay, ~/Applications/23step Overlay.app (quarantine cleared, ad-hoc signed, opened in the background).
Linux amd64 / arm64
~/.local/bin/23step, ~/.local/bin/23step-mcp; with --overlay, ~/.local/opt/23step-overlay and the launcher ~/.local/bin/23step-overlay.
--grokbot
~/.local/bin/23step, ~/.local/bin/23step-mcp, ~/.local/bin/23step-grokbot-turn and its helper in ~/.local/share/23step, key in ~/.config/23step/otel-key (0600).
https://23step.com/install/hooks.sh wires coding agents to 23step. It downloads one Python hook script and merges entries for it into each agent's hook config. The hook sends each turn's prompt, thoughts, tool calls, commands, and token usage to the API, and starts a headless recorder when the agent opens a browser with a DevTools port. Per-agent walkthroughs are on Getting started.
It writes the hook to .agents/hooks/step23_otel.py (plus a Cursor wrapper in .cursor/hooks/), under ~ with --global. Running it again refreshes the script and replaces only its own config entries; your other hooks are kept. If both a repository and a global install exist, the hook sends each turn once. It needs curl and python3, and never reads or writes your key.
Terminal
# In the repository the agent works in (commit the result)
curl -fsSL https://23step.com/install/hooks.sh | sh -s -- claude cursor
# Once for every project on this machine
curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --global all
Options
Option
Meaning
--repo (default)
Install in the current repository: the git top level, else the current directory. Aliases --local, --project.
-g, --global
Install in your home directory for every project. Alias --user.
The hook reads its key from STEP23_OTEL_KEY, then STEP23_TOKEN, then the file in STEP23_OTEL_KEY_FILE, then ~/.config/23step-otel-key. With no key it exits quietly. It never blocks the agent: each request times out after 2 seconds.
The hook config passes the agent with a flag: --claude, --codex, or --cline / --openrouter. Cursor, Antigravity, and Gemini CLI are detected from the event payload. Any other harness that can run a command per lifecycle event can pipe its JSON event to the hook on stdin the same way (see the OpenRouter SDK guide on Getting started).
Hook environment
Env
Default
Meaning
STEP23_OTEL_ENDPOINT
https://api.23step.com
Where traces are sent.
STEP23_OTEL_TIMEOUT
2
Seconds per request.
STEP23_DAEMON=0
on
Do not start the screenshot recorder.
STEP23_CDP_PORT
discovered
DevTools port for the recorder to attach to.
STEP23_TURN_MAX_SECONDS
3600
Longest a turn may stay open.
STEP23_DISABLE_RECONCILER=1
on
Do not start 23step reconcile --watch.
STEP23_NO_AUTO_UPDATE=1
on
Do not update 23step from the hook.
STEP23_BIN
PATH, ~/.local/bin
Path to the 23step binary.
STEP23_ARTIFACT_DIR
Folder whose Markdown and image outputs are attached to the step as artifacts.
Use the API when your agent or test harness is not one of the supported agents: create a run, add frames, commands, and artifacts as they happen, then finalize it and share the link. The CLI, hooks, and overlay use these same endpoints.
The base URL is https://api.23step.com. Send Authorization: Bearer st_... on every call. A key in a query string is rejected. Create keys on Account: runs:write creates and writes runs, runs:read reads them. Requests are rate limited per key and per organization, and image uploads have a daily byte allowance; both depend on the plan. Over a limit the API answers 429 with Retry-After.
New steps get your organization's default visibility (set in Settings, private unless an admin changed it). Change it per step in the browser or with PATCH /s/{share_id}. Secrets (API keys, tokens, passwords, private keys) are always redacted before storage; email PII is redacted by default and can be toggled per organization in Settings.
Describe one frame (or up to 50 as {"frames":[…]}) and get an upload URL for each PNG.
PUT <upload_url>
none
Upload the PNG. The URL is valid for 15 minutes.
POST /runs/{id}/commands
runs:write or up_
Record one shell command: text, cwd, exit code, timing. Never stdout or stderr.
POST /runs/{id}/artifacts
runs:write
Attach a Markdown document or a PNG the agent produced.
POST /runs/{id}/frames/{seq}/note
runs:write
Add an agent note to a frame ({"text":"…"}).
POST /runs/{id}/heartbeat
runs:write
Mark a long, quiet run as alive.
POST /runs/{id}/upload-token
runs:write
Mint an up_ token for a subagent that may write only to this run.
POST /runs/{id}/finalize
runs:write
Close the run and write its manifest.
POST /runs/{id}/share
runs:write
Get the step link (step_url).
GET /runs/{id}
runs:read
Manifest: frames in seq order, gaps, finalized.
GET /runs/{id}/frames/{seq}
runs:read
Download the stored PNG for one frame.
GET /runs/{id}/feedback
runs:read or runs:write
Review comments left on the step. ?include_session=1 adds the session's other runs.
DELETE /runs/{id}
runs:write (owner)
Delete the run and its images. Returns 204.
Steps (browser session, or unauthenticated when public)https://app.23step.com
Method and path
Purpose
GET /s/{share_id}.json
The step as JSON (schema 23step.step/v2). Public steps need no auth; private/org steps use the browser session cookie (for API-key reads, use /runs/{id} or MCP).
GET /s/{share_id}.md
The step as Markdown, for handing to another AI.
PATCH /s/{share_id}
Signed-in owner: change visibility (private, squad, team, org, public), discoverability, or retention (retention_mode: default, days, forever, with retention_days). apply_to_session: true updates every run in the session.
POST /s/{share_id}/comments
Signed-in viewer in the org: comment on the step ({"text":"…"}). Comments reach a running agent through feedback.
screen_w, screen_h, and scale describe the coordinate space of the frames you will send (scale must be above 0). Everything else is optional. prompt is redacted and capped at 16 KB. session_id chains successive prompts of one conversation; previous_step names an earlier run explicitly; correlation_id puts a parent agent and its subagents in one run. Set join_session: true to attach to a run already open for session_id instead of creating a second one.
Each frame is two requests: a JSON description, then a PUT of the PNG to the upload_url it returns. seq runs from 1 to 5000, orders the timeline, and is the idempotency key: sending the same seq again returns the same object and a fresh URL. Send Content-Type: image/png and x-goog-if-generation-match: 0 on the PUT; a 412 means the image is already stored and counts as success.
Required fields: seq, trigger (click, key, or timer), ts (RFC 3339), x, y, window_title, app. Optional: url, button, key_category (a class such as letter or enter, never the key), description, and dom_snapshot (page text, so an AI can read the frame without the image).
TerminalPOST /runs/{id}/frames + PUT
RUN=6f0c2a7e-5d1b-4c39-9a51-0b7f3f8e2c11
# 1. Describe the frame. The response holds a short-lived upload URL.
UP=$(curl -sS https://api.23step.com/runs/$RUN/frames \
-H "Authorization: Bearer $STEP23_TOKEN" -H "Content-Type: application/json" \
-d '{"seq":1,"trigger":"click","ts":"2026-11-23T10:00:00Z","x":640,"y":360,
"window_title":"Checkout","app":"chrome","url":"https://shop.example/checkout","button":1}' \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["upload_url"])')
# 2. PUT the PNG there. No bearer on this request.
curl -sS -X PUT "$UP" -H "Content-Type: image/png" \
-H "x-goog-if-generation-match: 0" --data-binary @frame-0001.png
Commands go on the same timeline as frames. They are redacted and capped at 8 KB, and limited to 10 per second per key. Artifacts are files the agent produced: kind is markdown (with text, up to 256 KB) or image (with base64 png). Each becomes one or more frames.
A run that stops receiving anything is eventually closed by the server. Send a heartbeat during long quiet stretches. finalize takes an optional body: outcome (such as completed, error, or stopped_by_user), reason, killed, and the same session and git metadata as POST /runs. A run that was never finalized still has a manifest from GET /runs/{id}.
Terminalheartbeat, finalize, share
# Keep a long run from being reaped as idle
curl -sS -X POST https://api.23step.com/runs/$RUN/heartbeat -H "Authorization: Bearer $STEP23_TOKEN"
# Close it
curl -sS https://api.23step.com/runs/$RUN/finalize -H "Authorization: Bearer $STEP23_TOKEN" \
-H "Content-Type: application/json" -d '{"outcome":"completed"}'
# {"ok":true,"frame_count":3,"gaps":[]}
# Get the step link
curl -sS -X POST https://api.23step.com/runs/$RUN/share -H "Authorization: Bearer $STEP23_TOKEN"
# {"share_id":"9b1c...","step_url":"https://app.23step.com/s/9b1c...","visibility":"private",...}
Give a subagent an up_ token instead of your key. It lasts one hour by default and at most 24 hours (ttl_seconds, up to 86400) and can only add frames and commands to that one run: it cannot read, delete, or touch another run. Send it as Authorization: Bearer up_.... Mark the subagent's entries with branch and parent_branch so the step draws them as their own lane.
Agents that already emit OpenTelemetry can send it directly: POST https://api.23step.com/v1/traces and POST /v1/logs accept OTLP/HTTP as protobuf (application/x-protobuf) or JSON, optionally gzip-compressed, with the same bearer key. Spans are mapped with the GenAI semantic conventions: gen_ai.conversation.id groups a session, prompts, thoughts, tool calls and results, responses, and token counts (gen_ai.usage.*) become the step's timeline.
https://mcp.23step.com/mcp lets any MCP client list, read, search, and annotate runs. Client setup for Claude Code, Cursor, Codex, VS Code and others is on Getting started.
Transport is stateless streamable HTTP: one JSON-RPC POST /mcp per call, no long-lived session. Authenticate with Authorization: Bearer st_...; a missing or wrong key gets 401. The key needs runs:read; add runs:write to see the write tools. A write-only key cannot connect. Every call is checked against your organization and the step's visibility, and is written to an audit log.
Start with get_run_summary, a manifest under 400 tokens, then drill in. run_id takes a run id or a step link.
Read tools (runs:read)
Tool
Arguments
Returns
get_run_summary
run_id; without it: view (runs or sessions), session_id, q, kind, has_errors, offset, limit
Status, session, agent and repo metadata, exit codes, modified files, notes, and a one-line index of steps. Without run_id, a list of runs or sessions.
inspect_step
run_id, step, grep, offset, limit, fields, branch
One step in detail: cleaned logs, unified diffs of edits, DOM text, and a screenshot link.
search_run_logs
q, run_id or session_id, kind, limit
Regex or keyword matches across commands, logs, diffs, DOM text, and notes, in one run or all you can see.
Screenshots and DOM text are also resources: 23step://runs/{run_id}/steps/{step}/screenshot and .../dom, readable with resources/read. At most one image is returned per call, capped at about 1.5 MB.
Titles, URLs, logs, comments, and pixels come from the recorded screen and are untrusted. The server wraps them in <<UNTRUSTED …>> markers that cannot be forged; clients should never follow instructions inside them. There is no delete tool.