Skip to main content
Cue is configured via a .maestro/cue.yaml file placed inside the .maestro/ directory at your project root. The engine watches this file for changes and hot-reloads automatically.

File Location

Maestro discovers this file automatically when the Cue Encore Feature is enabled. Each agent that has a .maestro/cue.yaml in its project root gets its own independent Cue engine instance.
One cue.yaml per agent project root. The engine reads ONLY <projectRoot>/.maestro/cue.yaml for each agent - it does not walk parent directories and does not fall back to any ancestor or workspace-wide config. If your fleet has agents at multiple project roots, you maintain one cue.yaml per root. See Multi-root pipelines below.

Full Schema

Sharing a workspace across agents

When two or more agents are registered against the same project directory (for example, one agent using Opus and another using Sonnet, both pointing at the same vault), every unowned subscription (one without an explicit agent_id) would otherwise fire once per agent. Maestro resolves this as follows:
  • settings.owner_agent_id set and matched by some agent in the root - that agent is the owner; other agents in the same root skip unowned subscriptions.
  • settings.owner_agent_id set but matched by nobody - the config is dead. Every agent in that project root skips unowned subscriptions, and each row in the Cue dashboard is flagged with a red warning linking to this setting.
  • settings.owner_agent_id unset and multiple agents share the root - the first agent in the session list wins. Non-winner rows in the Cue dashboard are flagged with a red warning naming the winner and pointing to owner_agent_id as the override.
Accepted values for owner_agent_id: the agent’s internal id (UUID) or its display name (e.g. Obsidian). Subscriptions with an explicit agent_id continue to fan out independently of ownership - useful when a single shared config intentionally targets multiple agents in the same workspace.

Multi-root pipelines (agents in different project roots)

