@@ -153,6 +153,29 @@ An HTTP/HTTPS filtering proxy runs on your host and is available at
153153web requests. You can configure network policies to control which destinations
154154are 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
158181Sandboxes cannot communicate with each other. Each VM has its own private
0 commit comments