Lumen is a vision-first browser agent developed by Jina, with the repository address at https://github.com/omxyz/lumen。其核心设计为感知循环:截图 → think → execute action → take another screenshot, with the entire process running through CDP (Chrome DevTools Protocol). It does not perform DOM scraping or use selectors, but instead drives model decisions directly based on viewport screenshots.
Main capabilities
- Vision loop: screenshot → model → action → screenshot, completely avoiding DOM dependence.
- Multi-provider support: can connect to Anthropic, Google, OpenAI, and any OpenAI-compatible endpoint.
- History compression: when context utilization reaches 80%, first perform first-level screenshot compression, then second-level LLM summarization.
- Unified coordinates: ActionDecoder normalizes the coordinate formats of all providers into viewport pixels during decoding.
- Persistent memory: writeState persists structured JSON, which is retained even after history compression.
- Streaming output: agent.stream() returns typed StreamEvent objects, facilitating real-time UI display.
- Session resumption: can be serialized to JSON, then resumed via Agent.resume().
- Safety mechanisms: SessionPolicy (domain allow/block lists), PreActionHook (imperative rejection), Verifier (completion gating).
- Duplicate detection: three-layer stuck detection, accompanied by progressively escalating prompts.
- Action caching: disk cache used to replay known-valid actions.
- Subtask delegation: the model can hand off subtasks via delegate to a new loop execution.
Running and usage Requires Node.js ≥ 20.19 and Chrome/Chromium for local browser mode. Models can be specified in the form "provider/model-id"; any unrecognized prefix is handled by CustomAdapter (OpenAI-compatible chat completions). Supports Anthropic's extended thinking. Can pre-navigate via startUrl, saving 1-2 model steps; supports multi-run sessions and session resumption. Browser options, event reference, and logging surfaces (such as LUMEN_LOG_CDP, LUMEN_LOG_ACTIONS, LUMEN_LOG_BROWSER, LUMEN_LOG_HISTORY, LUMEN_LOG_ADAPTER, LUMEN_LOG_LOOP) are available for debugging.
Core loop details
- Screenshot: capture the browser viewport via CDP.
- History: append to wire history; compress when context exceeds a threshold (level 1: discard old screenshots; level 2: LLM summary).
- Context: assemble the system prompt, including persistent state, site-specific hints (SiteKB), stuck hints, and workflow hints.
- Model: stream actions from the model (supports Anthropic, Google, OpenAI, or any OpenAI-compatible endpoint).
- Execution: ActionRouter dispatches each action to Chrome via CDP (click, type, scroll, navigate, etc.).
- Action verification: ActionVerifier runs heuristic post-checks (did the click hit? is there focus after typing?).
- Loop detection: RepeatDetector checks three layers - exact action repetition, category dominance, URL stagnation; progressively escalating hints guide the model out.
- Checkpoints: periodically save browser state; roll back on deep stagnation (level 8+).
- Termination gating: when the model calls task_complete, the Verifier (ModelVerifier or custom) checks the screenshot for confirmation. If rejected, the loop continues; if passed, return the result.
Use cases
- Web tasks that require browser automation without maintaining selectors.
- Agent experiments that need flexible switching across model providers.
- Repetitive workflows that need deterministic replay and self-healing capabilities.
- Evaluated on the WebVoyager benchmark (preliminary): a subset of 25 tasks sampled from WebVoyager, stratified across 15 sites, scored by an LLM-as-judge (Gemini 2.5 Flash), with 3 trials per task. Lumen runs with SiteKB (domain-specific navigation hints) and ModelVerifier (termination gating) enabled. All frameworks use Claude Sonnet 4.6 as the agent model.
Limitations and notes
- Requires Node.js >= 20.19 and Chrome/Chromium; on Linux CI you need to launch Chrome yourself with --no-sandbox and use a browser connection of type cdp.
- ESM-only, requires "moduleResolution": "bundler" or "nodenext" in tsconfig.json.
- Falls back to environment variables when the API key is not found: ANTHROPIC_API_KEY, GOOGLE_API_KEY / GEMINI_API_KEY, OPENAI_API_KEY.
- If the loop reaches maxSteps, you can increase maxSteps, add a focused systemPrompt, or use verbose: 2 for debugging.
- BROWSER_DISCONNECTED is the only error that is thrown; other action errors are fed back to the model.