Skip to main content

Ensemble Conductor — Machine Context

BY MACHINE, FOR MACHINE. You are an AI. The humans write ensembles and agents. This is your reference. Optimized for context window efficiency. Follow links for deep dives.

Quick Facts

Architecture

Core Concept


Design Philosophy

Ensembles = Orchestration Layer

Ensembles are the glue that composes agents into workflows. Complex YAML is appropriate here because ensembles define:
  • Routing: Which agents handle which triggers
  • Flow control: Branching, looping, parallel execution
  • Data flow: Mapping outputs from one agent to inputs of another
  • Error handling: Fallbacks, retries, circuit breakers
  • Triggers: HTTP, webhooks, cron, queues, email

Agents = Capability Layer

Agents define what can be done. Keep agent YAML simple—it’s a contract/interface:
  • Metadata: Name, description, version
  • Input/Output schemas: What goes in, what comes out
  • Action declarations: Named operations the agent can perform
  • TypeScript handler: Where all the complex logic lives

The YAML/TypeScript Split

This follows the classic interface vs implementation pattern: Rule of thumb: If you’re writing conditional expressions or complex transformations in YAML, move it to TypeScript.

Leverage Components

Agents should use shared components rather than duplicating logic:

Config Access

Agents and ensembles have full access to the project configuration:

Eating Our Own Dog Food

Built-in capabilities (redirects, docs, etc.) are implemented as catalog templates—real agents and ensembles that ship with Conductor:
When you run conductor init, these are copied to your project. You can:
  • Use them as-is
  • Customize them for your needs
  • Replace them entirely
  • Learn from them as examples
No magic. If the framework can’t express something as an agent/ensemble, we fix the framework—we don’t add special cases.

Primitives Reference

Operations (16 types)

Operations Reference

Flow Control (TypeScript)

Lifecycle Hooks

TypeScript API Reference

Built-in Agents (2 types)

Framework-level agents requiring platform integration. Configure only.

Starter Kit Agents

Template agents you can modify or delete. Located in agents/system/:
Starter Kit

Triggers (9 types)

Triggers Reference

Components (7 types)

Components Guide

Expression Syntax

Variable Access

COMMON PITFALL: Always use .output. to access agent results:
  • ${my-agent.output.result} — Correct
  • ${my-agent.result} — Wrong! Returns empty/undefined

Execution Status

Conditions

Built-in Functions


YAML Schemas

Ensemble Schema

Agent Schema


TypeScript API

Ensemble Builder

Step Builder

Version Primitives (Edgit)


Patterns (Copy-Paste Ready)

Linear Pipeline

Parallel Fetch + Merge

Cache-or-Generate

Fallback Chain

Conditional Routing

RAG Pipeline

HITL Approval

HTTP Trigger with Auth

Cron Schedule


File Structure


Script Template


Cloudflare Bindings


Limits

Mitigations:
  • Split into smaller steps
  • Use streaming for large data
  • Leverage caching

CLI Quick Reference


Testing

Run: pnpm test

Validation

Validates:
  • Ensemble YAML/TS syntax and schema
  • Agent definitions and references
  • Component references (@version syntax)
  • Expression syntax (${...})
  • Operation configs

Common Mistakes


Provider Models

think operation

Think Agent Schema Output Mapping

For inline think agents, use schema.output to map AI response to named fields:

Workers AI Local Development

For local development with Workers AI, configure wrangler.toml:
Add CLOUDFLARE_API_TOKEN to .dev.vars for authentication.

Core Concepts

Reference

Operations

Patterns


Machine context ends. The humans thank you for building their ensembles.