# sandbox.run_net: Run code (allowlisted network)

Run the step's own code in an isolated sandbox that may reach only the IPv4 ranges listed (owner-published only). Its answers are outside content.

- **Effect:** reads
- **Through `lg_propose`:** waits for a person's approval in the inbox
- **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 |  |
| `network` | array of string | yes | IPv4 ranges it may reach (everything else is blocked) |

## Example MCP call

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

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).