When a pipeline spans agents that live in different project roots, it is physically multiple cue.yaml files - one per participating agent’s project root. The engine never aggregates yaml across roots, so a “single root cue.yaml” is not a reliable pattern for a multi-root agent fleet. The rule: Each subscription lives in the .maestro/cue.yaml of the agent that owns it. “Owning agent” = the agent whose agent_id matches the subscription’s agent_id field. Cross-agent chains between subscriptions in different files are stitched at runtime via the standard source_session / fan_out fields plus their UUID-keyed companions (source_session_ids / fan_out_ids) - no shared file required. Where each role lives: Orchestration “at the root.” If you have an orchestrator agent whose project root sits above the worker agents in the filesystem, the orchestrator’s own .maestro/cue.yaml is naturally where fan-in / synthesis subscriptions land - because it owns those subscriptions, not because it is “the root.” Workers’ triggers still live in each worker’s own cue.yaml. Always set source_session / fan_out; add the _ids companions for rename stability. The validator requires source_session on every agent.completed subscription, and fan_out is the canonical field for fan-out targets. Additionally populate the parallel UUID arrays - source_session_ids: [<agent-uuid>] next to source_session: <agent-name>, fan_out_ids: [<uuid>, ...] next to fan_out: [<name>, ...]. The dispatcher prefers ids at lookup time and falls back to names, so cross-root edges survive an upstream agent rename. Omitting the ids works but silently breaks on rename. Pipeline grouping across files. A pipeline that spans roots still appears as one card in the Cue dashboard / Pipeline Editor as long as every participating subscription carries the same pipeline_name (and same # Pipeline: Name (color: #hex) comment header in each file). The visual editor handles this automatically; if you hand-author, keep the values consistent across every file. The visual editor is the easy path. When you save a multi-root pipeline from the Pipeline Editor, Maestro automatically partitions the subscriptions by owning agent’s project root and writes one yaml per participating cwd. If you find yourself authoring a multi-root pipeline by hand and it gets fiddly, building it in the Pipeline Editor and letting it emit the per-cwd files is the supported path.

Subscriptions

Each subscription is a trigger-prompt pairing. When the trigger fires, Cue sends the prompt to the agent.

Required Fields

Either prompt or prompt_file must be provided. If both are present, prompt_file takes precedence.

Optional Fields

Prompt Field

Prompts can be provided inline or via a separate file. Inline prompt:
File reference (using prompt_file):
File paths are resolved relative to the project root. Prompt files support the same {{VARIABLE}} template syntax as inline prompts. Using prompt_file keeps your cue.yaml clean when prompts are long or complex - the Pipeline Editor uses this approach by default, storing prompt files in .maestro/prompts/.

Output Prompt (Two-Phase Runs)

The output_prompt field enables a two-phase execution pattern. When the main prompt completes successfully, Cue automatically sends the output_prompt as a follow-up - with the first run’s output included as context. This is useful for workflows where one phase generates data and a second phase acts on it:
You can also use output_prompt_file to reference a .md file instead of inline text:
The output prompt only fires when the main run completes successfully. If the main run times out or fails, the output phase is skipped.

Pipelines

A pipeline groups multiple subscriptions under a single name in the Pipeline Editor. This is useful when you have related automations (e.g., a daily scan and a weekly review) that logically belong together. Defining a pipeline: Add a pipeline comment at the top of your cue.yaml, then use a naming convention to group subscriptions:
How it works:
  1. The # Pipeline: Name (color: hex) comment declares the pipeline name and its color in the UI
  2. The first subscription’s name matches the pipeline name exactly
  3. Additional subscriptions in the same pipeline use the convention Name-chain-N (e.g., My Pipeline-chain-1, My Pipeline-chain-2)
  4. All subscriptions with matching names appear as separate trigger lines within a single pipeline in the Pipeline Editor
Notes:
  • The color in the comment sets the pipeline’s dot color in the UI (any valid hex color)
  • Each subscription in a pipeline can have its own event type, schedule, and prompt - they don’t need to share configuration
  • Use the label field to give each line a descriptive name (e.g., “Daily Analysis”, “Weekly Review”)
  • The Pipeline Editor creates this structure automatically when you use the visual editor
Visual-node identity (target_node_key, fan_out_node_keys): When you save from the Pipeline Editor, you may see UUID-valued target_node_key / fan_out_node_keys fields on subscriptions. These are renderer-only - the Cue engine ignores them. They let the editor distinguish “two visual nodes that happen to point at the same agent” (different keys → two nodes on the canvas) from “one shared node with multiple inputs” (same key → explicit fan-in onto a single node). If you hand-edit YAML and want two separate visual instances of the same agent for the same trigger, give each sub a different target_node_key; if you want them to merge into one fan-in target, give them the same key. Leave the keys alone when round-tripping through the editor - clearing them silently re-merges your visual nodes by agent_id on the next reload.

Agent-authored Trigger -> Command -> Agent YAML checklist

If an AI agent writes cue.yaml directly (without using the visual editor), include all of the following so Maestro reconstructs the graph correctly:
  1. Initial trigger subscription uses action: command with a valid command object.
  2. The downstream agent.completed subscription includes source_sub pointing to that command subscription name.
  3. For fan-in chains, when source_sub / source_session / source_session_ids are arrays, all three must be the same length and positionally aligned: index i in each array refers to the same upstream source. The validator rejects mismatched lengths.
  4. Keep pipeline_name consistent across all subs in the pipeline.
  5. Keep per-node identity fields (target_node_key, fan_out_node_keys) stable once created.
Example:

Labels

The label field provides a human-readable name displayed in the Cue dashboard and pipeline editor. When subscriptions are grouped into a pipeline, the label distinguishes each line within the pipeline.

Disabling Subscriptions

Set enabled: false to pause a subscription without deleting it:

Settings

The optional settings block configures global engine behavior. All fields have sensible defaults - you only need to include settings you want to override.

timeout_minutes

Default: 30 | Type: positive number Maximum duration (in minutes) for a single Cue-triggered run. If an agent takes longer than this, the run is terminated.

timeout_on_fail

Default: 'break' | Type: 'break' or 'continue' What happens when a run times out:
  • break - Stop the run and mark it as failed. No further processing for this event.
  • continue - Stop the run but allow downstream subscriptions (in fan-in chains) to proceed with partial data.

max_concurrent

Default: 1 | Type: integer, 1-10 Maximum number of Cue-triggered runs that can execute simultaneously for this agent. Additional events are queued.

queue_size

Default: 512 | Type: integer, 0-10000 Maximum number of events that can be queued when all concurrent slots are occupied. Events beyond this limit are dropped. Default is 512 - generous enough to absorb bursty triggers without surfacing overflow toasts. Lower it to backpressure faster; set to 0 to drop any event that can’t run immediately.

Validation

The engine validates your YAML on every load. Common validation errors: The inline YAML editor in the Cue Modal shows validation errors in real-time as you type. A green Valid YAML indicator at the bottom confirms your config parses correctly. Cue YAML Editor

Complete Example

A realistic configuration demonstrating a pipeline with multiple trigger lines, mixed event types, and external prompt files:
All four subscriptions appear as separate trigger lines within a single DevOps pipeline in the Pipeline Editor.