Skip to content
This documentation covers kagent while it is in development and can describe unreleased features. For the current release, see the latest docs.

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Sandboxes

Page as Markdown

Run commands and work with files in isolated scratch environments that people, applications, and agents create on demand.

A kagent SandboxSandboxA kagent runtime that provides an isolated scratch environment for running commands and working with files. Created from a SandboxTemplate, it belongs to its caller, expires on a timer, and has no outbound network access unless an EgressPolicy allows it.Learn more is an isolated scratch environment that you create on demand, run commands in, and then delete or let expire. Each Sandbox runs on Agent Substrate behind the same isolation boundary as an agent, and it has no outbound network access unless you grant it.

Use a Sandbox when something other than an agent’s own harness needs a place to run code. Examples include a model’s generated script, a test that must not change the host, or a tool call that an agent sends from outside the cluster. A person reaches a Sandbox through the kagent CLI, an application through gRPC, and an agent through the kagent Model Context Protocol (MCP) server.