# sandbox.run: Run code (no network)

Run the step's own code (reviewed with the agent's version) in an isolated sandbox with no network, without the model. The code defines main(input) and returns JSON.

- **Effect:** reads
- **Through `lg_propose`:** runs at once
- **Credential scope:** `agents:write` to start a run with `lg_propose`

## Inputs

| Field | Type | Required | Notes |
|---|---|---|---|
| `language` | "python" \\| "javascript" | yes |  |
| `source` | string | yes | Code defining main(input) that returns JSON |
| `input` | any | no |  |
| `timeout_s` | integer | no |  |
| `env` | object | no |  |

## Example MCP call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_propose",
    "arguments": {
      "tool": "sandbox.run",
      "input": {
        "language": "python",
        "source": "…"
      }
    }
  }
}
```

Replace the placeholders in `input` with real values (the fields above). The answer has the run, its output, and anything waiting for a person.

All agent tools: [agent tools](https://www.restolayer.com/docs/agent-tools).
