Skip to content

Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.

430 B
Raw Blame
export type BrowserMode = "headless" | "headed";

/** Choose the browser process an operator asked for, preserving the existing default. */
export function browserModeFromEnv(raw: string | undefined): BrowserMode {
  const mode = raw?.trim() || "headless";
  if (mode === "headless" || mode === "headed") return mode;
  throw new Error(
    `COMPUTER_BROWSER_MODE must be headless or headed, not ${JSON.stringify(mode)}.`,
  );
}