Skip to main content
paddock is a single binary for macOS and Linux, on amd64 and arm64. It logs in through the console and saves an API key that the CLI and every server SDK find, or runs paddock on your machine and saves that server’s key, and it operates templates, agents, sessions, connectors, and the outbox: it sends messages, follows a session’s events live, and sets and tests connector functions. It calls only the public API, so anything it does your backend can do with a server SDK. It is built for people and for coding agents such as Claude Code and Codex: it prints tables for people and the API’s own JSON with --json, and every error says what to fix.

Install

The script detects your OS and architecture, downloads the latest release and its SHA256SUMS, checks the binary’s SHA-256, and installs it as paddock only when the checksum matches, printing Checksum verified. It installs into /usr/local/bin when that is writable, else into ~/.local/bin, and prints how to add the directory to your PATH when it is not on it. paddock version prints the installed version.

Log in

auth login opens the console’s approval page, which carries the code. Sign in, pick the organization, check that the page shows the same code, and confirm. The CLI then receives a new API key of that organization, named cli-<hostname>-<suffix>, where the suffix is the last four characters of the key’s ID, so the keys of several logins from one machine are told apart; it checks that the key works, and saves it. No secret is typed or pasted. The key is an ordinary API key: it is listed on the console’s API Keys page with origin CLI login, and you revoke it there. If no browser opens, open the printed URL on any device. --no-browser never opens one and only prints the URL and the code, for a remote machine, a container, or a coding agent’s shell; PADDOCK_NO_BROWSER=1 does the same for every login, and so does Linux with none of DISPLAY, WAYLAND_DISPLAY, and BROWSER set (VS Code Remote and Codespaces set BROWSER to open the URL on your own machine). The code expires after 10 minutes; run auth login again then. --base-url URL logs in to another paddock API, given as its base URL ending in /v1.

Local server

paddock server runs paddock on your own machine: the API, the Gateway, and the Runtime service in one process listening on 127.0.0.1 only, an embedded PostgreSQL it downloads and runs itself, and a model endpoint that forwards your harnesses’ calls to Anthropic and OpenAI with your own keys. There is no Docker, no E2B account, and no tunnel. It is local mode: an agent runs its harness, and every command the harness runs, as you, on your machine, with no sandbox around it. Use it for your own agents during development.
server start generates the server’s keys on first use, installs the pinned PostgreSQL after checking its SHA-256 and the pinned Claude Code and Codex CLIs with npm (Node 22 or later), starts the server in the background, and saves its base URL to the credentials file, so every other command and the server SDKs use the local server at once. The local server needs no API key: a request without Authorization works, and a key a client sends anyway is ignored. It listens on 127.0.0.1 only, so only your machine reaches it. The model keys are read from the environment of server start and stay in the server’s memory: they never reach an agent’s files or environment. Nothing checks them at start; creating an agent whose harness’s key is missing, such as a Codex agent without OPENAI_API_KEY, prints a warning, and its turns fail with model_auth until you restart the server with the key. Everything lives under ~/.paddock, or PADDOCK_HOME: the keys, each agent’s directory, the harnesses, PostgreSQL’s binaries and data, and the logs. PADDOCK_DATABASE_URL names a PostgreSQL to use instead of the embedded one.

Configuration file

--config FILE takes a YAML file of the local server’s settings. Every key is optional:
paddock.yaml
A flag wins over the file, the file over the environment variable, and the environment over the default. An unknown key, a value of the wrong type, a bad port, duration, or provider, and an empty api_key stop the start with the file’s path and the key. ~/ in home and daemon_bin is your home directory, and a relative path is relative to the file. server stop and server status take the same --config when the file moves the home. A change takes effect at the next start after server stop. With api_key set, the server requires it: every /v1 request needs Authorization: Bearer <api_key> or a session token, and anything else gets 401 unauthorized. server start saves the key with the base URL to the credentials file, so the CLI, the server SDKs, and agents watch send it on their own; for curl, add the header yourself. api_key has no environment variable, so a PADDOCK_API_KEY exported for the hosted API never locks your local server. The console does not sign in to a local server; drive it with the CLI and the server SDKs. A connector’s provider cannot reach 127.0.0.1: to receive webhooks, run your own tunnel to the HTTP port and start the server with PADDOCK_WEBHOOK_BASE_URL set to the tunnel’s URL followed by /hooks.

Credentials

