<!--
Sitemap:
- [Installation](/installation): Install the Bento daemon on macOS or Linux, then write your first pipeline to run a coding agent on a GitHub, Linear, or schedule event.
- [Upgrading](/upgrading): Version-specific steps for upgrading an existing Bento install.
- [Concepts](/concepts)
- [Build your first pipeline](/tutorials/pipeline-args)
- [Target a specific issue or PR from a URL](/tutorials/url-targeting)
- [Keep state across runs](/tutorials/pipeline-state)
- [Fire a pipeline on a schedule or on demand](/tutorials/schedule-and-fire)
- [Deploy a box to Railway](/tutorials/deploy-to-railway)
- [Operate a hosted daemon](/tutorials/operate-a-hosted-daemon)
- [Configuration](/configuration): Configure the Bento daemon with daemon.yaml: service name, port, webhooks, sandboxes, knowledge base, and environment variables.
- [Members](/members)
- [Knowledge base](/knowledge-base/)
- [Method and delivery](/knowledge-base/modes): Choose how Bento retrieves knowledge (BM25, vector, or hybrid) and how it delivers that knowledge to a coding agent.
- [Config](/knowledge-base/config)
- [MCP](/knowledge-base/mcp): Give coding agents your team knowledge over MCP. The Bento daemon serves an ask_knowledge search tool and per-file resources.
- [Pipeline configuration reference](/pipelines/config): Reference for Bento pipeline YAML: triggers, agents, skills, instructions, filters, sandboxes, structured results, and outputs.
- [Filters](/pipelines/filters): Filter GitHub, Linear, and webhook events by repository, label, and other fields so only the right Bento pipelines run.
- [Workflows](/pipelines/workflows): Group related Bento pipelines with their own agents, skills, and policies in one workflow directory under .bento/workflows.
- [Model routing](/pipelines/routing): Send each Bento pipeline run to the right model with named routes, label-based routing, and credential pools.
- [Orchestration](/pipelines/orchestration): Let an orchestrator decide how to dispatch a Bento pipeline: run one agent, fan out in parallel, or call typed capabilities.
- [Retries and failover](/pipelines/retries-and-failover): How Bento keeps runs going: route failover, sandbox fallbacks, queue retries, and the circuit breaker.
- [Triggers](/triggers/): Start a Bento pipeline from a GitHub, Linear, webhook, schedule, or manual trigger. Compare the trigger types and when each one fires.
- [GitHub trigger](/triggers/github): Run a coding agent on GitHub pull request, issue, and other webhook events. Configure HMAC verification and event patterns.
- [Linear trigger](/triggers/linear): Run a coding agent on Linear issue and comment events. Configure the Linear webhook, signature verification, and Hookdeck relay.
- [Webhook trigger](/triggers/webhook): Fire a Bento pipeline from any HTTP POST to /webhooks/{name}, with bearer-token authentication declared in daemon.yaml.
- [Schedule trigger](/triggers/schedule)
- [Manual trigger](/triggers/manual): Fire any Bento pipeline on demand with bento pipeline fire, and pass typed inputs to a pipeline that runs only on request.
- [Traces](/pipelines/traces)
- [Slack](/integrations/slack)
- [Public access](/public-access): Expose the Bento daemon to GitHub webhooks through a Cloudflare Quick Tunnel or Tailscale Funnel, and compare the two options.
- [Context engineering](/context-engineering): Assemble each coding agent prompt from personas, policies, skills, and pipeline instructions. Learn which file each instruction belongs in.
- [Best practices](/best-practices)
- [Troubleshooting](/troubleshooting)
- [Architecture](/architecture/vision)
- [Workspaces](/workspaces)
- [Authentication](/authentication)
- [Identity](/identity)
- [Security](/security)
- [References](/references)
- [Changelog](/changelog): Bento release history.
- [CLI reference](/cli/)
- [Setup](/cli/setup)
- [Secrets](/cli/secrets)
- [Lifecycle](/cli/lifecycle)
- [Sandbox image](/cli/image)
- [Sandboxes](/cli/sandbox)
- [Observability](/cli/observability)
- [Diagnostics](/cli/diagnostics)
- [Pipeline](/cli/pipeline)
- [Events](/cli/events)
- [Workbench](/cli/workbench)
- [Auth](/cli/auth)
- [Knowledge](/cli/knowledge)
- [Evals](/cli/evals)
- [Bento docs: run coding agents from version-controlled pipelines](/index): Bento runs coding agents from pipelines you keep in your repository. Declare the trigger, sandbox, skill, and guardrails in YAML.
- [Runtime wrapper](/architecture/runtime-wrapper)
- [Skill evolve](/architecture/skill-evolve)
-->

# Workflows

