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

# Pools

> Let your agent reuse a Devbox from an earlier task instead of starting a fresh one each time.

An agent that handles many similar tasks, such as reviewing each pull request, can take a Devbox from a pool instead of creating one per task. A reused Devbox already has the repository checked out, dependencies installed, and build output on disk.

A pool is a group of Devboxes that share a name, such as `review-bot`. Your agent acquires a free Devbox from it. If all are in use, a new one is created and added. When a task releases its Devbox, the next task gets it back, files and all.

## Acquire a Devbox

```bash CLI theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
devbox acquire review-bot --image builtin:default --size s
```

It returns the Devbox's name and a lease ID. While the lease is held, no other acquire gets that Devbox. The create settings apply only when a new Devbox is created.

## Release it

```bash CLI theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
devbox release --lease_id LEASE_ID
```

Release the lease when the task ends, whether it succeeded, failed, or was cancelled, so the next task can use the Devbox. Releasing doesn't stop or delete it, and its files stay, so reset the repository before the next task. It stops when idle, and acquiring it again starts it. To take a Devbox out of the pool, [delete it](https://namespace.so/docs/devbox/lifecycle.md#deleting).

## Related

* [Persistence](https://namespace.so/docs/devbox/persistence.md) for what a reused Devbox keeps.
* [`devbox acquire`](https://namespace.so/docs/reference/devbox-cli/acquire) and [`devbox release`](https://namespace.so/docs/reference/devbox-cli/release) for every option.


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