Sandboxing runs an agent’s generated code or commands in a restricted environment, confining untrusted code and its side effects. It also isolates active execution state from the model’s context window. section 7.5.2 section 1.2.3
The agent issues a command, the environment executes it, and compact return values or summaries enter the prompt for the next step. Unlike filesystem storage for static content, a sandbox can retain live state such as process memory, browser sessions, database connections, and in-memory dataframes. section 7.5.2
Working with a large dataset
A dataset can remain in the environment across dozens of agent steps while the prompt carries only its schema and row counts. Commands operate on the persistent data without loading it all into the context window. section 7.5.2
Sandboxing is one control within the agent runtime, not a replacement for other tool-use safeguards. Related controls include resource limits, network egress rules, credential brokering, process isolation, least-privilege permissions, argument validation, approval gates, and invocation tracing. section 1.2.3 section 4.7
A managed sandbox shifts the boundary over what an agent can touch to the provider. Before deploying a production agent, teams should identify that boundary alongside provider-managed memory and tool access. section 10.5.9









