Agents · coming soon
Agents and workflows, run in the region you name.
Scheduled and on-demand workflows, a supervisor delegating to sub-agents, human approvals, and MCP servers you build for your own APIs — every run pinned to a region, with a receipt of where it ran. Not generally available yet.
https://cloudsitus.com /api/v1Join the waitlist curl https://cloudsitus.com/api/v1/agents -H "Authorization: Bearer cs_live_…"
{ "object": "agents.status", "state": "off", "available": false,
"regions": ["CH", "EU"], "harness": { "state": "CH", "runtime": "EU" } }
On this page
Availability
Not generally available yet
503 agents_unavailable except two:GET /v1/agentsstatusstate (off | on), available, the regions runs may use, and where the harness keeps state and executes.
POST /v1/agents/mcp-servers/buildfreeGenerates an MCP server from a definition (below). Nothing is saved or billed.
Shapes may change
This page documents the routes, limits and refusals our gateway enforces. Workflow, run and proposal bodies may gain fields before general availability.
Overview
What it does
Region, always namedresidencyEvery draft and run names a region (or X-Region); there is no default. The run's model calls stay in that region — refused, never moved — and the run carries a receipt with the model region and where the harness keeps state and executes.
Idssigned handlesIds are bound to your account (wf_, flow_, run_, prop_, mcps_, conn_). Another account's id answers 404.
Billingtwo metersThe run's model calls are billed like any API call, plus a charge per finished run for the harness steps. Drafting a workflow and starting a run check your balance first; cancelling bills the work already done.
Auth
Authentication
Authorization: Bearer cs_live_…. Reads and deletes work on an empty balance; billed actions check it. A reseller's end-customer key gets its own isolated workspace.403human_decision_requiredApproving or denying a proposal is a person's decision: it is done in the dashboard (or over MCP with an approval link), never with an API key.
403insufficient_key_scopeA dashboard-session key cannot start runs or drafts, change secrets, register servers, delete or cancel.
Endpoint
Workflows
/v1/agents/workflowsGET lists, GET | PATCH | DELETE /v1/agents/workflows/{wf} read, update and delete.name · descriptionstringsrequiredName 1–80 characters; description up to 4,000.
regionregion coderequiredWhere the workflow's models run.
triggerobjectrequired{kind}: manual, webhook, event (with an event name), or schedule with every: hourly, daily, daily_HH, weekly, <N>m (15–1440) or <N>h (1–168).
steps1–24requiredEach {kind, title?}: agent (instruction, model: flash | think | pro, up to 32 tools), tool (toolname from the catalogue or one of your servers, args under 16 KB), approval (a person checks; note), or delegate (flow_id + instruction: hand off to an agent flow).
approvalsobjectoptionalauto_approve_max: none (default), low or medium — high-risk actions always wait for a person.
limitsobjectoptionalmax_runs_per_day 1–288 (default 24), max_steps 1–50 (default 20), budget_micro_per_run (micro-USD; default 1,000,000 = $1).
POST …/workflows/draftbilled{prompt, region} → a draft workflow from a description (prompt up to 4,000 characters). Nothing is saved.
POST …/workflows/{wf}/runsbilled{input?, region?}: input a JSON object under 256 KB.
curl https://cloudsitus.com/api/v1/agents/workflows \
-H "Authorization: Bearer cs_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly churn digest",
"region": "EU",
"trigger": { "kind": "schedule", "every": "weekly" },
"steps": [
{ "kind": "agent", "model": "think",
"instruction": "Summarise last week's cancelled accounts and their stated reasons." },
{ "kind": "approval", "note": "Check before it goes to the team." }
],
"limits": { "max_runs_per_day": 1, "budget_micro_per_run": 500000 }
}'
# Run it now (billed), pinned to the region you name
curl https://cloudsitus.com/api/v1/agents/workflows/wf_…/runs \
-H "Authorization: Bearer cs_live_…" -H "X-Region: EU" \
-H "Content-Type: application/json" -d '{ "input": {} }'
Endpoint
Agent flows
/v1/agents/flowsPOST /v1/agents/flows/{flow}/runs to run one.name · descriptionstringsrequiredName 1–80 characters; description optional.
supervisorobjectrequiredrole (up to 600 characters), synthesis_prompt? and model (default think).
agents1–63requiredEach with a key, role, instructions, model (default flash) and tools.
edges≤ 256optionalfeeds or returns between agents; no cycles, depth at most 3.
limitsobjectoptionalmax_depth 1–3, max_fanout 1–10 (default 8), budget_micro (default $5), timeout_min 1–360 (default 60).
Endpoint
Runs & proposals
/v1/agents/runs?workflow=, ?status=, ?cursor=).GET …/runs/{run}one runIts state and receipt. A finished run is settled once, the first time it is seen finished.
GET …/runs/{run}/eventslogThe run's event log, paged with cursor.
POST …/runs/{run}/cancelstopStops the run; work already done is billed.
GET …/proposalsapprovalsActions waiting for a person (?status=). Decide them in the dashboard.
Endpoint
Build an MCP server
/v1/agents/mcp-servers/buildMCP_TOKEN) to deploy as one of your database functions, and the secrets it needs. Free, works today. POST /v1/agents/mcp-servers registers a server for your agents.name · description · regionstringsrequiredname: lowercase letters, digits and _. description up to 600 characters. region: where it runs; no default.
tools≤ 32requiredEach: name, description (≤ 600), up to 16 params (string, number, integer, boolean), risk (read, write, destructive — a DELETE is never read) and a handler.
handlerhttp | rpcrequiredhttp: an HTTPS URL with {param} placeholders in the path or query (never the host), and an optional auth_header whose value comes from a secret name. rpc: a Postgres function (fn) in your database's public schema, called with the anon key.
targetobjectrequired{kind: "function", project, function_name?} — the generated server, deployed as one of your database functions — or {kind: "external", url, auth_secret?} to register an MCP server you already run (HTTPS; auth_secret is a secret name).
curl https://cloudsitus.com/api/v1/agents/mcp-servers/build \
-H "Authorization: Bearer cs_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "orders",
"description": "Read orders from our order API.",
"region": "EU",
"target": { "kind": "function", "project": "eu_k3v9q0x7m2a4b8c1", "function_name": "orders-mcp" },
"tools": [{
"name": "get_order", "description": "Read one order by id.", "risk": "read",
"params": [{ "name": "id", "type": "string", "description": "Order id", "required": true }],
"handler": { "kind": "http", "method": "GET", "url": "https://api.example.com/orders/{id}",
"auth_header": { "header": "Authorization", "secret": "ORDERS_TOKEN" } }
}]
}'
# → { "object": "agents.mcp_server.build", "tools": [...], "risk": {...},
# "secrets_required": ["ORDERS_TOKEN", "MCP_TOKEN"], "source": "…" }
Endpoint
Connections & secrets
/v1/agents/connections{app} starts an OAuth connection to a third-party app and returns an authorize_url for a person to open. GET lists, DELETE …/connections/{conn} disconnects.PUT /v1/agents/secrets/{NAME}write-only{value} (1–16,384 characters). Names are uppercase letters, digits and _. Values are never returned; GET /v1/agents/secrets lists names, when they changed and what uses them. Never settable over MCP.
GET /v1/agents/catalogtoolsThe tools, apps and your servers an agent may use, each with its risk.
Reference
Errors
503agents_unavailableNot enabled for this account yet.
422invalid_workflow · invalid_flow · invalid_server · invalid_requestValidation failed; issues lists up to 40 problems with their paths.
422region_requiredA draft or run without a region.
404not_foundUnknown path, or an id that is not yours.
413body_too_largeRequest bodies are limited to 512 KB.
429 · 502 · 504agents_busy · agents_upstream_error · agents_timeoutRetry with back-off.