zig-core 0.11.0

Core library for zig — workflow orchestration engine for AI coding agents
Documentation
---
name: examples
description: Index of bundled .zwf example workflow files with usage guidance
version: 1.0
references: []
---

# Example Workflows

The `prompts/examples/` directory contains ready-to-use `.zwf` workflow files
demonstrating common orchestration patterns.

## Available examples

| File | Pattern | Description |
|------|---------|-------------|
| `sequential.zwf` | sequential | Steps run one after another, each using the previous output |
| `fan-out.zwf` | fan-out | One step fans out work to N parallel agents, results merged |
| `generator-critic.zwf` | generator-critic | Generator produces a draft, critic reviews and refines it |
| `coordinator-dispatcher.zwf` | coordinator-dispatcher | Coordinator breaks down work, dispatches to specialist agents |
| `hierarchical-decomposition.zwf` | hierarchical-decomposition | Recursive task decomposition across multiple agent levels |
| `human-in-the-loop.zwf` | human-in-the-loop | Workflow pauses for human review/approval between steps |
| `inter-agent-communication.zwf` | inter-agent-communication | Agents communicate and share state via variables |

## Usage

```bash
# Copy an example into your project and run it
cp prompts/examples/sequential.zwf ./my-workflow.zwf
zig run my-workflow

# Or reference the example by path directly
zig run prompts/examples/fan-out.zwf

# Pack an example into a portable archive
zig workflow pack prompts/examples/sequential.zwf
```

See `zig docs patterns` for a detailed explanation of each pattern.