Codegen agents operate within secure, isolated sandbox environments where they can safely execute code, install dependencies, and run commands without affecting your local machine or production systems.
Each sandbox provides a controlled environment with:
bash
, sh
, etc.) to run scripts, linters, formatters, build tools, and other necessary commands.Agents utilize sandboxes for a variety of tasks:
pip
, npm
, yarn
) to install necessary libraries.Sandboxes are typically configured per-agent run or defined within your Codegen settings. You often don’t need to manage them directly, but advanced configurations might allow specifying Docker images or environment variables.
Sandboxes maintain file system persistence between agent interactions within the same context. For example, when continuing a conversation across different Slack messages or Linear comments, the sandbox state is preserved, allowing agents to seamlessly continue their work without losing context or having to reinstall dependencies.