-
Notifications
You must be signed in to change notification settings - Fork 558
ci(agent): build and test sandbox-agent images #4804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| title: Custom Agent Runner Images | ||
| sidebar_label: Custom Runner Images | ||
| description: Build and configure custom sandbox-agent runner images for self-hosted Agenta | ||
| --- | ||
|
|
||
| The default runner image is: | ||
|
|
||
| ```bash | ||
| ghcr.io/agenta-ai/agenta-sandbox-agent:latest | ||
| ``` | ||
|
Comment on lines
+7
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Default image in docs does not match Compose EE defaults. Line 7 says the default is |
||
|
|
||
| Build a custom image when you need extra system packages, custom certificates, or a pinned | ||
| runner build. | ||
|
|
||
| ## Build | ||
|
|
||
| From the repository root: | ||
|
|
||
| ```bash | ||
| docker build \ | ||
| -f services/agent/docker/Dockerfile \ | ||
| -t ghcr.io/<org>/agenta-sandbox-agent:<tag> \ | ||
| services/agent | ||
| ``` | ||
|
|
||
| The published image does not bundle Claude Code. If a harness needs Claude Code, the runner | ||
| installs it from Anthropic at runtime. | ||
|
|
||
| ## Configure Compose | ||
|
|
||
| ```bash | ||
| AGENTA_SANDBOX_AGENT_IMAGE_NAME=<org>/agenta-sandbox-agent | ||
| AGENTA_SANDBOX_AGENT_IMAGE_TAG=<tag> | ||
| ``` | ||
|
|
||
| ## Configure Helm | ||
|
|
||
| ```yaml | ||
| agentRunner: | ||
| image: | ||
| repository: ghcr.io/<org>/agenta-sandbox-agent | ||
| tag: <tag> | ||
| ``` | ||
|
|
||
| ## Configure Railway | ||
|
|
||
| ```bash | ||
| export AGENTA_SANDBOX_AGENT_IMAGE="ghcr.io/<org>/agenta-sandbox-agent:<tag>" | ||
| ``` | ||
|
|
||
| Then run the normal Railway deploy flow. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -114,12 +114,18 @@ AGENTA_CRYPT_KEY=replace-me | |||||||||||||||||||||||||||||||||||||||||||||||||||
| # CRISP_WEBSITE_ID= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # daytona | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_API_KEY= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_API_URL=https://app.daytona.io/api | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_SNAPSHOT=daytona-small | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_TARGET=eu | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # sandbox-agent | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_AGENT_RUNNER_URL=http://sandbox-agent:8765 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_AGENT_ENABLE_MCP=false | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_SANDBOX_AGENT_IMAGE_NAME=internal-ee-agenta-sandbox-agent | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_SANDBOX_AGENT_IMAGE_TAG=latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_PROVIDER=local | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_API_KEY= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_API_URL=https://app.daytona.io/api | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_TARGET=eu | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_SNAPSHOT= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_IMAGE= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+117
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Include This variable is consumed by compose but isn’t documented in the sample env section. Suggested patch # SANDBOX_AGENT_DAYTONA_SNAPSHOT=
# SANDBOX_AGENT_DAYTONA_IMAGE=
+# SANDBOX_AGENT_DAYTONA_INSTALL_PI=false📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # docker | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -114,12 +114,18 @@ AGENTA_CRYPT_KEY=replace-me | |||||||||||||||||||||||||||||||||||||||||||||||||||
| # CRISP_WEBSITE_ID= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # daytona | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_API_KEY= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_API_URL=https://app.daytona.io/api | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_SNAPSHOT=daytona-small | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DAYTONA_TARGET=eu | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # sandbox-agent | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_AGENT_RUNNER_URL=http://sandbox-agent:8765 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_AGENT_ENABLE_MCP=false | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_SANDBOX_AGENT_IMAGE_NAME=agenta-sandbox-agent | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # AGENTA_SANDBOX_AGENT_IMAGE_TAG=latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_PROVIDER=local | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_API_KEY= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_API_URL=https://app.daytona.io/api | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_TARGET=eu | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_SNAPSHOT= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # SANDBOX_AGENT_DAYTONA_IMAGE= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+117
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add the missing The compose service supports this variable, but the env example block omits it, which makes the configurable surface incomplete. Suggested patch # SANDBOX_AGENT_DAYTONA_SNAPSHOT=
# SANDBOX_AGENT_DAYTONA_IMAGE=
+# SANDBOX_AGENT_DAYTONA_INSTALL_PI=false📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ================================================================== # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # docker | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Daytona Sandbox Snapshot | ||
|
|
||
| This folder contains the supported self-host recipe for building a Daytona snapshot for the | ||
| Agenta `sandbox-agent` runner path. | ||
|
|
||
| We ship the recipe, not a built snapshot. The operator runs it in their own Daytona account: | ||
|
|
||
| ```bash | ||
| DAYTONA_API_KEY=... DAYTONA_TARGET=eu uv run build_snapshot.py --force | ||
| ``` | ||
|
|
||
| Configure the runner service with: | ||
|
|
||
| ```bash | ||
| SANDBOX_AGENT_PROVIDER=daytona | ||
| SANDBOX_AGENT_DAYTONA_SNAPSHOT=agenta-sandbox-pi | ||
| SANDBOX_AGENT_DAYTONA_INSTALL_PI=false | ||
| ``` | ||
|
|
||
| The recipe currently bases on the upstream full sandbox-agent image and adds the Pi CLI. | ||
| That image includes Claude Code. We do not distribute the resulting snapshot. Cloud builds its | ||
| own internal snapshot; self-hosters build their own. | ||
|
|
||
| Keep credentials out of the image and snapshot. Provider keys and self-managed login paths are | ||
| runtime concerns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Disable persisted git credentials in this checkout step.
This job executes repo code (install/tests); keeping the token in local git config is unnecessary and increases credential exposure risk.
Suggested patch
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 321-321: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 321-321: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
Source: Linters/SAST tools