Skip to main content
Environment variables are read by different surfaces. Prefer explicit SDK options or CLI config when you need per-call behavior; use environment variables for process-level configuration and secrets.

Core client variables

MCP variables

Generated MCP host configs prefer CLI args such as ["mcp", "run", "--surface", "agent", "--model", "browsing"]. Use these variables for process-level defaults, secrets, and backward-compatible host setups. CLI flags override WEBCOMPUTE_MCP_SURFACE and WEBCOMPUTE_MODEL_PROFILE.

Agent model variables

These variables configure MCP run_web_agent when it is enabled on the agent or all surface. SDK web.agent() still requires explicit model config. Common provider credential variables: Model profiles store these provider credential variable names, not the raw provider key values. The key values are read from the environment at run time.

CLI local-runtime variables

Local browser-development variables

These are for repo-local browser-server development, not public SDK usage.

Release/runtime variables

Secret handling

Use environment-backed secrets for agent runs:
Do not place raw API keys, passwords, cookies, proxy URLs, or signed Debug/CDP URLs in prompts.