A workflow is one directory that holds a set of related pipelines and the agents, skills, policies, and voices that only those pipelines use. Use a workflow to keep a large set of pipelines in one place. A pipeline in `.bento/pipelines/` does not change, and it can stay there.

## Directory layout

Each workflow is a directory under `.bento/workflows/`. The directory name is the workflow name.

```text
.bento/workflows/linear/
├── workflow.yaml
├── pipelines/
│   ├── dispatch.yaml
│   └── triage.yaml
├── agents/
│   └── dispatcher/
│       └── PERSONA.md
├── skills/
│   └── solve-linear-issue/
│       └── SKILL.md
├── policies/
│   └── board.md
└── voices/
    └── terse.md
```

Only `workflow.yaml` is necessary. Each other directory is optional, and each one uses the same file format as its shared counterpart. A voice file has `name` and `description` frontmatter, as a policy file has. The daemon ignores a workflow directory whose name starts with `_` or `.`.

## `workflow.yaml`

```yaml
# .bento/workflows/linear/workflow.yaml
name: linear
version: 1.0.0
description: Triage and solve Linear issues.
```

All three fields are necessary. The config load fails when one of these rules is not true:

* `name` is equal to the directory name.
* `name` contains only lowercase letters, digits, and hyphens.
* `name` is not `system`. The daemon uses `system` for its own pipelines.

A workflow directory that has a `pipelines/` directory but no `workflow.yaml` also fails the config load.

### Disable a workflow

To disable a workflow's pipelines, add `disabled: true` to its `workflow.yaml`:

```yaml
name: mergenet
version: 4.0.0
description: Annotate, approve, and merge pull requests.
disabled: true
```

Restart the daemon after the change. The disabled workflow's pipelines do not load, so schedules, incoming events, and manual requests cannot start them. Its agents, skills, policies, and voices remain available. Already queued runs keep their saved configuration; this setting does not cancel them.

To enable the pipelines again, remove `disabled` or set it to `false`, then restart the daemon. The value must be a boolean.

## Keys

A key is the name that the daemon uses for a pipeline, an agent, a policy, or a voice. In a workflow, the key is `<workflow>/<name>`. Outside a workflow, the key is the name.

| File | Key |
| --- | --- |
| `.bento/pipelines/ship.yaml` | `ship` |
| `.bento/workflows/linear/pipelines/dispatch.yaml` | `linear/dispatch` |
| `.bento/workflows/linear/agents/dispatcher/PERSONA.md` | `linear/dispatcher` |
| `.bento/workflows/linear/policies/board.md` | `linear/board` |
| `.bento/workflows/linear/voices/terse.md` | `linear/terse` |
| `.bento/workflows/linear/skills/solve-linear-issue/SKILL.md` | `solve-linear-issue` |

A skill keeps its name as its key, also in a workflow. Thus, each skill name must be unique in the repository.

Use the key in each command that names a pipeline:

```bash
bento pipeline fire linear/dispatch
bento pipeline inspect linear/dispatch
```

Traces, logs, and run records also show the key. A validation message names the file of the pipeline, for example `workflows/linear/pipelines/dispatch.yaml`. A pipeline that moves into a workflow has no alias. When you fire, schedule, or inspect the old name, the error names the new key: `— it moved to "<key>"`.

## Names in a workflow

A workflow pipeline refers to an agent by its name. The daemon looks for the agent in the same workflow first. If the workflow does not have it, the daemon uses the shared agent.

```yaml
# .bento/workflows/linear/pipelines/dispatch.yaml
agent: dispatcher # resolves to linear/dispatcher
```

An agent or a skill in a workflow finds its `policies:` in the same way, and an agent finds its `voice:` in the same way. A full key also works, for example `agent: github/reviewer`.

A workflow agent, policy, or voice cannot have the same name as a shared item of the same kind. Shared and workflow pipelines with the same name are valid, because their keys are different.

## Load errors

The daemon does not start when it finds one of these errors. `bento config validate` shows the same errors.

| Code | Cause | Fix |
| --- | --- | --- |
| `duplicate_key` | Two files make the same key, for example two skills with the same name. The message names both files. | Rename one of the items. |
| `shared_name_collision` | A workflow agent, policy, or voice has the same name as a shared item of the same kind. | Rename the workflow item, or remove the shared item. |
| `invalid_name` | The name of an agent, a policy, or a voice contains `/`, `:`, or `,`. | Remove the character from the name. |

Two pipelines with the same key also fail the config load, and the message names both files.

A pipeline file name can contain only letters, digits, `.`, `_`, and `-`. The config load fails for other file names. This rule applies in a workflow and in `.bento/pipelines/`.

## Limits

The `resources.agents` and `resources.skills` patterns in `.bento/daemon.yaml` cannot point into `.bento/workflows/`. The daemon finds workflow agents and skills without these patterns.
