Stack specs
A stack is a sleeve's specification: a YAML document saved in versions on the Specs page. Saving makes a new version; applying a version to a Dock moves the sleeve onto it. Older versions stay readable, so you can always go back.
The form or the YAML
When you press NEW STACK or EDIT, the editor opens on the FORM tab: plain fields for everything most sleeves need. The YAML tab shows the same spec as text. Both edit one spec, so you can switch at any moment, and what you save is always the YAML.
| Form section | What it sets in the YAML |
|---|---|
| Role | role.title, role.systemPrompt (the instructions) and role.objectives |
| Model | conscience: the model key, provider, model, longest answer (maxTokens) and creativity (temperature). Picking a key fills in its provider and a model. |
| Memory and files | Remembers adds mcp:memory:private and a private memory; Workspace files adds mcp:filesystem:/workspace |
| When it works | comms.triggers: its bus subject, a bare schedule, a work queue, or only when you message it; and routines, standing jobs on a clock with their own task |
| Limits per task | guards, with Quick, Standard, Thorough and Long-running presets |
| MCP servers | mcpServers: add one from your organization's MCP page or the catalog, choose which tools the sleeve may use, or remove it |
| Sandboxes | sandboxes: a machine for coding work, its CPUs, memory, internet, time per command and git keys (see Sandboxes) |
The form keeps every setting it does not show (other capabilities, shared memory, runtime and so on), so experts can still add those in the YAML. Two things to know:
- A change made in the form rewrites the YAML in a standard order and drops
#comments. The editor tells you when the spec has comments. - If the YAML cannot be read (for example while you are halfway through typing in it), the form waits: fix the YAML, then switch back.
SHOW CHANGES compares the draft with the version you started from, whichever tab you used.
A complete example
apiVersion: sleeve/v1
kind: Stack
metadata:
name: scout
tenant: acme
conscience:
provider: anthropic
model: claude-haiku-5-5
apiKeySecretRef: anthropic-main
params: { maxTokens: 1024, temperature: 0.3 }
role:
title: "Scout"
systemPrompt: |
You watch for news about our market and answer in one short paragraph.
Remember what you learn with your memory tools.
capabilities:
- mcp:memory:private
memory:
backend: nats-kv
private: acme/scout
comms:
triggers:
- { type: nats-subject, subject: acme.events.scout }
guards: { maxIterations: 6, tokenBudget: 40000, wallClockSeconds: 240 }
Fields
| Field | Required | Meaning |
|---|---|---|
apiVersion, kind |
yes | Always sleeve/v1 and Stack. |
metadata.name |
yes | The stack's name: 1 to 40 lowercase letters, digits or dashes. Must match the name you save it under. |
metadata.tenant |
yes | Your organization's alias. |
conscience.provider |
yes | anthropic, openai, google, xai, mistral, deepseek, cohere or ollama. |
conscience.model |
yes | The provider's model name, for example claude-haiku-5-5 or gpt-5-mini. |
conscience.apiKeySecretRef |
yes | The name of a model key (see Model keys). |
conscience.params |
no | temperature (0 to 2), maxTokens, topP (0 to 1). |
role.title, role.systemPrompt |
yes | Who the sleeve is and how it works. |
role.objectives |
no | Its standing objectives; added to its instructions on every task. They do not make it act on their own: a routine or a message does. |
capabilities |
no | The built-in tools it may use (below). |
mcpServers |
no | Tools from MCP servers (see MCP servers). |
sandboxes |
no | Machines next to the sleeve for coding work (see Sandboxes). |
memory.backend |
yes | nats-kv keeps memory on the Dock; none gives a sleeve with no memory. |
memory.private |
no | The sleeve's own memory, usually <tenant>/<name>. |
comms.triggers |
no | What wakes the sleeve (below). |
routines |
no | Standing jobs on a clock, each with its own task (below). |
guards |
yes | Limits per task: maxIterations, tokenBudget, wallClockSeconds. |
Capabilities
| Capability | What it gives the sleeve |
|---|---|
mcp:memory:private |
Remember and recall facts in its own memory. |
mcp:memory:shared |
Offer facts to a memory shared by the organization's sleeves on the Dock. Merging shared facts is not switched on yet. |
mcp:blackboard |
Post and read short-lived notes for other sleeves; needs a bus trigger. |
mcp:filesystem:<path> |
Read and write files under its own workspace volume. |
bus:publish:<subject>, bus:request:<subject> |
Send messages to other sleeves; the subject must start with your alias and a dot. |
Shells, host folders and integrations such as Slack are not available to sleeves on Docks. Tools from other services come as MCP servers.
Triggers
| Type | Wakes the sleeve when |
|---|---|
nats-subject |
A message arrives on the subject, for example acme.events.scout. |
schedule |
A cron expression comes due (cron, optional tz). The sleeve gets only "Scheduled wake"; use a routine to tell it what to do. |
work-queue |
A task is queued on a stream; it is acknowledged only when it succeeds. |
manual |
Only when you message it (Converse or the API). |
Every sleeve also answers Converse messages and API calls, whatever its triggers.
Routines
A routine is a standing job: at its time, the sleeve is handed the routine's task, exactly as if someone had sent it that message.
routines:
- name: nightly-results
cron: "0 7 * * 1-5" # minute hour day month weekday
tz: America/Costa_Rica # read the cron in this time zone; empty means UTC
task: |
Read last night's test run. List the new failures and their likely causes,
and open or update a ClickUp ticket for each real failure.
- name: clickup-triage
cron: "0 8,13 * * 1-5"
tz: America/Costa_Rica
task: Triage the new tickets in the Support list: priority, tags, assignee, and a comment on what is missing.
enabled: false # keep it, but do not run it
- Up to 10 routines; names are lowercase letters, digits and dashes.
- Each run is a task like any other: it counts against the guards and shows on the Events tab with the routine's name.
- Time zones are IANA names such as
America/Costa_RicaorEurope/Madrid, daylight saving included. Sleevecast refuses an unknown name and warns about a routine that runs more than 48 times a day. - In the form, routines are under When it works, with time presets.
Guards
Each task gets at most maxIterations turns of the model, tokenBudget tokens and wallClockSeconds seconds. When one runs out, the sleeve stops the task cleanly, reports which guard tripped, and shows as Guarded on the Fleet until its next task.
- Running out gently. When the token budget would not hold another working turn plus an answer, or the task reaches its last allowed turn, the sleeve stops calling tools and answers with what it has found, saying what it could not finish. A guard trips only when even that cannot fit, for example when a single turn is bigger than the whole budget.
- Cached input is cheap. Every turn re-sends the conversation so far, including the tool definitions of every MCP server and sandbox. With Anthropic models the sleeve marks that unchanged part for the provider's prompt cache, and input read from the cache counts as a tenth of its tokens against
tokenBudget, as providers bill it. - See what a turn carries. When a sleeve starts, its ready event (Events tab) says how many tools it has and roughly how many tokens their definitions add to every turn, per server. A server with dozens of tools can add tens of thousands; list only the tools a sleeve needs with
toolson that server.
Rules Sleevecast checks
When you save, the spec is checked against the runtime's schema and these rules, and the console points at the line of each problem:
metadata.tenantis your alias andmetadata.nameis the stack's name.- Only the capabilities above; bus subjects stay inside your organization.
- No secret values in the spec: keys and tokens are named with
secretRef, never pasted. - MCP servers have unique names and either a
urlor annpx/uvxcommand; unpinned packages get a warning. - No image: Sleevecast chooses the signed runtime image.
- No YAML anchors, aliases or custom tags, at most 24 levels deep, at most 32 KB.
The number of stacks your organization can save depends on your plan; new versions of a stack never count.