Skip to content
Merged
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
16 changes: 15 additions & 1 deletion cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ orca agents delete [agent] [--yes]
orca models [--payer orca|<provider>] # every model you can use, grouped by who pays

orca sessions list [--agent agent]
orca sessions get <id> # includes the session's cost, tokens, and machine time
orca sessions get <id> # includes the session's cost, tokens, machine time, and sandbox
orca sessions create --agent <agent> [--sandbox] [--template t] [--vault v]... [--file path[:dest]]...
orca sessions items <id> [--limit n]
orca sessions artifacts <id> # the files its turns saved under /workspace/outputs
orca sessions artifacts download <id> [artifact] [-o path|-] [--all]
orca sessions sleep <id> [--no-wait] [--json] # put its sandbox to sleep now
orca sessions delete <id> [--yes]
```

Expand Down Expand Up @@ -89,6 +90,19 @@ orca sessions artifacts download sess_123 --all -o results

Deleting the session stops its sandbox and deletes its artifacts.

### Put a sandbox to sleep

`orca sessions sleep <id>` puts a session's sandbox to sleep now, instead of waiting for the idle time the [pricing page](https://orcapods.ai/pricing) shows. Everything in `/workspace` is saved and machine time stops; the conversation stays, and the session's next message wakes it. Running programs stop and do not come back. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps).

It waits until the sandbox is asleep and prints "Asleep. Session session_... keeps its conversation and the files in /workspace; machine time has stopped. Its next message wakes it." It checks every second for up to 10 minutes; past that it exits 0 and the sandbox still goes to sleep. `--no-wait` returns once the sandbox starts going to sleep, and `--json` prints the server's `session.sandbox` object. When the request is refused, such as while a turn is running, or the sandbox stays awake, such as when its files are too large to save, it prints the server's message and exits 1. It needs CLI 1.5.0 or later.

`orca sessions get <id>` shows the sandbox as awake, going to sleep, asleep, waking up, or none.

```bash
orca sessions sleep sess_123
orca sessions sleep sess_123 --no-wait
```

## Skills, vaults, and files

```text
Expand Down
4 changes: 3 additions & 1 deletion cli/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ args = ["mcp", "serve"]
| --- | --- |
| Identity and keys | `whoami`, `list_keys`, `create_key`, `revoke_key` |
| Agents and models | `list_agents`, `get_agent`, `create_agent`, `update_agent`, `delete_agent`, `list_models` |
| Sessions | `list_sessions`, `get_session`, `create_session`, `list_session_items`, `delete_session`, `chat`, `list_artifacts`, `download_artifact` |
| Sessions | `list_sessions`, `get_session`, `create_session`, `list_session_items`, `delete_session`, `sleep_session`, `chat`, `list_artifacts`, `download_artifact` |
| Skills | `list_skills`, `get_skill`, `create_skill`, `delete_skill` |
| Vaults | `list_vaults`, `create_vault`, `delete_vault`, `list_credentials`, `add_credential`, `delete_credential` |
| Files | `list_files`, `upload_file`, `download_file`, `delete_file` |
Expand All @@ -70,6 +70,8 @@ For a new session, `chat` also takes `sandbox`, `template`, and `vaults`, as `cr

`chat` and `create_session` take `files`, a list of `{path, dest}` on your machine, and put them in the session's sandbox as [`--file`](/cli/commands#files-in-and-out-of-a-sandbox) does. `list_artifacts` and `download_artifact` bring back what the agent saved under `/workspace/outputs`: one artifact by ID or path, or with `all` every file of the newest turn into a folder.

`sleep_session` puts a session's sandbox to sleep now. Files in `/workspace` are saved and machine time stops; the conversation stays, and the next message wakes it. Running programs stop and do not come back. It is refused while a turn runs. It waits up to 60 seconds and returns `state` and `last_sleep`; `get_session` includes `sandbox`, the sandbox's state. These need CLI 1.5.0 or later; see [put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now).

`show_kit` returns a kit's review: what it runs, reaches, and spends, then each agent, skill, and template in full, and the `version` it describes. `copy_kit` takes `publicId`, that `version`, and `assets`, and copies nothing if the kit has changed since. Have the coding agent show you the review first, and copy only after you say yes. These two need CLI 1.4.0 or later; see [kits](/kits).

`add_credential` takes `type`: `static_bearer` (the default) with `token`, or `static_basic` with `login` and `password`, which Orca sends to the server as HTTP Basic (see [a login and password](/guides/credentials#a-login-and-password)). Its `vault` is the vault's ID.
Expand Down
4 changes: 4 additions & 0 deletions dashboard/agents-and-sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Nothing switches on its own.

The switch applies from the session's next turn, and to this session only. The agent and its other sessions keep their model. The session details then show the new model, the agent's own model beneath it, and who pays. To run a session on your own key you need a saved key; see [providers and API keys](/dashboard/providers-and-keys). The same switch is `POST /api/sessions/{session_id}/model` in the [API](/providers#switch-who-pays-for-one-session).

## Put a sandbox to sleep

A session's ⋯ menu has **Put sandbox to sleep** while its sandbox is awake. The sandbox saves its files and stops using machine time; the conversation stays, and the next message wakes it. Running programs do not come back. The header shows **Sandbox asleep** until it wakes. See [put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now).

## Delete

An agent's or session's row menu has **Delete agent** or **Delete session**. Deleting a session deletes its conversation, its artifacts, and its sandbox. Deleting an agent does not delete its sessions.
22 changes: 20 additions & 2 deletions guides/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,27 @@ print(agents.environments.files.list(env_id, path="/workspace").data)

If many sessions need the same setup, save it once as an **environment template** and pass `environment_template_id` when creating a session. A template accepts the same fields as above. Fields you also set on the session override the template's, with one exception: a session can tighten the template's network policy but not loosen it. See [skills and templates](/guides/skills).

### Idle sandboxes are paused
### When a sandbox sleeps

A sandbox that has not been used for the idle time the [pricing page](https://orcapods.ai/pricing) shows is paused to free resources. Until then it counts as machine time; while paused, it does not. Its status becomes `disconnected`. The next time the session needs it, Orca restores it automatically, with all files in `/workspace` intact. Programs that were running inside it, such as a server the agent started, do not survive the pause. Declared packages, environment variables, and network policy come back, and `setup_commands` run again during the restore, so keep setup commands safe to repeat.
A sandbox that has not been used for the idle time the [pricing page](https://orcapods.ai/pricing) shows goes to sleep on its own. You can also put it to sleep yourself, at once ([below](#put-a-sandbox-to-sleep-now)). Awake, it counts as machine time; asleep, it does not. The session keeps its conversation, and its environment's status becomes `disconnected`.

The next message, or a request for one of its files, wakes it. Waking takes a few seconds, longer for a large workspace, and the message waits for it.

**What comes back:** everything in `/workspace`, declared packages, environment variables and network rules. Setup commands (`setup_commands`) run again while it wakes, so keep them safe to repeat.

**What does not:** running programs and their memory, such as a server the agent started. Start them again after it wakes.

### Put a sandbox to sleep now

When you are done for now, put the session's sandbox to sleep instead of waiting for the idle time. From the CLI, `orca sessions sleep <session-id>`; in the dashboard, **Put sandbox to sleep** in the session's ⋯ menu; from an agent, the `sleep_session` tool; over HTTP, `POST /api/sessions/{session_id}/sandbox/sleep` (see [session sandbox](/reference/overview#session-sandbox)).

- It is refused while a turn is running. Wait for the turn to end, or stop it, then try again.
- Saving the files can take a few seconds to a few minutes for a large workspace. The CLI waits and tells you when it is asleep.
- Running programs stop first, so they are stopped even if the sandbox then stays awake.
- A sandbox whose files are too large to save stays awake, and you are told. Delete files in `/workspace` and try again.
- Opening the session does not wake a sandbox you put to sleep. Sending a message does.
- Nothing extra is charged: machine time stops, and the saved files count as storage, as with idle sleep.
- Deleting the session is different: it deletes the conversation, the artifacts and the sandbox's files.

## Self-hosted environment

Expand Down
2 changes: 2 additions & 0 deletions guides/sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ print(session.status, session.required_actions)

Check `status` before you send anything. If it is `requires_action`, the agent is waiting for you; see [`required_actions`](/turn-lifecycle#when-the-session-needs-you).

A session with a managed sandbox does not need to keep it awake while you are away. The sandbox goes to sleep on its own after the idle time, or you can [put it to sleep](/guides/environments#put-a-sandbox-to-sleep-now) at once. The conversation stays, everything in `/workspace` is saved, and the next message wakes it. Running programs do not come back. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps).

## Delete when finished

`sessions.delete(session_id)` deletes the conversation, its artifacts, and its sandbox. Download anything you need first. Deleting a session does not delete its agent, and deleting an agent is a separate call.
Expand Down
2 changes: 1 addition & 1 deletion kits/cram-coach.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ orca billing wallet # your balance and plan
`orca sessions get session_...` shows one session's cost, tokens, and machine time. Do it before you delete the session.

- **Model tokens** are paid from your Orca credit, since Cram Coach's model starts with `orca/`. The run in the example above cost $0.01 in tokens. A longer chapter costs more.
- **Machine time** comes from your plan, since every run has a sandbox. It counts from the sandbox's start until it pauses or you delete the session, not only while Cram Coach works. Runs on the sample chapter, with the session deleted as soon as the files were saved, used one minute each. Sandboxes also need a small balance of credit, your plan's [minimum balance](/plans#paid-work-needs-a-minimum-balance). Delete each session when you have your files.
- **Machine time** comes from your plan, since every run has a sandbox. It counts from the sandbox's start until it goes to sleep or you delete the session, not only while Cram Coach works. Runs on the sample chapter, with the session deleted as soon as the files were saved, used one minute each. Sandboxes also need a small balance of credit, your plan's [minimum balance](/plans#paid-work-needs-a-minimum-balance). Delete each session when you have your files.

The numbers for each plan are on the [pricing page](https://orcapods.ai/pricing). See [usage and wallet](/wallet#read-the-wallet-and-your-usage) for the rest.

Expand Down
16 changes: 8 additions & 8 deletions plans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Each plan sets:
- **Machine time included** in each period.
- **Extra machine time**, past the included time, at an hourly rate. Pro and Max have one; Free has none.
- **Sessions at once**, which is also how many sandboxes can run at once.
- **Storage** for your files, skills, artifacts and paused sandboxes.
- **Storage** for your files, skills, artifacts and sandboxes that are asleep.
- **A minimum balance** for paid work.

The numbers for each plan are on the [pricing page](https://orcapods.ai/pricing), which is built from the numbers Orca charges with. Every new account starts with a [signup credit](/wallet#where-credit-comes-from). Credit is bought separately; see [wallet and credit](/wallet).
Expand All @@ -31,7 +31,7 @@ Machine time is the time your sessions' managed sandboxes run. Sessions with `en

