# Run commands with the SDK

Collection: sdk
Human docs: https://zei.sh/docs/sdk

Stream command output through the sandbox data plane.

The provider uses sandboxd gRPC ExecStream. Pass cwd, timeout, env, and background using standard ComputeSDK names. The session client maps these to workingDirectory, timeoutMs, and environment.
Treat stdout, stderr, and exit codes as untrusted workload data.

Example:

```
const result = await compute.sandbox.runCommand(sandbox, "python agent.py", {
  cwd: "/workspace",
  timeout: 120_000,
  env: { RUN_ID: runId },
});
console.log(result.stdout, result.exitCode);
```
