What are Devboxes?
Devboxes are high-performance environments which are best-in-class for code related workflows, like builds and tests. Our Docker based environments provide you and your agents with the same toolchains that you’d use in CI (Docker, Bazel, Gradle, etc.). You also get lifecycle management that helps keep costs under control without sacrificing performance.How it works
Anthropic handles orchestration: the model, the agent loop, context management, and error recovery. Namespace handles execution: shell commands, file operations, tool calls, builds, test runs, etc.Prep
Before you start you will need the following pieces:Devbox CLI
If you are new to Devboxes, you can get started by installing the Devbox CLI.Setup Managed Claude Agent with Devbox
Start the setup process
Run the following command to start the setup process, and provide your Anthropic API key when prompted:
Generate Service Key
The Devbox CLI will automatically create a new environment in the Anthropic console for you.
Now you need to generate a new service key for the environment.Open the link provided by the CLI (which will take you to the newly created environment), to generate a new service key for the environment, and paste the key back into the CLI.
Configure Webhook
Next, you need to configure a webhook in the Anthropic console,
to allow Anthropic to send events to Namespace with instructions for the agent to execute.To help you with this step, the CLI provides you with
workspace webhooks URL and namespace webhook URL.Head over to workspace webhooks URL and start the process to create a webhook:- use the
namespace webhook URLas the endpoint URL for the webhook. - make sure to enable all
Session lifecycle events - and copy the generated
webhook secret.
Running the agent
Now, that you have a working Managed Agent setup with Namespace Devbox, you just need to create a Claude agent, and start using it to complete your tasks.Create a Claude Agent
Create a new agent in the Antropic console.Here is an example configuration for a Claude agent that can connect to Namespace Devbox Agent Runner:
Create a Session
Each Claude Agent session is backed by its own ephemeral Namespace Devbox. When you start a new session, Namespace provisions a fresh Devbox for it.
New session.
Make sure to select the Agent and Environment you set up in the previous steps.Then give your agent an instruction like “What OS are you running on?”, and hit send.