auth login and server start write one JSON file with mode 0600, in a directory of mode 0700:
The CLI and every server SDK look up the key and the base URL in the same order:
  1. API key: an explicit option (in a server SDK), then PADDOCK_API_KEY, then the credentials file. With none, requests carry no Authorization, which a local server without a configured key accepts.
  2. Base URL: an explicit option (--base-url on auth login, or the SDK’s option), then PADDOCK_BASE_URL, then the credentials file when no key comes from an option or the environment, then https://api.paddock.build/v1.
The file’s key and base URL were saved together, so they are used only together: a key from an option or PADDOCK_API_KEY never goes to the file’s base URL, and the file’s key is never sent to another base URL. A file with a base URL and no key, as server start saves it for a local server without a key, gives the base URL alone. The file is read only when no key comes from an option or the environment. A missing file means no credentials; a file that is needed but cannot be read fails with its path; run paddock auth login to replace it or paddock auth logout to remove it. See Authentication.

Templates

Tables name a template version by its ref, name@version, which is what agents create takes. Creating a document under an existing name adds that name’s next version; a document identical to the latest version returns that version unchanged; and every version of a name runs on one harness, so a document with another harness is 409 conflict with details.reason harness_changed. Agents keep the version they were created from. See Templates.

Agents

The agent’s URL takes messages: POST <url>/messages with {"text": "…"} sends one to the agent’s default session, created on the first message, and wakes the agent; see Agents and sessions.

Watch an agent

agents watch lists the agent’s sessions on the left, newest first, with their status and last activity, and shows the selected one live on the right, through the client SDK as a browser would see it. Events shows its event lines, Transcript its messages and each tool call’s command or file, and Stats its status and error, turns, tool calls, the tokens its turns used, and the latest turn’s time, time to first token, and wake time when it woke the agent; cost and the time until the agent sleeps are not reported by the API, and say so. ↑ and ↓ (or k and j) select a session, tab and the arrows switch views, f stops and resumes following, pgup and pgdn scroll while following is off, and q quits. With no sessions yet, it shows the curl that sends the first message. The UI is @paddockai/watch, a Node.js program in the repository’s JavaScript SDKs: agents watch runs paddock-watch from your PATH, or else runs it with Node.js 20 or later from the checkout you are in, after (cd sdk/js && pnpm install && pnpm -r build).

Sessions

Event lines show each event’s seq in brackets: a message as its kind and text, a tool call or result by the normalized tool name such as file_read, the call followed by the harness’s own name such as (Read), a turn’s start with its origin and its end with its outcome, and a line such as session ses_… idle when the session’s status changes. Streaming text is not printed as it is generated; the assistant message that completes it is. With --json, sessions stream prints one JSON line per stream event, {"session": …} or {"event": …}, streaming messages and status updates included.
sessions token prints a credential: only the token and a newline, so you can pipe it, such as paddock sessions token ses_… | pbcopy. Anyone holding it can read and write that session until it expires. It is the only command that prints a credential.
See Agents and sessions and Streaming.

Connectors

CONNECTOR is a connector’s ID or its name. SIDE is inbound or outbound, and RUNTIME is nodejs24.x or python3.14. connectors secrets set reads the value only from standard input, so it never lands in your shell history or a process list, and it refuses a terminal, where what you type is echoed: pipe the value in. A test that ran exits 0 whatever its result. If a preset’s function cannot be set after connectors create made the connector, the CLI says the connector was created, with its ID, before the error. See Connectors and Connector functions.

JSON output

Every command but auth login, auth logout, server run, server stop, agents watch, and version takes --json. It prints what the API returns: a resource such as a template, an agent, a session, an event, or a connector as the API reference documents it, a list as a JSON array of every item across every page ([] when there are none), a delete as { "deleted": [...] } with the refs or IDs it deleted, auth status as { baseUrl, baseUrlSource, key, keySource, valid } with the key masked, sessions token as { token, expiresAt }, and connectors secrets set as { connectorId, name }, never the value. When templates delete NAME --all fails, it prints the versions already deleted before the error: { "deleted": [] } when it refuses before deleting any. Flags may come before or after the arguments. Tables show times in your local time zone with its offset from UTC, such as 2026-11-19 09:15:30 +01:00.

Errors and exit codes

An API error goes to standard error as error: <code>: <message>, then each field error as path: message (or just the message, for a problem with the whole document), then any other detail, then the request ID. A template validation error whose message is its first field error prints that error once:
An error found while reading the YAML itself, such as a key paddock does not know or a value of the wrong kind, also names its line:
With --json, the error is one line of the API’s error body with requestId added: {"error":{"code":…,"message":…,"details":…,"requestId":…}}. paddock --help lists every command; paddock <group> <command> --help, such as paddock templates create --help or paddock connectors fn set --help, prints that command’s usage and flags.