-
Notifications
You must be signed in to change notification settings - Fork 8.2k
sandboxes v0.12.0 #24102
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
Open
dvdksn
wants to merge
12
commits into
docker:main
Choose a base branch
from
dvdksn:sandboxes-461
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,391
−225
Open
sandboxes v0.12.0 #24102
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
db88a4e
sandboxes: vendor v0.12.0 cli reference
dvdksn 5b6c2e8
sandboxes: update workspace and naming/behavior
dvdksn 91007e0
sandboxes: document reset command
dvdksn bb37fe0
sandboxes: document default network policy
dvdksn d9ce29d
sandboxes: clarify credential scoping
dvdksn 8b0aa15
sandboxes: document multiple workspaces with read-only mounts
dvdksn 9313580
sandboxes: add opencode and shell to supported agents
dvdksn 57910d9
sandboxes: document --pull-template flag and image caching
dvdksn 88d39af
sandboxes: update network logging docs
dvdksn 602c71e
sandboxes: add agent-specific documentation
dvdksn d97f161
sandboxes: explain proxy credential injection
dvdksn c75e3d6
sandboxes(chore): clean up "next steps" sections
dvdksn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,109 @@ | ||||||
| --- | ||||||
| title: cagent sandbox | ||||||
| description: | | ||||||
| Use Docker cagent in Docker Sandboxes with multi-provider authentication | ||||||
| supporting OpenAI, Anthropic, and more. | ||||||
| keywords: docker, sandboxes, cagent, ai agent, multi-provider, authentication | ||||||
| weight: 60 | ||||||
| --- | ||||||
|
|
||||||
| {{< summary-bar feature_name="Docker Sandboxes" >}} | ||||||
|
|
||||||
| This guide covers authentication, configuration, and usage of Docker cagent in | ||||||
| a sandboxed environment. [cagent](/ai/cagent/) is Docker's open source coding | ||||||
|
Contributor
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. Grammatical error: missing plural The phrase "supports multiple provider" should be "supports multiple providers" (plural).
Suggested change
|
||||||
| agent that supports multiple provider. | ||||||
|
|
||||||
| ## Quick start | ||||||
|
|
||||||
| Create a sandbox and run cagent for a project directory: | ||||||
|
|
||||||
| ```console | ||||||
| $ docker sandbox run cagent ~/my-project | ||||||
| ``` | ||||||
|
|
||||||
| The workspace parameter is optional and defaults to the current directory: | ||||||
|
|
||||||
| ```console | ||||||
| $ cd ~/my-project | ||||||
| $ docker sandbox run cagent | ||||||
| ``` | ||||||
|
|
||||||
| ## Authentication | ||||||
|
|
||||||
| cagent uses proxy-managed authentication for all supported providers. Docker | ||||||
| Sandboxes intercepts API requests and injects credentials transparently. You | ||||||
| provide your API keys through environment variables, and the sandbox handles | ||||||
| credential management. | ||||||
|
|
||||||
| ### Supported providers | ||||||
|
|
||||||
| Configure one or more providers by setting environment variables: | ||||||
|
|
||||||
| ```plaintext {title="~/.bashrc or ~/.zshrc"} | ||||||
| export OPENAI_API_KEY=sk-xxxxx | ||||||
| export ANTHROPIC_API_KEY=sk-ant-xxxxx | ||||||
| export GOOGLE_API_KEY=AIzaSyxxxxx | ||||||
| export XAI_API_KEY=xai-xxxxx | ||||||
| export NEBIUS_API_KEY=xxxxx | ||||||
| export MISTRAL_API_KEY=xxxxx | ||||||
| ``` | ||||||
|
|
||||||
| You only need to configure the providers you want to use. cagent detects | ||||||
| available credentials and routes requests to the appropriate provider. | ||||||
|
|
||||||
| ### Environment variable setup | ||||||
|
|
||||||
| Docker Sandboxes use a daemon process that doesn't inherit environment | ||||||
| variables from your current shell session. To make your API keys available to | ||||||
| sandboxes, set them globally in your shell configuration file. | ||||||
|
|
||||||
| Apply the changes: | ||||||
|
|
||||||
| 1. Source your shell configuration: `source ~/.bashrc` (or `~/.zshrc`) | ||||||
| 2. Restart Docker Desktop so the daemon picks up the new environment variables | ||||||
| 3. Create and run your sandbox: | ||||||
|
|
||||||
| ```console | ||||||
| $ docker sandbox create cagent ~/project | ||||||
| $ docker sandbox run <sandbox-name> | ||||||
| ``` | ||||||
|
|
||||||
| The sandbox detects the environment variables and uses them automatically. | ||||||
|
|
||||||
| ## Configuration | ||||||
|
|
||||||
| cagent supports YOLO mode that disables safety checks and approval prompts. | ||||||
| This mode grants the agent full access to your sandbox environment without | ||||||
| interactive confirmation. | ||||||
|
|
||||||
| ### Pass options at runtime | ||||||
|
|
||||||
| Pass cagent CLI options after the sandbox name and a `--` separator: | ||||||
|
|
||||||
| ```console | ||||||
| $ docker sandbox run <sandbox-name> -- run --yolo | ||||||
| ``` | ||||||
|
|
||||||
| The `run --yolo` command starts cagent with approval prompts disabled. | ||||||
|
|
||||||
| ## Base image | ||||||
|
|
||||||
| Template: `docker/sandbox-templates:cagent` | ||||||
|
|
||||||
| cagent supports multiple LLM providers with automatic credential injection | ||||||
| through the sandbox proxy. Launches with `run --yolo` by default. | ||||||
|
|
||||||
| See [Custom templates](../templates.md) to build your own agent images. | ||||||
|
|
||||||
| ## Development status | ||||||
|
|
||||||
| cagent is in active development. Known considerations: | ||||||
|
|
||||||
| - Features may change between Docker Desktop versions | ||||||
| - Multi-provider support is experimental | ||||||
| - Configuration format may evolve | ||||||
| - Some advanced features may be incomplete | ||||||
| - YOLO mode disables safety checks - use with caution | ||||||
|
|
||||||
| Report issues and provide feedback through the Docker Sandboxes feedback | ||||||
| channels. | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Quick start example could be more actionable
The generic
AGENTplaceholder makes this example less immediately useful. Consider showing a concrete example that users can copy and run, like:You could then add a note like "(Replace
claudewith your preferred agent)"