Skip to content

Commit 0874077

Browse files
committed
fix: address PR review feedback for BYOC cookbook
- Add agent_api/environment_service_key.txt and agent_api/*.txt to .gitignore - Add kokiy author entry to authors.yaml - Update Python version requirement from 3.8 to 3.11 in prerequisites - Fix registry.yaml: capitalize title, update description and date - Add security warning about --sandbox-backend=none in runner section - Add .env setup instructions with required env vars documentation
1 parent 039a5d1 commit 0874077

3 files changed

Lines changed: 8 additions & 30 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,5 @@ tool_use/demo_memory/
156156
tool_use/memory_storage/
157157
tool_use/.env
158158
agent_api/claude-environment-runner_*/
159+
agent_api/environment_service_key.txt
160+
agent_api/*.txt

agent_api/byoc_environments.ipynb

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,7 @@
6363
{
6464
"cell_type": "markdown",
6565
"metadata": {},
66-
"source": [
67-
"## 2. Setup & Installation {#setup}\n",
68-
"\n",
69-
"### Prerequisites\n",
70-
"\n",
71-
"- Python 3.8 or higher\n",
72-
"- Anthropic API key with BYOC access from [console.anthropic.com](https://console.anthropic.com/)\n",
73-
"- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed on your runner infrastructure\n",
74-
"- Infrastructure to run the BYOC worker (VM, container, etc.)"
75-
]
66+
"source": "## 2. Setup & Installation {#setup}\n\n### Prerequisites\n\n- Python 3.11 or higher\n- Anthropic API key with BYOC access from [console.anthropic.com](https://console.anthropic.com/)\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed on your runner infrastructure\n- Infrastructure to run the BYOC worker (VM, container, etc.)"
7667
},
7768
{
7869
"cell_type": "code",
@@ -91,9 +82,7 @@
9182
{
9283
"cell_type": "markdown",
9384
"metadata": {},
94-
"source": [
95-
"### Configure API Key"
96-
]
85+
"source": "### Configure API Key\n\nCreate a `.env` file in this directory with the following environment variables:\n\n```\nANTHROPIC_API_KEY=sk-ant-... # Your Anthropic API key\nANTHROPIC_SERVICE_KEY=... # Environment service key (generated in Console)\nANTHROPIC_ORG_ID=... # Your Anthropic organization ID\n```\n\n- **`ANTHROPIC_API_KEY`** - Required for all API calls. Get yours from [console.anthropic.com](https://console.anthropic.com/).\n- **`ANTHROPIC_SERVICE_KEY`** - Required to authenticate the Environment Runner. Generate this in the Console under your environment settings.\n- **`ANTHROPIC_ORG_ID`** - Required to identify your organization when running the Environment Runner."
9786
},
9887
{
9988
"cell_type": "code",
@@ -326,20 +315,7 @@
326315
{
327316
"cell_type": "markdown",
328317
"metadata": {},
329-
"source": [
330-
"### Starting the Runner\n",
331-
"\n",
332-
"The runner uses `orchestrator` mode to poll for work and process sessions. Key flags:\n",
333-
"\n",
334-
"| Flag | Description |\n",
335-
"|------|-------------|\n",
336-
"| `--organization-id` | Your Anthropic organization ID |\n",
337-
"| `--environment-id` | The BYOC environment to serve |\n",
338-
"| `--service-key-file` | Path to the environment service key file |\n",
339-
"| `--sandbox-backend` | Sandbox type (`none` for macOS dev, `srt` for Linux production) |\n",
340-
"\n",
341-
"> **Note:** On macOS, use `--sandbox-backend=none` since the Linux sandbox runtime (`srt`) is not available. In production Linux environments, omit this flag to use the default sandbox for security isolation."
342-
]
318+
"source": "### Starting the Runner\n\nThe runner uses `orchestrator` mode to poll for work and process sessions. Key flags:\n\n| Flag | Description |\n|------|-------------|\n| `--organization-id` | Your Anthropic organization ID |\n| `--environment-id` | The BYOC environment to serve |\n| `--service-key-file` | Path to the environment service key file |\n| `--sandbox-backend` | Sandbox type (`none` for macOS dev, `srt` for Linux production) |\n\n> **Security Warning:** The `--sandbox-backend=none` flag **disables all security isolation** for code execution. This means agent-generated code runs directly on your host machine without any sandboxing. **Only use this for local development and testing.** In production, always use the default sandbox backend (`srt` on Linux) to ensure that agent sessions are isolated from your host system and from each other.\n\n> **Note:** On macOS, use `--sandbox-backend=none` since the Linux sandbox runtime (`srt`) is not available. In production Linux environments, omit this flag to use the default sandbox for security isolation."
343319
},
344320
{
345321
"cell_type": "code",

registry.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@
603603
date: '2026-01-23'
604604
categories:
605605
- Agent Patterns
606-
- title: BYOC (Bring Your Own Compute) environments
607-
description: Run Claude agent workloads on your own infrastructure using self-hosted
608-
environments and the official Environment Runner.
606+
- title: BYOC (Bring Your Own Compute) Environments
607+
description: Meet compliance and data residency requirements by running Claude agents
608+
on your own infrastructure while Anthropic handles orchestration.
609609
path: agent_api/byoc_environments.ipynb
610610
authors:
611611
- kokiy

0 commit comments

Comments
 (0)