Clatter Labs
Console

Cosmos Agent

Cosmos Agent

An AI coding agent you call over HTTPS. Describe a task; Cosmos does the work on its own cloud computer and returns the result.

Cosmos Agent is Clatter Labs' AI agent for coding, available as an API. You send instructions in plain language. Cosmos plans the work, writes and runs code, uses a browser, keeps files, and reports back with an answer and any files it produced.

What a run can do

Each run works on your account's own cloud computer, with these tools:

ToolWhat Cosmos uses it for
Terminal and filesInstall packages, run builds and tests, read and edit code
BrowserOpen sites, click and type, check what a page really shows
Web search and fetchLook up docs and references
Cloud ReposKeep code in a repository, with history
HostingDeploy sites and APIs to <name>.clatterai.com, with DNS, a SQL database and key-value storage
Database and storageStore data and assets, install skills
Sub-agentsSplit a big job into parallel pieces
MemoryRemember what it learned for later runs
Connected appsUse the connectors and MCP servers on your account
OutputsSave files you get back with the run

The run lifecycle

Text
queued ─▶ running ─▶ completed
                 ├─▶ failed      (error.code: run_failed | out_of_credits)
                 └─▶ cancelled   (POST /v1/runs/{id}/cancel)
  1. Create a run with POST /v1/runs. You get the run back immediately with status running.
  2. Follow it with the event stream (GET /v1/runs/{id}/events) or poll GET /v1/runs/{id}.
  3. Read the result: output is Cosmos's final answer; files lists what it saved.

Runs keep going if you disconnect. A long task continues in segments past any single request's time limit, up to 150 steps.

Base URL and authentication

Text
https://api.agent.clatterlabs.xyz

Every request sends two headers: your key as a bearer token and your Account ID.

HTTP
Authorization: Bearer clsk_...
X-Clatter-Account: CL-XXXXXXXX

See Authentication for details.

The Agent API is generally available on every plan, Free included. Runs are pay as you go from your credits (plans don't cover API calls); see Rates.