wooden-umbrella-84098
05/20/2026, 5:00 PM/api/automation/v1?limit=50&offset=0
but doesn't seem to have an API key in the headers...it's returning 401wooden-umbrella-84098
05/20/2026, 5:12 PMTwo separate API keys
The automation backend is a separate service from the agent-server, with its own auth. They use different keys:
Service Frontend env var Header
agent-server VITE_SESSION_API_KEY X-Session-API-Key
automation backend VITE_AUTOMATION_API_KEY Authorization: Bearer ā¦
So no, the automation API does not use SESSION_API_KEY. The frontend has a dedicated axios client for it in src/api/automation-service/automation-service.api.ts (lines 25ā40):
const localAutomationAxios = axios.create();
localAutomationAxios.interceptors.request.use((config) => {
if (!config.baseURL) config.baseURL = getEffectiveLocalBackend().host;
const apiKey = import.meta.env.VITE_AUTOMATION_API_KEY?.trim();
if (apiKey) {
config.headers.set("Authorization", `Bearer ${apiKey}`);
}
return config;
});
There's an explicit comment there noting that the sidecar "authenticates via its own VITE_AUTOMATION_API_KEY Bearer token ā NOT the agent-server's X-Session-API-Key."
@quick-window-91705 @chilly-france-44439 one of the requirements we laid out (I think) is that both backends should use the same API key.quick-window-91705
05/20/2026, 5:13 PMnutritious-balloon-65098
05/20/2026, 5:14 PMwooden-umbrella-84098
05/20/2026, 5:15 PMSESSION_API_KEY as an env var, then running npm run dev:dangerously-dockerlesswooden-umbrella-84098
05/20/2026, 5:15 PMwooden-umbrella-84098
05/20/2026, 5:15 PMnpm run dev fixes itwooden-umbrella-84098
05/20/2026, 5:17 PMnutritious-balloon-65098
05/20/2026, 5:33 PMautomation-service.api.ts now reads VITE_SESSION_API_KEY instead of VITE_AUTOMATION_API_KEY for the Authorization: Bearer ⦠header.localApiKey generation in `dev-with-automation.mjs`; localApiKey = sessionApiKey so one key flows everywhere.VITE_AUTOMATION_API_KEY from static-build.mjs env.OPENHANDS_AUTOMATION_API_KEY, AUTOMATION_LOCAL_API_KEY, and AUTOMATION_AGENT_SERVER_API_KEY all default to the session key when not explicitly overridden.DEFAULT_AUTOMATION_API_KEY_PATH constant is kept as a no-op export to avoid breaking any downstream importers, which is the only "extra" but is a deliberate backward-compat choice.wooden-umbrella-84098
05/20/2026, 5:36 PMwooden-umbrella-84098
05/20/2026, 5:36 PMquick-window-91705
05/20/2026, 5:37 PM