Managoat is the hosted Fountain. Fountain is the open-source engine, and its name is on the CLI, the API, the SDK and this manual. Everything here applies to Managoat unless a page says it is for a self-hosted server.
Change sandbox lifetimes
This guide shows you how to widen, narrow or stop the two bounds that reclaim a sandbox. It also says what each one costs.
The two bounds
They do different things, and that difference matters more than the numbers do.
| Setting | Default | |
|---|---|---|
SANDBOX_IDLE_TIMEOUT_MINUTES |
60 |
No turn activity for this long suspends the sandbox. The sprite stays, scaled to zero. The next prompt wakes it, and the agent's memory is intact. |
SANDBOX_MAX_LIFETIME_HOURS |
0 (off) |
A ceiling on one continuous run, from creation or from the last wake. To cross it destroys an ephemeral sandbox, and parks a persistent one. Off by default, because a machine that runs all day is not a fault. |
A 0 stops either bound. A value that is not a non-negative integer refuses
to boot, and it does not quietly turn the bound off.
With the ceiling off, the idle timeout is the one automatic stop. A sandbox that stays busy stays up, and the concurrent-sandbox cap bounds how many can be up at once.
Which one you can be aggressive with
Neither bound ends the conversation. It stays resumable either way.
You can be aggressive with the idle bound, because a suspend loses nothing.
You cannot be aggressive with the max-lifetime ceiling, if you turn it on. The runtime session lives on the disk that the ceiling destroys. After a ceiling reclaim, the next prompt provisions a fresh sandbox, and the agent starts with no memory of the earlier turns. Expect a user to state their context again after one. Fountain parks a persistent home instead, and the home keeps its disk.
Fountain never ages a suspended sandbox out. Its sprite stays at the provider
until you terminate the conversation, or until somebody deletes the account.
A user can also reset a persistent sandbox with DELETE /api/sandboxes/:id,
and an admin can reap one with POST /api/admin/sandboxes/:id/reap.
GET /api/sandboxes?status=suspended lists the parked ones. Read
Sandboxes.
With CHECKPOINT_CREATION_ENABLED=true, Fountain takes a checkpoint of a
persistent sandbox each time it parks, on a provider that has checkpoints.
Read the configuration reference.
Not every provider can suspend
A provider that does not advertise the :suspend capability destroys on idle.
It does not fake a park, because a resume with a fresh disk would lose the
agent's memory without a sound. Read
the sandbox contract.
So on such a provider, a lower idle timeout is not free. It costs what the ceiling costs.
Verify it worked
The reaper logs one summary line for each run, each hour at :07.
kubectl logs -n fountain -l app=fountain --since=2h | grep 'reaper:'
# reaper: released=0 parked=1 expired=0 destroyed=2 untracked=102 live=114
parked counts the idle sandboxes the reaper suspended. The reaper can undo
that, and it is not a teardown.
Related
- About conversations, for what suspend and destroy mean to a user.
- Conversation states.
- Configuration reference.