Skip to content

Concepts

This section explains how zenflow is put together. Start here if you want a mental model of the runtime: the Orchestrator that owns a process, the LLM coordinator that narrates and routes, the DAG scheduler that picks ready steps, and the agents and mailboxes that do the work. Each page is short and focused on one concept; follow the links from the page map below in any order.

For the YAML surface, see YAML Reference. For the Go API, see Go API.

Page map

Architecture

  • Orchestrator - the process-wide Go type that owns model, sinks, storage, and lifecycle.
  • Execution Modes - the three entry points: RunFlow, RunGoal, RunAgent.
  • DAG Scheduling - how the executor walks dependsOn, picks ready steps, and bounds concurrency.
  • Coordinator - the LLM that narrates progress, routes messages, and synthesizes results.
  • Messaging - hub-and-spoke routing through the coordinator's forward_to_agent tool.

Lifecycle and failure

  • Failure Handling - retries, onStepFailure policies, and how errors propagate through the DAG.
  • Resume - re-entering a workflow run from a checkpoint.
  • Observability - the typed event stream, sinks, and OpenTelemetry tracing.

Agents and tools

  • Agents - named LLM configurations referenced from steps.
  • Tools - functions the LLM can call to do real work.
  • Shared Memory - namespaced key-value store that lives for the run.
  • Step Isolation - what steps share by default and how to sandbox them.
  • Structured Output - schema-bound results vs free-form text channels.

Composition

  • Loops - forEach and repeat-until sub-DAGs.
  • Conditions - CEL expressions that gate step execution.
  • Composition - including sub-workflows via the includes registry.

Released under the Apache 2.0 License.