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

# An agent that runs for days

> No deadline, pause when idle, resume with memory intact.

**You want** an agent sandbox that survives overnight and over weekends without paying for the hours nobody uses it.

**How it works.** Pricing counts active CPU and resident memory, and a paused sandbox costs only snapshot storage ([Pricing](https://docs.anonalabs.com/compute/pricing.md)). So give the sandbox no deadline and let it pause itself.

**1. Create with no deadline**

A timeout of `-1` means no deadline, on plans without a maximum lifetime. The free plan allows one hour at most. See [Lifecycle](https://docs.anonalabs.com/compute/concepts/lifecycle.md#no-time-limit).

**2. Pause when idle**

Set idle minutes (1 to 10080) on create or later. The sandbox pauses once nothing has used it: no request, no open terminal, live view or SSH, no running process started through `envd`. The dashboard's **No limit (pauses when idle)** does the same with 15 minutes.

**3. Come back**

```python come_back.py theme={null}
from anona import Sandbox

sbx = Sandbox.create("base", timeout=-1)
sbx.commands.run("echo kept > /dev/shm/note")
sbx.pause()

sbx = Sandbox.connect(sbx.sandbox_id)  # resumes it
print(sbx.commands.run("cat /dev/shm/note").stdout)
sbx.kill()
```

Running processes, open files and `/dev/shm` carry on where they were.

> [!WARNING]
>
> A sandbox without a deadline is billed for as long as it runs. Always set idle pause, or delete it.


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