Skip to content

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
GET/v1/agents
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

The API is in place but switched off. Until it is enabled for your account, every endpoint answers 503 agents_unavailable except two:
GET /v1/agentsstatus

state (off | on), available, the regions runs may use, and where the harness keeps state and executes.

POST /v1/agents/mcp-servers/buildfree

Generates 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

One operation layer behind three surfaces: this REST API, the dashboard (Agents), and the MCP server's agents module.
Region, always namedresidency

Every 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 handles

Ids are bound to your account (wf_, flow_, run_, prop_, mcps_, conn_). Another account's id answers 404.

Billingtwo meters

The 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_required

Approving 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_scope

A dashboard-session key cannot start runs or drafts, change secrets, register servers, delete or cancel.

Endpoint

Workflows

POST/v1/agents/workflows
A named sequence of steps with a trigger. GET lists, GET | PATCH | DELETE /v1/agents/workflows/{wf} read, update and delete.
name · descriptionstringsrequired

Name 1–80 characters; description up to 4,000.

regionregion coderequired

Where 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–24required

Each {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).

approvalsobjectoptional

auto_approve_max: none (default), low or medium — high-risk actions always wait for a person.

limitsobjectoptional

max_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.

POST/v1/agents/workflows
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

POST/v1/agents/flows
A supervisor that delegates to named sub-agents. Same list / get / update / delete routes as workflows, and POST /v1/agents/flows/{flow}/runs to run one.
name · descriptionstringsrequired

Name 1–80 characters; description optional.

supervisorobjectrequired

role (up to 600 characters), synthesis_prompt? and model (default think).

agents1–63required

Each with a key, role, instructions, model (default flash) and tools.

edges≤ 256optional

feeds or returns between agents; no cycles, depth at most 3.

limitsobjectoptional

max_depth 1–3, max_fanout 1–10 (default 8), budget_micro (default $5), timeout_min 1–360 (default 60).

Endpoint

Runs & proposals

GET/v1/agents/runs
Runs of every workflow and flow (?workflow=, ?status=, ?cursor=).
GET …/runs/{run}one run

Its state and receipt. A finished run is settled once, the first time it is seen finished.

GET …/runs/{run}/eventslog

The run's event log, paged with cursor.

POST …/runs/{run}/cancelstop

Stops the run; work already done is billed.

GET …/proposalsapprovals

Actions waiting for a person (?status=). Decide them in the dashboard.

Endpoint

Build an MCP server

POST/v1/agents/mcp-servers/build
Describe tools over your HTTPS API (or your database's Postgres functions); get back the source of a ready MCP server (Streamable HTTP, protected by a bearer MCP_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 · regionstringsrequired

name: lowercase letters, digits and _. description up to 600 characters. region: where it runs; no default.

tools≤ 32required

Each: name, description (≤ 600), up to 16 params (string, number, integer, boolean), risk (read, write, destructive — a DELETE is never read) and a handler.

handlerhttp | rpcrequired

http: 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).

POST/v1/agents/mcp-servers/build
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

POST/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/catalogtools

The tools, apps and your servers an agent may use, each with its risk.

Reference

Errors

503agents_unavailable

Not enabled for this account yet.

422invalid_workflow · invalid_flow · invalid_server · invalid_request

Validation failed; issues lists up to 40 problems with their paths.

422region_required

A draft or run without a region.

404not_found

Unknown path, or an id that is not yours.

413body_too_large

Request bodies are limited to 512 KB.

429 · 502 · 504agents_busy · agents_upstream_error · agents_timeout

Retry with back-off.