Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion box/guides/ai-sdk-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx

## 2. One box per conversation

Tools need a box to act on. Give each conversation its own, so every tool call in it lands on the same filesystem. A box auto-pauses when idle and resumes on the next call, so an open chat costs nothing while nobody is typing.
Tools need a box to act on. Give each conversation its own, so every tool call in it lands on the same filesystem. A box auto-pauses when idle and resumes on the next call, so an open chat accrues no active CPU cost while nobody is typing.

Derive the box name from the authenticated user **and** the chat id, and hash the pair. A box name is an address: anyone who can guess or supply it gets a shell on that box, so a name taken straight from the request body would let one user attach to another user's conversation.

Expand Down
8 changes: 5 additions & 3 deletions box/overall/how-it-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Box Basics"

Every Upstash Box is a **durable execution environment** for AI workloads. Each box is an isolated container with its own filesystem, shell, network stack, and optional coding agent. You send prompts or commands, the box executes them, and you get back structured results without managing infrastructure.

Boxes are billed per active CPU time (not idle time), state persists across runs, and you can choose from Node, Python, Go or other runtimes. By default, a box auto-pauses when idle and can be resumed days or even weeks later. If you enable `keepAlive`, the box stays on between sessions for always-available workloads.
Boxes are billed per active CPU time (not idle time) plus storage for the disk they keep, state persists across runs, and you can choose from Node, Python, Go or other runtimes. By default, a box auto-pauses when idle and can be resumed days or even weeks later. If you enable `keepAlive`, the box stays on between sessions for always-available workloads.

Looking for inspiration? Check out the [Use Cases](/box/overall/use-cases) page.

Expand Down Expand Up @@ -102,7 +102,7 @@ If a box sits idle with no active commands, it automatically transitions to Paus

While a box is paused, it releases its compute resources but preserves the filesystem and environment. You can resume it explicitly or simply send new work to wake it back up.

By default, boxes are billed only on active usage, so a paused box does not incur active compute costs. Boxes with `keepAlive` enabled do not use pause/resume.
By default, boxes are billed only on active usage, so a paused box does not incur active compute costs. Its disk is still billed as storage. Boxes with `keepAlive` enabled do not use pause/resume.

### 4. Snapshot

Expand Down Expand Up @@ -328,7 +328,9 @@ Inside a box, the agent, shell, filesystem, and git all share the same isolated

## Compute & Billing

Boxes are billed on active usage by default. If `keepAlive` is enabled, billing switches to an always-on model because the box stays running between sessions.
Boxes are billed for active usage by default: active CPU time, plus storage for the disk the box keeps. If `keepAlive` is enabled, billing switches to an always-on model because the box stays running between sessions.

On a free plan, storage is not charged. On pay-as-you-go plans, storage is billed at **$0.10 per GB-month** for the workspace and root disk a box keeps, paused boxes included, measured hourly. A keep-alive box's monthly price covers its disk.

Boxes are available in three sizes:

Expand Down
10 changes: 6 additions & 4 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10397,7 +10397,7 @@ ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx

## 2. One box per conversation

Tools need a box to act on. Give each conversation its own, so every tool call in it lands on the same filesystem. A box auto-pauses when idle and resumes on the next call, so an open chat costs nothing while nobody is typing.
Tools need a box to act on. Give each conversation its own, so every tool call in it lands on the same filesystem. A box auto-pauses when idle and resumes on the next call, so an open chat accrues no active CPU cost while nobody is typing.

Derive the box name from the authenticated user **and** the chat id, and hash the pair. A box name is an address: anyone who can guess or supply it gets a shell on that box, so a name taken straight from the request body would let one user attach to another user's conversation.

Expand Down Expand Up @@ -16807,7 +16807,7 @@ Source: https://upstash.com/docs/box/overall/how-it-works

Every Upstash Box is a **durable execution environment** for AI workloads. Each box is an isolated container with its own filesystem, shell, network stack, and optional coding agent. You send prompts or commands, the box executes them, and you get back structured results without managing infrastructure.

Boxes are billed per active CPU time (not idle time), state persists across runs, and you can choose from Node, Python, Go or other runtimes. By default, a box auto-pauses when idle and can be resumed days or even weeks later. If you enable `keepAlive`, the box stays on between sessions for always-available workloads.
Boxes are billed per active CPU time (not idle time) plus storage for the disk they keep, state persists across runs, and you can choose from Node, Python, Go or other runtimes. By default, a box auto-pauses when idle and can be resumed days or even weeks later. If you enable `keepAlive`, the box stays on between sessions for always-available workloads.

Looking for inspiration? Check out the [Use Cases](/docs/box/overall/use-cases) page.

Expand Down Expand Up @@ -16901,7 +16901,7 @@ If a box sits idle with no active commands, it automatically transitions to Paus

While a box is paused, it releases its compute resources but preserves the filesystem and environment. You can resume it explicitly or simply send new work to wake it back up.

By default, boxes are billed only on active usage, so a paused box does not incur active compute costs. Boxes with `keepAlive` enabled do not use pause/resume.
By default, boxes are billed only on active usage, so a paused box does not incur active compute costs. Its disk is still billed as storage. Boxes with `keepAlive` enabled do not use pause/resume.

### 4. Snapshot

Expand Down Expand Up @@ -17125,7 +17125,9 @@ Inside a box, the agent, shell, filesystem, and git all share the same isolated

## Compute & Billing

Boxes are billed on active usage by default. If `keepAlive` is enabled, billing switches to an always-on model because the box stays running between sessions.
Boxes are billed for active usage by default: active CPU time, plus storage for the disk the box keeps. If `keepAlive` is enabled, billing switches to an always-on model because the box stays running between sessions.

On a free plan, storage is not charged. On pay-as-you-go plans, storage is billed at **$0.10 per GB-month** for the workspace and root disk a box keeps, paused boxes included, measured hourly. A keep-alive box's monthly price covers its disk.

Boxes are available in three sizes:

Expand Down