The hosted API#
ComputerWorld runs as a hosted service at https://computaco.ai/v1. You
sign up, make an API key, and run environments over HTTP: boot one from a template
(built in, or your own world definition), let agents into it, send them pointer and
keyboard actions, read their screens as a scene or a PNG, snapshot and fork the
environment, run and verify expert procedures, and run a society of simulated people in
it. Every environment is the same deterministic engine as the Python wheel and the npm
package, so a run over HTTP replays to the same state hashes.
| Word | What it is |
|---|---|
| template | The static world definition an environment starts from: a built-in one, or one your organization keeps. |
| environment | One running world. It has a seed and a clock, and its history of snapshots and forks is part of it, with its machines and agents. It runs in a place (§ Places). |
| recording | Machines whose screens were recorded somewhere else, shown with the environment page (§ Recordings). Staff only. |
| agent | Something that acts in an environment, with a thread of what it was asked and what it did. An external agent is a grant with an actor token: your code, or Computatrum. A hosted agent is one the platform runs: Computatrum's agent loop on one machine, taking prompts. A simulated agent is one of the environment's society. |
| society | The simulated agents of an environment, their rules and their rounds, set when the environment boots (societies). |
| fork | An environment copied from another at its current state, optionally with changed society rules. The parent compares its forks. |
"World" names the definition format (world schema) and the engine's object; the API's running thing is an environment.
The contract is the OpenAPI document served at
https://computaco.ai/openapi.yaml; this page is the guide to it. The web
console at /console/ is built on the same
routes.
Quickstart#
Sign up, make an API key with the session (the console's API keys page does the same; the key is shown once), then boot an environment and let an agent in:
API=https://computaco.ai/v1
curl -s -c cw.cookies $API/auth/signup -H 'content-type: application/json' \
-d '{"username":"ada","password":"a long enough password"}'
# → {"user": {...}} (and the session cookie, kept in cw.cookies)
curl -s -b cw.cookies $API/keys -H 'content-type: application/json' \
-d '{"name":"laptop","scopes":["environments","templates"]}'
# → {"id": "key_…", "key": "cw_live_…", "scopes": ["environments", "templates"], …}
export CW_KEY=cw_live_…
curl -s $API/environments -H "authorization: Bearer $CW_KEY" \
-d '{"template":"agent-desktop","seed":1}'
# → {"id": "w_…", "state_hash": "…", "tick": 0, "machines": ["workstation"], …}
E=w_…
curl -s $API/environments/$E/agents -H "authorization: Bearer $CW_KEY" -d '{}'
# → {"id": "agent_1", "kind": "external", "token": "cwa_w_…", "config": {"actor": "ada",
# "machines": ["workstation"], "actions": ["pointer.v1", "keyboard.v1", "application.v1"], …}}
Hand the actor token to the agent. It can read the screen, act, and look:
T=cwa_w_…
A=$API/environments/$E/agents/agent_1
curl -s "$A/scene?elements=1" -H "authorization: Bearer $T" \
| jq '.elements[] | select(.interaction == "shell:launch:editor") | .center'
# → [34, 187]
curl -s $A/step -H "authorization: Bearer $T" -d '{"actions": [
{"family": "pointer.v1", "op": "click", "payload": {"x": 34, "y": 187, "width": 1280, "height": 800}},
{"family": "keyboard.v1", "op": "type", "payload": {"text": "Hello"}}]}'
curl -s -o screen.png "$A/render?width=1280&height=800" -H "authorization: Bearer $T"
The Python and JavaScript clients wrap all of this, with element finding, retries and errors that carry the API's code.
The same calls by hand:
Python#
import requests
API = "https://computaco.ai/v1"
owner = requests.Session()
owner.headers["authorization"] = "Bearer cw_live_…"
env = owner.post(f"{API}/environments", json={"template": "agent-desktop", "seed": 1}).json()
grant = owner.post(f"{API}/environments/{env['id']}/agents", json={}).json()
agent = requests.Session()
agent.headers["authorization"] = f"Bearer {grant['token']}"
base = f"{API}/environments/{env['id']}/agents/{grant['id']}"
scene = agent.get(f"{base}/scene", params={"elements": 1}).json()
x, y = next(e["center"] for e in scene["elements"] if e["interaction"] == "shell:launch:editor")
result = agent.post(f"{base}/step", json={"actions": [
{"family": "pointer.v1", "op": "click", "payload": {"x": x, "y": y, "width": 1280, "height": 800}},
]}).json()
print(result["outcomes"][0]["success"], result["state_hash"])
open("screen.png", "wb").write(agent.get(f"{base}/render").content)
# The owner forks, and runs an expert procedure in the fork.
fork = owner.post(f"{API}/environments/{env['id']}/fork", json={}).json()
run = owner.post(f"{API}/environments/{fork['id']}/procedures/run",
json={"ref": {"template": "agent-desktop", "id": "legal-engagement"}, "seed": 2}).json()
print(run["verification"]["passed"], run["demonstration"]["step_count"])
Send a User-Agent of your own. The API refuses Python's
bare urllib default (Python-urllib/3.x) with a 403 whose body is
error code: 1010, before the request reaches your environment; requests, httpx,
curl and browsers are not affected. With urllib, set one:
urllib.request.Request(url, headers={"User-Agent": "my-agent/1.0", ...}).
JavaScript#
const API = 'https://computaco.ai/v1';
const owner = (path, body) => fetch(API + path, {
method: body ? 'POST' : 'GET',
headers: { authorization: `Bearer ${process.env.CW_KEY}`, 'content-type': 'application/json' },
body: body && JSON.stringify(body),
}).then((r) => r.json());
const env = await owner('/environments', { template: 'agent-desktop', seed: 1 });
const grant = await owner(`/environments/${env.id}/agents`, {});
const step = await fetch(`${API}/environments/${env.id}/agents/${grant.id}/step`, {
method: 'POST',
headers: { authorization: `Bearer ${grant.token}`, 'content-type': 'application/json' },
body: JSON.stringify({ actions: [{ family: 'keyboard.v1', op: 'key', payload: { key: 'Ctrl+Alt+t' } }] }),
}).then((r) => r.json());
console.log(step.state_hash);
Authentication#
| Credential | How it is sent | What it can do |
|---|---|---|
| Session | the cw_session cookie that sign-up and sign-in set (HttpOnly, SameSite=Lax, Secure over HTTPS, 30 days) | Everything an API key can, from the console's origin. A write sent with a cookie must carry an Origin of the same host. |
| API key | Authorization: Bearer cw_live_… | Acts as the organization it was made in (§ Organizations): the routes of its scopes (below), on that organization's environments, templates, packages and keys. |
| Actor token | Authorization: Bearer cwa_<environment>_… | Only GET …/agents/{agent}, …/step, …/observe, …/scene, …/render, …/tell and …/messages (read, and write its agent, action and status messages) of the one external agent it was issued for. |
| Agent token | Authorization: Bearer cwt_… | Only POST /v1/agent/chat, POST /v1/agent/vision, POST /v1/agent/decide, GET /v1/agent/usage, and reading and asking /v1/harnesses (the catalog, one harness, a step of a research harness): what the Computatrum app is given by the device sign-in (§ Computatrum). |
- Accounts are a username (3–32 of
a-z 0-9 _ -) and a password (10–200 characters), stored as PBKDF2-HMAC-SHA-256 with a 16-byte random salt and 100,000 iterations, the most workerd's WebCrypto allows. Unknown usernames are hashed too, so timing does not say which exist. Five wrong passwords for one username lock it for the rest of a 15-minute window, and each address may try sign-up and sign-in ten times a minute. - API keys are shown once, when made; the service keeps their SHA-256 and a 12-character
prefix.
GET /v1/keyslists them,POST /v1/keysmakes one,DELETE /v1/keys/{id}revokes it at once. A key belongs to the organization it was made in (org_id), and any member of that organization may list and revoke it. Sign-up makes no key: the console offers to make the first one. - Scopes. A key holds one or more of five scopes, chosen when it is made
(
POST /v1/keys {"name", "scopes": [...]}; every scope whenscopesis left out) and listed on each key (scopes). A session holds every scope.Scope Routes environments/v1/environments/**(agents, society, snapshots, forks, procedures, files),/v1/recordings/**(staff),/v1/packages/**and/v1/harnesses/**(§ Harnesses)browser/v1/browser/**: the browser, one-call reads of a page and browser sessions (a key that heldenvironmentsbefore 2026-11-22 holds it too)templates/v1/templates/**and/v1/validatemodels/v1/models,/v1/chat/completions,/v1/agent/**(Computatrum's model calls, its usage and signed-in apps) and/v1/perceive(§ Perceiving pages)account/v1/me/**,/v1/keys/**,/v1/orgs/**,/v1/billing/**and/v1/staff/**A key without the scope a route needs gets a 403
scope_missingthat names the scope, and the request is not counted.accountincludes making keys, so a key with it can make a key with any scope. Public routes (/v1/health,/v1/plans,/v1/auth/*,/v1/vocabulary, the device sign-in's start and poll, the billing webhook) need no credential. Actor and agent tokens have no scopes: they are limited to their own routes. - Organizations. Every resource belongs to an organization. Each account has a personal
one, whose id is the account's own id, and may belong to team organizations (
org_…). A session acts in the personal organization unless the request carriesx-cw-org: <id>(the console sends it for the organization picked in its sidebar); an API key always acts in its own organization, andx-cw-orgnaming another is a 403.GET /v1/mesays which one a credential is acting in (org) and every one the account is in (orgs). - Actor tokens are the HTTP form of the engine's owner/actor split: the API key holds
the environment (the engine's
World), an actor token holds one external agent (the engine'sEnvironment, one actor's session on that world: a different thing from a hosted environment, which is the whole world). A token is stored as its hash inside its environment's object; revoking the agent, resetting the environment or deleting it ends it, and a fork issues new tokens for its copies of the agents.
Endpoints#
All paths are under /v1. Bodies and answers are JSON unless noted. Every answer that
changes an environment carries state_hash and tick (the environment's clock, logical
microseconds).
Accounts
| Method and path | What it does |
|---|---|
POST /auth/signup {username, password, email?, referral_code?} | Make an account; sets the session and answers 201 {user}. With email, the address is checked first (a malformed one is a 400 and no account is made), set on the account, and sent a code: the answer adds email ({address, verified, pending, sent}; sent: false with a message when no code could be sent, and the account stands). It makes no API key (POST /keys with the session does). A referral code is kept on the account and applied when it upgrades; one that is unknown, inactive, expired or used up is a 400 invalid_code. |
POST /auth/signin {username, password} | Sets the session. |
POST /auth/signout | Ends the session. |
GET /me | The account (user, with its email and email_verified_at: shown to its owner and nowhere else); email_verification: pending ({expires_at} while a code waits) and free_minutes_blocked (true while the service asks free agent minutes for a verified address and the account has none); the organization the credential acts in (org: id, name, kind, plan, your role) and every organization the account is in (orgs); that organization's quotas, usage this minute, today and in total (environments, templates), and billing: plan, status (none, active, past_due, canceled), renewal, discount, the sign-up referral code (§ Plans and billing). |
PATCH /me {name?, date_of_birth?} | Set or clear the account's profile; a field left out is kept, null clears it. A name is at most 100 characters, a date of birth is a real past date written yyyy-mm-dd (1900 or later). Anything else is a 400, email too: the address has its own routes. |
POST /me/email {email} | Set the account's address and send a six-digit code to it: 202 {email: {address, verified, verified_at, pending, renewal}}. A different address is unverified at once, and the tags the old one earned are removed. The verified address again is a renewal: it stays verified, and the code renews its tag. Limits below (§ The e-mail address). |
POST /me/email/verify {code} | Confirm the code: {user, email, standing, tag}. The address is verified, and tag is the tag its domain gave (academic, tier-1-university-student, or null). |
DELETE /me/email | Remove the address, and the tags it earned. |
GET /me/review, POST /me/review {standing, statement}, DELETE /me/review | The account's review request (the open one, or the last answered), the standings one may ask for; ask for one; withdraw the open one (§ The e-mail address). |
GET /me/usage?days=30 | The current organization's daily requests, steps, renders, environments created, model calls, professional steps and metered credits, professional: this month's professional steps against the plan's allowance (§ Professional applications), and heavy: this month's Heavy-minutes against the plan's (§ Places). |
GET /me/invites | Open invites addressed to the account's verified address, each with the code to accept it. |
POST /me/password {current, next} | Change the password; other sessions end. |
DELETE /me {password} or {confirm} | Delete the account and everything its personal organization owns — its environments with their snapshots, agents and societies (Heavy ones too, even when one cannot start), its estimates, its templates, keys, sessions, usage and model-call records — at once and for good; an attestation of noncommercial use is kept, as the harness's licence asks; the username is free again. A team organization the account is the only member of goes with it; one where it is the only owner and others remain is a 409 until ownership is handed over or the organization deleted. From a session the body carries the current password; with an API key, confirm (the account's username) or the password. A missing or wrong confirm is a 400, a wrong password a 401. |
GET /keys, POST /keys {name?, scopes?}, DELETE /keys/{id} | The current organization's API keys (org_id, created_by, scopes); any member makes or revokes one. scopes is a non-empty list of environments, browser, templates, models, account (§ Authentication), every one when left out; an unknown or empty list is a 400. |
Organizations — see § Organizations below. Roles: owner > admin > member.
| Route | What it does |
|---|---|
GET /orgs, POST /orgs {name} | Every organization the account is in (with its role), and the one the credential acts in; make a team organization (the account is its owner; the personal plan says how many). |
GET /orgs/{id} | The organization, your role, its quotas, billing, usage (environments, templates), bought applications and this month's professional steps (member). |
PATCH /orgs/{id} {name}, DELETE /orgs/{id} {confirm: name} | Rename (owner); delete it and everything it owns (owner). A personal organization is neither. |
GET /orgs/{id}/members; PATCH …/members/{user} {role}; DELETE …/members/{user} | Members with roles (member); change a role (owner); remove a member (admin) or leave (anyone). The last owner stays. |
GET, POST /orgs/{id}/invites {role?, email?, max_uses?, expires_in_days?}; DELETE …/invites/{inv} | Invites (admin): a code and its link /console/#/join?code=…, for member or admin, open to anyone with the code or to one email (then for one person), 14 days unless said otherwise. |
GET /orgs/invites/{code}, POST /orgs/join {code} | What a code opens; join with it (201, or 200 when already a member). An invite for an email needs that address, verified, on the account (403). |
GET /orgs/{id}/usage?days=30 | The organization's daily usage and this month's professional steps. |
GET /orgs/{id}/applications, POST …/applications/{product}/checkout | The professional applications: each with its one-time price and whether this organization has bought it, can_buy and the plan required; a Stripe Checkout URL to buy one for the whole organization (admin, paid plan). § Professional applications. |
GET, PUT /orgs/{id}/meter {enabled?, monthly_cap_usd?} | Metered professional steps beyond the plan's allowance (admin): turning them on the first time answers checkout_url for the payment method. |
Plans and billing — see § Plans and billing below.
| Method and path | What it does |
|---|---|
GET /plans | Public: Free, Pro and Enterprise with their prices and quotas, and billing_configured. |
POST /billing/checkout {plan: "pro", referral_code?} | A Stripe Checkout URL for the Pro subscription of the current organization, with the code's discount (admin in a team organization). |
POST /billing/portal | A Stripe Customer Portal URL for the current organization: card, invoices, cancel (admin). |
POST /billing/webhook | Stripe's signed events (set in Stripe's dashboard). |
Templates — the world definitions an environment starts from: the built-in ones and the organization's own, in one list.
| Method and path | What it does |
|---|---|
GET /health | Liveness and the engine build (engine.build, version, wasm_sha256). No credential needed. |
GET /templates | {templates: [{id, name, source, description, machines, services, internet, products, procedures, societies, boots?, updated_at?}]}. machines is [{id, user, profile, theme, presentation}], presentation the machine's device type (desktop, laptop, phone, server) or null. source is builtin or own. A built-in's id is its name (company-2026) and its boots says whether this deployment's engine boots it, with the engine's reason if not. |
GET /templates/{id} | The whole definition. |
POST /templates {name?, definition} | Save one (§ Plans and billing: templates). To keep a running environment's layout, post its GET /environments/{id}/definition. |
PUT /templates/{id} {name?, definition}, DELETE /templates/{id} | Change or delete one of the organization's own; a built-in one is a 403. |
GET /templates/{id}/topology | Its machines (profile, user, address, node, theme, presentation as a word, installed_apps, desktop_apps, packages, the initial_files paths), nodes, links (with id, their index), services, DNS and themes. |
POST /templates/{id}/topology {edits: [...]} | Apply edits to one of the organization's own in order, validate, save — all or nothing; a failure names the edit. |
GET /templates/{id}/procedures, GET /templates/{id}/procedures/{pid} | A built-in template's expert procedures. |
POST /templates/{id}/procedures/{pid}/instantiate {seed?, overrides?} | Draw an instance of one. |
GET /templates/{id}/societies, GET /templates/{id}/societies/{sid} | The society specs a built-in template ships. |
GET /vocabulary | Platforms (and platforms_available, what this engine draws), presentations, zones, service kinds, action families, observation channels, the application catalog (applications_detail, each with its product when it is a professional one), products (the professional applications with their one-time prices), places (the places deployed: {id, kind, metered, modules}, § Places) and hosts (each place's application modules). |
POST /validate {definition, society?} | Boot the definition with the engine and say whether it is a world. With society, the spec is compiled onto it and the answer says how many people it compiles to and the compiled definition's size. |
GET /packages, POST /packages {manifest, bytes?} | List the organization's own application packages (application packages); add or replace one: the manifest, and for a node_app its archive as base64. The hosted API runs web and node_app packages; a native Wasm module runs in the local engine. A package's id may not be one of ComputerWorld's own. |
GET, DELETE /packages/{id}; GET /packages/{id}/bytes | One package with its manifest; its bytes. An environment booted while a package exists installs the packages its machines' installed_apps and its node-app services name, and carries them through export, import and fork. |
The topology edits: add_machine {computer, node?, links?, theme?}, update_machine {id, set},
remove_machine {id} (with its node's links when nothing else is on the node), add_node,
remove_node, add_link {link: {from, to, bidirectional?, latency_us?, loss_per_million?}},
update_link {id, set}, remove_link {id}, add_service {service}, update_service {id, set},
remove_service {id}, set_theme {machine, theme}, set_presentation {machine, presentation},
set_applications {machine, applications}, set_internet, set_implicit_lan,
set_gateway {gateway}, set_metadata {key, value}. The fields are the
world schema's.
The browser — a web browser on a simulated Linux machine whose whole screen is the browser:
POST /browser/screenshot | content | markdown | links | snapshot {url, viewport?, wait_ms?, full_page?}
read a page in one call, and /browser/sessions opens sessions driven by actions. Each
session is an environment of the template browser. See the browser.
Environments (owner)
| Method and path | What it does |
|---|---|
GET /environments | The organization's environments, each with its place ({id, kind, metered, modules}; kind is lightning or heavy), its folder (a folder's id, or null) and pinned. |
POST /environments {template | definition, seed?, name?, platform?, procedure?, place?, idle_ttl?, society?} | Boot one from a template's id or from a definition. place says where it runs (§ Places): lightning or heavy (or a Lightning place's id), or a list tried in order; left out, Lightning first, and Heavy first only for a stated reason. The answer carries place (with reason) and refused, the places that refused it first. procedure ({template, id} or inline) boots it for that procedure: its machines get the desktops the procedure names and the environment goes to a place carrying its applications. idle_ttl (seconds, 60–86,400): the environment deletes itself after that long with no request (§ Driving one machine). society gives it simulated agents (§ Societies and forks). |
POST /environments/import (form: bundle, snapshot, options {name?, place?, idle_ttl?}) | Boot one from the export GET …/export gave, placed as a new environment is. |
GET, PATCH {name?, folder?, pinned?}, DELETE /environments/{id} | Summary (with place and its reason, head: the snapshot its state came from last, boot_ms, memory.wasm_bytes, professional: the bought applications it runs, idle_ttl, expires_at, forked_from and forks, the ids of its forks); rename, file it in a folder (folder: a folder's id, or null for none) and pin or unpin it (a change of only folder or pinned answers {environment}, the row as listed, and does not wake the environment); delete with its snapshots, agents and society. |
GET /folders, POST /folders {name}, PATCH /folders/{id} {name}, DELETE /folders/{id} | The organization's folders of environments ({id, name, created_at}, oldest first), as the console's sidebar groups them; any member makes, renames or deletes one. A name is 1 to 100 characters; an organization has at most 100 folders (429 quota_exceeded). Deleting a folder deletes nothing in it: its environments are in no folder again. A folder of another organization is a 404. Reached with the environments scope. |
GET /environments/{id}/files?machine=&path=, PUT … {content | base64} | The owner reads a file on a machine, or writes one onto it (§ Driving one machine). |
GET /environments/{id}/state_hash | {state_hash, tick}. |
POST /environments/{id}/advance {ticks | duration} | Move the clock ("30s", "2h", "1d"): timers, settlement windows and queues fire. |
POST /environments/{id}/reset {seed?} | Back to the definition; external and hosted agents are dropped with their threads. |
GET /environments/{id}/inspect[?pointer=] | The owner's view of the whole state, or one JSON Pointer into it. |
GET /environments/{id}/definition, GET /environments/{id}/trajectory | The definition it runs; every action so far. |
GET, PATCH /environments/{id}/services/{service}/state | A service's state; an owner write (merge patch), recorded for replay. |
GET /environments/{id}/asks | The questions the world's sites have for a model now (open: service, ask, purpose), the sites that ask (services), and when one next has something due (wake_at) (§ A site's questions). |
POST /environments/{id}/asks {services?, advance?, ask_model?} | Tell the sites that time has passed, answer what is open from the environment's journal, and with advance ("30m", or ticks) move the clock to each due time up to then. A reply the journal lacks is asked of the platform's model and journaled; with ask_model: false it comes back in pending and the clock waits at it. The answer: answered, pending, tick, state_hash, model (calls and tokens). |
GET, POST /environments/{id}/asks/journal | The journal as JSON lines of {key, reply}; POST {entries: [{key, reply}]} writes replies of your own. It is the journal a society's rounds use. |
POST /environments/{id}/perform {agent, gesture} | One grounded gesture ({do: "click", target: {label: "Post"}}) by the external agent agent names, as procedures use. |
GET /environments/{id}/topology | The running environment's topology (live: true). Each machine carries kind: "simulator" and interfaces: ["screen", "input", "launch", "files", "agents"]: what the machine is and what it can do. |
POST /environments/{id}/machines {computer, node?, links?}, DELETE /environments/{id}/machines/{m} | Add or remove a machine live. Links, services and themes are fixed at boot: change them in a template and boot it. |
Snapshots, forks, export
| Method and path | What it does |
|---|---|
GET, POST /environments/{id}/snapshots {label?} | Kept snapshots, oldest first: {snapshots, head}. Take one: the snapshot ({id, label, state_hash, tick, bytes, created_at, parent, author, frames}) with head, which is now its id (§ History). |
GET /environments/{id}/snapshots/{s}/frames/{machine} | The PNG of that machine's screen when the snapshot was taken, for each machine its frames names. |
GET /environments/{id}/snapshots/{s}/agents, GET …/snapshots/{s}/agents/{agent}/messages?after= | The agents the snapshot kept ({agents, conversations_kept}, each with its state then), and one's thread as it was then ({messages, state}, as …/agents/{agent}/messages answers). Nothing is restored to read them. |
POST /environments/{id}/snapshots/{s}/restore | Restore: {state_hash, tick, head, elapsed_ms, conversations_kept, agents}. The agents, their connections and their threads become the snapshot's (§ History); agents is the list now, with a token on each agent that comes back after it was removed. |
DELETE /environments/{id}/snapshots/{s} | Drop it: 200 {snapshots, head}. Its children hang from its parent. |
GET /environments/{id}/history | The family's history: this environment's furthest ancestor and every fork below it, each with its place, origin, head and snapshots (§ History). No environment is woken to answer. |
POST /environments/{id}/fork {name?, snapshot?, place?, idle_ttl?, society_ops?} | A new environment from now or a snapshot, at the same state hash, with the agents connected to a machine then carried over with their threads (the external ones under new tokens; a hosted one's task that was running does not go on, and its thread says so), and its society's runner state copied; society_ops changes the fork's society rules (§ Societies and forks). place is as for a new environment; left out, the fork runs where its parent does (§ Places). The answer names forked_from, place and refused. |
GET /environments/{id}/export | A portable bundle, as a multipart form: the JSON in bundle (definition, seed, agents) and the engine's snapshot as bytes in snapshot (application/octet-stream). POST /environments/import boots it again. |
Agents
| Method and path | Who | What it does |
|---|---|---|
GET /environments/{id}/agents | owner | {agents: [...]}: the external and hosted agents, then the society's simulated ones. A simulated agent is {id, kind: "simulated", name, population, …} (its id is the person's) and has no token. External and hosted agents carry their thread's state. |
POST /environments/{id}/agents {actor?, machines? | connections?, actions?, observations?, action_budget?, label?} | owner | Let an external agent in: kind: "external", with its token, shown once. connections is [{machine, mode?}] (§ Agents). Defaults: the first machine and its user, pointer.v1, keyboard.v1, application.v1, semantic.v1, a budget of 100,000 actions. |
POST /environments/{id}/agents {kind: "hosted", connections? | machine?, name?, harness?, instructions?, autonomy?, may_message?} | owner | Make a hosted agent connected to connections ([{machine, mode?}]; [] connects it to nothing), or to machine (left out: the only one): {id, kind: "hosted", name, machine, connections, at, autonomy, harness, instructions, may_message, session, config: {…, screen}, created_at, state}, no token (§ Agents). may_message is whom it may message ([] when left out: it asks nobody). |
GET, DELETE /environments/{id}/agents/{agent} | owner (GET: actor too) | One external or hosted agent; revoke it, with its thread (a hosted one's task stops). |
PATCH /environments/{id}/agents/{agent} {name?, instructions?, may_message?, autonomy?} | owner | Change what the agent is called, its standing instructions (at most 4,000 characters), whom it may message, and a hosted agent's autonomy. The answer is the agent. |
GET /environments/{id}/communication | owner | The communication graph: {nodes: [{id: "person", kind: "person", name: "You"}, {id, kind, name, machine, harness?, state}], edges: [{from, to}]} (§ Agents). |
PUT /environments/{id}/communication {edges: [{from, to}]} | owner | Replace every edge at once; the answer is the graph. An unknown id, a self-edge or an edge from "person" is a 400, and nothing changes. |
POST …/agents/{agent}/tell {to, text, hops?} | actor | An external agent's message to another agent: {delivered, why?}. Delivered only along an edge of the graph. |
PUT {mode?}, DELETE /environments/{id}/agents/{agent}/machines/{machine} | owner | Connect the agent to a machine or change the connection's mode; disconnect it. The answer is the agent. It keeps its id, token and thread. 404 for an unknown machine; 409 while a hosted agent is working (§ Agents). |
GET …/agents/{agent}/messages?after=&wait= | both | The agent's thread after the message after (0: from the start), waiting up to wait seconds (at most 25) for one: {messages: [{seq, role, text, at, …}], state}. Every kind of agent has one (§ Agents). |
POST …/agents/{agent}/messages | both | The owner's prompt {text, goal?}; an actor token's {role: agent | action | status, text, status?, kind?, …}. A simulated agent's is a 409. goal says what the task must leave on the screen, as data: {app, steps: [{primitive: "activate" | "type" | "select", bind: {target, text?}}]}, the application it names and its steps (a type step's empty target is any field of that application's windows; at most 20 steps). A hosted agent with an energy harness ends a task only when its done is found on the screen in a window of that application; with no goal, no done of an energy harness is confirmed. |
POST …/agents/{agent}/stop | owner | Stop it: {state}. A simulated agent is a 409. |
POST …/agents/{agent}/step {actions: [{family, op, machine?, payload}], render?} | both | Up to 64 actions. machine may be left out when the agent has one. An action outside the grant is an unsuccessful outcome, not an HTTP error. render: {width, height, if_changed?} answers the screen they left as frame (§ Driving one machine). |
GET …/agents/{agent}/observe | both | The granted observation channels. |
GET …/agents/{agent}/scene?width&height&elements=1 | both | The scene graph; elements adds every interactive node with its role, label, interaction id, clipped rect and center, front first, and, where the application declares them, its region (the regions it lies in, outermost first: {role, name, object?}) and object ({kind, id}, the record it stands for). |
GET …/agents/{agent}/screens/{digest} | both | A screen a hosted agent saw, as a PNG: a thought's screen, an action's screen or after. The platform keeps the picture of every screen the agent looks at or leaves, once per screen, the newest 400; an older one is a 404. The same digest is always the same picture. |
GET …/agents/{agent}/render?width&height&format=png|rgba | both | The screen of the agent's focused machine, 64–2,560 wide and 64–1,600 high, or taller when it is at most 4,096,000 pixels in all (a whole page); headers X-State-Hash, X-Tick, ETag. Send If-None-Match to poll: an unchanged screen is a 304, not drawn and not counted. |
Action families and payloads are the engine's. A hosted agent's machine is
its loop's: its owner reads its scene, render and observe (a session's windows are its own,
so its screen is seen through it), and a step for it is a 409. An agent connected to no
machine answers step, observe, scene and render with a 409 ("connected to no machine").
Agents#
An environment has any number of agents, of three kinds. Each has a thread: what it was asked, what it said and what it did, as numbered messages.
| Kind | What it is | Its thread is written by |
|---|---|---|
external | A grant with an actor token: your code, or Computatrum on someone's computer, acting through …/step. | The owner (prompts), and the actor token (what the agent says and does). |
hosted | An agent the platform runs: Computatrum's own agent loop, driving the machines it is connected to, each as its user, with the harness it was made with (§ Harnesses). | The owner (prompts), and the loop. |
simulated | One of the society's people (§ Societies and forks). | Nobody: it is their turns, decisions and gestures, read from the society's trace. |
A message is {seq, role, text, at, …}: seq counts from 1 in the thread and is never reused,
at is milliseconds since the epoch (null in a simulated agent's thread, whose trace keeps the
environment's clock, tick, instead), and role is one of
| Role | What it is | Its own fields |
|---|---|---|
person | A prompt, from the owner. | heard: <step> when a working run took it at that step; queued: true while it waits to be the next task; answers: <seq> when it answered the question with that seq |
peer | A message from another agent of the environment. | from, from_name, hops; reply: true when it is the summary of the task a message of this agent started there; heard as above |
agent | What the agent thinks and says. kind says which (below). | by kind |
action | What it did on the machine, in a short text: a click, typing, an application launched. | action (as sent), ok, changed (whether its screen changed), error, step, step_name (the step of its plan), batch (its place in a predicted batch, when it is not the first); a hosted agent's screen (the digest of the screen it acted on) and after (the one it left), each a picture at GET …/agents/{agent}/screens/{digest} |
status | started, finished, stopped, failed or waiting, with why in text. | status; started: task, harness, prompt (the seq of the message it runs), from (when a peer's message started it), resumes; finished, stopped, failed: steps, calls, quota, reset_at; waiting: question, options |
An agent message has a kind:
| Kind | What it is | Its own fields |
|---|---|---|
thought | Why the agent does the next thing: one for each decision its harness planned. It is reasoning, not speech: show it with the action it explains. | step, step_name, now (what it is doing, in a few words), plan (the steps still to come); and when its harness surfaces them, prefers (the options it ranked, {measure, better: lower | higher, options: [{name, value, tried?, at?}], chosen?}, best first; at, where the option is on the screen) and state (its internal state in a state view's step shape, {view, …}; harnesses); a hosted agent's screen, the digest of the screen it decided on |
question | A question to the person. | question: true, options (at most four short answers to choose from), step |
tell | A message it sent to another agent. | to, to_name, delivered, why (when it was not delivered), step |
said | Anything else it says: an external agent's own words, the notice that a step needs a password. |
The thread's state is one of
| State | When |
|---|---|
asking | A question is open: the agent asked the person and no prompt came after it. The run waits on it, or is parked (a waiting status). |
working | After a started status, or while a prompt waits for a hosted agent's loop. |
stopped | After a stopped status. |
idle | Otherwise. |
A thread keeps its last 5,000 messages. A message's own fields may change after it is written
(heard, queued, answers): a reader that reads the thread again from before it sees them.
An agent is connected to machines. Its connections are [{machine, mode}], and mode is
control (the default) or observe. PUT …/agents/{agent}/machines/{machine} {mode?} connects
one or changes its mode, and DELETE disconnects it; the agent keeps its id, its token and its
thread. Disconnected from every machine, an agent has connections: [] and at: null: it acts and
sees nowhere (409), a prompt to a hosted one is a 409, and a fork does not carry it.
A hosted agent has a session on each machine it is connected to, as that machine's user, so its
windows there wait for it. It is on one at a time (at, also machine): the first it controls,
until its harness answers switch_computer {computer}. Its render, scene and observe show
the machine it is on, and each thought and action in its thread carries that machine. On a
machine it observes it is shown the screen of a hosted agent controlling that machine (its own
session's when none does), and its actions are refused. An external agent's action on a machine it
observes is an unsuccessful outcome, with error.reason: "observe_only".
More than one agent may control a machine. Each has its own windows there, and they share the machine's files.
A hosted agent's autonomy is autonomous (it never asks the person), semi (it may ask:
may_message has person) or manual (it may ask, keeps to what the person told it, and a message
from another agent is refused, not taken as a task).
Streaming is long-polling. GET …/messages?after=<last seq you hold>&wait=25 answers at once
when there are messages after after, and otherwise waits up to 25 seconds for one: a message
added meanwhile answers the waiting read at once. Read in a loop, each time after the last seq,
and the thread streams with at most one open request per reader. One answer carries at most 500
messages; a reader that is behind asks again. (A long poll is plain JSON over one request, which
every HTTP client can make.)
A=$API/environments/$E/agents/agent_2
curl -s $API/environments/$E/agents -H "authorization: Bearer $CW_KEY" -d '{"kind": "hosted", "machine": "workstation"}'
# → {"id": "agent_2", "kind": "hosted", "name": "", "machine": "workstation", "harness": "computatrum-1.1-normal", "instructions": "", "may_message": [], "state": "idle", "config": {…, "screen": [1280, 800]}, …}
curl -s $A/messages -H "authorization: Bearer $CW_KEY" -d '{"text": "Open the Text Editor and type a greeting."}'
# → {"message": {"seq": 1, "role": "person", "text": "Open the Text Editor and type a greeting.", "at": 1793…}, "state": "working"}
curl -s "$A/messages?after=1&wait=25" -H "authorization: Bearer $CW_KEY"
# → {"messages": [{"seq": 2, "role": "status", "status": "started", "text": "Working on: Open the Text Editor…", "prompt": 1, …},
# {"seq": 3, "role": "agent", "kind": "thought", "text": "The dock has the Text Editor.", "step": 0, "step_name": "Open the editor", "now": "Opening the editor", "plan": ["Type the greeting"]},
# {"seq": 4, "role": "action", "text": "Open the Text Editor", "action": {"verb": "press", "element": "e-27"}, "ok": true, "changed": true, "step": 0, "step_name": "Open the editor"}],
# "state": "working"}
curl -s -X POST $A/stop -H "authorization: Bearer $CW_KEY"
# → {"state": "stopped"}
External agents take prompts too: the owner posts {text}, the agent reads its thread with
its actor token and answers with {role: "agent" | "action" | "status", text, …}, its
statuses saying when it starts and ends. An agent message may name its kind: said (when it
names none), thought, or question with up to four options; a waiting status says it waits
on a question. POST …/stop adds a stopped status for the agent to read: the platform cannot
stop code it does not run.
The communication graph says who may send a message to whom. Its nodes are the person and
every external and hosted agent. An edge {from, to} says the agent from may message to:
another agent, or "person", which lets it ask the person a question. Each agent's edges are its
may_message. The owner can always prompt any agent: that is authority, not an edge.
curl -s -X PUT $API/environments/$E/communication -H "authorization: Bearer $CW_KEY" \
-d '{"edges": [{"from": "agent_2", "to": "person"}, {"from": "agent_2", "to": "agent_3"}]}'
# → {"nodes": [{"id": "person", "kind": "person", "name": "You"},
# {"id": "agent_2", "kind": "hosted", "name": "Lead", "machine": "workstation", "harness": "computatrum-1.1-normal", "state": "idle"}, …],
# "edges": [{"from": "agent_2", "to": "person"}, {"from": "agent_2", "to": "agent_3"}]}
A new agent has no edges, so a hosted agent has full autonomy unless you say otherwise: it
never asks a question and never waits for permission. It chooses the most reasonable reading of
its task, acts, and says what it assumed in its finished status. Given a prompt that names
nothing to do ("go", "hi"), it starts no work and finishes at once, saying what it needs.
With the edge to the person, an agent may ask one question when two readings of its task
would lead to different work. The question is an agent message of kind question, with up to
four options. The owner's next prompt after it is the answer (a prompt sent before the question
is never its answer). The run waits live for a minute. Then it is parked: a waiting status,
no model calls, no time limit. Whenever the answer comes, the run goes on from where it stopped,
with a started status whose resumes is the seq of that waiting status. A parked run
never fails for want of an answer; POST …/stop drops it.
With an edge to another agent, an agent may tell it something. The other agent's thread gets
a peer message. A hosted agent runs it as a task, and when that task ends its summary goes back
as a peer message with reply: true, whether or not it has an edge back. A reply starts no
task: a working agent hears it at its next step, and the thread keeps it either way. A message
that arrives while a hosted agent works or waits on a question runs after that. hops counts a
chain of messages (a task started by a message with hops: n sends messages with hops: n + 1);
a message that would have hops over 8 is not delivered. An external agent sends with its own
token, POST …/agents/{agent}/tell {to, text, hops?} (hops: that of the message it acts on),
and reads replies in its thread.
Standing instructions. instructions says who an agent is and what it is for, in at most
4,000 characters. A hosted agent is given them with every task, before the task. An agent that may
message another is told that agent's name, what decides it, its machine and the first 200
characters of its instructions. Instructions and edges are read when each task starts.
Hosted agents (POST …/agents {kind: "hosted", machine, name?, harness?, instructions?, may_message?}) run while nobody
watches. A prompt starts a task. What the owner says while a task runs is heard by that task at
its next step (the message gets heard); only a harness that does not hear, a scripted one,
takes it as its next task (queued: true until that task starts). The task is
Computatrum's agent loop, the desktop app's own: each step it looks at the machine (the engine's
frame, and the scene's controls and text as its outline), asks its harness for a decision,
and acts with the pointer and the keyboard, and the thread gets why it did each thing (an agent
message of kind thought), what it did (action) and how it ended (status). harness names what decides (§ Harnesses):
computatrum-1.1-normal when it is left out, another effort, one of the organization's
scripted harnesses, or a research harness the account may use. It is checked when the agent is
made (404 harness_not_found, 403 harness_access_required) and again when each task starts
(409 harness_attestation_required when the harness needs the person's attestation first);
the agent shows it (harness), and the started status of each task carries it. Its screen is the machine's own size (config.screen: 1280×800 for a desktop,
390×844 for a phone). It differs from the app where nobody is at the machine:
- a step that sends, deletes, buys or changes an account is taken (the machine is simulated, and the owner asked for it); a step that needs a password, a code or a card number stops the task, since a hosted agent never types one;
- it asks the person only when the communication graph gives it that edge (above); without it, it decides for itself;
- a task ends after 40 steps (60 at the
carefuleffort) or after its harness'sbudget_s(10 minutes for Computatrum's and scripted harnesses, an hour for the navigator); - with the Computatrum harness, its model calls are the environment's organization's: admitted against its agent-minutes and
pay as you go and recorded to it, as a person's Computatrum calls are theirs
(§ Agent-minutes, credits and the two windows). A personal organization is its account, so a
person's Computatrum and their hosted agents share one pair of windows; a team organization's
hosted agents use the team's, at its plan, with no pay as you go (that is a person's). A task
stopped by a full window says so in its
failedstatus (quota: true,reset_at). Its steps and renders count against the organization's per-minute limits like an actor token's.
POST …/stop cuts the running task short and drops a parked run and the prompts that wait. A task the platform
cannot finish because the service restarted (an update) is reported in the thread as failed
with where it stopped (interrupted: true), and the agent goes on with the next prompt.
A scripted harness asks no model and uses no agent-minutes. A research harness's steps are decided by its own model and are not metered. A person of a society may be decided by a harness through the same field, with the same access checks.
Threads and hosted agents are under the environments scope.
Procedures (expert procedures)
| Method and path | What it does |
|---|---|
POST /templates/{id}/procedures/{pid}/instantiate {seed?, overrides?} | Draw an instance. |
POST /environments/{id}/procedures/stage {instance} | Write its setup files. |
POST /environments/{id}/procedures/project {instance, agent, options?} | Perform it through the external agent agent names (or {role: agent}) and return the demonstration. |
POST /environments/{id}/procedures/verify {instance, captures?} | Its checks against the environment; captures (a demonstration's) fills checks that name a captured {{@name}}. |
POST /environments/{id}/procedures/run {procedure | ref, seed, fork?, include_steps?, options?} | All four; lets its own agents in. fork: true runs in a throwaway copy and leaves the environment as it was. The environment must be in a place carrying the applications the procedure launches and have its desktops: a 409 says which place to fork to, or to boot an environment with procedure. |
Society (societies) — see § Societies and forks below.
| Method and path | What it does |
|---|---|
GET /environments/{id}/society | {spec_id, people, round, rounds, metrics}; a 404 when the environment has no society. |
POST /environments/{id}/society/rounds {count, ask_model?} | Run 1 to 100 rounds. |
GET, POST /environments/{id}/society/journal | The LLM journal; answers for pending decisions. |
GET /environments/{id}/society/trace?since= | The trace, as JSON lines. |
GET /environments/{id}/society/summary | Outcomes per round for this environment and each of its forks, divergence and state hashes. |
Driving one machine#
A client that treats an environment as one machine it rents — boots it, drives it as an agent would, hands it files and reads its files back, and gives it up — needs four things beyond the engine's calls. CommandAGI drives its simulated machines this way.
- The frame with the action.
POST …/agents/{agent}/step {actions, render: {width, height}}answersframe: {png, width, height, state_hash}beside the outcomes: the PNG (base64) thatGET …/renderwould draw for the state the actions left, so an agent that looks after every action pays one round trip, not two. It counts as one render. Withif_changed: true, a step that leaves the state hash as it was draws nothing and answers noframe. - Files in and out.
PUT /environments/{id}/files?machine=workstation&path=/home/ada/brief.txt {content}(or{base64}for bytes) writes a file onto the machine;GETwith the same query reads one back as{content, base64, bytes}. Both are the owner's (an API key; an actor token gets a 403) and carry at most 4 MiB. They go through the owner's file session on the machine, a session of the machine's user granted onlyfilesystem.v1, made on the first file call. It is a session like any other: a write is in the trajectory and the state hash, a fork carries the file, a reset drops the session. A path that is not a readable file is a 404, whether it is absent or a directory, because the engine says only that the read failed. - A lifetime.
POST /environments {…, idle_ttl: 900}boots an environment that deletes itself 900 s after the last request that reached it, an owner's or an actor token's, asDELETE /environments/{id}would, and gives its place underenvironments_maxback. A client that stops without deleting its environment, because it crashed or lost its link, does not hold the organization's quota. The summary saysidle_ttlandexpires_at. The time is kept by the environment itself, so it holds in every place. - What is left.
GET /mesays the plan'squotas.environments_maxandusage.environments, the environments the organization runs now; the difference is how many more it can boot. A boot past the quota is a 429quota_exceeded.
E=$(curl -s $API/environments -H "authorization: Bearer $CW_KEY" \
-d '{"template":"agent-desktop","platform":"ubuntu","idle_ttl":900}' | jq -r .id)
curl -s -X PUT "$API/environments/$E/files?path=/home/ada/brief.txt" -H "authorization: Bearer $CW_KEY" \
-d '{"content":"Ship on Friday."}'
A=$(curl -s $API/environments/$E/agents -H "authorization: Bearer $CW_KEY" -d '{}' | jq -r .id)
curl -s $API/environments/$E/agents/$A/step -H "authorization: Bearer $CW_KEY" -d '{
"actions": [{"family": "keyboard.v1", "op": "key", "payload": {"key": "Ctrl+Alt+t"}}],
"render": {"width": 1280, "height": 720, "if_changed": true}}' | jq '.frame.width'
curl -s "$API/environments/$E/files?path=/home/ada/brief.txt" -H "authorization: Bearer $CW_KEY" | jq -r .content
curl -s -X DELETE $API/environments/$E -H "authorization: Bearer $CW_KEY"
Real clients#
An environment is closed to the real network, except for the hosts its definition names (Real hosts). Two kinds of grant let an ordinary client in, on the API's own HTTPS port (443), and only as one of the environment's external agents:
- a publication lets any HTTP client read one service of the world with GET;
- an SSH grant lets the stock OpenSSH client run commands on one machine, through a small helper.
Neither reaches a real address: each request is the agent's own action inside the world, recorded in its history like any step, and a fork or a replay needs nothing of the client. A world with no grant is closed.
A grant is made by the environment's owner, for one external agent and one machine that agent controls.
Its answer holds the handle (cwh_…, not secret: it is in URLs) and the credential (cwi_…, secret:
sent as Authorization: Bearer cwi_…), shown once and never again. A grant lasts ttl_s seconds (60 to
86400, 3600 when left out). It stops working, for the next request and for an SSH connection already open,
when it is revoked (DELETE), when it expires, when the environment is reset, a snapshot is restored or the
environment is deleted, and when the agent no longer controls the machine or may no longer use the action the
grant needs. A fork or an import has none of its parent's grants. An environment holds at most 16 active grants
and issues at most 30 a minute; one grant serves at most 600 requests a minute.
GET /v1/health says which kinds this service offers now: "ingress": {"publications": true, "ssh": true}.
Publications#
| Route | |
|---|---|
POST /environments/{id}/publications {agent, host, port, machine?, ttl_s?} | Publish the service the world declares at host:port (GET …/topology lists them) from agent's machine. The agent needs http.v1. → {handle, url, credential, header, target, methods: ["GET"], expires_at, …} |
GET /environments/{id}/publications | The environment's publications, with state (active, expired, revoked, stale), uses and bytes; never a credential. |
DELETE /environments/{id}/publications/{handle} | Revoke it. |
GET /publications/{handle}/{path} | One GET of path (with its query) on the service, as the agent. Needs only the grant's credential. |
P=$(curl -s -X POST $API/environments/$S/publications -H "authorization: Bearer $CW_KEY" \
-H 'content-type: application/json' -d '{"agent": "agent_1", "host": "html.example", "port": 8090}')
umask 077; echo "$(echo "$P" | jq -r .header)" > headers
curl --fail-with-body -sS --header @headers "$(echo "$P" | jq -r .url)/api/records/probe"
# → "cw-probe-1"
The answer is the service's own status, its body (bytes as they are) and its Content-Type,
Content-Language, ETag and Last-Modified. It is never cached (Cache-Control: private, no-store), so the
next read sees the world as it is then. A page a browser would run (HTML, SVG, XML, script) comes as an
attachment in a sandbox, never as a page of this site; cookies and redirect targets the service sends do not
pass. X-CW-Tick and X-CW-State-Hash say when in the world it was answered.
Only bodyless GET (and HEAD) is served; a path and query are at most 2048 bytes; a body is at most 4 MiB. When
the world cannot answer (the name does not resolve there, its network does not route, the service is stopped),
the answer is 503 {"error": {"code": "in_world_failure", "world_error": {…}}} with no Retry-After: the same
failure the agent would see, and the next read after the world changes can succeed. (Retry-After comes only with
ingress_closed, when this service has turned publications off.) A 502 or 504 the world's own service answers is
passed as it is, but Cloudflare shows its own page for those statuses in place of the body.
SSH#
| Route | |
|---|---|
POST /environments/{id}/ssh {agent, public_key, machine?, exec?, forward?, ttl_s?} | Let a client holding public_key (an OpenSSH line, ssh-ed25519 AAAA…) act as agent. exec (default true) runs commands (the agent needs terminal.v1); forward: {host, port} also allows ssh -L to that one declared service (the agent needs http.v1); exec: false with forward allows only that. → {handle, login, websocket_url, credential, host_key, host_key_alias, known_hosts, ssh_command, expires_at, …} |
GET /environments/{id}/ssh, DELETE /environments/{id}/ssh/{handle} | As for publications. |
A machine takes SSH as a real one does, through its own SSH server. The grant's machine needs the
openssh-server package in the world's definition, or the grant is refused with 400. A connection is refused
while that machine's sshd is stopped in the world (systemctl stop sshd). Inside the world, ssh goes on from
there to other machines that run sshd (shell § ssh).
SSH speaks first on its connection, and this service listens only for HTTPS, so ssh reaches it through
cw-ssh-proxy, a helper the JavaScript client installs (npm i -g computerworld-cloud; Node 22 or later).
ssh starts it as its ProxyCommand; it carries ssh's bytes over a WebSocket to websocket_url and nothing else.
ssh checks the host key itself, against the known_hosts line the grant gave you.
G=$(curl -s -X POST $API/environments/$S/ssh -H "authorization: Bearer $CW_KEY" -H 'content-type: application/json' \
-d "{\"agent\": \"agent_1\", \"public_key\": \"$(cat ~/.ssh/id_ed25519.pub)\"}")
umask 077; echo "$G" > grant.json; echo "$G" | jq -r .known_hosts > known_hosts
export CW_SSH_GRANT=$PWD/grant.json
ssh -o ProxyCommand=cw-ssh-proxy -o HostKeyAlias=$(echo "$G" | jq -r .host_key_alias) \
-o UserKnownHostsFile=known_hosts -o StrictHostKeyChecking=yes -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 \
"$(echo "$G" | jq -r .login)@$(echo "$G" | jq -r .host_key_alias)" 'echo cw-731 > /tmp/cw-ingress.txt'
(ssh_command in the answer is the same line, ready to copy.) Each command is the agent's
terminal.v1 / execute on the machine, with the machine user's permissions: its stdout, stderr and exit status
are ssh's, as the SDK's execute returns them. A command that fails in the guest exits with its own status; a
command the grant may not run exits 255 with the reason on stderr. A command runs once: if the connection
drops, ssh does not send it again, and running the same text again is a new command. One SSH connection runs
one command per channel; a shell, a terminal (-t), subsystems (sftp), environment variables, agent and X11
forwarding, and remote forwarding (-R) are refused. With forward, ssh -L 8080:html.example:8090 serves
GET and HEAD to that service, as a publication does; any other destination is refused.
cw-ssh-proxy reads the grant file named by CW_SSH_GRANT (or its first argument), and refuses one others can
read: keep it mode 0600. It never puts the credential in a URL or an argument. ssh -p 443 to this host does
not work: the helper is what turns ssh's connection into the WebSocket this service accepts.
SSH transport#
For a client of your own in place of cw-ssh-proxy: GET /v1/ssh/{handle} with Upgrade: websocket,
Sec-WebSocket-Protocol: cw-ssh.v1 and Authorization: Bearer cwi_…. Every message is binary, a type byte
and its payload: 0x01 DATA (1 to 16384 bytes of the stream, in order), 0x02 EOF (the sender will send no
more DATA; the other direction goes on), 0x03 CREDIT (4 bytes, big-endian: the receiver took that many bytes),
0x04 CLOSE (a 2-byte code, then a UTF-8 reason: the whole connection ends). Each direction starts with
262144 bytes of credit; DATA beyond it, DATA after EOF or a text message ends the connection with CLOSE 1002.
Message boundaries carry no meaning. Nothing is resent after a connection is lost.
Real hosts#
A world's machines reach a real host on the internet when the world's definition names that host in its gateway policy:
"network": {"gateway": {"allow_host": true, "host_allowlist": ["api.github.com"], "sources": ["workstation"],
"schemes": ["https"], "ports": [443], "allowed_cidrs": ["0.0.0.0/0", "::/0"]}}
"host_allowlist": ["*"] admits any name the world does not define itself. A name the world defines always
stays inside the world.
An agent reaches a named host with an ordinary http.v1 request:
curl -s -X POST $API/environments/$S/agents/$A/step -H "authorization: Bearer $AGENT_TOKEN" -d '{"actions": [
{"family": "http.v1", "op": "request", "payload": {"method": "GET", "url": "https://api.github.com/zen"}}]}' \
| jq -r '.outcomes[0].value.body | implode'
Each such request is a real request, sent when the step runs. The history records the answer with the step, so a fork or a replay gives the same answer again and does not send the request again.
The world's own browser reaches named hosts too. A browser.v1 step that opens a real page loads it as a
browser does: the page, its stylesheets, scripts and pictures, and the requests its scripts make. A command's
curl on a machine reaches them the same way.
curl -s -X POST $API/environments/$S/agents/$A/step -H "authorization: Bearer $AGENT_TOKEN" -d '{"actions": [
{"family": "browser.v1", "op": "navigate", "payload": {"url": "https://example.com/"}}]}' | jq .outside
What a page asks for is found by running the step. The step runs; the requests it asked for and did not have are
sent; it runs again from where it began with their answers; and so on until it asks for nothing new. Only the
last run counts. outside in the step's answer says how many runs it took (rounds), how many requests were sent,
how many bytes came back and how long it took (elapsed_ms). A fork or a replay of the environment shows the same
page and sends nothing. The browser follows redirects itself. Cookies a site sets stay in the world's browser, and
a fork keeps them.
A page's scripts are held to a browser's rules. A request to another origin is a CORS request: its answer reaches
the page only when that origin allows the page's (Access-Control-Allow-Origin), and a request that is not
simple is preflighted with OPTIONS first. Cookies go to another origin only with credentials: "include" and an
answer that allows credentials. A no-cors request gets an opaque answer, and no script sees a Set-Cookie. A
refused request is a network error to the page and a line on its console.
These rules hold whatever a definition says:
- Only public addresses are reached, and never this platform's own hosts.
- For
http.v1andcurl, a redirect is the answer (status3xx with itslocation). It is not followed. - An answer is at most 4 MiB, or the definition's
max_response_bytesif that is smaller, and arrives within 15 s. - A step sends at most 96 such requests, receives about 24 MiB, reaches out for at most 30 s and runs at most 8 times. An environment sends at most 600 a minute.
A request that fails has the reason outside_unavailable, outside_failed or outside_refused
(error codes). A request past a limit fails with outside_failed and names the limit.
The operator stops every environment's real requests with PUT /v1/admin/outside {"requests": false}.
GET /v1/health shows "outside": true|false.
History#
An environment's history is a graph of snapshots. Forks join the graphs of a family: an environment, the environment it was forked from, and every fork of either. Two lines of work never join again: there is no merge, because two diverged states cannot be combined into one, and taking another environment's state is what a fork or a restore already does.
- A snapshot names where its state came from.
parentis the environment's head when the snapshot was taken (null: the environment's start),authorthe username that took it, andframesthe machines a picture was kept for: each machine an agent was connected to then (GET …/snapshots/{s}/frames/{machine}, a PNG). - The head is the snapshot the environment's state came from last: the newest one taken or restored. A snapshot taken after a restore has the restored one as its parent, so the history branches there. Dropping a snapshot hangs its children from its parent.
- A fork names where it left its parent.
originis{snapshot, tick, state_hash}of the parent when the fork was made; null for a fork made before 2026-11-12. - A snapshot keeps the agents and their conversations. With the world's state it keeps every
agent as it was: its connections and its thread (
GET …/snapshots/{s}/agentsand…/agents/{agent}/messages). A restore brings them back: the messages after the snapshot leave the environment's thread, an agent made after it is removed (its token stops working), and an agent removed after it comes back with a new token, answered once in the restore'sagents(a revoked token never works again). An external agent that is still here keeps its token. A hosted agent that was working when the snapshot was taken does not go on with that task: its loop stops, and its thread ends with astoppedstatus markedinterrupted: true; the prompts that waited are dropped. A thread's numbers go on past the highest one its line used, so a reader'safterstill hears what comes next; read again fromafter=0for the restored thread. A fork from a snapshot starts with the conversations it kept, and a fork from now with today's. A snapshot kept before snapshots held conversations (2026-11-12) restores the agents it named with empty threads, and says so:conversations_kept: false.
GET /environments/{id}/history answers the whole family, the furthest ancestor first:
{"environment": "w_2b…",
"environments": [
{"id": "w_5d…", "name": "main", "source": "builtin:agent-desktop", "created_at": 1794…, "parent": null, "origin": null,
"head": "s_91c2", "place": {"id": "core", "kind": "lightning", …},
"snapshots": [{"id": "s_07aa", "label": "one", "parent": null, "author": "ada", "frames": ["workstation"], …},
{"id": "s_91c2", "label": "two", "parent": "s_07aa", "author": "ada", …}]},
{"id": "w_2b…", "name": "branch", "source": "fork:w_5d…", "created_at": 1794…, "parent": "w_5d…",
"origin": {"snapshot": "s_07aa", "tick": null, "state_hash": "…"}, "head": "s_c410", "place": {…}, "snapshots": [...]}]}
It is read from the organization's own store, so no environment is woken, and a sleeping Heavy environment stays asleep. A deleted environment leaves the history.
Recordings#
A recording has machines whose screens were recorded somewhere else, as frames. It is not a
environment: nothing runs it. The console shows it with the environment page, and its
machines can do what a recording's machines can do. Staff read recordings, as they read the
fidelity analyses; for anyone else the list is empty and the routes are a 404.
GET /recordings answers {recordings: […]}, each with id: "r~<run>~<job>",
place: null, machines: ["reference", "simulator"] and
recording: {run, job, label, application, fidelity}. GET /recordings/r~… is one of them,
its …/topology has two machines of the kind recording with interfaces: ["screen"], and
its …/history answers {recording, steps: [{step, stimulus?, target?, overall?, findings?, divergent?, failed?, frames}]}.
Any write to a recording is a 409.
Societies and forks#
A society is the simulated agents of an environment: many people, each on the screen of their own phone or computer, who act in rounds on the environment's clock. It is set when the environment boots:
curl -s $API/environments -H "authorization: Bearer $CW_KEY" \
-d '{"template": "company-2026", "society": {"id": "rumor-cascade", "journal": "builtin"}}'
society is {spec | id, rule?, journal?, rounds?}: a spec of your own, or the id of
one the template ships (GET /templates/{id}/societies). The spec is compiled into the
definition, by a TypeScript port of the Python society runner that gives the same compiled
people and follows and the same state hashes as the Python runner on the same engine, and
replays the recorded rumor-cascade journal with no miss. The runner then starts in the
environment. Its people are the environment's simulated agents (GET …/agents), at most
society_people_max of them. POST /validate {definition, society} says how many people a
spec compiles to before you boot it.
People whose policy is llm ask a model. Their replies are the journal, keyed by the
prompt's bytes, so a run with a journal replays exactly. journal is "builtin" (the
journal recorded beside a built-in society), a journal file's text, or [{key, reply}]. A
round that meets a prompt the journal lacks is rolled back and comes back as pending
(the key, the person and the prompt); answer them with
POST /environments/{id}/society/journal and run the round again, or send
ask_model: true and the deployment asks its model (DeepSeek, deepseek-flash) and reruns
the round itself, counting each call against model_calls_per_day.
A society can also answer for a site whose people have no device (asks in the spec;
societies): the built-in alibaba-trade society of
robotics-co answers for the suppliers, the buyers and AI Mode of alibaba.com. Their
questions are journaled, come back as pending and are asked of the model the same way, under
the person service:<the service's id>.
A site's questions#
Some sites hold people whom a model decides for, and an assistant: on the simulated alibaba.com, the suppliers' sales people, the buyers who write to a store, and AI Mode. The site decides when each acts and what an answer does; it leaves the question for a model in its state and says when it next has something due (societies). A society answers during its rounds. An environment without one is served by a call:
curl -s $API/environments/$E/asks -H "authorization: Bearer $CW_KEY" # what is open, and when the next is due
curl -s $API/environments/$E/asks -H "authorization: Bearer $CW_KEY" -d '{"advance": "30m"}' # answer, moving the clock through each due time
Call it after your agent has acted (a supplier it wrote to answers at that supplier's own
time, so advance far enough), or with no advance to answer what is open now, such as a
question typed into AI Mode. Each reply is told to the site as a recorded event of the world
and kept in the environment's journal, keyed by the question's model and messages: a fork, or
the same run made again with the same actions, replays from the journal and asks no model.
The key holds the conversation, so a run in which your agent wrote something else meets other
questions; those are asked of the model, and journaled in turn. The same holds for a built-in
society's recorded journal ("journal": "builtin"): it replays what does not depend on what
your agents do, and the model answers the rest. Calls count against model_calls_per_day.
Forks are the experiment's arms. POST /environments/{id}/fork copies the environment
at its current state, with its society's runner state, and applies society_ops: the rule
ops of one arm of the spec's matched-fork design. The parent's trace is the prefix every
arm shares, each fork is an arm, and GET /environments/{id}/society/summary compares
them: outcomes per round, divergence, and each one's state hashes. Forks count against
environments_max.
curl -s $API/environments/$E/society/rounds -H "authorization: Bearer $CW_KEY" -d '{"count": 2}'
curl -s $API/environments/$E/fork -H "authorization: Bearer $CW_KEY" \
-d '{"name": "norm-half", "society_ops": [...]}'
curl -s $API/environments/$E/society/summary -H "authorization: Bearer $CW_KEY"
Harnesses#
A harness is what decides an agent's steps (harnesses). Computatrum on a
person's computer and a hosted agent run the same loop and choose a harness by id:
computatrum-1.1-fast, -normal (the default) and -careful; scripted-<uuid>, a fixed
program the organization keeps; the energy harnesses, such as psych-energy-2026-11-23-normal,
which score every action the screen offers; and research harnesses such as
tribe-v2-energy-2026-11-23-normal.
The platform runs one version of each model harness: an id of another version (computatrum-1.0-normal)
names the same family and effort at the version there is.
Each harness declares its facts: runs (local, scripted or remote), emits (the verbs it can
answer, or null for every verb), sends (what leaves the computer beyond the platform's own
model call, and to whom), latency, budget_s (how long one hosted task may run), requires
(the entitlements it needs) and licence.
curl -s $API/harnesses -H "authorization: Bearer $CW_KEY"
# → {"default": "computatrum-1.1-normal",
# "harnesses": [{"id": "computatrum-1.1-normal", "family": "computatrum", "version": "1.1", "effort": "normal", "title": "Computatrum · normal",
# "runs": "local", "emits": null, "sends": [], "latency": null, "budget_s": 600, "requires": [], "licence": null,
# "pixels": true, "available": true, "attestation": null, "why": "Open to every account."},
# {"id": "tribe-v2-energy-2026-11-23-normal", …, "runs": "remote", "serving": true,
# "emits": ["press", "click", "set_text", "type", "key", "scroll"],
# "sends": [{"what": "the words of the actions on the screen", "to": "ComputaCo's own model server, hosted by Hugging Face"}, …],
# "latency": {"cold_s": 30, "per": "screen of action words it has not read"}, "budget_s": 3600,
# "requires": ["noncommercial-research"], "licence": {"name": "CC BY-NC 4.0", "of": "TRIBE v2"},
# "available": true, "attestation": null, "why": "Open to you: your account holds noncommercial-research."}, …]}
| Method and path | What it does |
|---|---|
GET /harnesses | Every harness, each with its facts, available, why and attestation. |
GET /harnesses/{id} | One harness; a scripted one with its script. |
POST /harnesses/scripted {name, script} | Make a scripted harness (at most 100 an organization). |
PUT, DELETE /harnesses/{id} | Replace or delete a scripted harness. |
POST /harnesses/{id}/attestation {agree: true} | Attest the use of a harness whose licence binds it. A key, a session or the app's agent token. |
POST /harnesses/{id}/decide {input} | One step from a harness that runs on a model endpoint: {decision}, or 202 {pending, retry_ms}. |
GET /harnesses/decisions/{pending} | That step: {decision}, or 202 again. |
Tags grant entitlements, and a harness requires entitlements. GET /v1/me returns the account's
tags ({tag, by, at, evidence, expires, expired}: who attested it, when, the evidence and the
expiry) and the entitlements they add up to. An expired tag grants nothing. A harness is
available to a user acting in an organization when the operator has not denied it to either, and
has allowed it to either, or the account holds every entitlement the harness requires. Anything
else is 403 harness_access_required, and the message says what is missing. A table of tags and
entitlements is in harnesses.
An account that holds both commercial and noncommercial-research may use a harness that
requires noncommercial-research after it attests, once per harness: attestation is {required,
given, text, why} for such a harness and null otherwise. Making an agent is allowed. Starting a
task without the attestation (a message to a hosted agent, a society person's turn,
POST /harnesses/{id}/decide) is 409 harness_attestation_required; the error carries text and
why. An allow from the operator needs no attestation, and a deny still wins. The routes are under
the environments scope; an agent token reads the catalog, asks for steps and attests.
Perceiving pages#
POST /v1/perceive reads records out of a web page you fetched. You send the page and a JSON Schema of the records
you want; the answer is the records, with the place on the page each value was read from. Nothing is clicked, typed,
fetched or run: the page is laid out from the bytes you send, its own <style> sheets only, with no script and no
network. The same page and schema give the same answer.
curl -s $API/perceive -H "authorization: Bearer $CW_KEY" -H 'content-type: application/json' -d '{
"page": {"url": "https://example.org/releases", "html": "<!doctype html>…"},
"schema": {"type": "object", "required": ["title", "date", "url"],
"properties": {"title": {"type": "string", "description": "The release title as the list shows it."},
"date": {"type": ["string", "null"], "format": "date"},
"url": {"type": "string", "format": "uri"}}},
"purpose": "New releases for a monitor.",
"budget": {"max_cost": 0.002}
}'
# → {"records": [{"title": "Board approves winter dredging", "date": "2026-11-20", "url": "https://example.org/releases/41"}, …],
# "evidence": [{"record": 0, "nodes": [{"node": 31, "field": "title", "quote": "Board approves winter dredging"}, …]}, …],
# "outline_hash": "9f2c…", "harness": "rules", "cost": 0.0000021, "model_calls": 0, "cpu_ms": 41.2}
The request. page is {url, html} (the HTML as fetched, at most 8 MiB; url makes its links absolute) or
{url, graph}, a UX graph you made yourself (the scene contract's UxGraph). schema describes one record: an object
whose properties are strings, numbers, integers, booleans or null; a list or an object as a field is refused (400). A
property's name and description say what it is. format: uri takes the address a link opens; format: date takes a
date as the page prints it and writes it as an ISO date; an integer can be the record's place on the page. A schema
with additionalProperties reads a table's columns under their headings, as printed. purpose is one sentence, shown
to the model when one is asked. limit keeps the first records in reading order.
How it reads. The page is laid out at 1280 px and read into an outline: its regions (landmarks, lists and items, tables, rows, cells named by their column, headings, articles, blocks named by their class) over its words and links, in reading order. A record is a region that repeats. For each family of repeated regions, the schema's fields are matched to what each region holds: by type (an address, a date, a number), by meaning (the field's name and description against the column heading or the roles and class names around a value, with a multilingual model of words), and by how many regions hold it. Words every region repeats are labels, not values. A story that two places link to is kept at its first place.
harness. rules when the rules answer alone: one family of records fits, with the dates or columns that a list
of records has. model when two or more families fit and only a reader of the words can tell records from navigation
(a front page's stories from its menus): the chat model is shown each family's first records and answers which
families hold the schema's records. The model never writes a value; every value is read by the rules from a node of
the outline, and evidence names it (node is an index into the outline's nodes in reading order). A model's choice
is kept under the page's outline_hash, the schema and the purpose, so asking again gives the same answer and asks no
model.
Cost and budget. cost is in US dollars: the model call's tokens at its list price, and the Worker's time at
Cloudflare's price ($0.30 a million requests, $0.02 a million CPU milliseconds). budget.max_cost is never exceeded:
when a model call could cost more (every character of its prompt a token, and its longest answer, at the dearest model
of the chat chain), the read is refused with 402 over_budget and needed, and no model is asked. budget.max_ms
refuses (408 over_time) a read that took that long before its model call. A read is admitted and billed as a model
call (§ Computatrum), and given back when the rules answered alone. Measured on CommandAGI's corpus of 61 pages
(2026-11-21): a read by the rules costs about $0.000003; a read with a model call $0.0001 to $0.0011 on its first
read, less when the model's provider has the prompt cached.
outline_hash is the SHA-256 of the outline: two fetches of a page whose readable content did not change have
the same hash, whatever else their bytes differ in (a nonce, a timestamp in a script). Skip the records when it is
the last read's.
No records. records is empty with a note when no repeated region fits the schema: a page whose content a
script draws holds none of it here.
POST /v1/perceive/batch {requests: [...]} takes 1 to 20 reads, each its own request and budget, and answers
{answers: [...]} in the same order, a refusal in its place as {error: {code, message}}. Both routes are under the
models scope. The contract is seams/contracts/perceive.schema.json.
The e-mail address#
An account has one e-mail address, verified by a six-digit code sent to it from [email protected]
(docs/mail.md § What the service sends). The address is personal data: GET /v1/me shows it to its
owner, and no other view does. An organization's member list has no address; the operator's and
staff's views show its domain; the operator finds an account by an address a partner gave
(GET /v1/admin/users?email=), and the answer still has only the domain. Deleting the account
deletes the address and its codes.
- The code. Six digits, any value equally likely, kept as a salted SHA-256. It works once,
lasts 15 minutes and takes five tries: a wrong one says how many are left (
400 invalid_code), the fifth spends it, and a late one is400 code_expired. A new code replaces the one waiting. - Limits. One account: one code a minute and five an hour. One address: three an hour and six
a day, whoever asks, so the route cannot be used to send mail at someone. One network (the
caller's IP address): ten an hour. Past a limit is
429 rate_limitedwithRetry-After, and nothing changes. Addresses and IP addresses are counted by their hashes and forgotten after a day. - One account per verified address. A code to an address another account has verified is
sent (only the address's holder reads it), and confirming it is
409 email_taken. - Standing. A verified address at an academic domain gives the account a tag, attested
by: "email", with its domain as the evidence and a one-year expiry:tier-1-university-studentat a tier-1 university,academicat any other academic or government research domain (docs/harnesses.md § Standing from an e-mail address). Verifying it again renews it. A new address, or none, takes it away. A tag the operator attested is never replaced or lowered. - Free minutes. While the service's setting is on (
PUT /v1/admin/free-minutes {"verified_email_required": true}; on since 2026-11-12), a Computatrum or hosted agent's model call that would use the Free plan's agent minutes is403 email_verification_requireduntil the account (for a team organization, one of its owners) holds a verified address. A paid plan, pay as you go, staff and a member of an organization on a paid plan are not asked. There is no captcha. - Mail that cannot be sent is
503 mail_failed(the code is forgotten; it is never retried or sent through another account), or503 mail_not_configured. - Review requests. A person whose address gives too little asks for a review:
POST /v1/me/review {standing, statement}, wherestandingis one ofresearcher,tier-1-university-faculty,tier-1-university-student,academic, andstatement(20 to 2,000 characters) says what they are, where, and a public page that shows it. One request is open at a time (409). The operator lists the open ones (GET /v1/admin/reviews: username, standing, statement, the verified domain), grants one by attesting a tag (PUT /v1/admin/users/{username}/tags/{tag}; the request recordsgrantedand the tag), or declines it (POST /v1/admin/reviews/{id}/decline {reason}; the person reads the reason inGET /v1/me/review). Staff do the same in the console (GET /v1/staff/reviews,POST …/{id}/grant,POST …/{id}/decline).
Estimates#
What a model predicts people would do on a frame. An estimate is a prediction about people in general. It is
not an observation: it is not written to an agent's thread, and every answer says
kind: "prediction". Today there is one model, SeekUI (Guo, Jiang, Leiva and Oulasvirta, CHI 2026,
10.1145/3772318.3791178), which predicts the scanpath of a person
searching a screen for an element named by its text. The routes need the environments scope.
| Route | What it does |
|---|---|
GET /v1/estimates | {models}: each model's id, what it estimates, what it needs, its price in credits, its credit to the authors, and available. |
POST /v1/estimates {preview: true, source} | The frame's elements, scene, digest and running, at no charge. |
POST /v1/estimates {model, target, source, element?} | {estimate, cached, charged}. target is the text searched for (1 to 200 characters); element is the interaction of the target on this frame. |
Analysis happens after a run: a screen of an agent whose run is still going is refused (409 run_in_progress). source is
one frame: {environment, agent, screen} (a screen the agent kept, by digest), {environment, snapshot, machine} (the picture kept with a snapshot), or, for staff, {recording, step,
machine}. The same model runs on all of them. A frame's scene is kept with its picture. A snapshot kept without one has
it read once from the snapshot's own state (scene: "rebuilt"), without touching the running environment.
An estimate has width and height (the frame's pixels), fixations ({order, x, y, element} in those pixels, element
being the frontmost control under the point, or null), reached (whether its last three fixations are within 32 pixels of
element, the paper's test; null without a target element) and explanation (the model's own account, itself a prediction).
A new estimate costs a fixed number of credits, on the organization's agent-minute windows or pay as you go like its
other model calls. The answer is kept by the picture, model and target, and asking again costs nothing. The model scales
to zero when idle: while it starts the route answers 503 inference_starting with retry-after, and nothing is charged.
Errors and limits#
An error is {"error": {"code", "message"}}: 400 bad_request (and a code's invalid_code or code_expired), 401 unauthenticated, 403
forbidden, scope_missing (an API key without the route's scope) or email_verification_required (§ The e-mail address), 404 not_found (also another organization's environment), 409 conflict or email_taken, 413
too_large, 422 invalid_definition / invalid_edit / invalid_procedure, 429
rate_limited or quota_exceeded with Retry-After, 500 engine_error, 503
model_error, mail_failed, billing_error, model_unavailable (with Retry-After), agent_not_configured,
mail_not_configured or billing_not_configured, 507 definition_too_large (the environment needs more memory than its
place has; fork it to Heavy, § Places). The device sign-in's polling answers 400 with the OAuth device-grant
codes (§ Computatrum).
A failure on our side (500 engine_error, 507, and the 503 of a model, the payment service or a Heavy
environment that did not answer) says so in plain words and carries a support reference: the error's id, also at the end of its
message (Support reference: 3f9c0a7e12b4d685.). What failed, in detail, is in our logs under that id, and never in
the answer: an exception's own words, a provider's answer, and the names of our hosts, objects, storage and accounts
stay on our side. The same holds for a hosted agent's or a simulated person's failed task, whose thread says
The agent's loop failed: something went wrong on our side. Support reference: …. An error about your request (a
4xx written for it, the engine's refusal of your definition) says what to change.
Each account's quotas are its plan's (GET /v1/me shows them, GET /v1/plans lists every
plan's); see § Plans and billing.
An actor token's work counts against its environment's organization; it is limited in its environment's object at Free's per-minute rates (the object does not know its owner's plan) and added to the account's counts after it is answered.
Plans and billing#
| Quota | Free | Pro, $29 a month | Enterprise |
|---|---|---|---|
Environments running at once, forks included (environments_max) | 8 | 32 | 128 |
Agents per environment (agents_per_environment) | 16 | 64 | 256 |
Kept snapshots per environment (snapshots_per_environment) | 16 | 64 | 256 |
Templates of the organization's own (templates_max) | 32 | 128 | 512 |
People in an environment's society (society_people_max) | 32 | 128 | 512 |
| API keys | 10 | 25 | 100 |
| Definition size | 4 MiB | 4 MiB | 4 MiB |
| Requests a minute | 600 | 3,000 | 12,000 |
Actions (step) a minute | 1,200 | 6,000 | 24,000 |
| Renders a minute | 120 | 600 | 2,400 |
| Model calls a day (societies' LLM people) | 500 | 5,000 | 50,000 |
| Computatrum agent-minutes in a rolling 5 hours | 15 | 120 | 1,200 |
| Computatrum agent-minutes in a rolling week | 30 | 300 | 3,000 |
| Team organizations an account may create | 2 | 8 | 32 |
| Members in a team organization (open invites count) | 5 | 25 | 500 |
| Professional applications may be bought | no | yes | yes |
| Steps a month in environments running them, before metering | 0 | 100,000 | 1,000,000 |
Heavy-minutes a month (heavy_minutes_per_month, § Places) | 0 | 1,200 | 12,000 |
Agents per environment counts external and hosted agents. The console's view of a machine (an external agent
granted that one machine and labelled console:<machine>, through which the console draws its tile) is not
counted: one a machine is free, and a second one counts.
Pro and Enterprise never fall below Free on any limit. The definition size is what one request may carry, the same on every plan. How large an environment may grow is its place's: Lightning is the same on every plan, Heavy has room for big worlds, and the paid plans include Heavy-minutes (§ Places). Enterprise is by agreement ([email protected]) and set by the operator, not sold here.
The plan is an organization's, not an account's: a personal organization's plan is what
/v1/me shows as the account's, and a team organization is upgraded on its own (by one of
its admins, with x-cw-org), for every member. The rate limits above are per organization.
Organizations#
An organization is who owns things and who pays. Every account has a personal organization
(its own id; one member, the owner; it takes no invites), and may create team organizations
(org_…) and join others by invite. A member uses the organization's environments,
templates, packages and keys and makes keys for it; an admin also invites and removes members,
buys applications and manages billing; an owner also renames the organization, changes roles
and deletes it. There is always at least one owner. Invites are codes (cwi_…), given out as
links to /console/#/join?code=…; one made for an email is for one person and shows up on
that account's Organization page once the account has verified that address. A member list shows usernames and names, never an address. Usage, quotas and the plan's
allowances are counted per organization, so a team's work is pooled and billed once.
Professional applications#
The engineering and media-production suites in the catalog — KiCad ($490), FreeCAD ($490)
and the video editors Clipchamp, iMovie, Kdenlive and Video Editor ($390) — are
professional applications, each bought once for an organization and then run by every
member in every environment (GET /v1/vocabulary → products; the prices are the
catalog's price_cents). The other closed applications (the office suite, Visual Studio
Code, Music, Maps) come with every plan.
- Tier for access. Buying needs a paid plan: on Free,
POST /v1/orgs/{id}/applications/{product}/checkoutand an environment that installs the application answer402 plan_required. On Pro or Enterprise the checkout is a Stripe Checkout Session in payment mode at the catalog's price, with an invoice for the receipt;checkout.session.completedwithpayment_status: paidgrants the entitlement to the organization (metadata.kind: application,org_id,product). Until then an environment running the application is402 application_not_purchased, withmissingnaming the products; the same check meets a machine added live and a procedure boot. The operator may grant an application by agreement (POST /v1/admin/orgs/{id}/applications/{product}). - Meter for volume. An environment that runs a bought application is a professional
environment (
professionalin its summary). Itsstepactions, gestures (perform) and procedure runs come out of the organization's monthly allowance (Pro 100,000, Enterprise 1,000,000), then are metered at 100 steps a credit (10 credits, $0.025, per 1,000 steps) on the same credits meter as pay as you go, when the organization has turned metered steps on (PUT /v1/orgs/{id}/meter {"enabled": true, "monthly_cap_usd": 50}; the first time answers acheckout_urlfor the payment method). Without it, or at the cap, the next step is429 quota_exceededwithRetry-Afterthe start of next month; environments without a professional application are never metered. An environment leases 20 steps at a time from the accounts object and spends them locally, so metering adds one round trip in twenty steps; what is left of a lease when the environment's object is evicted is at most a fifth of a credit. The price is a volume price, not a cost one: a step with KiCad launched took 4 ms of engine time against 1 ms in an open environment (2026-10-31).
Each limit is enforced from the organization's plan: requests, steps and renders a minute when a request is authorized; API keys, templates and model calls where they are kept; a society's people when it is compiled; an environment's agents and snapshots when the grant or snapshot is asked for (the environment itself holds up to the largest plan's). What an account already holds when it drops to a smaller plan is kept; it cannot make more until it is under the limit.
Upgrading. POST /v1/billing/checkout {"plan": "pro", "referral_code": "FIRST100"}
answers a Stripe Checkout URL (a monthly subscription to Computaco Pro, $29). The account
stays Free until Stripe tells the webhook it paid. Success and cancel return to
/console/#/settings?billing=success and …=cancel. POST /v1/billing/portal answers a
Customer Portal URL to change the card, see invoices or cancel (at the period's end).
The webhook (POST /v1/billing/webhook) checks Stripe-Signature — HMAC-SHA256 of
<t>.<payload> under the endpoint's signing secret, t within 300 s — and handles each event id
once:
| Event | Effect |
|---|---|
checkout.session.completed | Subscription mode: Pro, active, for the organization in metadata.org_id (or the customer's); the renewal date from the subscription; the code redeemed. metadata.kind: payg turns pay as you go on for the account; org_meter turns metered steps on for the organization. Payment mode with metadata.kind: application and payment_status: paid: the product is granted to the organization. |
customer.subscription.updated | active/trialing → Pro; past_due → past due; unpaid, canceled, incomplete_expired → Free. Renewal and cancel-at-period-end follow. |
customer.subscription.deleted | Free, canceled. |
invoice.payment_failed | past_due: Pro is kept for 7 days, then the organization is Free until a payment succeeds. A failed pay-as-you-go or metered-steps invoice pauses that metering; the plan is untouched. |
checkout.session.expired | The code's reserved place is given back. |
On a deployment where billing is not configured, every billing
route answers 503 billing_not_configured, GET /v1/plans says billing_configured:
false, and the pricing page and console say upgrades open soon. No account is shown as
paid that Stripe has not charged.
Referral and discount codes. A code has a percentage off, the plan it is for, a
duration (forever — for the life of the subscription —, once, or repeating for
duration_in_months), an optional max_redemptions and expires_at, and an active
flag. An account names one at sign-up (referral_code, kept on the account) or at
checkout. Checkout reserves one of the code's places for the session's hour, in the one
accounts object without awaiting between the check and the write, so the place after the
last is refused (the tests run 101 checkouts at once against 100 places: 100 sessions, one
invalid_code); payment redeems it, an expired session gives it back. An account redeems
a code once. The discount is a Stripe coupon cw_<CODE> made from the code on its first
checkout. The launch code is FIRST100: 20% off Pro, forever, for the first 100
customers.
Codes are made and retired by Computaco, not through the public API; a partner's code or plan by agreement is set up the same way ([email protected]).
Computatrum#
Computatrum is Computaco's desktop app that works the person's own computer, with their cursor and keyboard, as a computer-use agent. Each step its harness (harnesses) asks the models: a chat model what to do next, a vision model what is on the screen when the decision needs it, and a decision model for routine moves; or one screen model that reads the screenshot and decides in one call. This API serves them, signs the app in, and meters every call against the account's plan (in agent-minutes), or pay as you go (in credits).
| Route | Credential | What it does |
|---|---|---|
POST /v1/agent/chat | any (agent token included) | OpenAI-style chat completions: model deepseek-flash (DeepSeek, text) or gemini-flash (Google's Gemini Flash, text and screenshots) |
POST /v1/agent/vision | any | {image, prompt, max_tokens?} → {text, usage} by deepseek-v4.1-flash-1017 (DeepSeek V4.1 Flash on Cloudflare, reasoning off) |
POST /v1/agent/decide | any | {state, questions, model?} → {answers}: typed choices with a confidence, by TypeSafe's Jev (then Cloudflare's Clef), or by the decision model model names |
GET /v1/agent/decide | any | the decision chain as it stands, each backend with whether this deployment can reach it |
GET, PUT /v1/admin/agent-config | operator only | every call's model chain; a change takes effect within 10 s |
GET /v1/agent/usage | any | both windows (minutes), pay as you go this month (credits), the last 30 days by model |
POST /v1/agent/device | none | starts a device sign-in |
POST /v1/agent/device/token | none | the app polls it for its agent token |
GET /v1/agent/device/{user_code}, POST …/approve, POST …/deny | console session only | the person approves or declines the app |
GET /v1/agent/tokens, DELETE /v1/agent/tokens/{id} | session or API key | the signed-in apps, and signing one out |
GET, PUT /v1/billing/payg | session or API key | pay-as-you-go settings |
GET /v1/models | session or API key | the models as OpenAI lists models: deepseek-flash (text, tools), deepseek-v4.1-flash-1017 and gemini-flash (text, images), each with served_by and its pay-as-you-go pricing a million tokens |
POST /v1/chat/completions | session or API key | OpenAI chat completions on any of them, by model (the chat model when left out); metered as the routes above |
OpenAI's own paths. GET /v1/models and POST /v1/chat/completions put both models
where an OpenAI client looks for them, so a client whose base URL is https://computaco.ai
calls them unchanged; this is how CommandAGI offers Computaco's
models as agents. The chat model takes what /v1/agent/chat takes. The vision model reads
image_url parts given as data: URLs of a PNG, JPEG or WebP (at most 8 a call, each at
most 4 MiB), and never fetches a URL; tools, tool_choice and response_format are passed
on to it. DeepSeek answers no json_schema format, so the chat model takes OpenAI's
response_format: {type: "json_schema", json_schema: {name, schema}} as json_object, with
the schema in a system message before the others: the answer is one JSON object, and that it
fits the schema is asked of the model, not enforced. Both
answer OpenAI's shape with metering, and count in the same windows, or pay as you go, as
Computatrum's own calls. stream: true is answered as OpenAI's event stream, whole: one
chunk holding the answer (and its tool calls) as its delta, one with usage and
metering, then [DONE], because the models are called whole.
Chat. The body is OpenAI's: messages (1–500 of {role: system|user|assistant|tool,
content}), max_tokens (default 1,024, at most 8,192; more is lowered to 8,192),
temperature, top_p, stop, response_format, tools, tool_choice and
reasoning_effort are passed on; anything else is ignored, and stream: true is refused (the
answer comes whole). model chooses the chain: gemini-flash is the screen chain, whose
messages may hold screenshots as image_url parts (data: URLs of a PNG, JPEG or WebP, at most
8, each at most 4 MiB; it fetches no URL); anything else is the chat chain, which reads text
only and refuses an image part (400). DeepSeek reasons before it answers unless it is told not
to, and its reasoning counts against max_tokens: asked for 60 tokens, deepseek-flash spent
all 60 reasoning and answered nothing (recorded on 2026-11-12). So its reasoning is off
(thinking: {type: "disabled"}) unless reasoning_effort asks for it, a call that reasons gets
at least 2,048 tokens (Gemini always reasons, at low when none is named), and an empty answer,
or one cut off at its limit (finish_reason: "length"), is the provider failing, not an answer: it is
asked again with four times the budget and its reasoning off, then once more with 8,192 tokens.
"Off" is the model's own: DeepSeek's thinking: {type: "disabled"}, reasoning_effort: "none" for
DeepSeek on Cloudflare, and the lowest effort (low) for a model that cannot turn its reasoning off
(Gemini, GLM); leaving the effort out would make GLM reason at its default, max. An answer still
empty passes the call to the next backend, then 503; one still cut off is served as it is. A call is
charged for the tokens it used, every attempt's. Google bills a Gemini call's thinking
as output, so its completion_tokens here include it. The answer is OpenAI's shape — {id, object:
"chat.completion", created, model, choices: [{index, message, finish_reason}], usage:
{prompt_tokens, completion_tokens, total_tokens, cached_tokens}} — plus metering:
{cost_micro, credits, billed: "plan"|"payg", ms, minutes, task?, usd?}, what the call was
charged. A request the
model refuses (400, e.g. too long) answers 400 and costs nothing; the model unreachable or
failing answers 503 model_unavailable with Retry-After: 5.
Vision. image is a base64 PNG, JPEG or WebP (a data: URL works too) of at most 4 MiB
decoded; prompt is the question, up to 20,000 characters; max_tokens defaults to 512, at
most 2,048. The answer is {text, model, usage: {prompt_tokens, completion_tokens,
total_tokens, images: 1}, model_ms, metering}. The model is asked with its reasoning off (at
its lowest effort when it cannot be off), a budget of at least 2,048 tokens when it reasons, and
temperature 0.1; an empty or cut-off read is asked again as a chat call is. Ask it for coordinates in the image's pixels and it gives them (below).
Decide. The typed decisions the app takes between chat calls: which control to click next,
when the plan is clear and the screen's outline names it. state is an object or a string (the
goal, the current step, the controls numbered, what was done; at most 60,000 characters as
JSON); questions is {<name>: {type: "choice", instructions, criteria: {<option>: <what it
means>}}}, 1 to 8 questions of 2 to 255 options each, names and options in letters, digits,
space, _, . and -. model names one decision model, each served by its own chain:
jev-1.14.0 (TypeSafe), clef and clef-flash (Cloudflare, then OpenRouter),
gemini-decision-1 (Google, which takes the state as input and writes no output tokens);
without it the call is the decide chain. A harness's chooser names its model
(the choosers). The answer is {model, provider, answers: {<name>: {type: "choice",
choice, confidence, probabilities}}, usage, model_ms, metering}. The model writes no text: it
picks one option a question and says how sure it is, so the app acts on a confident pick and
asks the chat model otherwise. Measured on dev on 2026-10-31 on four states of an order form
(empty, one field filled, both filled, all filled): TypeSafe's Jev answered in 93–119 ms and took
the right move on two with no wrong one; Clef in 339–630 ms, one right and none
wrong; Clef-flash in 273–1,039 ms, none right, naming wrong items at low confidence (which the
app's 0.6 gate refuses). On the whole task against the real API, twice each: with Jev first the
chooser took 2 of 5 moves and the chat model was asked twice (18.1 and 19.6 s); with Clef first it
took none and chat was asked three times (21.6 and 18.8 s). Jev serves first; Clef
serves when TypeSafe cannot, with nothing to switch. A decision is ~600 tokens: Jev ~25 µ$, Clef ~145 µ$, Gemini Decision ~60 µ$, against a chat call's ~300 µ$. How each chooser does on fourteen form screens, and the gate each has, is in the choosers.
Backends. Each of the three calls goes to an ordered chain of provider/model backends, and
the first that answers serves it. A backend that cannot be reached,
is overloaded or fails is passed over for the next; one that refuses the request itself (400)
ends it. The answer's model (and provider, for decide) names the one that served it, and
the call is metered at that model's rate.
| Call | Providers | The chain today |
|---|---|---|
| chat | deepseek (DeepSeek's API), openrouter, workers-ai (Cloudflare), google | deepseek/deepseek-flash, openrouter/deepseek/deepseek-v4-flash |
| vision | workers-ai, openrouter, google | workers-ai/@cf/deepseek-ai/deepseek-v4.1-flash-1017, workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct, openrouter/qwen/qwen3.7-flash |
| screen | google (the Gemini API), openrouter | google/gemini-3.6-flash, openrouter/google/gemini-3.6-flash, google/gemini-3.5-flash-lite |
| decide | typesafe (TypeSafe's Jev), workers-ai (Cloudflare's Clef), openrouter, google (Gemini Decision) | typesafe/jev-1.14.0, workers-ai/@cf/cloudflare/clef, openrouter/cloudflare/clef |
Each decision model model names has its own chain: jev-1.14.0 is typesafe/jev-1.14.0;
clef is workers-ai/@cf/cloudflare/clef, openrouter/cloudflare/clef; clef-flash the same
with Clef-flash; gemini-decision-1 is google/gemini-decision-1. A backend that holds a request
for 45 seconds without answering is passed over for the next one.
ComputaCo may change a chain at any time, and a change reaches every call within 10 seconds.
GET /v1/agent/decide shows the decision chain as it stands.
Signing the app in. The device flow (RFC 8628's shape, our error envelope):
curl -s -X POST $API/agent/device -d '{"client_name": "Computatrum on ada-mbp"}'
# → {"device_code": "cwd_…", "user_code": "BCDF-GHJK", "verification_url": "https://computaco.ai/console/#/device?code=BCDF-GHJK",
# "verification_uri": "https://computaco.ai/console/#/device", "expires_in": 900, "interval": 5, "client_name": "…"}
curl -s -X POST $API/agent/device/token -d '{"device_code": "cwd_…"}'
# → 400 {"error": {"code": "authorization_pending"}} every 5 s until the person approves, then once:
# → {"access_token": "cwt_…", "token_type": "bearer", "scope": "agent", "token_id": "agt_…", "user": {"id", "username", "plan"}}
The app opens verification_url; the console (signed in) shows the app's name and the code,
and the person approves or declines it. Polling faster than interval answers slow_down;
a declined sign-in answers access_denied, an expired one (15 minutes) expired_token, a
used or unknown code invalid_grant. A user code is 8 letters from 20 consonants (34 bits),
lives 15 minutes, and is approved only from a console session, never with a key; a device
code is 32 random bytes, stored as its SHA-256 and exchanged once. The agent token is 32
random bytes, stored as its SHA-256, does not expire, and reaches only the three routes
above; the console's Usage page lists the signed-in apps and signs one out
(DELETE /v1/agent/tokens/{id}) at once. Starting a sign-in counts against the address's
ten sign-up and sign-in attempts a minute.
Agent-minutes, credits and the two windows#
A person thinks in time, not tokens, so a plan's windows are counted in agent-minutes: the wall-clock time Computatrum is working on a task. A developer thinks in cost, so pay as you go is counted in credits: $0.001 of model cost.
A task's minutes. The app sends the task each call belongs to, a UUID per task, in the
header X-Computatrum-Task (or task_id in the body; 1–64 letters, digits, -, _). A call
adds its own duration (from when the API receives it to when the model has answered) plus
the gap since the end of the same task's previous call, up to 15 seconds; a call overlapping the previous one adds only the time past it. The first
call of a task, and a call with no task, adds its own duration only. So time the agent spends
waiting for the person — a confirmation, a credential handed over, a pause because they moved
the mouse — is counted for at most 15 s, however long it lasts.
Why 15 seconds, measured from the event logs of 12 real tasks run by the app's end-to-end
tests against the live models on the dev deployment (four on 2026-10-28, and eight more with
this metering, two rounds of the same four tests): the gap between one step's decision and the next step's screen read is
the agent acting, the screen settling and the next capture, and the 39 such gaps were
0.43–2.22 s (median 0.92 s). The longest the agent can make one on its own is 12.7 s: a
wait of at most 10 s, the 2 s settle cap and about 0.7 s to capture and show
the marker. 15 s is above that, and well below a person reading a card and answering.
What a minute costs, measured (the same eight tasks on dev, 2026-10-28; metering per call
in each read and think event):
| Task | Steps | Wall time | Charged | Credits | Credits a minute |
|---|---|---|---|---|---|
| Loop: order form, one purchase confirmation | 6 | 75.8 s / 55.0 s | 74.9 s / 54.5 s | 3.700 / 3.843 | 2.96 / 4.23 |
| Loop: login, the password handed to the person | 4 / 5 | 24.7 s / 27.0 s | 24.0 s / 26.4 s | 2.278 / 3.007 | 5.70 / 6.83 |
| App: sign in, pause for the mouse, Allow once, done | 6 | 55.6 s / 56.5 s | 55.2 s / 56.0 s | 3.826 / 3.790 | 4.16 / 4.06 |
| App: the stop key mid-task | 1 | 7.3 s / 6.0 s | 6.8 s / 4.7 s | 0.636 / 0.509 | 5.64 / 6.47 |
| All eight | 5.04 min | 21.589 | 4.28 |
A screen read was 0.296–0.335 credits (0.315 on average), a decision 0.173–0.505 (0.311); a
step took 7.77 s at the median. The account's own GET /v1/agent/usage said 2.68 minutes after
the first round, the sum of its calls' ms.
The two windows. A plan has two rolling windows, as consumer AI subscriptions do: a
5-hour window that starts with the first call after the last one ended, and a weekly
window likewise. A call is admitted while both have room for its estimated charge (20 s: a
task's gap and a typical call) and holds that time until it ends; its real time then takes the
estimate's place, so a window ends over its limit only by what a call runs past the estimate, and
calls that start together do not all pass on the same remaining time. A call that fails is
charged nothing. When a window has no room for a call (full), calls
answer 429 quota_exceeded with Retry-After the seconds to its reset (the later reset when
both are) — or go to pay as you go when it is on. The windows were in credits until
2026-10-28; on the change every account's windows started again empty.
The fair-use guardrail. Minutes alone would let a loop that calls the models far faster, or
with far larger prompts, than the app does spend without bound inside its minutes. So a window
is also full once its calls have cost 15 credits for each minute of its limit: 1,800 credits in Pro's 5 hours, 4,500 in its week. The person
sees minutes, not this number; a window full this way says "fair_use": true. The app's own
tasks cost 4.28 credits a minute (6.83 at most, above); the most its loop can cost is a busy
desktop with every prompt at its largest — a 4,000-token decision prompt, 670 tokens of it from
cache, and 300 out (1,363 µ$), a 1440×900 screen read with 200 out (368 µ$), 1.73 credits a
step — at the median 7.77 s a step: 13.4 credits a minute. 15 is above that and 3.5 times
the measured average, so no one using the app reaches it.
GET /v1/agent/usage:
{"plan": "pro", "unit": {"name": "minute", "task_gap_cap_s": 15, "payg": {"name": "credit", "model_cost_usd": 0.001, "price_usd": 0.0025}},
"windows": {"five_hour": {"limit": 120, "used": 31.25, "remaining": 88.75, "started_at": 1793232000000, "resets_at": 1793250000000, "full": false},
"weekly": {"limit": 300, "used": 96.5, "remaining": 203.5, "started_at": 1793001600000, "resets_at": 1793606400000, "full": false}},
"payg": {"enabled": false, "requested": false, "subscribed": false, "status": "none", "mode": "overflow", "monthly_cap_usd": 20,
"period_start": 1790812800000, "period_end": 1793491200000, "credits": 0, "spend_usd": 0, "unreported_credits": 0},
"last_30_days": [{"kind": "chat", "model": "deepseek-flash", "calls": 1290, "tokens_in": 1270000, "tokens_cached": 503000, "tokens_out": 361000, "images": 0, "minutes": 31.4, "credits": 401.2, "payg_credits": 0}, …]}
A call's own metering says what it added: {"cost_micro": 311, "credits": 0.311, "billed":
"plan", "ms": 2140, "minutes": 0.04, "task": "4f1c2a9e-…"}.
The model costs behind a credit are the providers' list prices, always at the peak rate:
| Model | Input | Cached input | Output |
|---|---|---|---|
deepseek-flash (DeepSeek, peak; off-peak is half) | $0.30 / M | $0.006 / M | $1.20 / M |
deepseek-v4.1-flash-1017 (Cloudflare; an image is input tokens) | $0.30 / M | $0.006 / M | $1.20 / M |
llama-4-scout-17b-16e-instruct (Cloudflare) | $0.27 / M | — | $0.85 / M |
gemini-3.6-flash (Google, paid Standard tier, until 2026-12-31; thinking is output) | $0.75 / M | $0.075 / M (assumed: 3.8 Flash's) | $3.75 / M |
gemini-3.5-flash-lite (Google) | $0.30 / M | $0.30 / M (assumed: not published) | $2.50 / M |
gemini-decision-1 (Google; no output tokens) | $0.10 / M | — | — |
jev-1.14.0 (TypeSafe), clef, clef-flash (Cloudflare) | $0.042 / M, $0.24 / M, $0.038 / M | charged as input |
Google's prices are from its pricing page (ai.google.dev/gemini-api/docs/pricing, read on 2026-11-12). Gemini 3.8 and 3.6 Flash list $1.50 and $7.50 from 2027-01-01. Gemini 3.5 Flash has no published price; were it put in a chain, it is charged at 3.6 Flash's.
The plans, and the most each can cost: every weekly window of a month used to the last minute, every minute at the fair-use ceiling (52/12 weeks a month):
| Plan | 5-hour window | Weekly window | Most model cost a month | At the measured 4.28 credits a minute |
|---|---|---|---|---|
| Free | 15 min | 30 min | 30 × 15 × $0.001 × 52/12 = $1.95 | $0.56 |
| Pro, $29 | 120 min | 300 min | 300 × 15 × $0.001 × 52/12 = $19.50 | $5.56 |
| Enterprise | 1,200 min | 3,000 min | $195.00 | by agreement |
Why Pro stays profitable. Pro is $29 a month; Stripe keeps 2.9% + $0.30 = $1.14, leaving $27.86. The most a Pro account can cost in models is its weekly window used to the last minute, every week, at the fair-use ceiling: 300 min × 15 credits × $0.001 × 52/12 = $19.50 a month, leaving $8.36 (29%) at the worst possible use, before the off-peak half price DeepSeek gives most hours. At the cost real tasks measured, a fully used Pro costs $5.56 a month and leaves $22.30 (77%). The 5-hour window holds 120 of the week's 300 minutes, so one sitting can use at most two fifths of the week. Free's worst case is $1.95 a month and its measured case $0.56. 120 minutes is about a hundred tasks like the order form (55–76 s each).
Pay as you go#
For developers building their own Computatrum (or anyone past their windows): unchanged, in credits, not minutes — credits billed monthly in arrears through Stripe at $0.0025 a credit, $2.50 per 1,000 — 2.5 times model cost, which pays Stripe's fees and the free plan. It is on the account's own Stripe customer, beside any plan.
PUT /v1/billing/payg {"enabled": true, "monthly_cap_usd": 20, "mode": "overflow"}turns it on. The first time, it answers{"payg": …, "checkout_url": "https://checkout.stripe.com/…"}: a Checkout Session for a subscription to the metered pay-as-you-go price, which takes the card; pay as you go is on once Stripe's webhook says the subscription is (payg.subscribed). Turning it off, or changing the cap or mode, is immediate; the subscription stays (nothing is billed without use) and the Customer Portal cancels it.mode: "overflow"(the default) uses the plan's windows first and pay as you go after;"always"bills every call to pay as you go and leaves the windows alone (for an app of your own with your own users).monthly_cap_usd(1–10,000, default 20) is the most it spends in a calendar month (UTC), at its price; past it, calls answer 429 until the month ends or the cap is raised.- Each call billed this way is reported to a Stripe Billing Meter (event
computatrum_credits,payload.stripe_customer_id,payload.valuein whole credits) by the API every 60 seconds: whole credits only, the fraction kept for the next report, each report with anidentifier(cw_<user>_<n>) that Stripe deduplicates, so a retry is billed once. - Its subscription's events carry
metadata.kind = "payg"and never change the plan: created or updatedactiveturns it on,past_due(or a failed PAYG invoice) suspends it until paid, deleted turns it off.
The models, and why#
The chat model is DeepSeek's deepseek-flash (served by DeepSeek-V4.1-Flash), the cheapest
capable model the account already holds a key for. The vision model was chosen from
Cloudflare's model catalog (as listed on 2026-10-28) on the three screenshots above,
each asked two things: to read the screen (events on a day, an email's subject and sender, a
pull request's number, title and the reviewer who asked for changes) and where a control is,
in pixels:
| Model | Read correctly | Control found within 10 px | Latency | Cost of a 960×600 screenshot |
|---|---|---|---|---|
glm-5.3-flash | 3 of 3, every run | 3 of 3, every run (2–7 px) | 1.3–2.9 s | 146 µ$ |
gemma-4-26b-a4b-it (thinking off) | 2 of 3 | 0 of 3 | 1.2–1.8 s | ~45 µ$ |
llama-4-scout-17b-16e-instruct | 3 of 3 | 0 of 3 | 2.2–9.0 s | ~350 µ$ |
mistral-small-3.1-24b-instruct | 3 of 3 (one name misread) | 0 of 3 | 1.7–2.0 s | ~330 µ$ |
moondream3.1-9B-A2B | — answered empty | — | — | — |
clef-omni, Cloudflare's own multimodal decision model, answers typed
questions (yes/no, choice, score) with probabilities rather than text, so it cannot be the
text answer this route promises; it could score a screen ("is the dialog open?") in a
later route. GLM-5.3-flash is the only model that both read and pointed right, at a cost a
step can carry.
Cloudflare deprecated GLM-5.3-flash on 2026-11-20: Workers AI's REST API answers it 410, and through the binding it answered the harness study's document screens (2026-11-21) with nothing, its reasoning having spent the budget. GLM's reasoning cannot be turned off. The vision chain is now DeepSeek V4.1 Flash on Cloudflare with its reasoning off, then Llama 4 Scout. On two of the study's document screens (Windows' Word, Android's Docs), the harness's own read prompt, 2,048 tokens:
| Model | Answered | Tokens out | Latency |
|---|---|---|---|
deepseek-v4.1-flash-1017, reasoning none | 2 of 2 | 319, 348 | 4.4–5.3 s |
deepseek-v4.1-flash-1017, reasoning low | 0 of 2 (cut off at 2,048 reasoning) | 2,048 | 15–16 s |
llama-4-scout-17b-16e-instruct | 2 of 2 | 173, 192 | 4.3–6.4 s |
mistral-small-3.1-24b-instruct | 2 of 2 | 346, 560 | 8.6–15 s |
inkling-2-small, reasoning none | 1 of 2 (it reasoned anyway; the other cut off) | 2,029, 2,048 | 5.1–6.3 s |
gemma-4-26b-a4b-it, reasoning low | 0 of 2 (cut off) | 2,048 | 41–42 s |
How well DeepSeek V4.1 Flash points at a control (locate) has not been measured. The model can be changed at any time (a model with no
listed rate is charged at a fallback of $1 / $4 per million tokens).
Downloads#
The API serves the app's installers, public and unmetered, at /download/*:
curl -s https://computaco.ai/download/computatrum/latest.json # the stable channel
curl -s https://computaco.ai/download/computatrum/beta.json # the beta channel
curl -LO https://computaco.ai/download/computatrum/computatrum-0.1.0-linux-arm64.AppImage
A manifest is {version, channel, published, files: [{platform, arch, kind, name, bytes,
sha256, url}]} (latest.json is the stable channel's, <channel>.json another's) (platform is linux, mac or windows; kind is AppImage, deb,
tar.gz, dmg, zip or exe), cached for 60 s; an installer is cached for an hour. Both
answer HEAD, one Range (206, or 416 past the end), If-Range and If-None-Match.
Each Computatrum release uploads its installers first and its manifest last, so the manifest
never names a file that is not there yet.
Places#
A place is where an environment executes. There are two, both hosted on Computaco's infrastructure:
| place | what it is for | starts | application modules | cost |
|---|---|---|---|---|
Lightning (lightning) | most worlds: a few machines, small and quick | at once | its Lightning place's (core, office, media) | in the plan |
Heavy (heavy) | big worlds (several GiB): many machines, societies, heavy applications | in a few seconds | every one | Heavy-minutes |
A place is chosen when the environment boots (place), and the summary, the list and the
family's history name it (place). GET /v1/vocabulary lists the places deployed (places).
place in POST /v1/environments, …/import and …/fork is lightning (the Lightning place
that carries most of what the world launches), heavy, a Lightning place's id (core,
office, media), or a list of those, tried in order. Any other word is a 400. A place that
is not deployed is passed over, and is a 503 when no other was named.
Left out, Lightning comes first, then Heavy. Heavy goes first only for a stated reason:
- the world launches modules that no Lightning place carries;
- it has five or more machines on the simulated internet, or more than eighteen without it;
- its machines have applications of a module of their own (office, VS Code, KiCad, video, music, maps, Python) and there are two or more of them on the simulated internet, or more than six without it;
- it has a society;
- it is a fork whose parent runs on Heavy.
A fork left to itself runs where its parent does. POST /v1/environments/{id}/fork
{"place": "lightning"} moves a copy of a Heavy environment to Lightning at the same state
hash, and {"place": "heavy"} the other way.
A refusal that is the place's own moves to the next place. There are three: Heavy when
the plan does not include it (402 plan_required; Free includes no Heavy-minutes, Pro 1,200
a month and Enterprise 12,000, § Plans and billing), the month's Heavy-minutes used
(429 quota_exceeded, which names the day they renew), and a Lightning place the world does
not fit in (507 definition_too_large). The last place's refusal is the answer; any other
refusal is the answer at once. So a society on Free boots on Lightning, with Heavy among
refused, and {"place": "heavy"} on Free is a 402.
The answer of a boot, a fork and an import says where the environment runs, why, and what was passed over:
{"id": "w_5d1e0c7b2a", …,
"place": {"id": "core", "kind": "lightning", "metered": false, "modules": ["kicad", "python"],
"reason": "asked for; heavy refused it (plan_required)"},
"refused": [{"place": "heavy", "code": "plan_required", "message": "…"}]}
place.kind is lightning or heavy; place.id is a Lightning place's id or heavy, and
metered says whether its time counts as Heavy-minutes. reason is a phrase (it fits
Lightning, asked for, its parent runs on Heavy, a society's rounds need more room than
Lightning has) and stays the environment's own: GET /v1/environments/{id} gives it again.
GET /v1/me/usage (and an organization's) shows heavy: the Heavy-minutes used this month,
included, and left.
What fits Lightning. One machine, or a few without the simulated internet, fits with room
to spare: agent-desktop boots in under 2 seconds and a step takes under 1 ms. The company
worlds with five or more machines on the simulated internet, a society on an internet world
(nine people), and the procedures that grow the engine most (VS Code on the company world, a
Kdenlive render) need more room than Lightning has, and answer 507
definition_too_large there. On Heavy they run.
An environment that has outgrown its place. A world that fits at boot and grows past its
place later answers 507 definition_too_large to what needs its world in memory. Forking it
to Heavy keeps it at the state last written (POST /v1/environments/{id}/fork
{"place": "heavy"}). Renaming it, forking it and deleting it do not load its world, so
they work on such an environment; so does listing, which never reads an environment's world.
How a Heavy environment works. It runs the same engine as Lightning does, so it answers every route the same way, at the same state hashes. It sleeps after 10 minutes with no request; its next request wakes it in a few seconds. Its storage is kept in between:
- The environment's storage (the world's state, kept snapshots, agents and threads, the society) is written before it sleeps and every 5 minutes while it runs, and restored before anything else when it wakes. A Heavy environment that fails loses what it did since the last of those writes, at most 5 minutes; nothing else.
- Heavy time is counted from the environment's wake to its sleep, in 5-minute steps; one that runs out of the month's minutes is written and stopped, and is refused again until they renew or the plan is raised.
idle_ttlholds as it does on Lightning: an environment asleep past it is woken once to delete itself.
Where it runs#
The site, the docs, the console and the API are all served from https://computaco.ai; the
console calls the API on the same origin, so its session cookie is first-party. Every other
name a deployment answers to (www.computaco.ai and the hosting provider's own names) sends
the request to computaco.ai with a 308, method kept, so a session cookie only ever lives on
one host. There is also a test deployment, in Stripe's test mode, that shares no accounts or
environments with computaco.ai; the Computatrum measurements above ("on dev") were taken on it.
Payment runs on Stripe: the product Computaco Pro, $29 a month, its own Customer Portal, and the webhook above. Accounts made for a partner by agreement are ordinary accounts: their password signs in to the console, where the person can change it.