diff --git a/public/images/blog/anthropic-self-managed-sandboxes/egress-denied.gif b/public/images/blog/anthropic-self-managed-sandboxes/egress-denied.gif new file mode 100644 index 00000000..840e6d63 Binary files /dev/null and b/public/images/blog/anthropic-self-managed-sandboxes/egress-denied.gif differ diff --git a/public/images/blog/anthropic-self-managed-sandboxes/resume.gif b/public/images/blog/anthropic-self-managed-sandboxes/resume.gif new file mode 100644 index 00000000..3d46437e Binary files /dev/null and b/public/images/blog/anthropic-self-managed-sandboxes/resume.gif differ diff --git a/public/images/blog/anthropic-self-managed-sandboxes/write-file.gif b/public/images/blog/anthropic-self-managed-sandboxes/write-file.gif new file mode 100644 index 00000000..abac5b73 Binary files /dev/null and b/public/images/blog/anthropic-self-managed-sandboxes/write-file.gif differ diff --git a/src/app/blog/authors.ts b/src/app/blog/authors.ts index f285c445..6639b995 100644 --- a/src/app/blog/authors.ts +++ b/src/app/blog/authors.ts @@ -70,6 +70,13 @@ export const authors: Author[] = [ photo: "", bio: "Petr, Engineer at Solo.io, comes from a background as a solution architect and developer, now focusing on Service Mesh technologies with public clouds.", }, + { + id: "stevenjin8", + name: "Steven Jin", + title: "Software Engineer at Solo.io", + photo: "", + bio: "Steven is a software engineer at Solo.io working on kagent.", + }, ]; export const getAuthorById = (id: string): Author | undefined => { diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index 508c8ffb..76879b87 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -13,6 +13,13 @@ function shortDate(date: string) { } const posts = [ + { + slug: 'anthropic-self-managed-sandboxes', + publishDate: '2026-11-07', + title: 'Anthropic Self-Hosted Sandboxes with kagent', + description: 'kagent lets you run Anthropic self-hosted sandboxes on your own infrastructure.', + authorId: 'stevenjin8', + }, { slug: 'kagent-v1-0-release', publishDate: '2026-11-09', diff --git a/src/blogContent/anthropic-self-managed-sandboxes.mdx b/src/blogContent/anthropic-self-managed-sandboxes.mdx new file mode 100644 index 00000000..6e165b00 --- /dev/null +++ b/src/blogContent/anthropic-self-managed-sandboxes.mdx @@ -0,0 +1,227 @@ +export const metadata = { + title: "Anthropic Self-Hosted Sandboxes with kagent", + publishDate: "2026-11-07T00:00:00Z", + description: + "kagent lets you run Anthropic self-hosted sandboxes on your own infrastructure.", + author: "Steven Jin", + authorIds: ["stevenjin8"], +}; + +# Anthropic Self-Hosted Sandboxes with kagent + + + +In May 2026, Anthropic released [self-hosted sandboxes](https://claude.com/resources/articles/claude-managed-agents-updates), allowing your Claude agents to provision sandboxes and execute code on your infrastructure. +Anthropic hosts the agent loop, while kagent connects to Anthropic and runs the agent's code execution sandbox on your Kubernetes cluster. + +As a new contributor, I was surprised that kagent aims to be a complete agentic solution regardless of your provider or harness. +This integration is an example of doing things beyond running harnesses. +In this post, we will create an agent on Anthropic, watch kagent provision a sandbox for it, and see how kagent suspends idle sandboxes while persisting their state. +Although this post focuses on Anthropic, we plan on providing similar integrations for other managed agent platforms. + +## Prerequisites + +You will need Kind, the kagent CLI, and the Anthropic `ant` CLI to follow these instructions. + +Install the kagent CLI. + +``` +curl https://raw.githubusercontent.com/kagent-dev/kagent/refs/heads/main/scripts/get-kagent | bash -s -- --version v1.0.0 +kagent version +``` + +See the [Anthropic docs](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) to install the Anthropic CLI. Then, log in to the CLI. + +``` +ant auth login # Or export ANTHROPIC_API_KEY +``` + +Next, create a [self-hosted environment](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#run-your-first-session) on [Claude Platform](https://platform.claude.com/environments), and generate its environment key. + +``` +ANTHROPIC_ENVIRONMENT_ID=env_xxx +ANTHROPIC_ENVIRONMENT_KEY=sk-ant-oatxxx +``` + +## Setup and Installation + +Start by provisioning a [Kind](https://kind.sigs.k8s.io/) cluster. + +```bash +curl -fsSL https://raw.githubusercontent.com/kagent-dev/kagent/4de694355985e9d06dc92ad1adfa64d96d32f19e/scripts/kind/kind-config.yaml | + kind create cluster --name kagent \ + --image kindest/node:v1.35.0 --config - +``` + +Store the environment key in a Kubernetes Secret so it isn't exposed in the controller's configuration. + +```bash +kubectl create namespace kagent +kubectl create secret generic anthropic-environment-key -n kagent \ + --from-literal=key="${ANTHROPIC_ENVIRONMENT_KEY}" +``` + +Next, create the configuration files for our kagent install. + +```bash +VALUES_DIR=$(mktemp -d) + +cat > ${VALUES_DIR}/kagent-values.yaml < ${VALUES_DIR}/config.yaml <