Skip to content

Commit 8d42af6

Browse files
committed
sandboxes: explain proxy credential injection
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 87fa1fa commit 8d42af6

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

content/manuals/ai/sandboxes/architecture.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,29 @@ An HTTP/HTTPS filtering proxy runs on your host and is available at
153153
web requests. You can configure network policies to control which destinations
154154
are allowed. See [Network policies](network-policies.md).
155155

156+
### Credential injection
157+
158+
The HTTP/HTTPS proxy automatically injects credentials into API requests for
159+
supported providers (OpenAI, Anthropic, Google, GitHub, etc.). When you set
160+
environment variables like `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` on your
161+
host, the proxy intercepts outbound requests to those services and adds the
162+
appropriate authentication headers.
163+
164+
This approach keeps credentials on your host system - they're never stored
165+
inside the sandbox VM. The agent makes API requests without credentials, and
166+
the proxy injects them transparently. When the sandbox is removed, no
167+
credentials remain inside.
168+
169+
For multi-provider agents (OpenCode, cagent), the proxy automatically selects
170+
the correct credentials based on the API endpoint being called. See individual
171+
[agent configuration](agents/) for credential setup instructions.
172+
173+
When building custom templates or installing agents manually in the shell
174+
sandbox, some agents may require environment variables like `OPENAI_API_KEY`
175+
to be set before they start. Set these to placeholder values (e.g.,
176+
`proxy-managed`) if needed - the proxy will inject actual credentials
177+
regardless of the environment variable value.
178+
156179
### Sandbox isolation
157180

158181
Sandboxes cannot communicate with each other. Each VM has its own private

0 commit comments

Comments
 (0)