> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metaphi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent teams

> A lead session that splits a job into pieces, hands each to a worker session, and keeps them in sync.

A worker is an ordinary Hum session: its own process, its own transcript, its own git worktree. The lead's model decides when a job wants workers, the way it decides to delegate; the harness never asks first. `hum ps` shows every worker, and any of them can be stopped.

## Workers

The lead starts workers, messages them, waits on them and stops them. A sub-agent never starts a team.

`role=general` does the work including edits, `role=explore` reads and never writes, and every [sub-agent file](https://docs.metaphi.ai/hum/sub-agents.md) in scope is a role too. A role takes tools away and never adds any. A worker inherits the lead's permission rules and hooks, since it discovers them from the same repository.

At most five workers run per team. A sixth spawn puts the task on the list and says so; it starts as soon as a slot frees. A task with `depends_on` waits for those tasks to finish and then starts on its own. Neither ever fails.

## The task list

Each team has one task list. A task is held by one worker at a time, a task waits for the tasks it depends on, and a task whose worker ended unfinished goes back on the list. A resumed lead reads its list back.

## Where the files are

| Path | Holds |
| - | - |
| `~/.hum/teams/<team>/tasks.jsonl` | The task list |
| `~/.hum/sessions/<name>.jsonl` | One transcript per session: the lead's, and one per worker |
| `<repo>/.hum/worktrees/<task>` | A worker's worktree, on branch `hum/<task>` |

## From the terminal

```
hum team              the teams here: the lead, how many workers, how many tasks are open
hum team <id>         one team's task list
hum ps                every running session, with its team and role
hum send <name> "…"   a message to a worker by hand
hum stop <name>       end one
hum worktrees         the worktrees the workers are on
```

## Safety

A message from a session settles nothing: it approves no call, answers no question of the person's, and changes no setting. A worker's questions take their defaults unless a person is attached to that worker, and the lead never answers for the person. Under approvals a worker that would edit is refused, the way a general sub-agent is, and the tool says so.

* [Sub-agents](https://docs.metaphi.ai/hum/sub-agents.md): workers inside one session, up to five at once, each with a fresh context.
* [Sessions](https://docs.metaphi.ai/hum/sessions.md): several sessions, each its own process and transcript. `hum resume` attaches to one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.