# Flows

> Write a flow, pass data between its steps, branch, loop, run steps in parallel, retry, wait for a person and dry-run it.

These guides write a flow and shape how it runs: its data, its branches, loops and parallel steps, its retries, a person's approval, and dry runs.

A **flow** is a graph of steps that runs in a known order. Tool steps run your code, agent steps ask a model for a judgment, and edges between them decide what runs next. A flow is data, versioned and checked when it loads. Every run of it is recorded step by step in its journal.

Use a flow when you know the order of the work, such as look up, decide, then act. Use a single agent when the model should decide the order.

- [Write a flow](https://docs.kindgi.com/v0.1.9/guides/flows/write-a-flow.md): tool and agent steps, edges, and running it.
- [Pass data between steps](https://docs.kindgi.com/v0.1.9/guides/flows/pass-data-between-steps.md): a step's input from the run input and earlier steps, and the run's output.
- [Branch a flow](https://docs.kindgi.com/v0.1.9/guides/flows/branch-a-flow.md): edges that fire only when a condition holds.
- [Join branches](https://docs.kindgi.com/v0.1.9/guides/flows/join-branches.md): a step that waits for whichever branches ran.
- [Repeat steps in a loop](https://docs.kindgi.com/v0.1.9/guides/flows/loop.md): once per element of a list, or until a condition holds.
- [Run steps in parallel](https://docs.kindgi.com/v0.1.9/guides/flows/run-steps-in-parallel.md): several tools on the same input at once.
- [Retry a failing step](https://docs.kindgi.com/v0.1.9/guides/flows/retry-a-step.md): retries with backoff, and a time limit per step.
- [Wait for an approval](https://docs.kindgi.com/v0.1.9/guides/flows/wait-for-an-approval.md): a flow that stops until a person decides.
- [Dry-run a flow](https://docs.kindgi.com/v0.1.9/guides/flows/dry-run-a-flow.md): run the steps that only read, and stop before the first one that writes.

The examples build up one pack, `acme`, from the `sample` template: `kindgi init acme --template=sample`, or `--template=python`. Each page shows the tools it adds, and [Write a flow](https://docs.kindgi.com/v0.1.9/guides/flows/write-a-flow.md) has the first ones. Where a model matters, the output is from Claude Haiku 4.5. Outputs on newer models, such as Claude Sonnet 5.5, differ in wording, not shape. The model is registered with `kindgi providers register --preset=anthropic`, as [Models](https://docs.kindgi.com/v0.1.9/guides/models.md) shows.