- **Every sandbox is the same machine,** the size the [pricing page](https://orcapods.ai/pricing) shows.
- **It is counted in whole minutes** while a sandbox is connected, whether the agent is working or waiting. Each minute a sandbox is running counts as one minute.
- **An idle sandbox is paused** after the idle time the [pricing page](https://orcapods.ai/pricing) shows. Paused time is not counted. The sandbox resumes, with its files, the next time the session needs it. See [execution environments](/guides/environments#idle-sandboxes-are-paused).
- **An idle sandbox goes to sleep** after the idle time the [pricing page](https://orcapods.ai/pricing) shows, and you can [put it to sleep](/guides/environments#put-a-sandbox-to-sleep-now) sooner. Time asleep is not counted. The sandbox wakes, with its files, the next time the session needs it. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps).
- **The period** is your subscription's billing period on Pro and Max, and the calendar month (UTC) on Free. Included time is counted per period and does not carry over.

When the included time is used up:
Expand All @@ -51,19 +51,19 @@ Orca checks it when a turn starts. If the limit is already reached, the message

## Sandboxes at once

Your organization can have as many managed sandboxes running as its plan runs sessions at once. A sandbox counts while it starts and while it runs, working or idle; a paused sandbox does not. Orca checks before it starts a sandbox or resumes a paused one. Past the limit, the request is refused with HTTP 429 `rate_limit_exceeded` and `Retry-After: 60`: "Your plan runs 1 sandbox at once. A session's sandbox goes to sleep after 10 minutes idle; delete a session you no longer need, or wait.", with your plan's number and idle time.
Your organization can have as many managed sandboxes running as its plan runs sessions at once. A sandbox counts while it starts and while it runs, working or idle; a sandbox that is asleep does not. Orca checks before it starts a sandbox or wakes one. Past the limit, the request is refused with HTTP 429 `rate_limit_exceeded` and `Retry-After: 60`, and a message that gives your plan's sandboxes at once and idle time and asks you to delete a session you no longer need, or wait. To free a place now, [put a sandbox to sleep](/guides/environments#put-a-sandbox-to-sleep-now).

Before a sandbox starts or resumes, Orca also checks what it checks each minute a sandbox runs: the [minimum balance](#paid-work-needs-a-minimum-balance), and on Free the [included machine time](#machine-time). If either would stop the sandbox, it does not start.
Before a sandbox starts or wakes, Orca also checks what it checks each minute a sandbox runs: the [minimum balance](#paid-work-needs-a-minimum-balance), and on Free the [included machine time](#machine-time). If either would stop the sandbox, it does not start.

## Storage

Each plan has a storage limit, on the [pricing page](https://orcapods.ai/pricing) and in `GET /api/public/plans` as `stored_bytes`. It counts your uploaded files, skill versions, artifacts, and the saved workspaces of paused sandboxes.
Each plan has a storage limit, on the [pricing page](https://orcapods.ai/pricing) and in `GET /api/public/plans` as `stored_bytes`. It counts your uploaded files, skill versions, artifacts, and the saved workspaces of sandboxes that are asleep.

- **At the limit,** an upload, a new skill or skill version, a kit copy with skills, and a new sandbox are refused with HTTP 403 `storage_quota_exceeded`: "Your organization stores X of its Y. Delete files, skills or sessions to free space."
- **Your sessions keep working.** A sandbox's workspace is always saved when it pauses, and a paused sandbox still resumes, even past the limit. Delete files, skills or sessions you no longer need to make room.
- **Your sessions keep working.** A sandbox's workspace is always saved when it goes to sleep, and a sandbox that is asleep still wakes, even past the limit. Delete files, skills or sessions you no longer need to make room.
- **Uploads need credit.** While paid work is paused, a file or skill upload is refused with HTTP 429 `insufficient_quota`: "Out of Orca credit: add credit to upload files". Copying a kit needs no credit.

When Orca's own storage is nearly full, uploads, skill uploads, kit copies and new sandboxes are refused for a while with HTTP 503 `storage_unavailable` and `Retry-After: 300`: "Orca's storage is nearly full. Try again later." Paused sandboxes still resume.
When Orca's own storage is nearly full, uploads, skill uploads, kit copies and new sandboxes are refused for a while with HTTP 503 `storage_unavailable` and `Retry-After: 300`: "Orca's storage is nearly full. Try again later." Sandboxes that are asleep still wake.

## How many you can keep

Expand All @@ -86,7 +86,7 @@ An agent's `instructions` can be at most 256 KiB, and its `tools` at most 256 Ki

## Paid work needs a minimum balance

Even included machine time needs Orca credit in the wallet. When your balance is below your plan's **minimum balance** (on the [pricing page](https://orcapods.ai/pricing), and in the wallet as `min_balance_micro_usd`), Orca pauses paid work: model calls and web searches on Orca credit, and managed sandboxes. A turn on an Orca credit model, or in a session with a managed sandbox, is then refused. A managed sandbox does not start or resume, and file and skill uploads are refused. Turns on your own provider key in a session without a sandbox keep working, their web searches included. See [wallet and credit](/wallet#when-credit-runs-low).
Even included machine time needs Orca credit in the wallet. When your balance is below your plan's **minimum balance** (on the [pricing page](https://orcapods.ai/pricing), and in the wallet as `min_balance_micro_usd`), Orca pauses paid work: model calls and web searches on Orca credit, and managed sandboxes. A turn on an Orca credit model, or in a session with a managed sandbox, is then refused. A managed sandbox does not start or wake, and file and skill uploads are refused. Turns on your own provider key in a session without a sandbox keep working, their web searches included. See [wallet and credit](/wallet#when-credit-runs-low).

## Schedules

Expand Down
Loading