Documentation
Terracotta
Agents that do work, on infrastructure that can say no. This is how to get the first one running, how approvals interrupt it, how it gets triggered, and what stops it spending your money.
Terracotta is infrastructure for autonomous agents that run tasks. It is not a chatbot framework and it is not an LLM. If what you want is a conversation, this is the wrong product; if what you want is something that goes and does a job under rules you wrote, read on.
The pieces
- Agent
- A long-lived identity: which model it uses, what it is allowed to do, what it may spend. Phases run Pending → Starting → Running → Stopping → Stopped, or Failed.
- Task
- One unit of work handed to an agent, described as an objective in plain language, with constraints. Phases run Pending → Scheduled → Running → Succeeded, or Failed, or Cancelled. There is no separate "run" object, the task is the run.
- Role and RoleBinding
- What an agent may call, and whether each call is allowed outright, sent for human approval, or denied. Bound to a service account.
- SandboxPolicy
- How the agent process is confined: non-root, read-only root filesystem, no privilege escalation, and what it may reach on the network.
Your first agent
Your workspace arrives with a service account and an RBAC baseline already bound to it, read-only web, memory and skill discovery, auto-approved, so a first agent can do something on its own without you writing a Role first.
- Store a model provider key, every provider offered on the hosted service requires one, and an agent without it is rejected before it starts. In the console, Secrets → new secret, type llm-api-key. The value is write-only: the API never returns it, and neither does the console. The key stays in your own workspace, the agent reads it from there, and the provider bills you directly for what the agent spends.
- Agents → New Agent. Name it (lowercase, hyphens, DNS-safe, 63 characters at most), choose the provider and the model, and set a token budget. Leave the service account as the baseline one for now.
- Give it a soul, if you have one, a Markdown file inside the image that becomes its system prompt. This is where the agent learns what it is for and what it must never do.
- Submit a task: pick the agent, write the objective in plain language, and set constraints , a maximum number of actions, a maximum duration, and an allow or deny list of tools if you want to narrow it further than its Role already does.
- Watch it. The task page shows steps as they complete and artifacts as they are produced; the agent page shows tokens used against budget.
A worked example, an agent that researches cars and writes up what it finds, lives in the product repository as a quickstart. It is the shortest path from an empty workspace to something that visibly did a job.
Default deny is real, and it has a distinctive failure. An agent whose service account has no role bindings starts, reasons correctly, and has every tool call refused with "rbac denied: no-bindings", while the task still reports Succeeded, because an agent that handles a denial gracefully has not crashed. If an agent produces a beautifully written explanation of why it could not do anything, check its bindings first.
Approvals
Every tool call an agent makes passes through the same five stages before it happens: RBAC, then the token budget, then the rate limiter, then the circuit breaker, then approval routing. The first matching RBAC rule wins and no matching rule means denied.
Approval is a property of the rule that matched, not an afterthought. A rule marks its calls auto (go ahead), human (ask somebody) or deny (never). So "read the web freely, but ask before you send anything" is two rules, not a setting.
- A call awaiting approval appears on the console's Approvals page, which refreshes every three seconds because approvals are time-sensitive. Each card shows the agent, the tool, the action type, the timestamp and the exact parameters.
- Approve is one click. Reject takes a reason, and the reason reaches the agent, a rejected call is information, and a well-built agent adapts rather than retrying.
- A task can also set its own policy: auto (rules decide), per-action (every call is evaluated individually) or batch-review (the agent works, then pauses for review of the batch).
- The waiting call does not wait forever. An approval nobody answers eventually times out and the agent is told so, rather than the task hanging indefinitely.
Approvals survive a restart of the control plane, they are rows in a database, not in-memory state, so a deploy in the middle of your afternoon does not lose the queue.
Triggers: webhooks
A webhook turns an external event into a task. Create one from the console, Webhooks → New Webhook, naming the agent it should hand work to, the source kind, and optionally the event types to accept.
POST /terracotta/v1/webhooks/<slug>
- github
- Verified with X-Hub-Signature-256. The objective is built from the URL, repository, number and head SHA only, never the PR title or body, which are attacker-controlled text.
- stripe
- Verified with Stripe-Signature, against every signing entry so key rotation works, within a five-minute timestamp tolerance. Only ids, enums and quantities are decoded.
- generic
- Verified with X-Terracotta-Signature. The sender supplies the objective, so whoever holds the HMAC key controls what the agent is asked to do. Use it only from senders you trust.
For github and generic we mint the signing secret and show it to you exactly once, at creation. Copy it before you close the dialog. Stripe is the other way round: Stripe issues the secret, so ours is a placeholder you replace with the whsec_ value from Stripe, unchanged, the prefix is part of the key.
Deliveries are defended without you configuring anything: a size cap, a rate limit of one per second with a burst of ten, a constant-time signature comparison, a one-hour replay window keyed on the delivery id, and a thirty-second burst-dedup window so a source that fires twice does not start two tasks. An event type your filter does not list is accepted and ignored rather than erroring.
Editing a webhook secret after creation has no console control yet, replacing one is an operator action today. If you need to rotate a signing secret, write to us.
Triggers: schedules
A CronTask runs a task template on a schedule. It takes ordinary cron syntax, plus the shorthands you would expect, and an IANA timezone so a daily job means daily where your team is.
schedule: "0 7 * * *" timezone: "Europe/London" schedule: "*/15 * * * *" concurrencyPolicy: Forbid
The setting worth thinking about is concurrency: Allow lets runs overlap, Forbid skips a run whose predecessor is still going, Replace cancels the predecessor. Forbid is the right default for almost everything, an agent that is still working when its next run fires is usually a sign the schedule is too tight, not a reason to have two of them.
Pausing a schedule has no console or CLI verb yet; it is an operator action. Deleting and recreating the CronTask is the self-serve equivalent.
Budgets
Spend is bounded in three places at once, because each one can see something the others cannot.
- Per agent
- A lifetime token budget, plus optional caps per request and per session. When the budget is exhausted the agent stops, gracefully, at its next heartbeat, rather than being killed mid-thought.
- Per task
- A maximum number of actions and a maximum duration. Also a circuit breaker: an agent repeating the same action is paused rather than left to loop.
- Per workspace
- The plan quotas, a monthly token budget, an agent limit, and a concurrent-agent limit , which no member of the workspace can raise for themselves. Note what the token budget is protecting: the provider key is yours, so it caps what your agents spend on your own provider account rather than rationing an allowance bought from us.
The agent limit is enforced by Kubernetes itself rather than by a check in a handler, so it also holds against an agent spawning children or a schedule creating agents behind the dashboard's back. The token budget and the concurrent-agent limit are enforced at admission, on the path every tool call already takes.
Two of the fields on the quota panel, concurrent tasks and stored memories, are reported but not yet enforced. They are shown so the plan reads honestly, and we would rather tell you that than let you plan around a limit that does not bite.
The plan panel
Settings carries a "Plan & usage" card: what this workspace is entitled to, and what it has used since the start of the current period. It shows the plan, agents in use against the agent limit, tokens used this month against the monthly budget, and the concurrency and memory figures underneath.
- ok
- Under 80% of the monthly budget.
- warning
- 80% or more.
- throttle
- 95% or more.
- exceeded
- 100% or more.
- unlimited
- The field is set to zero, which means no limit.
The budget window restarts on a fixed day of the month, taken from the day you were provisioned, so your quota month lines up with your invoice month. Days past the 28th are rejected rather than quietly clamped, the 31st has no meaning in February, and a window that slides is worse than one that starts a few days early.
There is also a quota event trail, which records provisioning, quota changes, suspensions and admission denials. It exists to answer the question customers actually ask, which is not "what is my quota" but "why did my agents stop".
A Dedicated deployment has no plan row at all, and the card renders nothing rather than showing you an empty one.
Activation
Activation is how an account becomes usable, and it applies to people, not to agents, there is no "activate an agent" step anywhere in the product. When your workspace is provisioned the owner account is created with a random password that is hashed and thrown away immediately, so the account exists but cannot be signed in to. The activation link is the only way in: it opens the console, you choose a password of at least twelve characters, and you are signed in.
Activation links are single use, expire after seven days, and are stored only as a hash. Issuing a new one deletes any earlier unused one for that person. Two people redeeming the same link at the same instant produce exactly one activated account.