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

# Use LithosBox with coding agents

> Give Claude Code, Codex, or Cursor a sandbox for running code and testing changes.

Your coding agent can use LithosBox to run commands, install dependencies, inspect
results, and save checkpoints in an isolated environment. Install the LithosBox
skill so the agent has the setup instructions and API guide available in its session.

## Install the skill

Run the installer in your terminal:

```sh theme={null}
curl -fsSL https://console.sandbox.lithosai.cloud/install.sh | sh
```

Select **Claude Code**, **Codex**, or **Cursor** when prompted. Enter an API key from
**Console → API Keys** and choose whether to save it. The optional sandbox check
verifies that your account can create, use, and delete a sandbox.

Restart your agent or reload its skills after installation. The installed
`runtime.md` tells it which local command to use for the SDK and saved credentials.
See [Installation](/installation#set-up-agent-skills) to choose agents explicitly
or install for a single project.

## Ask your agent to use a sandbox

Describe the task, the inputs it should use, and what you want to keep. For example:

```text theme={null}
Use LithosBox to run this project's tests. Upload the source files, install the
project's dependencies in the sandbox, and report the test results. Download any
failure logs before deleting the sandbox.
```

For work you want to continue later:

```text theme={null}
Set up this project in LithosBox and save a durable snapshot after its tests pass.
Give me the snapshot ID so I can restore the environment in a later session.
```

The agent runs its SDK script on the computer where you installed LithosBox.
Commands sent through the SDK run inside the sandbox. Files from your project
need to be uploaded before the sandbox can use them.

## Continue work in another session

Keep the sandbox ID to reconnect to a working environment, or a snapshot ID to
restore a saved checkpoint. Give that ID to the agent along with your next task.

For parallel experiments, ask the agent to fork the sandbox after setup. Each
copy starts from the same state and can be changed independently. See
[Save, restore, fork](/guides/save-restore).

## Check results and cleanup

Ask the agent to check command exit codes and collect output before reporting
success. A background job starting successfully does not mean it has finished;
its logs or completion status need to be checked separately.

Delete sandboxes when the task is complete, or explicitly ask to keep one. Save a
durable snapshot before deleting an environment you want to restore. Snapshots
are managed separately on the console's **Snapshots** page.

If credentials are missing or rejected, run `lithosbox configure` in your terminal.
You do not need to paste the key into the agent conversation.

## Use MCP tools

If you prefer tools exposed through MCP, include the MCP dependencies when
installing:

```sh theme={null}
curl -fsSL https://console.sandbox.lithosai.cloud/install.sh | sh -s -- --mcp
```

Activate the installed commands, then verify the tools are available:

```sh theme={null}
lithosbox mcp --check
```

For Claude Code, register the local command:

```sh theme={null}
claude mcp add lithosbox --transport stdio -- "$(command -v lithosbox)" mcp
```

For another MCP client, set the command to the absolute `bin/lithosbox` path
printed by the installer and use `mcp` as its argument. That command loads the key
you chose to save. Install and configure LithosBox separately on any other computer
that will run the MCP server.

## Make the docs available to your agent

To connect the documentation search server in Claude Code:

```sh theme={null}
claude mcp add --transport http lithosbox-docs https://docs.sandbox.lithosai.cloud/mcp
```

The documentation server helps your agent look up usage; the sandbox MCP tools
perform actions in your account.

Agents can also read pages as Markdown by adding `.md` to a page URL. The
[documentation index](https://docs.sandbox.lithosai.cloud/llms.txt) and
[full documentation](https://docs.sandbox.lithosai.cloud/llms-full.txt) are
available without connecting a tool.

## Install skills in an existing Python environment

If you already manage an environment containing the LithosBox SDK, you can install
its bundled skill directly:

```sh theme={null}
python -m lithosbox skill install
```

This writes to `.claude/skills/lithosbox/` in the current project. Use
`--dir ~/.agents/skills` for Codex user skills or `--dir ~/.cursor/skills` for Cursor
user skills. This command copies the skill only; follow its `setup.md` to configure
the runtime and credentials if needed.
