Drive RunBerth from an AI agent
The RunBerth CLI is built to be operated by other AI agents, not just humans: machine-readable output on every command, stable exit codes, and a live self-describing contract. Paste one prompt into Claude, Cursor, or any assistant and it can install the CLI, authenticate, and deploy agents for you.
Quick start: a short prompt that links the onboarding guide. Your assistant reads the guide itself and learns the sign-in, the products, the prices and the real calls.
Permanent setup: one line for your agent's context (CLAUDE.md, AGENTS.md, or a system prompt) that tells it to read the CLI instructions at runberth.com/docs/cli/llms.txt, so it always gets the current version.
Short version: paste runberth.com/agents-snippet.md into AGENTS.md or CLAUDE.md. To choose between RunBerth and other providers, an agent can read runberth.com/compare.md, which compares prices and features with sources.
The contract
- Authenticate with an env var, never interactively. Mint a long-lived key (
mk_…) withrunberth keys createand export it asRUNBERTH_TOKEN. Keys never expire unless created with an expiry; login tokens do. - Pass
--jsonon every command. Results go to stdout as JSON. Errors printError: ...on stderr, with the HTTP status and the API's response body for API errors. - Branch on exit codes. 0 success, 1 other error, 2 usage, 3 not found, 4 auth, 5 API error, 6 partial failure, 7 rate limited, 10 config. Full table in the CLI reference.
- Never guess flags.
runberth guide --jsonemits a one-shot manifest of every command and flag, introspected live from the CLI itself, so it cannot drift. - Names or IDs. The top-level agent commands take the exact name or an ID prefix, and inside a linked directory the agent argument can be omitted. Commands that show
<agent_id>in their help, such asexec, need the full ID.
A session in six lines
export RUNBERTH_TOKEN=mk_xxxxxxxxxxxx
runberth whoami --json # exit 4 = no or expired credential
runberth templates --json # discover templates
runberth create runner --template openclaw --json
runberth chat runner "set up a daily digest of my repo" --json | jq -r '.response'
runberth logs runner --jsonOver MCP
An assistant that speaks the Model Context Protocol can use RunBerth as tools instead of a shell. The hosted server at https://mcp.runberth.com/mcp (Bearer mk_ key) drives Linux and Windows desktops and Android phones, sandboxes and swarms; setup snippets are on Linux desktops. Locally, runberth mcp serves every CLI command as an MCP tool over stdio.
Agent-followable docs
The migration runbooks are written to be executed by a coding agent: point Claude Code or your RunBerth agent at a provider's runbook page and it can inventory the old provider with read-only credentials, recreate each workload as a RunBerth agent, and hand you a reversible cutover checklist.
Driving vs. building
This page is about an AI agent driving RunBerth through the CLI. To build a product where every customer gets their own RunBerth-hosted agent, use the SDK from your backend instead.