# Working with Agents

[Documentation index](../README.md) · [Getting started](../getting-started.md)

Use Herdsman from a normal Pi session (a Lead). Keep small or inseparable work
local; delegate bounded work when a separate execution context or specialist is useful.

## Choose the right scope

| Goal                                              | Use                                 |
| ------------------------------------------------- | ----------------------------------- |
| Make a small edit or answer a local question      | Flexible Lead, direct Pi work       |
| Inspect code or obtain an independent review      | Delegate an Agent                   |
| Coordinate several specialists in one checkout    | Orchestrate Lead                    |
| Run independent changes in separate Git worktrees | [Manager](project-orchestration.md) |
| Supervise several projects                        | [Chief](chief-supervision.md)       |

These are choices, not required workflow stages. Role and execution policy
are separate from authority; see [Coordination](../concepts/coordination.md).

## Delegate a task

Ask your Lead in ordinary language:

```text
Use scout to identify the relevant code paths for this bug.
Then recommend the smallest fix.
```

Herdsman starts the Agent asynchronously and delivers its result back to its
direct owner. You can continue independent work while it runs. The available
Agent definitions depend on the session's configuration and delegation policy;
see [Agent definitions](agent-definitions.md) for the bundled roster and customization.

## Choose how the Lead executes

Use `/lead` or the Lead mode entry in `/herdsman`.

| Ordinary mode | Default strategy                                                                                         |
| ------------- | -------------------------------------------------------------------------------------------------------- |
| Flexible      | Delegate when useful; keep trivial or inseparable work local.                                            |
| Orchestrate   | Delegate bounded execution that an Agent can reasonably own; retain technical direction and integration. |

`/lead-flexible` and `/lead-orchestrate` select or refresh the respective
profile. Assigned Leads use their selected launch definition instead, not
these ordinary mode choices. See [Coordinator customization](customizing-coordinators.md)
for changing the policies.

## Run independent work together

```text
Have scout trace the parser and researcher check the upstream API.
Run them in parallel if their work is independent.
Use their findings before implementing the fix.
```

Keep dependent steps ordered, and avoid overlapping writers in one checkout.
Nested delegation is available when the Agent's definition and depth permit
it; more Agents are not inherently better.

## Continue while work is running

Your Lead remains available for other work while Agents run. When the only
remaining prerequisite is an Agent result or owner answer, Herdsman resumes
the conversation automatically. You do not need to ask it to poll for progress.

External operations are different: an Agent may monitor a build, CI run or
deployment that its work depends on. You can continue unrelated work while
it does so.

## Review and reuse results

```text
Ask reviewer to review the implementation against the agreed plan.
Include the implementation Agent's result as evidence.
```

The Lead evaluates findings and requests corrections only when justified.
Forward relevant files and exact result references instead of redoing completed
work or assuming other sessions share the same history.
See [Handoffs and files](handoffs.md).

## Inspect, steer or recover work

The [status widget](../reference/status-widget.md) shows active work and
attention states. Use Herdr navigation or the appropriate `/herdsman` controls
to inspect sessions. A blocked Agent may need an answer from its owner.
When the outcome is uncertain, consult [Recovery](recovery.md) before retrying.

The precise Agent operations and authorization rules are in
[Agent tools](../reference/agent.md) and [Lifecycle](../concepts/lifecycle.md).
