Primitive 01
Continuations
The unit of work in Maestro is not a model call. It is a resumable, migratable reasoning process that can sleep for weeks and wake on a signal.
What a continuation is
Every framework today treats model.invoke() as the atomic unit of work. Graphs wire those calls together; orchestrators dispatch between them. The problem is that this makes the agent terminate: a request comes in, work happens, a response goes out. Research doesn't work that way. A nutrition consultant evaluating a feed additive over six weeks needs something that continues.
A continuation is the atomic primitive that lets that happen. It carries:
- Identity — stable id, lineage, generation
- Goal frame — a structured representation of what it's trying to accomplish (not a prompt)
- State — working draft, open questions, accumulated findings
- Budget vector — tokens by tier, dollars, wall-clock, tool quotas, human-attention quotas
- Wake conditions — predicates that say when to schedule it next
- Context binding — pointer to its field projection
- Lineage edges — parent, children, siblings, merge targets
The hot store schema
Cosmos DB on Azure, DynamoDB on AWS — same logical model behind a substrate interface.
continuation
continuation_id UUID, PK
root_id UUID
parent_id UUID NULL
generation INT
tenant_id UUID
researcher_id UUID
status ENUM
created_at TIMESTAMP
updated_at TIMESTAMP
next_wake_at TIMESTAMP NULL
goal_frame JSONB
state JSONB
budget JSONB
wake_conditions JSONB
context_field_id UUID
policy_class TEXT
tags TEXT[]
continuation_event # append-only event log
event_id UUID, PK
continuation_id UUID, FK
ts TIMESTAMP
kind ENUM
payload JSONB
cost JSONB The goal frame is structured
This is the contract between the researcher and Maestro. It's also what fingerprints the continuation for the context field — semantically similar frames share context.
{
"intent": "evaluate_feed_additive_effect",
"subject": {
"species": "dairy_cow",
"lactation_stage": "early",
"cohort_size_range": [60, 200]
},
"question": "Does {additive} at {dose_range} improve {outcome} vs control?",
"bindings": {
"additive": "monensin",
"dose_range_mg_per_day": [200, 400],
"outcome": "milk_yield_kg_per_day"
},
"evidence_requirements": {
"study_types": ["rct", "field_trial"],
"min_n_per_arm": 30,
"min_recency_years": 10
},
"deliverable": "structured_evidence_brief",
"success_predicate": "evidence_brief.confidence >= 0.7 AND human_signoff.received"
} Wake conditions are why this works
A sleeping continuation specifies why it should be woken. A continuation can sleep for three weeks waiting on an arXiv RSS event, wake for five seconds of work, and go back to sleep — without anyone "running" it.
{
"any_of": [
{"kind": "timer", "at": "2026-05-20T09:00:00Z"},
{"kind": "event", "stream": "arxiv.q-bio", "predicate": "matches_goal_frame"},
{"kind": "human_signal", "from": "researcher_id", "topic": "approval"},
{"kind": "sibling_publish", "root_id": "...", "tag": "finding"},
{"kind": "data_arrival", "source": "cargill.feed_trial_2026_q2"}
]
} Migration and failure semantics
Continuations are designed to be migratable across workers. Cooperative locking with fencing tokens, idempotent event log, no migration mid-model-call — model calls are checkpoint boundaries. The Erlang and Temporal lineage, adapted for LLM-driven work.
Why this matters for Cargill
A nutrition consultant submits one goal frame on Monday. The root spawns eleven children: three pulling structured trial data, four monitoring literature streams that will fire for weeks as new papers land, two synthesizing evidence with Opus-class reasoning, one drafting the regulatory section, one watching a competitor's RSS feed. Eight go to sleep within ten minutes. By Friday, two have woken because new trials were published. Total spend: ~$14. Total researcher time: ~35 minutes, mostly review. That's the work continuations enable.