Display name for this mission; passed through to the compiled graph.
Declare the input schema for this mission.
Accepts a Zod schema object or a plain JSON-Schema Record<string, unknown>.
The schema is stored in the compiled graph's stateSchema.input field and used
by the runtime for optional input validation.
Zod or JSON-Schema object describing the expected input payload.
Set the goal template for this mission.
The template is a free-form string that describes what the mission should achieve.
It may include {{variable}} placeholders. The current stub compiler passes
the template through verbatim into generated node instructions; future planner
integrations may interpolate it from runtime input.
Example: 'Research {{topic}} and produce a concise summary'
Goal prompt template string.
Declare the output (return) schema for this mission.
Accepts a Zod schema object or a plain JSON-Schema Record<string, unknown>.
The schema is stored in the compiled graph's stateSchema.artifacts field.
Zod or JSON-Schema object describing the expected artifact payload.
Configure planner hints recorded on the mission config.
Today the compiler emits a fixed stub plan regardless of strategy. These settings are still preserved so planner-backed mission compilation can adopt them without changing the authoring API.
Planner settings including strategy name, step budget, and per-node iteration and tool-parallelism caps.
Routing/planning strategy identifier (e.g. 'linear', 'react', 'tree-of-thought').
Hard cap on the total number of plan steps the planner may emit.
Optional maxMaximum LLM iterations a single gmi node may consume per invocation.
Forwarded to gmiNode as maxInternalIterations.
Optional parallelWhen true, gmi nodes are configured to issue multiple tool calls per turn.
Forwarded to gmiNode as parallelTools.
Apply mission-level policy overrides.
Policies declared here are applied to all compiled nodes unless a node already carries its own policy declaration. This is the preferred mechanism for setting blanket guardrails, memory consistency modes, or persona settings across a mission.
Policy configuration object.
Optional memory?: { Optional consistency?: MemoryConsistencyModeOptional read?: anyOptional write?: anyOptional discovery?: { Optional kind?: stringOptional fallback?: stringOptional personality?: { Optional traitOptional adaptOptional mood?: stringOptional guardrails?: string[]Guardrail identifiers applied as output guardrails on every node.
Declare an anchor node that will be spliced into the execution order.
Anchors let callers inject pre-built GraphNode objects (e.g. specialised tool
invocations, human-in-the-loop checkpoints, or validation guardrails) at precise
positions within the phase-ordered plan without modifying the planner output.
Unique node id assigned to the anchor in the compiled graph.
Pre-built GraphNode (from gmiNode, toolNode, etc.).
Placement constraints: phase, after / before ordering.
When true the compiler will throw if the anchor cannot be placed.
Optional phase?: "gather" | "process" | "validate" | "deliver"Execution phase the anchor belongs to. Phases are ordered:
gather → process → validate → deliver.
Optional after?: anyInsert the anchor after this node id (sibling anchor id or plan step id). When the referenced id is not found the anchor is appended to the phase tail.
Optional before?: anyInsert the anchor before this node id. Currently reserved for future use; has no effect in this compiler version.
Set the autonomy mode for this mission.
autonomous — all expansion gates auto-approve. Only stops at hard caps.guided — every expansion requires explicit user approval.guardrailed — auto-approves below configurable thresholds, asks above.Autonomy mode.
Set the provider assignment strategy for this mission.
Strategy name: best, cheapest, balanced, explicit, mixed.
Optional options: { Optional explicit assignments and fallback strategy.
Optional assignments?: Record<string, { Optional fallback?: stringSet the model used for Tree of Thought planning phases.
Use a strong reasoning model here (e.g., claude-opus-4-6, gpt-4o) for better plan quality. Defaults to the same model as execution if not set.
Model identifier string (e.g., 'claude-opus-4-6').
Validate configuration and compile this mission into a CompiledMission.
Required fields: input, goal, returns, planner.
Throws with a descriptive message if any required field is missing.
Optional options: { Optional compilation overrides.
Optional checkpointCustom checkpoint store; defaults to InMemoryCheckpointStore.
A CompiledMission ready to invoke(), stream(), or explain().
When required builder fields are missing.
Fluent builder that collects mission configuration and validates it at
.compile()time.All setter methods return
thisfor chaining. No compilation work is performed until.compile()is called, ensuring fast construction of mission objects at module load time.