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

# Parallel AI agents

> Choose fleet machines, memory forks, or command swarms to run parallel AI agents on independent tasks.

For parallel AI agents, choose the primitive that matches the state your tasks need.

| You want | Use | You manage |
| - | - | - |
| Independent live machines | [Fleet](https://docs.bead.run/parallel/fleets.md) | Commands, results, and deletion for each machine |
| Copies of a running process and its memory | [Fork](https://docs.bead.run/snapshots/fork.md) | Each child and the source |
| Independent command shards with automatic cleanup | [Swarm](https://docs.bead.run/parallel/swarms.md) | Job input, terminal status, and results |

## Start independent machines

```bash theme={null}
bead fleet --template agents --size small --count 2 --kind temporary --timeout 900
```

Inspect every member result before dispatching work. Upload or clone your repository separately on each machine, then [send a prompt](https://docs.bead.run/use-cases/agent-on-repo.md).

## Branch prepared memory

```bash theme={null}
bead sandbox fork ID --count 2 --timeout 300
bead sandbox fork-get JOB
```

Fork captures the source once. Wait for each successful child and verify `memoryRestored: true`. Children keep the source size. Open network connections break and tenant secrets already in memory can be copied.

## Run command shards

```bash theme={null}
bead swarm run 'printf "%s\n" "$BEAD_SWARM_INDEX"' --count 2 --concurrency 2
bead swarm status JOB
bead swarm results JOB --output results.jsonl
```

Use a template or snapshot with your code already prepared, or clone a public repository inside the command. Check each member's exit code. The swarm controller deletes its machines; fleets and forks require your cleanup.

For machine-to-machine services, read [private networking](https://docs.bead.run/parallel/networking.md). Reachability depends on placement.


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