{
  "canonical_name": "vercel-labs/agent-browser",
  "compilation_id": "pack_e0027aa5427e4a5393c7a007d3e25025",
  "created_at": "2026-05-19T10:50:36.392626+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=skill, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=skill, recipe, host_instruction, eval, preflight"
    ],
    "evidence_delta": {
      "confirmed_claims": [
        "identity_anchor_present",
        "capability_and_host_targets_present",
        "install_path_declared_or_better"
      ],
      "missing_required_fields": [],
      "must_verify_forwarded": [
        "Run or inspect `npm install -g agent-browser` in an isolated environment.",
        "Confirm the project exposes the claimed capability to at least one target host."
      ],
      "quickstart_execution_scope": "allowlisted_sandbox_smoke",
      "sandbox_command": "npm install -g agent-browser",
      "sandbox_container_image": "node:22-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "deterministic_isolated_install",
      "sandbox_validation_id": "sbx_ca1f498cc2c54c55b1e4598985e35bb6"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_08325e75cda09a6826e0da4b8432434a",
    "canonical_name": "vercel-labs/agent-browser",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/vercel-labs/agent-browser",
    "slug": "agent-browser",
    "source_packet_id": "phit_de0fa7fa46924b548afa4e51256cec61",
    "source_validation_id": "dval_567cd1eb369b45518f7850b5520fb183"
  },
  "merchandising": {
    "best_for": "需要流程自动化能力，并使用 local_cli的用户",
    "github_forks": 2029,
    "github_stars": 32838,
    "one_liner_en": "Browser automation CLI for AI agents",
    "one_liner_zh": "Browser automation CLI for AI agents",
    "primary_category": {
      "category_id": "workflow-automation",
      "confidence": "high",
      "name_en": "Workflow Automation",
      "name_zh": "流程自动化",
      "reason": "matched_keywords:automation, agent, browser"
    },
    "target_user": "使用 local_cli 等宿主 AI 的用户",
    "title_en": "agent-browser",
    "title_zh": "agent-browser 能力包",
    "visible_tags": [
      {
        "label_en": "Browser Agents",
        "label_zh": "浏览器 Agent",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "product_domain-browser-agents",
        "type": "product_domain"
      },
      {
        "label_en": "Web Task Automation",
        "label_zh": "网页任务自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "user_job-web-task-automation",
        "type": "user_job"
      },
      {
        "label_en": "Browser Automation",
        "label_zh": "浏览器自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-browser-automation",
        "type": "core_capability"
      },
      {
        "label_en": "Node-based Workflow",
        "label_zh": "节点式流程编排",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-node-based-workflow",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Evaluation Suite",
        "label_zh": "评测体系",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-evaluation-suite",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_de0fa7fa46924b548afa4e51256cec61",
  "page_model": {
    "artifacts": {
      "artifact_slug": "agent-browser",
      "files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json",
        "REPO_INSPECTION.md",
        "CAPABILITY_CONTRACT.json",
        "EVIDENCE_INDEX.json",
        "CLAIM_GRAPH.json"
      ],
      "required_files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json"
      ]
    },
    "detail": {
      "capability_source": "Project Hit Packet + DownstreamValidationResult",
      "commands": [
        {
          "command": "npm install -g agent-browser",
          "label": "Node.js / npm · 官方安装入口",
          "source": "https://github.com/vercel-labs/agent-browser#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "浏览器自动化",
        "节点式流程编排",
        "评测体系"
      ],
      "eyebrow": "流程自动化",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要流程自动化能力，并使用 local_cli的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "Browser automation CLI for AI agents"
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "local_cli",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "skill, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Chrome 147.0 crashes with \"trap int3\" when running in docker",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_9045278ef5e043dcadccf9288477813c | https://github.com/vercel-labs/agent-browser/issues/1339 | 来源讨论提到 node 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker",
            "user_impact": "可能阻塞安装或首次运行。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Detected: Trojan:Win32/Posilod.EB!cl",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_edbde732c7a7410e96ad0fa301e4222d | https://github.com/vercel-labs/agent-browser/issues/1281 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Detected: Trojan:Win32/Posilod.EB!cl",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_ab39b89d157047e897e771d2572dfcdd | https://github.com/vercel-labs/agent-browser/issues/1338 | 来源讨论提到 node 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse",
            "category": "运行坑",
            "evidence": [
              "community_evidence:github | cevd_0896b0b429c641f0b93ca9dcbbee6db8 | https://github.com/vercel-labs/agent-browser/issues/1319 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "Developers should check this security_permissions risk before relying on the project: Dashboard privileged POST routes should reject cross-origin requests",
            "category": "安全/权限坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_bc39fa851aecda51d6ae79863b570093 | https://github.com/vercel-labs/agent-browser/issues/1345 | Dashboard privileged POST routes should reject cross-origin requests"
            ],
            "severity": "high",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.",
            "title": "失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests",
            "user_impact": "Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests"
          },
          {
            "body": "Developers should check this security_permissions risk before relying on the project: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission",
            "category": "安全/权限坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_50f6336937705c962c78ed48a466eb98 | https://github.com/vercel-labs/agent-browser/issues/1365 | `--auto-connect` fails too quickly when Chrome asks for remote debugging permission"
            ],
            "severity": "high",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission. Context: Source discussion did not expose a precise runtime context.",
            "title": "失败模式：security_permissions: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission",
            "user_impact": "Developers may expose sensitive permissions or credentials: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support XDG Base Directory paths for agent-browser state, config, and installs",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_a2b8bb7035dd44e0a9e97dc78186f3b2 | https://github.com/vercel-labs/agent-browser/issues/1361 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Support XDG Base Directory paths for agent-browser state, config, and installs",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: After failed close, subsequent open reports success but returns stale content from prior URL",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_fce1ca55e45e13ba327a52473c958037 | https://github.com/vercel-labs/agent-browser/issues/1367 | After failed close, subsequent open reports success but returns stale content from prior URL"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: After failed close, subsequent open reports success but returns stale content from prior URL. Context: Observed when using node, python, linux",
            "title": "失败模式：installation: After failed close, subsequent open reports success but returns stale content from prior URL",
            "user_impact": "Developers may fail before the first successful local run: After failed close, subsequent open reports success but returns stale content from prior URL"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: Chrome 147.0 crashes with \"trap int3\" when running in docker",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_de7dc45e4f45905d10cb44680cd26da5 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker",
              "failure_mode_cluster:github_issue | fmev_e97d2c4c42c663165c2763023d5d79e3 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Chrome 147.0 crashes with \"trap int3\" when running in docker. Context: Observed when using docker, windows, linux",
            "title": "失败模式：installation: Chrome 147.0 crashes with \"trap int3\" when running in docker",
            "user_impact": "Developers may fail before the first successful local run: Chrome 147.0 crashes with \"trap int3\" when running in docker"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: Detected: Trojan:Win32/Posilod.EB!cl",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_11d6daa01783b3f8d6cc4984b34591d9 | https://github.com/vercel-labs/agent-browser/issues/1281 | Detected: Trojan:Win32/Posilod.EB!cl"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Detected: Trojan:Win32/Posilod.EB!cl. Context: Observed when using windows",
            "title": "失败模式：installation: Detected: Trojan:Win32/Posilod.EB!cl",
            "user_impact": "Developers may fail before the first successful local run: Detected: Trojan:Win32/Posilod.EB!cl"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: Feature: `network throttle` for emulating slow connections / per-URL delay",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_af068ec0790d0398008062aef7b5d1a5 | https://github.com/vercel-labs/agent-browser/issues/1372 | Feature: `network throttle` for emulating slow connections / per-URL delay"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Feature: `network throttle` for emulating slow connections / per-URL delay. Context: Observed during installation or first-run setup.",
            "title": "失败模式：installation: Feature: `network throttle` for emulating slow connections / per-URL delay",
            "user_impact": "Developers may fail before the first successful local run: Feature: `network throttle` for emulating slow connections / per-URL delay"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_1ea0ed85aeff64de383d8fa15586474d | https://github.com/vercel-labs/agent-browser/issues/1351 | High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills. Context: Observed when using node, playwright, windows",
            "title": "失败模式：installation: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills",
            "user_impact": "Developers may fail before the first successful local run: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: Support XDG Base Directory paths for agent-browser state, config, and installs",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_5bd8394953d7b9c8f00eade661671801 | https://github.com/vercel-labs/agent-browser/issues/1361 | Support XDG Base Directory paths for agent-browser state, config, and installs"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Support XDG Base Directory paths for agent-browser state, config, and installs. Context: Observed when using linux",
            "title": "失败模式：installation: Support XDG Base Directory paths for agent-browser state, config, and installs",
            "user_impact": "Developers may fail before the first successful local run: Support XDG Base Directory paths for agent-browser state, config, and installs"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_8b48c64a7c8bd1d363fa81928818b489 | https://github.com/vercel-labs/agent-browser/issues/1348 | Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1). Context: Observed when using node, python, windows",
            "title": "失败模式：installation: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File...",
            "user_impact": "Developers may fail before the first successful local run: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: v0.27.0",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_release | fmev_c5cd290a3adea233428e19624c61cbc4 | https://github.com/vercel-labs/agent-browser/releases/tag/v0.27.0 | v0.27.0"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: v0.27.0. Context: Observed when using node",
            "title": "失败模式：installation: v0.27.0",
            "user_impact": "Upgrade or migration may change expected behavior: v0.27.0"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：After failed close, subsequent open reports success but returns stale content from prior URL",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_20b2fb27e3744303957ee3b14657c6fb | https://github.com/vercel-labs/agent-browser/issues/1367 | 来源讨论提到 node 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：After failed close, subsequent open reports success but returns stale content from prior URL",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 38 个潜在踩坑项，其中 7 个为 high/blocking；最高优先级：安装坑 - 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 106,
        "forks": 2029,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 32838
      },
      "source_url": "https://github.com/vercel-labs/agent-browser",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "Browser automation CLI for AI agents",
      "title": "agent-browser 能力包",
      "trial_prompt": "# agent-browser - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for vercel-labs/agent-browser.\n\nProject:\n- Name: agent-browser\n- Repository: https://github.com/vercel-labs/agent-browser\n- Summary: Browser automation CLI for AI agents\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Browser automation CLI for AI agents\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n- Capability 2: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. introduction: Introduction to Agent Browser. Produce one small intermediate artifact and wait for confirmation.\n2. installation-guide: Installation Guide. Produce one small intermediate artifact and wait for confirmation.\n3. element-references: Element References System. Produce one small intermediate artifact and wait for confirmation.\n4. architecture-overview: Architecture Overview. Produce one small intermediate artifact and wait for confirmation.\n5. daemon-and-cdp: Daemon and CDP Protocol. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/vercel-labs/agent-browser\n- https://github.com/vercel-labs/agent-browser#readme\n- skill-data/agentcore/SKILL.md\n- skill-data/core/SKILL.md\n- skill-data/dogfood/SKILL.md\n- skill-data/electron/SKILL.md\n- skill-data/slack/SKILL.md\n- skill-data/vercel-sandbox/SKILL.md\n- skills/agent-browser/SKILL.md\n- README.md\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "voices": [
        {
          "body": "来源平台：github。github/github_issue: `--cdp` eval/open silently target a secondary execution context when Chr（https://github.com/vercel-labs/agent-browser/issues/1373）；github/github_issue: Feature: `network throttle` for emulating slow connections / per-URL del（https://github.com/vercel-labs/agent-browser/issues/1372）；github/github_issue: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-ch（https://github.com/vercel-labs/agent-browser/issues/1371）；github/github_issue: snapshot -s <selector> produces duplicate elements when AX tree contains（https://github.com/vercel-labs/agent-browser/issues/1338）；github/github_issue: Support XDG Base Directory paths for agent-browser state, config, and in（https://github.com/vercel-labs/agent-browser/issues/1361）；github/github_issue: After failed close, subsequent open reports success but returns stale co（https://github.com/vercel-labs/agent-browser/issues/1367）；github/github_issue: Chrome 147.0 crashes with \"trap int3\" when running in docker（https://github.com/vercel-labs/agent-browser/issues/1339）；github/github_issue: `--auto-connect` fails too quickly when Chrome asks for remote debugging（https://github.com/vercel-labs/agent-browser/issues/1365）；github/github_issue: High LLM turn count due to frequent `snapshot` calls when using `agent-b（https://github.com/vercel-labs/agent-browser/issues/1351）；github/github_issue: Chrome 147.0 crashes with \"trap int3\" when running in docker（https://github.com/vercel-labs/agent-browser/issues/1339）；github/github_issue: Support enabling WebAuthn for passkey authentication with a virtual auth（https://github.com/vercel-labs/agent-browser/issues/688）；github/github_issue: Feature Request: Chrome Extension-based Connection for Seamless Login St（https://github.com/vercel-labs/agent-browser/issues/1319）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_issue",
              "source": "github",
              "title": "`--cdp` eval/open silently target a secondary execution context when Chr",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1373"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Feature: `network throttle` for emulating slow connections / per-URL del",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1372"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Orphaned headless Chrome Helpers spin at high CPU under agent-browser-ch",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1371"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "snapshot -s <selector> produces duplicate elements when AX tree contains",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1338"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Support XDG Base Directory paths for agent-browser state, config, and in",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1361"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "After failed close, subsequent open reports success but returns stale co",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1367"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Chrome 147.0 crashes with \"trap int3\" when running in docker",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1339"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "`--auto-connect` fails too quickly when Chrome asks for remote debugging",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1365"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "High LLM turn count due to frequent `snapshot` calls when using `agent-b",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1351"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Chrome 147.0 crashes with \"trap int3\" when running in docker",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1339"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Support enabling WebAuthn for passkey authentication with a virtual auth",
              "url": "https://github.com/vercel-labs/agent-browser/issues/688"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Feature Request: Chrome Extension-based Connection for Seamless Login St",
              "url": "https://github.com/vercel-labs/agent-browser/issues/1319"
            }
          ],
          "status": "已收录 12 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "流程自动化",
      "desc": "Browser automation CLI for AI agents",
      "effort": "安装已验证",
      "forks": 2029,
      "icon": "bolt",
      "name": "agent-browser 能力包",
      "risk": "可发布",
      "slug": "agent-browser",
      "stars": 32838,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "浏览器自动化",
        "节点式流程编排",
        "评测体系"
      ],
      "thumb": "gray",
      "type": "Skill Pack"
    },
    "manual": {
      "markdown": "# https://github.com/vercel-labs/agent-browser 项目说明书\n\n生成时间：2026-05-15 11:32:46 UTC\n\n## 目录\n\n- [Introduction to Agent Browser](#introduction)\n- [Installation Guide](#installation-guide)\n- [Element References System](#element-references)\n- [Architecture Overview](#architecture-overview)\n- [Daemon and CDP Protocol](#daemon-and-cdp)\n- [Navigation Commands](#navigation-commands)\n- [Interaction Commands](#interaction-commands)\n- [State Inspection Commands](#state-inspection-commands)\n- [Browser Engine Integration](#browser-engines)\n- [Authentication and Session Persistence](#authentication)\n\n<a id='introduction'></a>\n\n## Introduction to Agent Browser\n\n### 相关页面\n\n相关主题：[Installation Guide](#installation-guide), [Architecture Overview](#architecture-overview)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n- [examples/environments/app/page.tsx](https://github.com/vercel-labs/agent-browser/blob/main/examples/environments/app/page.tsx)\n</details>\n\n# Introduction to Agent Browser\n\nAgent Browser is a high-performance, native Rust CLI tool designed for browser automation and AI agent integration. Unlike traditional browser automation frameworks that rely on Node.js wrappers or third-party libraries, Agent Browser communicates directly with Chrome/Chromium via the Chrome DevTools Protocol (CDP), providing a lightweight and reliable solution for web interaction tasks.\n\n## Overview\n\nAgent Browser serves as a bridge between AI agents and web browsers, enabling autonomous web navigation, interaction, and data extraction. It is compatible with a wide range of AI agent platforms including Cursor, Claude Code, Codex, Continue, and Windsurf.\n\n| Aspect | Description |\n|--------|-------------|\n| **Language** | Rust (native CLI) |\n| **Protocol** | Chrome DevTools Protocol (CDP) |\n| **Dependencies** | No Playwright or Puppeteer dependency |\n| **Platform** | Chrome/Chromium |\n| **License** | See repository LICENSE |\n\n**资料来源：** [skills/agent-browser/SKILL.md]()\n\n## Architecture\n\nAgent Browser follows a modular architecture with distinct layers for CLI handling, native browser control, and extensible skills.\n\n```mermaid\ngraph TD\n    A[User / AI Agent] --> B[CLI Layer<br/>Rust Commands]\n    B --> C[Native Actions Layer<br/>CDP Dispatcher]\n    C --> D[Chrome/Chromium<br/>via CDP]\n    \n    E[Skills System] --> B\n    E --> F[Core Skills]\n    E --> G[Specialized Skills]\n    \n    G --> G1[Electron Apps]\n    G --> G2[Slack Workspace]\n    G --> G3[Exploratory Testing]\n    G --> G4[Cloud Providers]\n    \n    H[Session Management] --> C\n    H --> H1[Auth Vault]\n    H --> H2[State Persistence]\n    H --> H3[Video Recording]\n```\n\n**资料来源：** [skill-data/core/SKILL.md](), [skills/agent-browser/SKILL.md]()\n\n## Core Concepts\n\n### Accessibility-Tree Snapshots\n\nAgent Browser generates accessibility-tree snapshots that provide structured, human-readable representations of web pages. Each interactive element receives a unique reference ID (e.g., `@e1`, `@e2`) that can be used for subsequent interactions.\n\nExample snapshot output:\n```\nPage: Example - Log in\nURL: https://example.com/login\n\n@e1 [heading] \"Log in\"\n@e2 [form]\n  @e3 [input type=\"email\"] placeholder=\"Email\"\n  @e4 [input type=\"password\"] placeholder=\"Password\"\n  @e5 [button type=\"submit\"] \"Continue\"\n  @e6 [link] \"Forgot password?\"\n```\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md](), [skill-data/core/SKILL.md]()\n\n### Element Reference Notation\n\nElement references follow a consistent notation pattern:\n\n```\n@e1 [tag attribute=\"value\"] \"text content\" placeholder=\"hint\"\n```\n\n| Component | Description |\n|-----------|-------------|\n| `@e1` | Unique reference ID |\n| `tag` | HTML tag name |\n| `attribute=\"value\"` | Key attributes |\n| `\"text content\"` | Visible text |\n| `placeholder=\"hint\"` | Additional attributes |\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md]()\n\n## Command Reference\n\n### Navigation Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser open [url]` | Launch browser with optional navigation |\n| `agent-browser back` | Navigate backward |\n| `agent-browser forward` | Navigate forward |\n| `agent-browser reload` | Reload current page |\n| `agent-browser close` | Close browser |\n| `agent-browser connect <port>` | Connect to existing browser via CDP |\n\n**资料来源：** [skill-data/core/references/commands.md]()\n\n### Interaction Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser click <ref>` | Click an element |\n| `agent-browser fill <ref> <text>` | Type text into input |\n| `agent-browser select <ref> <value>` | Select dropdown option |\n| `agent-browser check <ref>` | Check a checkbox |\n| `agent-browser scroll <direction> <pixels>` | Scroll page |\n\n**资料来源：** [cli/src/native/actions.rs]()\n\n### Data Retrieval Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser snapshot [-i]` | Get page snapshot (interactive only with `-i`) |\n| `agent-browser screenshot [path]` | Capture screenshot |\n| `agent-browser get text <ref>` | Get visible text |\n| `agent-browser get attr <ref> <name>` | Get attribute value |\n| `agent-browser get url` | Get current URL |\n| `agent-browser get title` | Get page title |\n\n**资料来源：** [cli/src/output.rs](), [cli/src/native/actions.rs]()\n\n### Network Control Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser network route <url>` | Intercept network request |\n| `agent-browser network unroute <url>` | Remove interception |\n| `agent-browser network requests [--clear]` | View/clear network requests |\n| `agent-browser network har <start\\|stop> [path]` | Capture HAR file |\n\n**资料来源：** [skill-data/core/references/commands.md](), [cli/src/output.rs]()\n\n### Cookie and Storage Management\n\n```bash\nagent-browser cookies get           # View all cookies\nagent-browser cookies set --url <url> --name <name> --value <val>\nagent-browser cookies clear         # Clear all cookies\nagent-browser storage local         # Manage localStorage\nagent-browser storage session       # Manage sessionStorage\n```\n\n**资料来源：** [cli/src/output.rs]()\n\n### Browser Settings Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser set viewport <w> <h>` | Set viewport size |\n| `agent-browser set device <name>` | Emulate device |\n| `agent-browser set geo <lat> <lng>` | Set geolocation |\n| `agent-browser set offline on\\|off` | Toggle offline mode |\n| `agent-browser set headers <json>` | Set custom headers |\n| `agent-browser set media dark\\|light` | Set color scheme |\n\n**资料来源：** [cli/src/output.rs]()\n\n## Sessions and State Management\n\nAgent Browser supports multiple concurrent browser sessions with state persistence.\n\n```mermaid\ngraph LR\n    A[Session A] --> B[State File A]\n    C[Session B] --> D[State File B]\n    E[Auth Vault] --> A\n    E[Auth Vault] --> C\n```\n\n**Key Features:**\n\n- **Named Sessions**: `--session <name>` flag for multiple sessions\n- **State Persistence**: Save and restore browser state\n- **Auth Vault**: Secure credential storage\n- **Video Recording**: Capture browser activity\n\n**资料来源：** [skill-data/core/SKILL.md](), [skills/agent-browser/SKILL.md]()\n\n## Skills System\n\nAgent Browser uses an extensible skills system that provides specialized workflows for different environments.\n\n### Core Skills\n\n```bash\nagent-browser skills get core             # Core workflows and common patterns\nagent-browser skills get core --full      # Include full command reference\n```\n\n### Specialized Skills\n\n| Skill | Description | Command |\n|-------|-------------|---------|\n| **Electron** | Desktop app automation | `agent-browser skills get electron` |\n| **Slack** | Workspace automation | `agent-browser skills get slack` |\n| **Dogfood** | Exploratory testing/QA | `agent-browser skills get dogfood` |\n| **Vercel Sandbox** | Cloud browser in microVMs | `agent-browser skills get vercel-sandbox` |\n| **AgentCore** | AWS Bedrock cloud browsers | `agent-browser skills get agentcore` |\n\n**资料来源：** [skills/agent-browser/SKILL.md]()\n\n## React Developer Tools Integration\n\nAgent Browser includes built-in React DevTools support for debugging React applications:\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser react_tree` | View React component tree |\n| `agent-browser react_inspect` | Inspect component props/state |\n| `agent-browser react_renders_start` | Track render counts |\n| `agent-browser react_renders_stop` | Stop render tracking |\n\n**资料来源：** [cli/src/native/actions.rs](), [cli/src/react/suspense.rs]()\n\n### Suspense Boundary Analysis\n\nAgent Browser can analyze React Suspense boundaries with actionability scoring:\n\n| Blocker Kind | Weight | Actionability |\n|--------------|--------|---------------|\n| ClientHook | 7 | 90% |\n| RequestApi | 6 | 88% |\n| ServerFetch | 5 | 82% |\n| Cache | 4 | 74% |\n| Stream | 3 | 60% |\n| Unknown | 2 | 35% |\n| Framework | 1 | 18% |\n\n**资料来源：** [cli/src/react/suspense.rs]()\n\n## Dashboard Interface\n\nAgent Browser includes a web-based dashboard for visual browser management:\n\n```mermaid\ngraph TD\n    A[Dashboard] --> B[Controls Panel]\n    A --> C[Result Panel]\n    A --> D[Network Panel]\n    A --> E[Extensions Panel]\n    \n    B --> B1[URL Input]\n    B --> B2[Mode Selector]\n    B --> B3[Action Controls]\n    \n    C --> C1[Screenshot View]\n    C --> C2[Snapshot View]\n    C --> C3[Step History]\n    \n    D --> D1[Request List]\n    D --> D2[HAR Export]\n    \n    E --> E1[Extension List]\n    E --> E2[Extension Details]\n```\n\nThe dashboard is built with React and supports:\n\n- Resizable panels for flexible layouts\n- Theme switching (light/dark)\n- Mobile-responsive design\n- Real-time step history\n\n**资料来源：** [examples/environments/app/page.tsx](), [packages/dashboard/src/components/network-panel.tsx](), [packages/dashboard/src/components/extensions-panel.tsx]()\n\n## Best Practices\n\n### 1. Always Snapshot Before Interacting\n\n```bash\n# CORRECT - Snapshot first to get refs\nagent-browser open https://example.com\nagent-browser snapshot -i          # Get refs first\nagent-browser click @e1            # Use ref\n\n# WRONG - Ref doesn't exist yet\nagent-browser open https://example.com\nagent-browser click @e1            # Will fail!\n```\n\n### 2. Re-snapshot After Navigation\n\nElement references change when the page navigates. Always take a new snapshot after clicking links or navigating to new pages.\n\n### 3. Use Sessions for Complex Workflows\n\n```bash\nagent-browser --session my-session open https://example.com\nagent-browser --session my-session snapshot -i\n# ... perform actions ...\nagent-browser --session my-session close\n```\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md]()\n\n## Installation and Setup\n\n### Prerequisites\n\n- Chrome or Chromium browser installed\n- Operating system: macOS, Linux, or Windows\n\n### Installation\n\nRefer to the repository's installation instructions for your platform. Agent Browser is distributed as a native binary with no runtime dependencies.\n\n### Configuration Files\n\n| File | Purpose |\n|------|---------|\n| `~/.agent-browser/` | Default config directory |\n| Sessions | Stored in config directory |\n| Auth Vault | Encrypted credential storage |\n\n**资料来源：** [AGENTS.md]()\n\n## Summary\n\nAgent Browser provides a powerful, efficient, and AI-agent-friendly approach to browser automation. Its key differentiators include:\n\n- **Native Rust implementation** for high performance\n- **Direct CDP communication** without third-party dependencies\n- **Accessibility-tree snapshots** for reliable element targeting\n- **Session management** for complex multi-step workflows\n- **Extensible skills system** for specialized environments\n- **Built-in React DevTools** integration for debugging\n\nThese features make Agent Browser an ideal choice for AI agents, automated testing pipelines, and developer workflows requiring precise browser control.\n\n---\n\n<a id='installation-guide'></a>\n\n## Installation Guide\n\n### 相关页面\n\n相关主题：[Introduction to Agent Browser](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/vercel-labs/agent-browser/blob/main/README.md)\n- [AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n- [skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/flags.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/flags.rs)\n</details>\n\n# Installation Guide\n\n## Overview\n\nThe agent-browser project is a native Rust CLI tool designed for browser automation, providing AI agents with reliable web interaction capabilities. Unlike traditional browser automation tools that rely on Node.js wrappers, agent-browser delivers a fast, lightweight solution built directly in Rust with Chrome/Chromium support via Chrome DevTools Protocol (CDP). The installation process handles downloading the necessary Chrome browser binaries, setting up platform-specific binaries, and configuring dependencies for the dashboard UI.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n## Prerequisites\n\n### System Requirements\n\nBefore installing agent-browser, ensure your system meets the following requirements:\n\n| Requirement | Details |\n|-------------|---------|\n| **Operating System** | macOS, Linux, or Windows (7 platform binaries built) |\n| **Chrome/Chromium** | Required for browser automation functionality |\n| **Rust Toolchain** | Required for building from source |\n| **Node.js/pnpm** | Required for dashboard development |\n\nThe project builds all 7 platform binaries during CI/CD, including native binaries for different architectures. Chrome is downloaded directly from Chrome for Testing during the installation process, eliminating the need for system-installed Chrome browsers.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n### Required Dependencies\n\n| Dependency | Purpose | Installation Method |\n|------------|---------|---------------------|\n| Chrome/Chromium | Browser automation target | Auto-downloaded via `install` command |\n| Cargo/Rust | Building CLI from source | [rustup.rs](https://rustup.rs) |\n| pnpm | Dashboard package management | `npm install -g pnpm` |\n\n## Installation Methods\n\n### Method 1: npm Package Installation (Recommended)\n\nThe recommended installation method uses the npm registry for cross-platform compatibility:\n\n```bash\nnpm install -g @agent-browser/cli\n```\n\nAfter installation, you must run the setup command to download Chrome binaries:\n\n```bash\nagent-browser install\n```\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n### Method 2: Building from Source\n\nFor development or customization, build the CLI from source:\n\n```bash\n# Clone the repository\ngit clone https://github.com/vercel-labs/agent-browser.git\ncd agent-browser\n\n# Install dependencies and build\ncd cli && cargo build --release\n```\n\nThe Rust codebase architecture follows a modular structure:\n\n```graph TD\n    A[cli/src/native/] --> B[daemon/]\n    A --> C[actions/]\n    A --> D[browser/]\n    A --> E[CDP client/]\n    A --> F[snapshot/]\n    A --> G[state/]\n```\n\nThe `--engine` flag allows selecting between Chrome and Lightpanda browser engines, providing flexibility in automation scenarios.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n### Method 3: Docker Installation\n\nFor containerized environments, Docker builds are supported:\n\n```bash\n# Build from the project's Dockerfile\ndocker build -t agent-browser -f docker/Dockerfile.build .\n```\n\nDocker installation is particularly useful for CI/CD pipelines and reproducible automation environments where system dependencies need to be isolated.\n\n## Post-Installation Setup\n\n### Chrome Binary Download\n\nAfter installing the CLI package, you must download the Chrome binary:\n\n```bash\nagent-browser install\n```\n\nThis command retrieves Chrome directly from Chrome for Testing, ensuring a compatible and up-to-date browser binary is available for all automation tasks. The `--download-path` flag can specify a custom location:\n\n```bash\nagent-browser --download-path /custom/path install\n```\n\n资料来源：[cli/src/flags.rs:45-49](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/flags.rs)\n\n### Verifying Installation\n\nVerify the installation by checking the version and available commands:\n\n```bash\nagent-browser --version\nagent-browser --help\n```\n\nThe CLI provides comprehensive command documentation through the help system:\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser open <url>` | Open a URL in the browser |\n| `agent-browser snapshot` | Capture accessibility tree with element refs |\n| `agent-browser click @<ref>` | Click element by reference |\n| `agent-browser skills get <name>` | Retrieve skill documentation |\n| `agent-browser install` | Download Chrome binaries |\n\n资料来源：[cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n\n## Skill Documentation Loading\n\nAgent-browser uses a skill-based documentation system that loads content dynamically based on the installed version:\n\n```bash\n# Load core workflows and common patterns\nagent-browser skills get core\n\n# Include full command reference and templates\nagent-browser skills get core --full\n\n# List all available skills\nagent-browser skills list\n```\n\nAvailable specialized skills:\n\n| Skill | Purpose |\n|-------|---------|\n| `electron` | Electron desktop apps (VS Code, Slack, Discord, Figma) |\n| `slack` | Slack workspace automation |\n| `dogfood` | Exploratory testing and QA |\n| `vercel-sandbox` | Agent-browser inside Vercel Sandbox microVMs |\n| `agentcore` | AWS Bedrock AgentCore cloud browsers |\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n## Platform-Specific Considerations\n\n### macOS\n\nOn macOS, if you encounter security prompts about unsigned applications, you may need to allow the application in System Preferences > Security & Privacy, or run:\n\n```bash\nxattr -d com.apple.quarantine /path/to/agent-browser\n```\n\n### Linux\n\nLinux distributions require WebKit/GTK dependencies for Chrome. Install via your package manager:\n\n```bash\n# Debian/Ubuntu\nsudo apt-get install libgtk-3-0 libnss3\n\n# Fedora\nsudo dnf install gtk3 nss\n```\n\n### Windows\n\nWindows installations automatically configure the required runtime dependencies. Ensure Windows Subsystem for Linux (WSL) compatibility if running in hybrid environments.\n\n## Running Tests\n\nAfter installation, verify the setup by running the test suite:\n\n```bash\n# Unit tests (fast, no Chrome required)\ncd cli && cargo test\n\n# End-to-end tests (requires Chrome installed)\ncd cli && cargo test e2e -- --ignored --test-threads=1\n```\n\nThe project contains approximately 320 unit tests and 18 e2e tests. E2E tests launch real headless Chrome instances and must run serially to avoid instance contention.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n## Troubleshooting\n\n### Chrome Download Failures\n\nIf the `install` command fails to download Chrome:\n\n1. Check network connectivity to `Chrome for Testing`\n2. Verify write permissions to the download directory\n3. Use `--download-path` to specify an alternative location with proper permissions\n\n### Permission Denied Errors\n\nEnsure the agent-browser binary has execute permissions:\n\n```bash\nchmod +x /path/to/agent-browser\n```\n\n### Engine Selection\n\nIf Chrome automation fails, try specifying the engine explicitly:\n\n```bash\nagent-browser --engine chrome open https://example.com\n```\n\nThe `--engine` flag supports Chrome (default) and Lightpanda engines for different automation scenarios.\n\n## Next Steps\n\nAfter successful installation:\n\n1. Load core skill documentation: `agent-browser skills get core --full`\n2. Open a test URL: `agent-browser open https://example.com`\n3. Capture a snapshot: `agent-browser snapshot -i`\n4. Explore specialized skills for your use case\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n---\n\n<a id='element-references'></a>\n\n## Element References System\n\n### 相关页面\n\n相关主题：[State Inspection Commands](#state-inspection-commands), [Interaction Commands](#interaction-commands)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# Element References System\n\nThe Element References System is a core mechanism in agent-browser that provides stable, human-readable identifiers for DOM elements during browser automation tasks. Instead of relying on fragile CSS selectors or XPath expressions, the system assigns unique reference IDs (such as `@e1`, `@e2`) that persist across page states and can be used reliably in subsequent automation commands.\n\n## Overview\n\nElement references serve as the primary interface between automation scripts and the browser's accessibility tree. When a snapshot is taken, each interactive element receives a reference ID that can be used in commands like `click`, `fill`, `type`, and `get` without requiring re-selection.\n\n```mermaid\ngraph TD\n    A[Browser Page] --> B[snapshot Command]\n    B --> C[Accessibility Tree Traversal]\n    C --> D[Element Identification]\n    D --> E[Reference Assignment]\n    E --> F[@e1 @e2 @e3 ...]\n    F --> G[Automation Commands]\n    G --> H[click @e1]\n    G --> I[fill @e2]\n    G --> J[get text @e3]\n```\n\n## Reference Notation Format\n\nElement references follow a standardized notation format that encodes element metadata:\n\n```\n@e1 [tag type=\"value\"] \"text content\" placeholder=\"hint\"\n│    │   │             │               │\n│    │   │             │               └─ Additional attributes\n│    │   │             └─ Visible text\n│    │   └─ Key attributes shown\n│    └─ HTML tag name\n└─ Unique ref ID\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n### Reference Components\n\n| Component | Description | Example |\n|-----------|-------------|---------|\n| `@eN` | Unique reference identifier | `@e1`, `@e42` |\n| Tag | HTML element type | `button`, `input`, `link` |\n| Type attribute | Element type classification | `type=\"email\"`, `type=\"password\"` |\n| Text content | Visible text on element | `\"Submit\"`, `\"Log in\"` |\n| Placeholder | Input placeholder text | `placeholder=\"Email\"` |\n\n## Common Reference Patterns\n\nThe snapshot system recognizes common element patterns and standardizes their reference notation:\n\n```bash\n@e1 [button] \"Submit\"                    # Button with text\n@e2 [input type=\"email\"]                 # Email input\n@e3 [input type=\"password\"]              # Password input\n@e4 [a href=\"/page\"] \"Link Text\"         # Anchor link\n@e5 [select]                             # Dropdown\n@e6 [textarea] placeholder=\"Message\"     # Text area\n@e7 [div class=\"modal\"]                  # Container element\n@e8 [img alt=\"Logo\"]                     # Image with alt text\n@e9 [checkbox] checked                   # Checked checkbox\n@e10 [radio] selected                    # Selected radio button\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## Snapshot Command Options\n\nThe `snapshot` command generates element references with various filtering and formatting options:\n\n```bash\nagent-browser snapshot                    # Full tree (verbose)\nagent-browser snapshot -i                 # Interactive elements only (preferred)\nagent-browser snapshot -i -u              # Include href URLs on links\nagent-browser snapshot -i -c              # Compact mode (no empty structural nodes)\nagent-browser snapshot -i -d 3            # Cap depth at 3 levels\nagent-browser snapshot -s \"#main\"         # Scope to a CSS selector\nagent-browser snapshot -i --json          # Machine-readable output\n```\n\n资料来源：[skill-data/core/SKILL.md]()\n\n### Option Reference\n\n| Option | Purpose | Use Case |\n|--------|---------|----------|\n| `-i` | Interactive elements only | Preferred for automation |\n| `-u` | Include href URLs | When link destinations matter |\n| `-c` | Compact output | Complex pages with many empty nodes |\n| `-d N` | Depth limit | Focus on specific page sections |\n| `-s SELECTOR` | CSS scope | Target specific page regions |\n| `--json` | JSON format | Programmatic processing |\n\n## Element Reference Commands\n\nElement references are used with various commands to interact with page elements:\n\n### Direct Element Commands\n\n```bash\nagent-browser click @e1                   # Click element\nagent-browser click @e1 --new-tab          # Click and open in new tab\nagent-browser fill @e2 \"text\"             # Fill input field\nagent-browser type @e2 \"text\"             # Type character by character\nagent-browser press Enter                 # Press key on focused element\n```\n\n### State Inspection Commands\n\n```bash\nagent-browser get text @e1                # Get visible text\nagent-browser get html @e1                # Get innerHTML\nagent-browser get attr @e1 href           # Get specific attribute\nagent-browser get value @e1               # Get input value\nagent-browser get title                   # Get page title\nagent-browser get url                     # Get current URL\nagent-browser get count \".item\"           # Count matching elements\n```\n\n### State Checking Commands\n\nThe `is` command verifies element states:\n\n```bash\nagent-browser is visible @e1\nagent-browser is enabled @e1\nagent-browser is checked @e1\n```\n\n资料来源：[cli/src/output.rs]()\n\n## Find Command and Locators\n\nThe `find` command provides an alternative to snapshot-based reference acquisition by locating elements using various criteria:\n\n```bash\nagent-browser find <locator> <value> <action> [text]\n```\n\n### Supported Locators\n\n| Locator | Description | Example |\n|---------|-------------|---------|\n| `role` | ARIA role selector | `find role button click` |\n| `text` | Text content match | `find text \"Submit\" click` |\n| `label` | Label text association | `find label \"Email\" fill` |\n| `placeholder` | Placeholder attribute | `find placeholder \"Search\"` |\n| `alt` | Alt text (images) | `find alt \"Logo\" click` |\n| `title` | Title attribute | `find title \"Help\" click` |\n| `testid` | Test identifier | `find testid \"submit-btn\" click` |\n| `first` | First matching selector | `find first button click` |\n| `last` | Last matching selector | `find last link click` |\n| `nth` | Nth matching element | `find nth 5 button click` |\n\n资料来源：[cli/src/commands.rs]()\n\n### Find Command Options\n\n| Option | Purpose |\n|--------|---------|\n| `--exact` | Perform exact string matching |\n| `--name <name>` | Filter by accessible name (role locator) |\n\n## Action Dispatch System\n\nElement reference commands are dispatched to handlers through the action routing system:\n\n```mermaid\ngraph LR\n    A[Command Input] --> B[\"dispatch(\\\"click\\\", state)\"]\n    B --> C{Match Action}\n    C -->|click| D[handle_click]\n    C -->|fill| E[handle_fill]\n    C -->|get| F[handle_get]\n    C -->|is| G[handle_is]\n    C -->|find| H[handle_find]\n```\n\nThe action router maps command strings to their respective handlers in the native daemon:\n\n```rust\n\"click\" => handle_dispatch(cmd, state).await,\n\"fill\" => handle_dispatch(cmd, state).await,\n\"get\" => handle_dispatch(cmd, state).await,\n\"is\" => handle_dispatch(cmd, state).await,\n\"find\" => handle_dispatch(cmd, state).await,\n```\n\n资料来源：[cli/src/native/actions.rs]()\n\n### Available Element Actions\n\n| Action | Handler | Purpose |\n|--------|---------|---------|\n| `click` | `handle_dispatch` | Mouse click |\n| `fill` | `handle_dispatch` | Fill input with text |\n| `type` | `handle_dispatch` | Character-by-character typing |\n| `press` | `handle_dispatch` | Keyboard press |\n| `hover` | `handle_dispatch` | Mouse hover |\n| `select` | `handle_dispatch` | Select dropdown option |\n| `check` | `handle_dispatch` | Check checkbox/radio |\n| `uncheck` | `handle_dispatch` | Uncheck checkbox |\n| `focus` | `handle_dispatch` | Focus element |\n| `blur` | `handle_dispatch` | Blur element |\n\n## Iframe Support\n\nElement references automatically handle iframe content. When a snapshot is taken, iframe elements are resolved and their child accessibility trees are included inline:\n\n```bash\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Checkout\"\n# @e2 [Iframe] \"payment-frame\"\n#   @e3 [input] \"Card number\"\n#   @e4 [input] \"Expiry\"\n#   @e5 [button] \"Pay\"\n# @e6 [button] \"Cancel\"\n```\n\nReferences to elements inside iframes carry frame context, allowing direct interactions without manual frame switching:\n\n```bash\nagent-browser click @e3                    # Works inside iframe\nagent-browser fill @e4 \"12/25\"\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## Best Practices\n\n### Always Snapshot Before Interacting\n\n```bash\n# CORRECT\nagent-browser open https://example.com\nagent-browser snapshot -i          # Get refs first\nagent-browser click @e1            # Use ref\n\n# WRONG\nagent-browser open https://example.com\nagent-browser click @e1            # Ref doesn't exist yet!\n```\n\n### Re-Snapshot After Navigation\n\n```bash\nagent-browser click @e5            # Navigates to new page\nagent-browser snapshot -i          # Get new refs\nagent-browser click @e1            # Use new refs\n```\n\n### Re-Snapshot After Dynamic Changes\n\n```bash\nagent-browser click @e1            # Opens dropdown\nagent-browser snapshot -i          # See dropdown items\nagent-browser click @e7            # Select item\n```\n\n### Snapshot Specific Regions\n\nFor complex pages, snapshot specific areas to reduce noise:\n\n```bash\n# Snapshot just a form\nagent-browser snapshot @e9\n```\n\n## Session-Dependent References\n\nElement references are session-dependent and may vary between browser sessions. The same element on the same page might receive different reference IDs in different sessions:\n\n| Element | Typical Ref Range | How to Find |\n|---------|------------------|-------------|\n| Home tab | e10-e20 | `snapshot -i \\| grep \"Home\"` |\n| DMs tab | e10-e20 | `snapshot -i \\| grep \"DMs\"` |\n| Activity tab | e10-e20 | `snapshot -i \\| grep \"Activity\"` |\n| Search | e5-e10 | `snapshot -i \\| grep \"Search\"` |\n| More unreads | e20-e30 | `snapshot -i \\| grep \"More unreads\"` |\n| Channel refs | e30+ | `snapshot -i \\| grep \"channel-name\"` |\n\n资料来源：[skill-data/slack/references/slack-tasks.md]()\n\n## Architecture Summary\n\n```mermaid\ngraph TD\n    subgraph \"CLI Layer\"\n        A[User Command] --> B[commands.rs Parser]\n        B --> C[Command Dispatch]\n    end\n    \n    subgraph \"Native Daemon\"\n        C --> D[actions.rs Router]\n        D --> E[State Manager]\n        E --> F[CDP Client]\n    end\n    \n    subgraph \"Browser Layer\"\n        F --> G[Chrome DevTools Protocol]\n        G --> H[Accessibility Tree]\n    end\n    \n    subgraph \"Reference Generation\"\n        H --> I[Element ID Assignment]\n        I --> J[@eN Reference Labels]\n    end\n    \n    J --> K[Snapshot Output]\n    K --> L[Automation Commands]\n```\n\nThe Element References System provides the foundation for reliable browser automation by abstracting DOM complexity behind human-readable identifiers that remain stable across page states and navigation events.\n\n---\n\n<a id='architecture-overview'></a>\n\n## Architecture Overview\n\n### 相关页面\n\n相关主题：[Daemon and CDP Protocol](#daemon-and-cdp), [Introduction to Agent Browser](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/mod.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/mod.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/native/stream/websocket.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/websocket.rs)\n- [cli/src/native/react/suspense.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/react/suspense.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/connection.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/connection.rs)\n</details>\n\n# Architecture Overview\n\nagent-browser is a Rust-based browser automation framework that provides high-performance browser control through native CDP (Chrome DevTools Protocol) communication. The system is designed for AI agent integration, enabling reliable and observable browser automation.\n\n## System Architecture\n\nThe architecture follows a layered approach with clear separation between the CLI interface, daemon process, and browser engine.\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        CLI[CLI Interface]\n        Dashboard[Web Dashboard]\n    end\n\n    subgraph \"Daemon Layer\"\n        WS[WebSocket Server]\n        Dispatcher[Action Dispatcher]\n        State[State Manager]\n    end\n\n    subgraph \"CDP Layer\"\n        CDP[CDP Client]\n        Protocol[Protocol Handler]\n    end\n\n    subgraph \"Browser Engine\"\n        Chrome[Chrome/Chromium]\n        Lightpanda[Lightpanda]\n    end\n\n    CLI --> WS\n    Dashboard --> WS\n    WS --> Dispatcher\n    Dispatcher --> CDP\n    CDP --> Chrome\n    CDP --> Lightpanda\n    Dispatcher --> State\n```\n\n## Core Components\n\n### Daemon Architecture\n\nThe browser automation daemon is the central coordinator that manages browser sessions and handles command dispatching. It runs as a persistent process that maintains browser state across multiple operations.\n\n**Key Responsibilities:**\n\n| Component | Responsibility |\n|-----------|----------------|\n| WebSocket Server | Accepts client connections with origin validation |\n| Action Dispatcher | Routes commands to appropriate handlers |\n| State Manager | Maintains session state and snapshots |\n| CDP Client | Manages protocol-level communication |\n\n资料来源：[cli/src/native/mod.rs]()\n\n### Action Dispatch System\n\nThe action system provides a comprehensive set of browser automation commands. Actions are dispatched based on command type and handle specific browser operations.\n\n**Action Categories:**\n\n| Category | Commands |\n|----------|----------|\n| Navigation | `goto`, `back`, `forward`, `reload`, `waitforurl`, `waitforloadstate` |\n| Interaction | `click`, `fill`, `press`, `select`, `check`, `uncheck`, `multiselect` |\n| Content | `snapshot`, `innertext`, `innerhtml`, `gettext`, `getattribute` |\n| State | `cookies_get`, `cookies_set`, `storage_get`, `storage_set` |\n| Network | `route`, `unroute`, `requests`, `har` |\n| React Debug | `react_tree`, `react_inspect`, `react_renders_start` |\n\n资料来源：[cli/src/native/actions.rs:1-50]()\n\n### CDP Client Layer\n\nThe CDP (Chrome DevTools Protocol) client handles low-level communication with the browser engine. This abstraction allows the system to work with different browser engines through a unified interface.\n\n**Supported Engines:**\n\n| Engine | Selection Flag |\n|--------|----------------|\n| Chrome/Chromium | `--engine chrome` (default) |\n| Lightpanda | `--engine lightpanda` |\n\n资料来源：[cli/src/native/mod.rs]()\n\n## Communication Protocol\n\n### WebSocket Server\n\nThe daemon exposes a WebSocket server for client communication. Security is enforced through origin validation.\n\n```mermaid\ngraph LR\n    Client[Client App] -->|WebSocket| OriginCheck[Origin Check]\n    OriginCheck -->|Allowed| Accept[Accept Connection]\n    OriginCheck -->|Blocked| Reject[403 Forbidden]\n```\n\n**Origin Validation:**\n\nThe server validates the `Origin` header on incoming WebSocket requests. Connections from disallowed origins receive a `403 Forbidden` response before any data exchange occurs.\n\n```rust\nif !is_allowed_origin(origin.as_deref()) {\n    return Err(reject); // Status: FORBIDDEN\n}\n```\n\n资料来源：[cli/src/native/stream/websocket.rs:15-30]()\n\n### Request/Response Flow\n\nAll commands follow a request-response pattern:\n\n1. Client sends JSON command via WebSocket\n2. Server validates origin\n3. Dispatcher routes to appropriate handler\n4. Handler executes CDP operation\n5. Result returned as JSON response\n\n## State Management\n\n### Session State\n\nThe daemon maintains persistent state for each browser session:\n\n| State Component | Description |\n|-----------------|-------------|\n| Tabs | Active tab list and current tab reference |\n| Frame | Current frame hierarchy |\n| Viewport | Window dimensions |\n| Recording | Video recording status |\n\n资料来源：[cli/src/native/stream/websocket.rs:5-15]()\n\n### Snapshot System\n\nThe snapshot system provides accessibility-tree based page representation with stable element references (`@e1`, `@e2`, etc.) for reliable element selection across page mutations.\n\n**Best Practice:** Always snapshot before interacting with elements, as refs change after navigation or dynamic content changes.\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## React Inspection System\n\nFor React-based applications, the daemon provides specialized inspection capabilities:\n\n### Blocker Detection\n\nThe system identifies React Suspense boundaries and classifies them by impact:\n\n| Blocker Kind | Weight | Actionability |\n|--------------|--------|---------------|\n| ClientHook | 7 | 90 |\n| RequestApi | 6 | 88 |\n| ServerFetch | 5 | 82 |\n| Cache | 4 | 74 |\n| Stream | 3 | 60 |\n| Unknown | 2 | 35 |\n| Framework | 1 | 18 |\n\n### Boundary Classification\n\n| Boundary Kind | Description |\n|---------------|-------------|\n| RouteSegment | Next.js/App Router segment boundary |\n| ExplicitSuspense | User-declared `<Suspense>` component |\n| Component | Implicit boundary from component structure |\n\n资料来源：[cli/src/native/react/suspense.rs:30-60]()\n\n## CLI Architecture\n\nThe CLI provides both interactive and scripted access to browser automation:\n\n### Command Structure\n\n```\nagent-browser <command> [args]\n```\n\n**Primary Command Groups:**\n\n| Group | Purpose |\n|-------|---------|\n| `agent-browser open` | Navigate to URL |\n| `agent-browser <action>` | Execute automation action |\n| `agent-browser set` | Configure browser settings |\n| `agent-browser network` | Manage network interception |\n| `agent-browser state` | Save/load/restore sessions |\n| `agent-browser tab` | Manage browser tabs |\n| `agent-browser screenshot` | Capture page images |\n| `agent-browser install` | Download Chrome |\n\n资料来源：[cli/src/output.rs]()\n\n## Dashboard Architecture\n\nThe web-based dashboard provides visual monitoring and control:\n\n```mermaid\ngraph TD\n    Dashboard[Dashboard App] -->|API| Daemon\n    Dashboard -->|Display| Results[screenshots/snapshots]\n    Dashboard -->|Controls| Form[Control Form]\n```\n\n**Dashboard Features:**\n\n- Resizable split view (controls + results)\n- Responsive layout for mobile/desktop\n- Real-time screenshot display with base64 encoding\n- Snapshot viewer with step history\n- Step-by-step playback of automation sequences\n\n资料来源：[packages/dashboard/src/components/extensions-panel.tsx]()\n\n## Installation and Dependencies\n\n### Chrome Installation\n\nThe `install` command downloads Chrome directly from Chrome for Testing:\n\n```bash\nagent-browser install\n```\n\nThis ensures the Chrome binary is available for CDP communication without requiring system-wide Chrome installation.\n\n## Testing Architecture\n\n### Unit Tests\n\nFast tests (~320) that verify individual components without Chrome dependency:\n\n```bash\ncd cli && cargo test\n```\n\n### End-to-End Tests\n\nIntegration tests that launch real headless Chrome:\n\n```bash\ncd cli && cargo test e2e -- --ignored --test-threads=1\n```\n\n**Requirements:**\n\n- Chrome must be installed\n- Tests run serially to avoid browser instance contention\n\n## Security Considerations\n\n| Aspect | Implementation |\n|--------|----------------|\n| Origin Validation | WebSocket connections validated before acceptance |\n| Session Isolation | Each session maintains separate state |\n| Credential Storage | Authentication vault for secure credential handling |\n\n## Summary\n\nagent-browser implements a clean three-tier architecture:\n\n1. **Client Layer** - CLI and dashboard provide user interfaces\n2. **Daemon Layer** - Rust-based server handles command dispatch and state\n3. **CDP Layer** - Browser-agnostic protocol client enables Chrome/Lightpanda support\n\nThe design prioritizes reliability (stable element refs), observability (snapshots, screenshots, video recording), and extensibility (skill-based system for specialized automation tasks).\n\n---\n\n<a id='daemon-and-cdp'></a>\n\n## Daemon and CDP Protocol\n\n### 相关页面\n\n相关主题：[Architecture Overview](#architecture-overview), [Browser Engine Integration](#browser-engines)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/cdp/client.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/cdp/client.rs)\n- [cli/src/native/cdp/chrome.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/cdp/chrome.rs)\n- [cli/src/native/stream/mod.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/mod.rs)\n- [cli/src/native/stream/websocket.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/websocket.rs)\n- [cli/src/native/stream/cdp_loop.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/cdp_loop.rs)\n- [cli/cdp-protocol/browser_protocol.json](https://github.com/vercel-labs/agent-browser/blob/main/cli/cdp-protocol/browser_protocol.json)\n- [cli/cdp-protocol/js_protocol.json](https://github.com/vercel-labs/agent-browser/blob/main/cli/cdp-protocol/js_protocol.json)\n</details>\n\n# Daemon and CDP Protocol\n\n## Overview\n\nThe agent-browser project implements a native Rust-based browser automation daemon that communicates with Chrome/Chromium browsers via the Chrome DevTools Protocol (CDP). The architecture separates the automation logic from browser control through WebSocket-based CDP connections, enabling AI agents to interact with web pages through a CLI interface.\n\n**Architecture Layer Diagram:**\n\n```mermaid\ngraph TD\n    A[CLI Interface] --> B[Action Dispatcher]\n    B --> C[CDP Client]\n    C --> D[WebSocket Stream]\n    D --> E[CDP Loop Handler]\n    E --> F[Chrome Browser Instance]\n    \n    G[CDP Protocol Files] --> F\n    H[Generated CDP Types] --> C\n```\n\n## Daemon Architecture\n\n### Native Daemon Components\n\nThe daemon lives in `cli/src/native/` and handles all browser automation tasks. The main components include:\n\n| Component | Location | Purpose |\n|-----------|----------|---------|\n| Daemon | `cli/src/native/daemon/` | Process management and state coordination |\n| Actions | `cli/src/native/actions.rs` | Command handlers for browser operations |\n| Browser | `cli/src/native/browser/` | Browser instance lifecycle |\n| CDP Client | `cli/src/native/cdp/client.rs` | Protocol communication |\n| CDP Loop | `cli/src/native/stream/cdp_loop.rs` | Message processing loop |\n\n资料来源：[cli/src/native/actions.rs](cli/src/native/actions.rs)\n\n### Action Dispatch\n\nThe action handler maps command names to their implementation functions. Supported actions include:\n\n```rust\nlet result = match action {\n    \"launch\" => handle_launch(cmd, state).await,\n    \"navigate\" => handle_navigate(cmd, state).await,\n    \"url\" => handle_url(state).await,\n    \"cdp_url\" => handle_cdp_url(state),\n    \"inspect\" => handle_inspect(state).await,\n    \"title\" => handle_title(state).await,\n    \"content\" => handle_content(state).await,\n    \"evaluate\" => handle_evaluate(cmd, state).await,\n    \"close\" => handle_close(state).await,\n    \"snapshot\" => handle_snapshot(cmd, state).await,\n    \"screenshot\" => handle_screenshot(cmd, state).await,\n    \"click\" => handle_click(cmd, state).await,\n    \"dblclick\" => handle_dblclick(cmd, state).await,\n    \"fill\" => handle_fill(cmd, state).await,\n    \"type\" => handle_type(cmd, state).await,\n    \"press\" => handle_press(cmd, state).await,\n    \"hover\" => handle_hover(cmd, state).await,\n    \"scroll\" => handle_scroll(cmd, state).await,\n    // ... additional actions\n};\n```\n\n资料来源：[cli/src/native/actions.rs:50-75](cli/src/native/actions.rs)\n\n### Browser Engine Selection\n\nThe `--engine` flag selects between Chrome and Lightpanda browsers. Chrome is downloaded from Chrome for Testing via the `install` command.\n\n## CDP Protocol Implementation\n\n### Protocol Files\n\nThe CDP protocol definitions are stored in JSON format:\n\n| File | Description |\n|------|-------------|\n| `browser_protocol.json` | Core browser domains (Page, Network, Runtime, etc.) |\n| `js_protocol.json` | JavaScript debugging domains |\n\n资料来源：[cli/cdp-protocol/browser_protocol.json](cli/cdp-protocol/browser_protocol.json)\n\n### Auto-Generated Types\n\nCDP types are auto-generated from protocol JSON files:\n\n```rust\n/// Auto-generated CDP types from protocol JSON files in `cdp-protocol/`.\n///\n/// To populate: download `browser_protocol.json` and `js_protocol.json` from\n/// <https://github.com/nicolo-ribaudo/nicolo-ribaudo.github.io/> (or any\n/// Chromium source) into `cli/cdp-protocol/` and rebuild.\n#[allow(clippy::upper_case_acronyms)]\npub mod generated {\n    include!(concat!(env!(\"OUT_DIR\"), \"/cdp_generated.rs\"));\n}\n```\n\n资料来源：[cli/src/native/cdp/types.rs](cli/src/native/cdp/types.rs)\n\n### CDP Client Structure\n\nThe CDP client manages communication with the browser:\n\n```mermaid\ngraph LR\n    A[Command] --> B[CDP Client]\n    B --> C[WebSocket Writer]\n    C --> D[Browser CDP Endpoint]\n    \n    E[Browser Events] --> F[WebSocket Reader]\n    F --> G[Event Handler]\n    G --> H[State Updates]\n```\n\n## WebSocket Communication\n\n### Stream Module Architecture\n\nThe WebSocket communication is handled by the stream module located in `cli/src/native/stream/`:\n\n| Module | File | Purpose |\n|--------|------|---------|\n| Stream Core | `cli/src/native/stream/mod.rs` | Stream trait definitions and utilities |\n| WebSocket | `cli/src/native/stream/websocket.rs` | WebSocket connection handling |\n| CDP Loop | `cli/src/native/stream/cdp_loop.rs` | CDP message processing loop |\n\n### WebSocket Connection\n\nThe WebSocket module establishes and maintains connections to the Chrome DevTools endpoint:\n\n```mermaid\nsequenceDiagram\n    participant CLI as CLI Command\n    participant Client as CDP Client\n    participant WS as WebSocket\n    participant Chrome as Chrome Browser\n    \n    CLI->>Client: connect(url)\n    Client->>WS: establish_connection()\n    WS->>Chrome: WebSocket Handshake\n    Chrome-->>WS: 101 Switching Protocols\n    WS-->>Client: Connected\n    \n    loop Message Exchange\n        CLI->>Client: send_command()\n        Client->>WS: write_message()\n        WS->>Chrome: CDP JSON Message\n        Chrome-->>WS: CDP Response/Event\n        WS-->>Client: read_message()\n        Client-->>CLI: Result\n    end\n```\n\n### CDP Loop Handler\n\nThe CDP loop processes incoming messages and manages the event queue:\n\n- Handles CDP events from the browser\n- Routes responses to pending command callbacks\n- Manages connection state and reconnection logic\n\n资料来源：[cli/src/native/stream/cdp_loop.rs](cli/src/native/stream/cdp_loop.rs)\n\n## Browser Connection\n\n### Connection Methods\n\nThe daemon supports multiple connection methods:\n\n| Method | Command | Use Case |\n|--------|---------|----------|\n| Launch new browser | `agent-browser open` | Fresh browser instance |\n| Connect to existing | `agent-browser connect 9222` | Attach to running browser |\n\n```bash\n# Launch with navigation\nagent-browser open <url>\n\n# Connect to running browser on specific port\nagent-browser connect 9222\n\n# Launch without navigation (clean slate)\nagent-browser open\n```\n\n### CDP WebSocket URL\n\nThe CDP WebSocket URL can be retrieved programmatically:\n\n```bash\nagent-browser cdp_url\n```\n\nThis returns the WebSocket debugger URL for programmatic browser attachment.\n\n### Browser Version Info\n\nThe connection retrieves browser metadata:\n\n```rust\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct BrowserVersionInfo {\n    #[serde(rename = \"webSocketDebuggerUrl\")]\n    pub web_socket_debugger_url: Option<String>,\n    #[serde(rename = \"Browser\")]\n    pub browser: Option<String>,\n}\n```\n\n资料来源：[cli/src/native/cdp/types.rs](cli/src/native/cdp/types.rs)\n\n## CDP Protocol Domains\n\n### Supported Domains\n\nThe agent-browser supports CDP domains for:\n\n| Domain | Purpose | Key Commands |\n|--------|---------|--------------|\n| Page | Page navigation and loading | navigate, reload, back, forward |\n| Runtime | JavaScript execution | evaluate, callFunctionOn |\n| DOM | DOM manipulation | getDocument, describeNode |\n| Input | User input simulation | dispatchEvent, insertText |\n| Network | Network request interception | setRequestInterception, getResponseBody |\n| Target | Browser target management | createTarget, attachToTarget |\n\n### Browser Automation Actions\n\nThe following high-level actions are available via CDP:\n\n```bash\n# Navigation\nagent-browser open <url>\nagent-browser back\nagent-browser forward\nagent-browser reload\n\n# DOM Interaction\nagent-browser click @e1\nagent-browser fill @e2 \"text\"\nagent-browser type @e3 \"input\"\nagent-browser hover @e4\nagent-browser scroll down 500\n\n# State Queries\nagent-browser snapshot\nagent-browser screenshot\nagent-browser get text @e1\nagent-browser get attr @e1 href\n\n# JavaScript\nagent-browser evaluate \"document.title\"\n```\n\n## Error Handling\n\n### WebDriver Fallback\n\nThe daemon gracefully handles unsupported actions when using WebDriver backend:\n\n```rust\nErr(anyhow::anyhow!(\n    \"Action '{}' is not supported on the WebDriver backend\",\n    action\n))\n```\n\n### CDP Error Propagation\n\nCDP errors are propagated through the action chain, enabling detailed error messages for debugging failed browser operations.\n\n## Performance Considerations\n\n### Session Management\n\n- Each browser session maintains a persistent CDP connection\n- Sessions can be named and persisted for multi-session workflows\n- State persistence allows resuming automation tasks\n\n### Network Idle Detection\n\nThe daemon supports waiting for network idle states:\n\n```bash\nagent-browser wait --load networkidle\n```\n\nThis is essential for SPAs and applications with dynamic content loading.\n\n## Security Model\n\n### Credential Management\n\nThe daemon provides a secure credential vault for browser authentication:\n\n```bash\nagent-browser set credentials <user> <pass>\n```\n\n### Cookie Management\n\nCookies can be set from various formats:\n\n```bash\nagent-browser cookies set --curl <file> [--domain <host>]\n```\n\nAuto-detects JSON, cURL, and Cookie-header file formats.\n\n## Extension Points\n\n### Custom CDP Scripts\n\nExecute arbitrary JavaScript in the browser context:\n\n```bash\nagent-browser addscript <script>\nagent-browser addinitscript <script>\n```\n\n### Custom Styles\n\nInject CSS for visual testing:\n\n```bash\nagent-browser addstyle <css>\n```\n\n## Summary\n\nThe Daemon and CDP Protocol architecture enables agent-browser to provide a performant, Rust-native browser automation solution. By implementing direct CDP communication over WebSockets, the project avoids dependencies on Node.js wrappers like Playwright or Puppeteer while maintaining full compatibility with Chrome's DevTools Protocol capabilities.\n\nThe separation of concerns between the action dispatcher, CDP client, and WebSocket stream layers ensures maintainability and enables future extensions for additional browser engines and protocol features.\n\n---\n\n<a id='navigation-commands'></a>\n\n## Navigation Commands\n\n### 相关页面\n\n相关主题：[Interaction Commands](#interaction-commands), [State Inspection Commands](#state-inspection-commands)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n</details>\n\n# Navigation Commands\n\nNavigation Commands in agent-browser provide the fundamental mechanisms for controlling browser state, page loading, and session management. These commands enable AI agents and automated scripts to interact with web pages by controlling navigation flow, managing browser windows, and handling page lifecycle events.\n\n## Overview\n\nThe Navigation Commands subsystem handles all operations related to:\n\n- **Browser Launch and Shutdown** — Initialize and terminate browser instances\n- **Page Navigation** — Navigate to URLs, handle history traversal, and manage SPA routing\n- **Session Management** — Connect to existing browser instances via CDP protocol\n- **Pre-navigation Setup** — Configure browser state before initial page load\n\n```mermaid\ngraph TD\n    A[User Command] --> B{Command Type}\n    B -->|open/goto/navigate| C[Parse URL & Flags]\n    B -->|back/forward/reload| D[History Action]\n    B -->|pushstate| E[SPA Navigation]\n    B -->|connect| F[CDP Connection]\n    B -->|close| G[Cleanup Session]\n    \n    C --> H{URL Protocol?}\n    H -->|http/https| I[Direct Navigation]\n    H -->|about/data/file| I\n    H -->|none specified| J[Prepend https://]\n    \n    I --> K[Execute Navigation]\n    D --> L[Browser History API]\n    E --> M[History PushState + Events]\n    F --> N[Remote CDP Session]\n    G --> O[Close All Tabs/Session]\n    \n    K --> P[Return Result JSON]\n    L --> P\n    M --> P\n    N --> P\n    O --> P\n```\n\n## Core Navigation Commands\n\n### `open` — Launch Browser\n\nLaunches a new browser instance. When called without a URL, it opens about:blank and allows staging browser state before the first navigation.\n\n**Usage:**\n\n```bash\nagent-browser open\nagent-browser open <url>\n```\n\n| Variant | Behavior |\n|---------|----------|\n| `open` (no args) | Launch on about:blank; allows `network route`, `cookies set`, or `addinitscript` before first navigation |\n| `open <url>` | Launch and immediately navigate to the specified URL |\n\n**URL Auto-prepend Logic:**\n\nThe CLI automatically prepends `https://` if no protocol is specified. Supported protocols include:\n\n| Protocol | Example |\n|----------|---------|\n| `https://` | `https://example.com` |\n| `http://` | `http://localhost:3000` |\n| `about:` | `about:blank`, `about:version` |\n| `data:` | `data:text/html,<h1>Hello</h1>` |\n| `file://` | `file:///path/to/page.html` |\n| `chrome-extension://` | `chrome-extension://...` |\n| `chrome://` | `chrome://version` |\n\n```rust\nlet url_lower = url.to_lowercase();\nlet url = if url_lower.starts_with(\"http://\")\n    || url_lower.starts_with(\"https://\")\n    || url_lower.starts_with(\"about:\")\n    || url_lower.starts_with(\"data:\")\n    || url_lower.starts_with(\"file:\")\n    || url_lower.starts_with(\"chrome-extension://\")\n    || url_lower.starts_with(\"chrome://\")\n{\n    url.to_string()\n} else {\n    format!(\"https://{}\", url)\n};\n```\n\n资料来源：[cli/src/commands.rs:35-50](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n\n### `goto` / `navigate` — Navigate to URL\n\nAliases for navigation to a specific page. Both commands require a URL argument.\n\n```bash\nagent-browser goto https://example.com\nagent-browser navigate example.com  # auto-prepends https://\n```\n\n资料来源：[cli/src/commands.rs:25-30](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n\n### `pushstate` — SPA Client-side Navigation\n\nPerforms client-side navigation in Single Page Applications (SPA) using `history.pushState`. This command triggers the appropriate navigation events that modern frameworks like Next.js rely on.\n\n```bash\nagent-browser pushstate <url>\n```\n\n**Behavior:**\n\n1. Calls `history.pushState` with the target URL\n2. Dispatches `popstate` and `navigate` events\n3. Auto-detects `window.next.router.push` for Next.js applications and triggers RSC fetch\n\n```bash\nagent-browser pushstate /dashboard\nagent-browser pushstate /products/123\n```\n\n### `back` — Go Back\n\nNavigates the current tab backward in browser history.\n\n```bash\nagent-browser back\n```\n\n### `forward` — Go Forward\n\nNavigates the current tab forward in browser history.\n\n```bash\nagent-browser forward\n```\n\n### `reload` — Reload Page\n\nReloads the current page, respecting cache settings.\n\n```bash\nagent-browser reload\n```\n\n### `close` — Close Browser\n\nCloses the browser instance and terminates the session.\n\n```bash\nagent-browser close\nagent-browser close --all\n```\n\n| Flag | Behavior |\n|------|----------|\n| (default) | Close current session |\n| `--all` | Close all browser sessions |\n\n### `connect` — CDP Remote Connection\n\nConnects to an existing browser instance via Chrome DevTools Protocol (CDP) port.\n\n```bash\nagent-browser connect <port>\n```\n\n```bash\nagent-browser connect 9222  # Connect to browser on port 9222\n```\n\n## Pre-navigation Setup (One-turn Batch)\n\nFor scenarios requiring state staging before the first navigation (e.g., blocking scripts, setting cookies), agent-browser supports batch operations:\n\n```bash\nagent-browser batch \\\n  '[\"open\"]' \\\n  '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n  '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n  '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\nThis pattern:\n\n1. Opens browser on about:blank\n2. Registers a network route to abort all script resources\n3. Sets cookies from a curl-format cookie file\n4. Navigates to the target URL\n\n资料来源：[skill-data/core/references/commands.md:18-26](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n\n## Command Dispatch Architecture\n\nThe command dispatch system maps command strings to handler functions:\n\n```rust\n\"open\" | \"goto\" | \"navigate\" => handle_navigation(cmd, rest, flags, state).await,\n\"back\" => handle_back(cmd, state).await,\n\"forward\" => handle_forward(cmd, state).await,\n\"reload\" => handle_reload(cmd, state).await,\n\"pushstate\" => handle_pushstate(cmd, rest, state).await,\n\"close\" | \"quit\" | \"exit\" => handle_close(cmd, rest, state).await,\n\"connect\" => handle_connect(cmd, rest, state).await,\n```\n\n资料来源：[cli/src/native/actions.rs:30-45](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n\n## Navigation Command Response Format\n\nAll navigation commands return a JSON response indicating success or failure:\n\n**Success Response:**\n\n```json\n{\n  \"id\": \"session-id\",\n  \"action\": \"navigate\",\n  \"url\": \"https://example.com\"\n}\n```\n\n**Error Response (Missing URL):**\n\n```json\n{\n  \"error\": \"MissingArguments\",\n  \"context\": \"goto\",\n  \"message\": \"Expected URL argument\"\n}\n```\n\n## Flags for Navigation Commands\n\n| Flag | Applies To | Purpose |\n|------|------------|---------|\n| `--headed` | `open` | Launch browser in headed (visible) mode |\n| `--wait-until <event>` | `goto`, `navigate`, `open` | Wait for navigation event (load, domcontentloaded, networkidle) |\n| `--provider <name>` | All navigation | Specify CDP provider (e.g., vercel-sandbox) |\n| `--session <name>` | All commands | Use a specific named session |\n\n```bash\nagent-browser open --headed\nagent-browser goto https://example.com --wait-until networkidle\n```\n\n## Common Usage Patterns\n\n### Basic Navigation Flow\n\n```bash\nagent-browser open https://example.com\nagent-browser snapshot -i\nagent-browser click @e1\nagent-browser back\n```\n\n### Debugging with Pre-navigation Setup\n\n```bash\n# Block all third-party scripts\nagent-browser open\nagent-browser network route \"*\" --abort --resource-type script\nagent-browser goto https://example.com\n```\n\n### SPA Navigation with Framework Detection\n\n```bash\nagent-browser open https://my-nextjs-app.com\nagent-browser click @e5  # Navigate to another route\nagent-browser pushstate /new-route  # Trigger client-side navigation\nagent-browser snapshot -i\n```\n\n## Session and Tab Management\n\nNavigation commands operate within the context of a session. Each session can contain multiple tabs:\n\n| Command | Purpose |\n|---------|---------|\n| `tab new [url]` | Open a new tab |\n| `tab list` | List all open tabs |\n| `tab <n>` | Switch to tab by index |\n| `tab close` | Close current tab |\n\n```bash\nagent-browser tab new\nagent-browser tab new https://example.com\nagent-browser tab 2\nagent-browser tab close\n```\n\n## Implementation Details\n\n### URL Parsing in `commands.rs`\n\nThe navigation handler in `cli/src/commands.rs` performs the following steps:\n\n1. **Argument Extraction** — Scans command arguments for the first non-flag value as URL\n2. **Protocol Validation** — Checks if URL starts with a supported protocol scheme\n3. **Auto-prepend** — Adds `https://` prefix if no protocol detected\n4. **Command Construction** — Builds JSON command payload with action type and URL\n\n```mermaid\nsequenceDiagram\n    User->>CLI: agent-browser goto example.com\n    CLI->>Parser: Parse \"goto\" command\n    Parser->>URL Validator: Check \"example.com\"\n    URL Validator->>URL Validator: No protocol prefix\n    URL Validator-->>Parser: Prepend https://\n    Parser->>Builder: Build navigate command\n    Builder->>Browser: Execute navigation\n    Browser-->>User: JSON response\n```\n\n## Related Commands\n\n| Command Category | Commands |\n|------------------|----------|\n| **State Inspection** | `snapshot`, `screenshot`, `get` |\n| **Element Interaction** | `click`, `fill`, `type`, `press` |\n| **Network Control** | `network route`, `cookies`, `storage` |\n| **Browser Settings** | `set viewport`, `set geo`, `set offline` |\n\n---\n\n<a id='interaction-commands'></a>\n\n## Interaction Commands\n\n### 相关页面\n\n相关主题：[Navigation Commands](#navigation-commands), [State Inspection Commands](#state-inspection-commands), [Element References System](#element-references)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/interaction.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/interaction.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# Interaction Commands\n\nInteraction Commands are the core primitives that enable AI agents to programmatically control and manipulate web pages in the agent-browser system. These commands provide atomic operations for clicking elements, entering text, scrolling, and capturing page state through an accessibility-tree based reference system.\n\n## Architecture Overview\n\nThe interaction system follows a command dispatch pattern where incoming commands are routed to appropriate handlers based on their operation type. The architecture separates concerns between command parsing, execution, and output formatting.\n\n```mermaid\ngraph TD\n    A[User/Agent Input] --> B[Command Parser]\n    B --> C[actions.rs Dispatcher]\n    C --> D[interaction.rs Handlers]\n    D --> E[CDP Protocol Layer]\n    E --> F[Browser Engine]\n    F --> G[Page Response]\n    G --> H[output.rs Formatter]\n    H --> I[Terminal/Agent]\n    \n    C -.->|click, fill, type, scroll| D\n    C -.->|mouse, keyboard| D\n    C -.->|snapshot, screenshot| D\n```\n\n### Component Responsibilities\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| Command Dispatcher | `actions.rs` | Routes commands to handlers |\n| Interaction Handlers | `interaction.rs` | Executes atomic browser operations |\n| Output Formatter | `output.rs` | Formats and presents results |\n| CDP Layer | Native | Chrome DevTools Protocol communication |\n\n## Element Reference System\n\nInteraction commands use an element reference system (`@e1`, `@e2`, etc.) to identify targets on the page. These references are obtained through snapshot operations and represent unique identifiers in the accessibility tree.\n\n```mermaid\ngraph LR\n    A[Page HTML] --> B[Accessibility Tree]\n    B --> C[Snapshot Command]\n    C --> D[@e1 button \"Submit\"]\n    C --> E[@e2 input \"Email\"]\n    D --> F[Click @e1]\n    E --> G[Fill @e2 \"text\"]\n```\n\n**Reference Format:**\n```\n@e1 [tag type=\"value\"] \"text content\" placeholder=\"hint\"\n│    │   │             │               │\n│    │   │             │               └─ Additional attributes\n│    │   │             └─ Visible text\n│    │   └─ Key attributes shown\n│    └─ HTML tag name\n└─ Unique ref ID\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md:1-50]()\n\n## Core Interaction Commands\n\n### Element Selection Commands\n\n| Command | Description | Parameters |\n|---------|-------------|------------|\n| `find` | Find elements by locator | `<locator> <value> [action] [text]` |\n| `count` | Count matching elements | `<selector>` |\n| `is` | Check element state | `<what> <selector>` |\n\n**Locators supported:** `role`, `text`, `label`, `placeholder`, `alt`, `title`, `testid`, `first`, `last`, `nth`\n\n资料来源：[cli/src/output.rs:1-20]()\n\n### Mouse Commands\n\n```mermaid\ngraph TD\n    A[mouse] --> B[move <x> <y>]\n    A --> C[down <btn>]\n    A --> D[up <btn>]\n    A --> E[wheel <dy> <dx>]\n    \n    B --> F[Dispatch mousemove event]\n    C --> G[Dispatch mousedown event]\n    D --> H[Dispatch mouseup event]\n    E --> I[Dispatch wheel event]\n```\n\n| Command | Description |\n|---------|-------------|\n| `mouse move <x> <y>` | Move cursor to coordinates |\n| `mouse down [btn]` | Press mouse button (default: left) |\n| `mouse up [btn]` | Release mouse button |\n| `mouse wheel <dy> [dx]` | Scroll wheel (delta Y/X) |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Keyboard Commands\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `type` | Type text (with key events) | `type @e1 \"hello\"` |\n| `press` | Press special key | `press Enter` |\n| `setvalue` | Set input value directly | `setvalue @e1 \"value\"` |\n\n**Special Keys:** `Enter`, `Tab`, `Escape`, `Backspace`, `ArrowUp`, `ArrowDown`, `ArrowLeft`, `ArrowRight`, `F1-F12`, `Control`, `Alt`, `Shift`\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Scroll Commands\n\n| Command | Description |\n|---------|-------------|\n| `scroll down <px>` | Scroll down by pixels |\n| `scroll up <px>` | Scroll up by pixels |\n| `scroll left <px>` | Scroll left by pixels |\n| `scroll right <px>` | Scroll right by pixels |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n### State Inspection Commands\n\n```mermaid\ngraph TD\n    A[get command] --> B{Property Type}\n    B -->|attr| C[Get attribute value]\n    B -->|value| D[Get input value]\n    B -->|text| E[Get visible text]\n    B -->|html| F[Get innerHTML]\n    B -->|title| G[Get page title]\n    B -->|url| H[Get current URL]\n    B -->|box| I[Get bounding box]\n    B -->|styles| J[Get computed styles]\n```\n\n| Command | Description |\n|---------|-------------|\n| `get text <ref>` | Get visible text of element |\n| `get value <ref>` | Get input field value |\n| `get attr <ref> <name>` | Get specific attribute |\n| `get html <ref>` | Get innerHTML |\n| `get title` | Get page title |\n| `get url` | Get current URL |\n| `get box <ref>` | Get bounding box coordinates |\n| `get styles <ref>` | Get computed CSS styles |\n| `get cdp-url` | Get CDP debugging URL |\n\n资料来源：[cli/src/output.rs:1-20]()\n\n## Click Variations\n\nThe click command supports several modifiers for different interaction patterns:\n\n| Command | Description |\n|---------|-------------|\n| `click <ref>` | Standard left-click |\n| `click <ref> --new-tab` | Click and open in new tab |\n| `click <ref> --double` | Double-click |\n| `click <ref> --right` | Right-click (context menu) |\n| `tap <ref>` | Mobile-style tap (touch events) |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Form Input Commands\n\n### Text Input\n\n```mermaid\ngraph LR\n    A[Input Commands] --> B[type]\n    A --> C[fill]\n    A --> D[setvalue]\n    \n    B --> E[Triggers keydown/keyup]\n    C --> F[Direct value set]\n    D --> G[Direct value assignment]\n```\n\n| Command | Description | Behavior |\n|---------|-------------|----------|\n| `fill <ref> <text>` | Fill input field | Replaces existing value, triggers input events |\n| `type <ref> <text>` | Type text character by character | Triggers full key event sequence |\n| `setvalue <ref> <value>` | Set value directly | Bypasses sanitization |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Other Input Types\n\n| Command | Target | Description |\n|---------|--------|-------------|\n| `check <ref>` | Checkbox | Check a checkbox |\n| `uncheck <ref>` | Checkbox | Uncheck a checkbox |\n| `select <ref> <value>` | Select | Select option by value |\n| `upload <ref> <path>` | File input | Upload file |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n## Wait and Timing\n\nWait commands control execution timing for dynamic content:\n\n| Command | Description |\n|---------|-------------|\n| `wait <ms>` | Wait for milliseconds |\n| `wait --load` | Wait for page load event |\n| `wait networkidle` | Wait for network to be idle |\n| `wait --load networkidle` | Combined load + network idle |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Command Chaining with Batches\n\nMultiple commands can be executed in a single batch operation for efficiency:\n\n```mermaid\ngraph TD\n    A[Batch Command] --> B[Parse JSON Array]\n    B --> C[Execute Sequentially]\n    C --> D[Command 1]\n    D --> E[Command 2]\n    E --> F[Command N]\n    F --> G[Return Combined Results]\n```\n\nExample batch command:\n```bash\nagent-browser batch \\\n  '[\"open\"]' \\\n  '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n  '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n  '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n资料来源：[skill-data/core/references/commands.md:1-30]()\n\n## State Management\n\n### Browser State Commands\n\n| Command | Description |\n|---------|-------------|\n| `is <state> <ref>` | Check if element is `visible`, `enabled`, `checked` |\n| `is open` | Check if browser is open |\n| `is closed` | Check if browser is closed |\n\n### Visibility and Enabled States\n\n```mermaid\ngraph TD\n    A[Check State] --> B{Element Type}\n    B -->|Button/Input| C[Check: enabled]\n    B -->|Checkbox| D[Check: checked]\n    B -->|Any| E[Check: visible]\n    \n    C --> F[Return boolean]\n    D --> F\n    E --> F\n```\n\n资料来源：[cli/src/output.rs:1-20]()\n\n## Advanced Interactions\n\n### React-Specific Commands\n\nFor React applications, specialized inspection commands are available:\n\n| Command | Description |\n|---------|-------------|\n| `react_tree` | Get component tree |\n| `react_inspect <ref>` | Inspect React component |\n| `react_renders_start` | Start render tracking |\n| `react_renders_stop` | Stop render tracking |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Dialog Handling\n\n```mermaid\ngraph TD\n    A[Dialog Appears] --> B{dialog type}\n    B -->|alert| C[handle_alert]\n    B -->|confirm| D[handle_confirm]\n    B -->|prompt| E[handle_prompt]\n    \n    C --> F[dialog accept --message \"text\"]\n    D --> F\n    E --> G[dialog accept \"input\"]\n    G --> F\n```\n\n| Command | Description |\n|---------|-------------|\n| `dialog accept [message]` | Accept dialog with optional message |\n| `dialog dismiss` | Cancel/dismiss dialog |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n## Common Workflow Patterns\n\n### Basic Navigation and Interaction\n\n```bash\n# 1. Open page\nagent-browser open https://example.com\n\n# 2. Take snapshot to get refs\nagent-browser snapshot -i\n\n# 3. Interact with elements\nagent-browser click @e1\nagent-browser fill @e2 \"user@example.com\"\nagent-browser press Enter\n\n# 4. Wait for response\nagent-browser wait 1000\n```\n\n### Form Submission Flow\n\n```bash\nagent-browser open https://example.com/login\nagent-browser snapshot -i\nagent-browser fill @e_email \"test@example.com\"\nagent-browser fill @e_password \"secretpassword\"\nagent-browser click @e_submit\nagent-browser wait --load networkidle\nagent-browser screenshot result.png\n```\n\n### Error Handling Pattern\n\n```bash\n# Check if operation succeeded\nagent-browser is visible @e_success_message\n\n# If failed, inspect state\nagent-browser snapshot -i\nagent-browser get text @e_error_message\n```\n\n## Command Reference Summary\n\n### Interaction Operations Matrix\n\n| Category | Commands |\n|----------|----------|\n| **Mouse** | `click`, `mouse move/down/up/wheel`, `dblclick` |\n| **Keyboard** | `type`, `press`, `setvalue` |\n| **Scroll** | `scroll up/down/left/right` |\n| **Forms** | `fill`, `check`, `uncheck`, `select`, `upload` |\n| **Inspect** | `get text/value/attr/html/title/url/box/styles` |\n| **State** | `find`, `count`, `is` |\n| **Timing** | `wait` |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n资料来源：[cli/src/output.rs:1-20]()\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Best Practices\n\n1. **Always snapshot before interacting** - Element refs are obtained from snapshots and must be fetched after page load or navigation\n2. **Re-snapshot after navigation** - New pages have new accessibility trees with different refs\n3. **Use appropriate wait conditions** - Wait for `networkidle` when content loads dynamically\n4. **Prefer `fill` over `type`** - `fill` is faster and more reliable for automated workflows\n5. **Use `type` for form validation** - When you need key events to trigger validation logic\n\n资料来源：[skill-data/core/references/snapshot-refs.md:1-50]()\n\n---\n\n<a id='state-inspection-commands'></a>\n\n## State Inspection Commands\n\n### 相关页面\n\n相关主题：[Interaction Commands](#interaction-commands), [Element References System](#element-references)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/native/state.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/state.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# State Inspection Commands\n\nState Inspection Commands in agent-browser provide mechanisms to examine, retrieve, and manage browser state including cookies, web storage, session data, console errors, and DOM element properties. These commands enable debugging, state verification, and persistence of browser sessions across operations.\n\n## Architecture Overview\n\nState inspection in agent-browser operates through a layered architecture where the CLI command layer parses user input, the actions layer dispatches to appropriate handlers, and the browser backend (CDP/WebDriver) executes the actual state retrieval.\n\n```mermaid\ngraph TD\n    A[CLI Input] --> B[commands.rs Parser]\n    B --> C[actions.rs Dispatcher]\n    C --> D[State Handlers]\n    C --> E[Storage Handlers]\n    C --> F[Element Handlers]\n    D --> G[Browser Backend<br/>Chrome CDP / WebDriver]\n    E --> G\n    F --> G\n    G --> H[State Output]\n    \n    D -. includes .-> D1[cookies_get/set/clear]\n    D -. includes .-> D2[state_save/load/list/clean]\n    E -. includes .-> E1[storage_get/set/clear]\n    F -. includes .-> F1[gettext/getattr/isvisible]\n```\n\n资料来源：[cli/src/native/actions.rs:1-150]()\n\n## Command Categories\n\nState inspection commands are organized into five primary categories:\n\n| Category | Purpose | Commands |\n|----------|---------|----------|\n| **Cookie Inspection** | Manage HTTP cookies | `cookies_get`, `cookies_set`, `cookies_clear` |\n| **Web Storage** | Inspect localStorage/sessionStorage | `storage_get`, `storage_set`, `storage_clear` |\n| **Session State** | Save/load browser sessions | `state_save`, `state_load`, `state_list`, `state_clean` |\n| **Element Properties** | Query DOM element attributes | `gettext`, `getattribute`, `inputvalue`, `isvisible`, `isenabled`, `ischecked` |\n| **Error Inspection** | Retrieve console errors | `errors` |\n\n资料来源：[cli/src/native/actions.rs:80-100]()\n\n## Cookie Inspection\n\nCookies can be inspected and managed through the `cookies` command family.\n\n### Get Cookies\n\nRetrieves all cookies for the current domain:\n\n```bash\nagent-browser cookies get\n```\n\n### Set Cookie\n\nSets a cookie with explicit parameters:\n\n```bash\nagent-browser cookies set --url <url> --name <name> --value <value> [--domain <domain>] [--path <path>] [--httpOnly] [--secure] [--sameSite <strict|lax|none>] [--expires <timestamp>]\n```\n\n### Set Cookie from File\n\nAuto-detects and imports cookies from JSON, cURL, or Cookie-header format:\n\n```bash\nagent-browser cookies set --curl <file> [--domain <host>]\n```\n\n### Clear Cookies\n\nRemoves all cookies:\n\n```bash\nagent-browser cookies clear\n```\n\n资料来源：[cli/src/output.rs:1-50]()\n\n## Web Storage Inspection\n\nWeb storage commands manage the browser's localStorage and sessionStorage.\n\n### Storage Commands\n\n| Command | Description |\n|---------|-------------|\n| `storage_get` | Retrieve value from localStorage or sessionStorage |\n| `storage_set` | Set a key-value pair in storage |\n| `storage_clear` | Clear all items from selected storage |\n\n```bash\n# Get storage value\nagent-browser storage_get <local|session> <key>\n\n# Set storage value\nagent-browser storage_set <local|session> <key> <value>\n\n# Clear storage\nagent-browser storage_clear <local|session>\n```\n\n资料来源：[cli/src/native/actions.rs:85-90]()\n\n## Session State Management\n\nThe agent-browser maintains persistent state in `~/.agent-browser` (or `<tempdir>/agent-browser` when home directory cannot be resolved).\n\n### State Directory Structure\n\n```mermaid\ngraph LR\n    A[~/.agent-browser] --> B[sessions/]\n    A --> C[auth/]\n    A --> D[encryption.key]\n    B --> E[<session-id>/]\n    E --> F[state.json]\n    E --> G[screenshots/]\n```\n\n资料来源：[cli/src/native/state.rs:80-95]()\n\n### State Commands\n\n| Command | Description |\n|---------|-------------|\n| `state_save` | Save current browser state to disk |\n| `state_load` | Restore browser state from saved file |\n| `state_list` | List all saved states |\n| `state_clean` | Remove states older than specified days |\n| `state_rename` | Rename an existing state |\n\n```bash\n# Save current state\nagent-browser state_save <path> [--name <name>]\n\n# Load saved state\nagent-browser state_load <path>\n\n# List all states\nagent-browser state_list\n\n# Clean old states (default: 30 days)\nagent-browser state_clean [--days <n>]\n\n# Rename a state\nagent-browser state_rename --path <path> --name <new_name>\n```\n\n### State Directory Resolution\n\n```rust\npub fn get_state_dir() -> PathBuf {\n    if let Some(home) = dirs::home_dir() {\n        home.join(\".agent-browser\")\n    } else {\n        std::env::temp_dir().join(\"agent-browser\")\n    }\n}\n\npub fn get_sessions_dir() -> PathBuf {\n    get_state_dir().join(\"sessions\")\n}\n```\n\n资料来源：[cli/src/native/state.rs:80-90]()\n\n## Element Property Inspection\n\nElement inspection commands retrieve properties and states of DOM elements using element references obtained from snapshots.\n\n### Get Text Content\n\nRetrieves the visible text of an element:\n\n```bash\nagent-browser gettext @e1\n```\n\n### Get HTML Content\n\nRetrieves element innerHTML or innerText:\n\n```bash\nagent-browser innerhtml @e1\nagent-browser innertext @e1\n```\n\n### Get Attributes\n\nRetrieves any attribute value from an element:\n\n```bash\nagent-browser getattribute @e1 href\nagent-browser getattribute @e1 src\n```\n\n### Get Input Value\n\nRetrieves the current value of input elements:\n\n```bash\nagent-browser inputvalue @e1\n```\n\n### Check Element State\n\nVerify element state properties:\n\n```bash\nagent-browser isvisible @e1\nagent-browser isenabled @e1\nagent-browser ischecked @e1\n```\n\n### Count Matching Elements\n\nCount elements matching a selector:\n\n```bash\nagent-browser count \".item-class\"\n```\n\n### Get Bounding Box\n\nRetrieve element dimensions and position:\n\n```bash\nagent-browser boundingbox @e1\n```\n\n### Get Styles\n\nRetrieve computed CSS styles:\n\n```bash\nagent-browser styles @e1\n```\n\n资料来源：[cli/src/native/actions.rs:30-60]()\n\n## Find Elements\n\nThe `find` command locates DOM elements using various locator strategies.\n\n### Supported Locators\n\n| Locator | Description | Example |\n|---------|-------------|---------|\n| `role` | Find by ARIA role | `find role button --exact` |\n| `text` | Find by text content | `find text \"Submit\"` |\n| `label` | Find form label | `find label \"Email\"` |\n| `placeholder` | Find by placeholder | `find placeholder \"Search...\"` |\n| `alt` | Find by alt attribute | `find alt \"profile\"` |\n| `title` | Find by title attribute | `find title \"Close\"` |\n| `testid` | Find by test ID | `find testid submit-btn` |\n| `first` | First element matching selector | `find first \".item\"` |\n| `last` | Last element matching selector | `find last \".item\"` |\n\n### Find Command Syntax\n\n```bash\nagent-browser find <locator> <value> [action] [--exact] [--name <name>]\n```\n\n### Examples\n\n```bash\n# Find button by role and click\nagent-browser find role button --exact click\n\n# Find input by placeholder\nagent-browser find placeholder \"email\" fill \"test@example.com\"\n\n# Find link by text\nagent-browser find text \"Learn more\"\n```\n\n资料来源：[cli/src/commands.rs:150-200]()\n\n## Console Error Inspection\n\nRetrieve JavaScript errors logged to the browser console.\n\n### Get Errors\n\n```bash\nagent-browser errors\n```\n\nReturns a list of all console errors captured during the session.\n\n### Console Monitoring\n\nEnable or disable console message capture:\n\n```bash\nagent-browser console enable\nagent-browser console disable\n```\n\n## Snapshot-Based Inspection\n\nSnapshots provide a hierarchical view of the page DOM with element references.\n\n### Snapshot Modes\n\n| Flag | Description |\n|------|-------------|\n| `-i` | Interactive elements only (preferred) |\n| `-u` | Include href URLs on links |\n| `-c` | Compact mode (no empty structural nodes) |\n| `-d <n>` | Cap depth at n levels |\n| `-s <selector>` | Scope to CSS selector |\n| `--json` | Machine-readable JSON output |\n\n### Snapshot Output Format\n\n```\nPage: Example - Log in\nURL: https://example.com/login\n\n@e1 [heading] \"Log in\"\n@e2 [form]\n  @e3 [input type=\"email\"] placeholder=\"Email\"\n  @e4 [input type=\"password\"] placeholder=\"Password\"\n  @e5 [button type=\"submit\"] \"Continue\"\n  @e6 [link] \"Forgot password?\"\n```\n\n### Snapshot Workflow\n\n```mermaid\ngraph TD\n    A[Open Page] --> B[Snapshot -i]\n    B --> C[Parse Element Refs]\n    C --> D[Click @e3]\n    D --> E[Snapshot -i]\n    E --> F[Find Input Fields]\n    F --> G[Fill @e3 \"email\"]\n    G --> H[Fill @e4 \"password\"]\n    H --> I[Click @e5]\n```\n\n资料来源：[skill-data/core/SKILL.md:1-80]()\n\n## Complete Command Reference\n\n### State Inspection Summary\n\n| Command | Category | Description |\n|---------|----------|-------------|\n| `cookies get` | Cookie | List all cookies |\n| `cookies set --name X --value Y` | Cookie | Set a cookie |\n| `cookies clear` | Cookie | Clear all cookies |\n| `storage_get <type> <key>` | Storage | Get storage value |\n| `storage_set <type> <key> <val>` | Storage | Set storage value |\n| `storage_clear <type>` | Storage | Clear storage |\n| `state_save <path>` | Session | Save browser state |\n| `state_load <path>` | Session | Load browser state |\n| `state_list` | Session | List saved states |\n| `state_clean [days]` | Session | Clean old states |\n| `errors` | Console | Get console errors |\n| `gettext @eN` | Element | Get element text |\n| `getattribute @eN <attr>` | Element | Get attribute |\n| `isvisible @eN` | Element | Check visibility |\n| `count <selector>` | Element | Count elements |\n\n资料来源：[cli/src/native/actions.rs:70-100]()\n\n## Usage Patterns\n\n### Inspecting Page State\n\n```bash\n# Full page inspection workflow\nagent-browser open https://example.com\nagent-browser snapshot -i           # Get element refs\nagent-browser get title             # Page title\nagent-browser get url               # Current URL\nagent-browser errors                # Check for console errors\n```\n\n### Verifying Element State\n\n```bash\nagent-browser click @e1             # Click element\nagent-browser wait 500             # Wait for response\nagent-browser isvisible @e2        # Verify visibility\nagent-browser gettext @e3          # Get text content\n```\n\n### Persisting Session State\n\n```bash\nagent-browser open https://app.example.com\nagent-browser cookies set --name session --value abc123\nagent-browser storage_set local user \"john\"\nagent-browser state_save ./my-session   # Persist state\n# Later...\nagent-browser state_load ./my-session  # Restore state\n```\n\n## Summary\n\nState Inspection Commands in agent-browser provide comprehensive capabilities for examining and managing browser state:\n\n- **Cookie Management**: Full CRUD operations on HTTP cookies with file import support\n- **Web Storage**: Access to localStorage and sessionStorage\n- **Session Persistence**: Save, load, list, and clean browser sessions\n- **Element Inspection**: Query text, attributes, states, and styles\n- **Element Location**: Find elements by role, text, label, placeholder, and other attributes\n- **Console Monitoring**: Capture and retrieve JavaScript errors\n\nThese commands work together with the snapshot system to enable precise browser automation workflows with full state observability.\n\n---\n\n<a id='browser-engines'></a>\n\n## Browser Engine Integration\n\n### 相关页面\n\n相关主题：[Daemon and CDP Protocol](#daemon-and-cdp), [Installation Guide](#installation-guide)\n\nThe provided context does not contain the source files specified in the query (lightpanda.rs, discovery.rs, webdriver/mod.rs, safari.rs, ios.rs). Without access to the actual browser engine integration source files, I cannot generate an accurate technical wiki page that properly cites the specified files.\n\nHowever, based on the available context from this repository, I can provide a partial analysis of browser engine-related components:\n\n<details>\n<summary>Related Context Files</summary>\n\nThe following context files provide indirect information about browser engine integration patterns:\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [packages/dashboard/src/components/session-tree.tsx](https://github.com/vercel-labs/agent-browser/blob/main/packages/dashboard/src/components/session-tree.tsx)\n\n</details>\n\n# Browser Engine Integration\n\n> **Note:** This page requires the actual source files for browser engine implementations (`lightpanda.rs`, `discovery.rs`, `webdriver/mod.rs`, `safari.rs`, `ios.rs`) which are not available in the current context. The following represents partial analysis based on indirect evidence.\n\n## Architecture Overview\n\nBased on the available context, agent-browser uses a Chrome DevTools Protocol (CDP) based approach for browser automation:\n\n```\n┌─────────────────┐     CDP/WebSocket      ┌─────────────────┐\n│  agent-browser  │ ──────────────────────▶│  Chrome/Chromium│\n│      CLI        │                        │    Browser      │\n└─────────────────┘                        └─────────────────┘\n        │\n        ├── Session Management\n        ├── Element Reference System (@e1, @e2, ...)\n        └── Command Dispatch\n```\n\n## Supported Browser Contexts\n\n| Context Type | Implementation | Protocol |\n|--------------|----------------|----------|\n| Chrome/Chromium | CDP Native | WebSocket |\n| Electron | CDP Native | WebSocket |\n| Remote Debugging | `--remote-debugging-port` | CDP |\n| Safari (iOS) | WebDriver | W3C WebDriver |\n\n## Session Management\n\nSessions are managed through port-based connections:\n\n```typescript\n// From session-tree.tsx\ninterface Session {\n  port: number;\n  session: string;\n  provider?: string;\n  pending?: boolean;\n}\n```\n\nSessions can be connected via:\n\n```bash\nagent-browser connect 9222\n```\n\n## Command Dispatch Architecture\n\nThe CLI uses a dispatch pattern for handling browser commands:\n\n```rust\n// From cli/src/native/actions.rs (partial)\nmatch subcmd.as_str() {\n    \"click\" => handle_click(cmd, state).await,\n    \"fill\" => handle_fill(cmd, state).await,\n    \"snapshot\" => handle_snapshot(cmd, state).await,\n    \"screenshot\" => handle_screenshot(cmd, state).await,\n    \"get\" => handle_get(cmd, state).await,\n    // ... additional commands\n}\n```\n\n## Browser Engine Providers\n\nBased on the codebase structure, agent-browser supports multiple browser engine providers:\n\n| Provider | File Reference | Purpose |\n|----------|----------------|---------|\n| Lightpanda | `lightpanda.rs` | Lightweight browser engine |\n| Safari | `safari.rs` | macOS/iOS Safari via WebDriver |\n| iOS | `ios.rs` | iOS WebKit via WebDriver |\n| Chrome CDP | `discovery.rs` | Auto-discovery of Chrome instances |\n\n## CDP Discovery Mechanism\n\nThe `discovery.rs` module handles automatic detection of browser instances:\n\n- Scans for Chrome/Chromium processes\n- Identifies remote debugging ports\n- Matches browser version compatibility\n- Establishes WebSocket connections\n\n## WebDriver Integration\n\nFor non-Chrome browsers, WebDriver protocols are used:\n\n```bash\n# Safari WebDriver\nagent-browser set driver safari\n\n# iOS WebDriver  \nagent-browser set driver ios\n```\n\n## Session State Management\n\n| State | Description |\n|-------|-------------|\n| Active | Currently connected and responsive |\n| Pending | Connection in progress |\n| Closed | Session terminated |\n\n## Command Reference for Engine Interaction\n\n```bash\n# Connect to specific port\nagent-browser connect <port>\n\n# Session operations\nagent-browser session new\nagent-browser session list\nagent-browser session close\n\n# Engine-specific settings\nagent-browser set viewport <width> <height>\nagent-browser set device <device-name>\nagent-browser set geo <lat> <lng>\nagent-browser set offline [on|off]\n```\n\n## Limitations\n\nThis page cannot provide complete documentation for browser engine integration without access to:\n\n- `cli/src/native/cdp/lightpanda.rs`\n- `cli/src/native/cdp/discovery.rs`\n- `cli/src/native/webdriver/mod.rs`\n- `cli/src/native/webdriver/safari.rs`\n- `cli/src/native/webdriver/ios.rs`\n\nThese files are required for accurate implementation details about:\n\n- CDP command serialization/deserialization\n- WebDriver protocol mapping\n- Browser-specific quirks handling\n- Session lifecycle management\n\n---\n\n**资料来源:** [cli/src/native/actions.rs:1-20](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n**资料来源:** [packages/dashboard/src/components/session-tree.tsx:1-50](https://github.com/vercel-labs/agent-browser/blob/main/packages/dashboard/src/components/session-tree.tsx)\n**资料来源:** [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n\n---\n\n<a id='authentication'></a>\n\n## Authentication and Session Persistence\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [skill-data/core/references/authentication.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/authentication.md)\n- [skill-data/core/references/session-management.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/session-management.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n</details>\n\n# Authentication and Session Persistence\n\nThis page documents the authentication workflows and session persistence mechanisms in agent-browser, covering how to handle login flows, save/restore authenticated states, manage credentials securely, and persist browser sessions across runs.\n\n## Overview\n\nagent-browser provides multiple layers of authentication and session persistence:\n\n1. **Credential Management** — Store and retrieve login credentials via an encrypted auth vault\n2. **State Persistence** — Save and restore full browser state (cookies, localStorage, sessionStorage)\n3. **Session Management** — Auto-save/restore named sessions without manual file handling\n4. **Profile Persistence** — Use Chrome user data directories for full browser profile persistence\n\nThese mechanisms layer on top of the core CDP (Chrome DevTools Protocol) browser automation, using the underlying Playwright-managed browser infrastructure to serialize and deserialize authentication artifacts.\n\n资料来源：[cli/src/native/actions.rs:action_dispatch](../blob/main/cli/src/native/actions.rs) (dispatch table)\n\n---\n\n## Architecture\n\n### Credential and State Flow\n\n```mermaid\ngraph TD\n    User[User / Agent] -->|agent-browser auth save| Vault[Auth Vault<br/>~/.agent-browser/vault/]\n    User -->|agent-browser state save| StateFile[State File<br/>JSON]\n    User -->|--session-name| AutoSave[Auto-Save Location<br/>~/.agent-browser/sessions/]\n    User -->|--profile| ChromeProfile[Chrome Profile Dir<br/>User Data Directory]\n    \n    Vault -->|auth login| Browser[Browser Instance]\n    StateFile -->|state load| Browser\n    AutoSave -->|auto-restore| Browser\n    ChromeProfile -->|attach| Browser\n    \n    Browser -->|cookies, localStorage| StateFile\n    Browser -->|cookies, localStorage| AutoSave\n    Browser -->|full state| ChromeProfile\n```\n\n### Action Handler Dispatch\n\nThe `actions.rs` module dispatches authentication and persistence commands to dedicated handlers:\n\n| Action | Handler | Purpose |\n|--------|---------|---------|\n| `auth_save` | `handle_auth_save` | Store credentials in vault |\n| `auth_list` | `handle_credentials_list` | List saved credentials |\n| `auth_delete` | `handle_credentials_delete` | Remove credential |\n| `auth_show` | `handle_auth_show` | Display credential details |\n| `auth_login` | `handle_auth_login` | Fill + submit login form |\n| `state_save` | `handle_state_save` | Serialize browser state to JSON |\n| `state_load` | `handle_state_load` | Restore browser state from JSON |\n| `state_list` | `handle_state_list` | List saved state files |\n| `cookies_get` | `handle_cookies_get` | Read cookies |\n| `cookies_set` | `handle_cookies_set` | Write cookies |\n| `cookies_clear` | `handle_cookies_clear` | Clear all cookies |\n| `storage_get` | `handle_storage_get` | Read localStorage/sessionStorage |\n| `storage_set` | `handle_storage_set` | Write to storage |\n| `storage_clear` | `handle_storage_clear` | Clear storage |\n\n资料来源：[cli/src/native/actions.rs:action_dispatch](../blob/main/cli/src/native/actions.rs) (dispatch table lines 35-75)\n\n---\n\n## Authentication Vault\n\nThe auth vault provides secure credential storage at `~/.agent-browser/vault/`. It encrypts credentials at rest using an optional `AGENT_BROWSER_ENCRYPTION_KEY`.\n\n### Saving Credentials\n\n```bash\nagent-browser auth save my-app --url https://app.example.com/login \\\n  --username user@example.com --password-stdin\n# (type password, press Ctrl+D)\n```\n\nThe vault stores credentials keyed by a friendly name (`my-app` in this example). The `--url` flag associates the credential with a specific login page for targeted retrieval.\n\n### Using Saved Credentials\n\n```bash\nagent-browser open https://app.example.com/login\nagent-browser auth login my-app\n```\n\nThe `auth login` command fills the username and password fields, clicks the submit button, and waits for navigation — all automatically using the saved credential set.\n\n资料来源：[skill-data/core/references/authentication.md:auth_vault](../blob/main/skill-data/core/references/authentication.md) (auth vault section)\n\n### Credential Management Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser auth save <name>` | Save credentials to vault |\n| `agent-browser auth login <name>` | Fill + submit login form |\n| `agent-browser auth list` | List all stored credentials |\n| `agent-browser auth show <name>` | Display credential details |\n| `agent-browser auth delete <name>` | Remove credential from vault |\n\n---\n\n## Basic Login Flow\n\nFor sites without saved credentials, a manual login flow uses the snapshot-and-interact pattern:\n\n```bash\n# 1. Navigate to login page\nagent-browser open https://app.example.com/login\nagent-browser wait --load networkidle\n\n# 2. Get interactive elements\nagent-browser snapshot -i\n# Output: @e1 [input type=\"email\"], @e2 [input type=\"password\"], @e3 [button] \"Sign In\"\n\n# 3. Fill and submit\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\nagent-browser click @e3\nagent-browser wait --url \"**/dashboard\"\n\n# 4. Verify success\nagent-browser get url  # Should be dashboard, not login\n```\n\nThe `--load networkidle` wait condition ensures the page is fully loaded before attempting to fill form fields.\n\n资料来源：[skill-data/core/references/authentication.md:basic_login_flow](../blob/main/skill-data/core/references/authentication.md) (basic login flow section)\n\n---\n\n## State Persistence\n\nState persistence serializes the browser's authentication artifacts to a JSON file for reuse across runs.\n\n### State File Format\n\n```json\n{\n  \"cookies\": [...],\n  \"localStorage\": {...},\n  \"sessionStorage\": {...},\n  \"origins\": [...]\n}\n```\n\nThe state file contains cookies, Web Storage API data (`localStorage` and `sessionStorage`), and origin permissions.\n\n### Saving State\n\n```bash\n# After successful login, save state\nagent-browser open https://app.example.com/login\n# ... complete login flow ...\nagent-browser state save ./auth-state.json\n```\n\n### Loading State\n\n```bash\n# Restore authenticated session\nagent-browser state load ./auth-state.json\nagent-browser open https://app.example.com/dashboard\n# Already logged in\n```\n\n### Inline State Loading\n\nYou can also use `--state` to load state at browser launch:\n\n```bash\nagent-browser --state ./auth-state.json open https://app.example.com/dashboard\n```\n\n资料来源：[skill-data/core/references/session-management.md:state_file_contents](../blob/main/skill-data/core/references/session-management.md) (state file contents section)\n\n### State Management Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser state save <path>` | Serialize current state to file |\n| `agent-browser state load <path>` | Restore state from file |\n| `agent-browser state list` | List saved state files |\n\n---\n\n## Session Auto-Persistence\n\nNamed sessions (`--session-name`) provide automatic save/restore without explicit file handling. State is persisted to `~/.agent-browser/sessions/<name>.json` and restored automatically on subsequent runs.\n\n### Basic Usage\n\n```bash\n# First run: login once\nagent-browser --session-name twitter open https://twitter.com\n# ... complete login flow ...\nagent-browser close  # state saved automatically\n\n# Subsequent runs: state auto-restored\nagent-browser --session-name twitter open https://twitter.com\n# Already authenticated\n```\n\n### Session Environment Variable\n\n```bash\nexport AGENT_BROWSER_SESSION_NAME=my-app\nagent-browser open https://app.example.com\n# State auto-saved on close, auto-restored on launch\n```\n\n### Session vs State File Comparison\n\n| Feature | `--session-name` | `--state <file>` |\n|---------|------------------|------------------|\n| File management | Automatic | Manual |\n| Location | `~/.agent-browser/sessions/` | User-specified |\n| Reuse across machines | No (local path) | Yes (if file is shared) |\n| Cleanup | `agent-browser close` | Manual `rm` |\n\n---\n\n## Chrome Profile Persistence\n\nFor full browser profile persistence (cookies, IndexedDB, service workers, cache, extensions), use `--profile` to point agent-browser at a Chrome user data directory.\n\n```bash\n# First run: login once\nagent-browser --profile ~/.myapp-profile open https://app.example.com/login\n# ... complete login flow ...\n\n# All subsequent runs: already authenticated\nagent-browser --profile ~/.myapp-profile open https://app.example.com/dashboard\n```\n\nDifferent profiles isolate authentication between projects or test users:\n\n```bash\nagent-browser --profile ~/.profiles/admin open https://app.example.com\nagent-browser --profile ~/.profiles/viewer open https://app.example.com\n```\n\nOr set via environment variable:\n\n```bash\nexport AGENT_BROWSER_PROFILE=~/.myapp-profile\nagent-browser open https://app.example.com/dashboard\n```\n\nProfile persistence is the most complete form of state preservation, but the profile directory can grow large due to cache and IndexedDB storage.\n\n资料来源：[skill-data/core/references/authentication.md:persistent_profiles](../blob/main/skill-data/core/references/authentication.md) (persistent profiles section)\n\n---\n\n## OAuth and SSO Flows\n\nOAuth flows require handling browser redirects between the app and the identity provider:\n\n```bash\n# Start OAuth flow\nagent-browser open https://app.example.com/auth/google\n\n# Wait for redirect to Google\nagent-browser wait --url \"**/accounts.google.com**\"\nagent-browser snapshot -i\n\n# Fill Google credentials\nagent-browser fill @e1 \"user@gmail.com\"\nagent-browser click @e2  # Next button\nagent-browser wait 2000\nagent-browser snapshot -i\nagent-browser fill @e3 \"password\"\nagent-browser click @e4  # Sign in\n\n# Wait for redirect back\nagent-browser wait --url \"**/app.example.com**\"\n\n# Save authenticated state\nagent-browser state save ./oauth-state.json\n```\n\nThe `wait --url` pattern is essential for OAuth flows, as it pauses execution until the expected redirect occurs.\n\n资料来源：[skill-data/core/references/authentication.md:oauth_sso_flows](../blob/main/skill-data/core/references/authentication.md) (OAuth / SSO flows section)\n\n---\n\n## Two-Factor Authentication\n\nFor 2FA flows, use `--headed` mode to show the browser window so the user can enter the code:\n\n```bash\n# Login with credentials\nagent-browser open https://app.example.com/login --headed\nagent-browser snapshot -i\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\nagent-browser click @e3\n\n# Wait for user to complete 2FA manually (browser is visible)\necho \"Complete 2FA in the browser window...\"\nagent-browser wait --url \"**/dashboard\" --timeout 120000\n\n# Save state after 2FA\nagent-browser state save ./2fa-state.json\n```\n\nThe `--timeout 120000` gives the user up to 2 minutes to complete the 2FA challenge.\n\n资料来源：[skill-data/core/references/authentication.md:two_factor_authentication](../blob/main/skill-data/core/references/authentication.md) (two-factor authentication section)\n\n---\n\n## Cookie-Based Authentication\n\n### Reading Cookies\n\n```bash\nagent-browser cookies get\n```\n\n### Setting Cookies Manually\n\n```bash\nagent-browser cookies set session_token \"abc123xyz\" --domain \"app.example.com\"\nagent-browser open https://app.example.com/dashboard\n```\n\n### Importing Cookies from cURL\n\nImport cookies exported from browser DevTools:\n\n```bash\nagent-browser cookies set --curl cookies.txt --domain example.com\n```\n\nThe `--curl` flag auto-detects JSON, cURL dump, or bare Cookie header formats.\n\n### Clearing Cookies\n\n```bash\nagent-browser cookies clear\n```\n\n---\n\n## Web Storage API\n\n### Reading Storage\n\n```bash\nagent-browser storage get --type localStorage\nagent-browser storage get --type sessionStorage\n```\n\n### Setting Storage Values\n\n```bash\nagent-browser storage set --type localStorage --key \"auth_token\" --value \"xyz789\"\n```\n\n### Clearing Storage\n\n```bash\nagent-browser storage clear --type localStorage\nagent-browser storage clear --type sessionStorage\n```\n\n---\n\n## Authentication Reuse Pattern\n\nA common pattern saves login state once and reuses it across multiple runs:\n\n```bash\n#!/bin/bash\nSTATE_FILE=\"/tmp/auth-state.json\"\n\nif [[ -f \"$STATE_FILE\" ]]; then\n    agent-browser state load \"$STATE_FILE\"\n    agent-browser open https://app.example.com/dashboard\nelse\n    # Perform login\n    agent-browser open https://app.example.com/login\n    agent-browser snapshot -i\n    agent-browser fill @e1 \"$USERNAME\"\n    agent-browser fill @e2 \"$PASSWORD\"\n    agent-browser click @e3\n    agent-browser wait --load networkidle\n\n    # Save for future use\n    agent-browser state save \"$STATE_FILE\"\nfi\n```\n\nThis script checks for existing state, loads it if present, otherwise performs login and saves the state.\n\n资料来源：[skill-data/core/references/session-management.md:authenticated_session_reuse](../blob/main/skill-data/core/references/session-management.md) (authenticated session reuse section)\n\n---\n\n## Best Practices\n\n### 1. Name Sessions Semantically\n\n```bash\n# Good: Clear purpose\nagent-browser --session github-auth open https://github.com\nagent-browser --session docs-scrape open https://docs.example.com\n\n# Avoid: Generic names\nagent-browser --session s1 open https://github.com\n```\n\n### 2. Always Clean Up\n\n```bash\n# Close sessions when done\nagent-browser --session auth close\nagent-browser --session scrape close\n```\n\n### 3. Handle State Files Securely\n\n```bash\n# Don't commit state files (contain auth tokens!)\necho \"*.auth-state.json\" >> .gitignore\n\n# Delete after use\nrm /tmp/auth-state.json\n```\n\n### 4. Use Auth Vault for Credentials\n\nStore credentials in the vault instead of hardcoding in scripts:\n\n```bash\n# Secure\nagent-browser auth login my-app\n\n# Insecure (leaks to shell history)\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\n```\n\n### 5. Timeout Long Sessions\n\n```bash\n# Set timeout for automated scripts\ntimeout 60 agent-browser --session long-task get text body\n```\n\n资料来源：[skill-data/core/references/session-management.md:best_practices](../blob/main/skill-data/core/references/session-management.md) (best practices section)\n\n---\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `AGENT_BROWSER_SESSION_NAME` | Default session name for auto-persistence |\n| `AGENT_BROWSER_PROFILE` | Default Chrome profile directory |\n| `AGENT_BROWSER_ENCRYPTION_KEY` | Encryption key for auth vault (32-byte hex) |\n\n---\n\n## Quick Reference\n\n```bash\n# Save credentials to vault\nagent-browser auth save myapp --url https://app.example.com/login --username user@example.com --password-stdin\n\n# Use saved credentials\nagent-browser open https://app.example.com/login\nagent-browser auth login myapp\n\n# Save/restore state\nagent-browser state save ./auth.json\nagent-browser state load ./auth.json\n\n# Auto-persist session\nagent-browser --session-name myapp open https://app.example.com\n# State auto-saved on close, auto-restored on next run\n\n# Full profile persistence\nagent-browser --profile ~/.myapp-profile open https://app.example.com\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：vercel-labs/agent-browser\n\n摘要：发现 38 个潜在踩坑项，其中 7 个为 high/blocking；最高优先级：安装坑 - 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker。\n\n## 1. 安装坑 · 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_9045278ef5e043dcadccf9288477813c | https://github.com/vercel-labs/agent-browser/issues/1339 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_edbde732c7a7410e96ad0fa301e4222d | https://github.com/vercel-labs/agent-browser/issues/1281 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 3. 配置坑 · 来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab39b89d157047e897e771d2572dfcdd | https://github.com/vercel-labs/agent-browser/issues/1338 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 4. 运行坑 · 来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0896b0b429c641f0b93ca9dcbbee6db8 | https://github.com/vercel-labs/agent-browser/issues/1319 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 5. 安全/权限坑 · 失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1345\n- 证据：failure_mode_cluster:github_issue | fmev_bc39fa851aecda51d6ae79863b570093 | https://github.com/vercel-labs/agent-browser/issues/1345 | Dashboard privileged POST routes should reject cross-origin requests\n\n## 6. 安全/权限坑 · 失败模式：security_permissions: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：Developers may expose sensitive permissions or credentials: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1365\n- 证据：failure_mode_cluster:github_issue | fmev_50f6336937705c962c78ed48a466eb98 | https://github.com/vercel-labs/agent-browser/issues/1365 | `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n## 7. 安全/权限坑 · 来源证据：Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a2b8bb7035dd44e0a9e97dc78186f3b2 | https://github.com/vercel-labs/agent-browser/issues/1361 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 8. 安装坑 · 失败模式：installation: After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：Developers may fail before the first successful local run: After failed close, subsequent open reports success but returns stale content from prior URL\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: After failed close, subsequent open reports success but returns stale content from prior URL. Context: Observed when using node, python, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_fce1ca55e45e13ba327a52473c958037 | https://github.com/vercel-labs/agent-browser/issues/1367 | After failed close, subsequent open reports success but returns stale content from prior URL\n\n## 9. 安装坑 · 失败模式：installation: Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：Developers may fail before the first successful local run: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Chrome 147.0 crashes with \"trap int3\" when running in docker. Context: Observed when using docker, windows, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_de7dc45e4f45905d10cb44680cd26da5 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker, failure_mode_cluster:github_issue | fmev_e97d2c4c42c663165c2763023d5d79e3 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n## 10. 安装坑 · 失败模式：installation: Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：Developers may fail before the first successful local run: Detected: Trojan:Win32/Posilod.EB!cl\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Detected: Trojan:Win32/Posilod.EB!cl. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_11d6daa01783b3f8d6cc4984b34591d9 | https://github.com/vercel-labs/agent-browser/issues/1281 | Detected: Trojan:Win32/Posilod.EB!cl\n\n## 11. 安装坑 · 失败模式：installation: Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：Developers may fail before the first successful local run: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature: `network throttle` for emulating slow connections / per-URL delay. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_af068ec0790d0398008062aef7b5d1a5 | https://github.com/vercel-labs/agent-browser/issues/1372 | Feature: `network throttle` for emulating slow connections / per-URL delay\n\n## 12. 安装坑 · 失败模式：installation: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：Developers may fail before the first successful local run: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills. Context: Observed when using node, playwright, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_1ea0ed85aeff64de383d8fa15586474d | https://github.com/vercel-labs/agent-browser/issues/1351 | High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n## 13. 安装坑 · 失败模式：installation: Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：Developers may fail before the first successful local run: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support XDG Base Directory paths for agent-browser state, config, and installs. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_5bd8394953d7b9c8f00eade661671801 | https://github.com/vercel-labs/agent-browser/issues/1361 | Support XDG Base Directory paths for agent-browser state, config, and installs\n\n## 14. 安装坑 · 失败模式：installation: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：Developers may fail before the first successful local run: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1). Context: Observed when using node, python, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_8b48c64a7c8bd1d363fa81928818b489 | https://github.com/vercel-labs/agent-browser/issues/1348 | Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n## 15. 安装坑 · 失败模式：installation: v0.27.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v0.27.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v0.27.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v0.27.0. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_c5cd290a3adea233428e19624c61cbc4 | https://github.com/vercel-labs/agent-browser/releases/tag/v0.27.0 | v0.27.0\n\n## 16. 安装坑 · 来源证据：After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_20b2fb27e3744303957ee3b14657c6fb | https://github.com/vercel-labs/agent-browser/issues/1367 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 17. 安装坑 · 来源证据：Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_36122bb7094447a7a9b2239bd9c771d7 | https://github.com/vercel-labs/agent-browser/issues/1372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 18. 配置坑 · 失败模式：configuration: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_781294606dea03b40a16f8364175701c | https://github.com/vercel-labs/agent-browser/issues/1349 | ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n## 19. 配置坑 · 失败模式：configuration: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_74962e644ba9c7d489e3bdece3e2a4fc | https://github.com/vercel-labs/agent-browser/issues/1371 | Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n## 20. 配置坑 · 失败模式：configuration: Per-session /api/command should require same-origin or token auth\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Per-session /api/command should require same-origin or token auth\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Per-session /api/command should require same-origin or token auth\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Per-session /api/command should require same-origin or token auth. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6007658713bbd7305ceaadde537b784e | https://github.com/vercel-labs/agent-browser/issues/1344 | Per-session /api/command should require same-origin or token auth\n\n## 21. 配置坑 · 失败模式：configuration: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support enabling WebAuthn for passkey authentication with a virtual authenticator. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6d37cbd32f509cb166bf7a0928a6b0b6 | https://github.com/vercel-labs/agent-browser/issues/688 | Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n## 22. 配置坑 · 来源证据：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_32ddde976ec0445da607d0adffc5df4c | https://github.com/vercel-labs/agent-browser/issues/1349 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 23. 配置坑 · 来源证据：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_1f2a7d9ece1a4bb7bd3d903998370d73 | https://github.com/vercel-labs/agent-browser/issues/1371 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 24. 配置坑 · 来源证据：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6ba5505f7fb14ad7a3bc2b5b88a0b59b | https://github.com/vercel-labs/agent-browser/issues/1373 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 25. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | README/documentation is current enough for a first validation pass.\n\n## 26. 运行坑 · 失败模式：runtime: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is ope...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this runtime risk before relying on the project: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：Developers may hit a documented source-backed failure mode: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target. Context: Observed when using python, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_373b5edde1d9ebc3a89e256d7531b186 | https://github.com/vercel-labs/agent-browser/issues/1373 | `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n## 27. 维护坑 · 失败模式：migration: Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this migration risk before relying on the project: Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：Developers may hit a documented source-backed failure mode: Harden inspect-mode DevTools WebSocket handshakes\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Harden inspect-mode DevTools WebSocket handshakes. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f6db656b77e427d890ba72a1ff380949 | https://github.com/vercel-labs/agent-browser/issues/1347 | Harden inspect-mode DevTools WebSocket handshakes\n\n## 28. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | last_activity_observed missing\n\n## 29. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 30. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 31. 安全/权限坑 · 来源证据：Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6acd97eb554140c28938a0eb08e44c34 | https://github.com/vercel-labs/agent-browser/issues/1345 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 安全/权限坑 · 来源证据：Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab6c062eedaf466d8f40864ca24bf8ea | https://github.com/vercel-labs/agent-browser/issues/1347 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 33. 安全/权限坑 · 来源证据：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_648ff78f18f34d51a44b9176d011738f | https://github.com/vercel-labs/agent-browser/issues/1351 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 34. 安全/权限坑 · 来源证据：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a4a36591a7e45c1b85d35b020e63d5a | https://github.com/vercel-labs/agent-browser/issues/688 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 35. 安全/权限坑 · 来源证据：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_fda08c46f8b5454e8e93b061d6d3c992 | https://github.com/vercel-labs/agent-browser/issues/1348 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_21be9bb1198543e1839dd312b41a3f3c | https://github.com/vercel-labs/agent-browser/issues/1365 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 37. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | issue_or_pr_quality=unknown\n\n## 38. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | release_recency=unknown\n\n<!-- canonical_name: vercel-labs/agent-browser; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "agent-browser",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:1132001614",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/vercel-labs/agent-browser"
        },
        {
          "evidence_id": "art_cccb1b4ae4964f20859d2ae468a3f039",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/vercel-labs/agent-browser#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "agent-browser 说明书",
      "toc": [
        "https://github.com/vercel-labs/agent-browser 项目说明书",
        "目录",
        "Introduction to Agent Browser",
        "Overview",
        "Architecture",
        "Core Concepts",
        "Command Reference",
        "Sessions and State Management",
        "Doramagic 踩坑日志"
      ]
    }
  },
  "quality_gate": {
    "blocking_gaps": [],
    "category_confidence": "medium",
    "compile_status": "ready_for_review",
    "five_assets_present": true,
    "install_sandbox_verified": true,
    "missing_evidence": [],
    "next_action": "publish to Doramagic.ai project surfaces",
    "prompt_preview_boundary_ok": true,
    "publish_status": "publishable",
    "quick_start_verified": true,
    "repo_clone_verified": true,
    "repo_commit": "55f38f4d81981f0191c730005c419958c7d20605",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "pnpm-lock.yaml",
      "package.json",
      "README.md",
      "docs/pnpm-lock.yaml",
      "docs/package.json",
      "docs/tsconfig.json",
      "docs/components.json",
      "docs/public/schema.json",
      "docs/src/lib/utils.ts",
      "docs/src/lib/search-index.ts",
      "docs/src/lib/mdx-to-markdown.ts",
      "docs/src/lib/github.ts",
      "docs/src/lib/page-titles.ts",
      "docs/src/lib/rate-limit.ts",
      "docs/src/lib/docs-navigation.ts",
      "docs/src/lib/page-metadata.ts",
      "docs/src/app/page.mdx",
      "docs/src/app/configuration/page.mdx",
      "docs/src/app/skills/page.mdx",
      "docs/src/app/dashboard/page.mdx",
      "docs/src/app/streaming/page.mdx",
      "docs/src/app/installation/page.mdx",
      "docs/src/app/quick-start/page.mdx",
      "docs/src/app/profiler/page.mdx",
      "docs/src/app/cdp-mode/page.mdx",
      "docs/src/app/snapshots/page.mdx",
      "docs/src/app/native-mode/page.mdx",
      "docs/src/app/sessions/page.mdx",
      "docs/src/app/changelog/page.mdx",
      "docs/src/app/next/page.mdx",
      "docs/src/app/ios/page.mdx",
      "docs/src/app/diffing/page.mdx",
      "docs/src/app/security/page.mdx",
      "docs/src/app/commands/page.mdx",
      "docs/src/app/selectors/page.mdx",
      "docs/src/app/api/docs-markdown/route.ts",
      "docs/src/app/api/docs-chat/route.ts",
      "docs/src/app/api/search/route.ts",
      "docs/src/app/providers/browserless/page.mdx",
      "docs/src/app/providers/kernel/page.mdx"
    ],
    "repo_inspection_verified": true,
    "review_reasons": [],
    "tag_count_ok": true,
    "unsupported_claims": []
  },
  "schema_version": "0.1",
  "user_assets": {
    "ai_context_pack": {
      "asset_id": "ai_context_pack",
      "filename": "AI_CONTEXT_PACK.md",
      "markdown": "# agent-browser - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 agent-browser 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。\n\n## Claim 消费规则\n\n- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。\n- **事实最低状态**：`supported`\n- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。\n- `weak`：只能作为低置信度线索，必须要求用户继续核实。\n- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。\n- `unverified`：不得作为事实使用，应明确说证据不足。\n- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。\n\n## 它最适合谁\n\n- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0004` supported 0.86\n- **希望把专业流程带进宿主 AI 的用户**：仓库包含 Skill 文档。 证据：`skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md`, `skill-data/dogfood/SKILL.md`, `skill-data/electron/SKILL.md` 等 Claim：`clm_0005` supported 0.86\n\n## 它能做什么\n\n- **AI Skill / Agent 指令资产库**（可做安装前预览）：项目包含可被宿主 AI 读取的 Skill 或 Agent 指令文件，可用于把专业流程带入 Claude、Codex、Cursor 等宿主。 证据：`skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md`, `skill-data/dogfood/SKILL.md`, `skill-data/electron/SKILL.md` 等 Claim：`clm_0001` supported 0.86\n- **多宿主安装与分发**（需要安装后验证）：项目包含插件或 marketplace 配置，说明它面向一个或多个 AI 宿主的安装和分发。 证据：`.claude-plugin/marketplace.json` Claim：`clm_0002` supported 0.86\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`AGENTS.md`, `README.md` Claim：`clm_0003` supported 0.86\n\n## 怎么开始\n\n- `npm install -g agent-browser` 证据：`README.md` Claim：`clm_0006` supported 0.86\n- `npm install agent-browser` 证据：`README.md` Claim：`clm_0007` supported 0.86\n- `git clone https://github.com/vercel-labs/agent-browser` 证据：`README.md` Claim：`clm_0008` supported 0.86\n- `npx skills add vercel-labs/agent-browser` 证据：`README.md` Claim：`clm_0009` supported 0.86\n- `npm install -g appium` 证据：`README.md` Claim：`clm_0010` supported 0.86\n- `npx opensrc <package>           # npm package (e.g., npx opensrc zod)` 证据：`AGENTS.md` Claim：`clm_0011` supported 0.86\n- `npx opensrc pypi:<package>      # Python package (e.g., npx opensrc pypi:requests)` 证据：`AGENTS.md` Claim：`clm_0012` supported 0.86\n- `npx opensrc crates:<package>    # Rust crate (e.g., npx opensrc crates:serde)` 证据：`AGENTS.md` Claim：`clm_0013` supported 0.86\n- `npx opensrc <owner>/<repo>      # GitHub repo (e.g., npx opensrc vercel/ai)` 证据：`AGENTS.md` Claim：`clm_0014` supported 0.86\n\n## 继续前判断卡\n\n- **当前建议**：需要管理员/安全审批\n- **为什么**：继续前可能涉及密钥、账号、外部服务或敏感上下文，建议先经过管理员或安全审批。\n\n### 30 秒判断\n\n- **现在怎么做**：需要管理员/安全审批\n- **最小安全下一步**：先跑 Prompt Preview；若涉及凭证或企业环境，先审批再试装\n- **先别相信**：真实输出质量不能在安装前相信。\n- **继续会触碰**：命令执行、宿主 AI 配置、本地环境或项目文件\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0004` supported 0.86\n- **适合人群线索：希望把专业流程带进宿主 AI 的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md`, `skill-data/dogfood/SKILL.md`, `skill-data/electron/SKILL.md` 等 Claim：`clm_0005` supported 0.86\n- **能力存在：AI Skill / Agent 指令资产库**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md`, `skill-data/dogfood/SKILL.md`, `skill-data/electron/SKILL.md` 等 Claim：`clm_0001` supported 0.86\n- **能力存在：多宿主安装与分发**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`.claude-plugin/marketplace.json` Claim：`clm_0002` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`AGENTS.md`, `README.md` Claim：`clm_0003` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0006` supported 0.86\n\n### 现在还不能相信\n\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`.claude-plugin/marketplace.json`, `AGENTS.md`, `skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md` 等\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。 证据：`.claude-plugin/marketplace.json`\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n- **安装命令是否需要网络、权限或全局写入？**（unverified）：这影响企业环境和个人环境的安装风险。 证据：`README.md`\n\n### 继续会触碰什么\n\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`AGENTS.md`, `README.md`\n- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`.claude-plugin/marketplace.json`, `AGENTS.md`, `skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md` 等\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`.claude-plugin/marketplace.json`, `AGENTS.md`, `README.md`\n- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`CHANGELOG.md`, `README.md`, `evals/README.md`, `evals/lib/claude.ts` 等\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：用安装前交互式试用判断工作方式是否匹配，不需要授权或改环境。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）\n- **不要使用真实生产凭证**：环境变量/API key 一旦进入宿主或工具链，可能产生账号和合规风险。（适用：出现 API、TOKEN、KEY、SECRET 等环境线索时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。\n- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。\n- **准备撤销测试 API key 或 token**：测试凭证泄露或误用时，可以快速止损。\n- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。\n\n## 哪些只能预览\n\n- 解释项目适合谁和能做什么\n- 基于项目文档演示典型对话流程\n- 帮助用户判断是否值得安装或继续研究\n\n## 哪些必须安装后验证\n\n- 真实安装 Skill、插件或 CLI\n- 执行脚本、修改本地文件或访问外部服务\n- 验证真实输出质量、性能和兼容性\n\n## 边界与风险判断卡\n\n- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0015` inferred 0.45\n- **宿主 AI 插件或 Skill 规则冲突**：新规则可能改变用户现有宿主 AI 的工作方式。 处理方式：安装前先检查插件 manifest 和 Skill 文件，必要时隔离测试。 证据：`.claude-plugin/marketplace.json` Claim：`clm_0016` supported 0.86\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`AGENTS.md`, `README.md` Claim：`clm_0017` supported 0.86\n- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。\n- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。\n- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。\n\n## 开工前工作上下文\n\n### 加载顺序\n\n- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。\n- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。\n- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。\n- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。\n- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。\n\n### 任务路由\n\n- **AI Skill / Agent 指令资产库**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`skill-data/agentcore/SKILL.md`, `skill-data/core/SKILL.md`, `skill-data/dogfood/SKILL.md`, `skill-data/electron/SKILL.md` 等 Claim：`clm_0001` supported 0.86\n- **多宿主安装与分发**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`.claude-plugin/marketplace.json` Claim：`clm_0002` supported 0.86\n- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`AGENTS.md`, `README.md` Claim：`clm_0003` supported 0.86\n\n### 上下文规模\n\n- 文件总数：315\n- 重要文件覆盖：40/315\n- 证据索引条目：70\n- 角色 / Skill 条目：7\n\n### 证据不足时的处理\n\n- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。\n- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。\n- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。\n- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。\n\n## Prompt Recipes\n\n### 适配判断\n\n- 目标：判断这个项目是否适合用户当前任务。\n- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。\n\n```text\n请基于 agent-browser 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 agent-browser 当作安装前体验资产，而不是已安装工具或真实运行环境。\n\n请严格输出四段：\n1. 先问我 3 个必要问题。\n2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。\n3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。\n4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。\n\n硬性边界：\n- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。\n- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。\n- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。\n- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。\n- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。\n- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。\n\n```\n\n### 角色 / Skill 选择\n\n- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。\n- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。\n\n```text\n请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。\n```\n\n### 风险预检\n\n- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。\n- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。\n\n```text\n请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。\n```\n\n### 宿主 AI 开工指令\n\n- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。\n- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。\n\n```text\n请基于 agent-browser 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 7 个角色 / Skill / 项目文档条目。\n\n- **agentcore**（skill）：Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include \"use agentcore\", \"run on AWS\", \"cloud browser with AWS\", \"bedrock browser\", \"agentcore session\", or any task requiring AWS-hosted browser automation. 激活提示：当用户任务与“agentcore”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/agentcore/SKILL.md`\n- **core**（skill）：Core agent-browser usage guide. Read this before running any agent-browser commands. Covers the snapshot-and-ref workflow, navigating pages, interacting with elements click, fill, type, select , extracting text and data, taking screenshots, managing tabs, handling forms and auth, waiting for content, running multiple browser sessions in parallel, and troubleshooting common failures. Use when the user asks to interac… 激活提示：当用户任务与“core”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/core/SKILL.md`\n- **dogfood**（skill）：Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app/site/platform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be… 激活提示：当用户任务与“dogfood”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/dogfood/SKILL.md`\n- **electron**（skill）：Automate Electron desktop apps VS Code, Slack, Discord, Figma, Notion, Spotify, etc. using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect… 激活提示：当用户任务与“electron”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/electron/SKILL.md`\n- **slack**（skill）：Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction. 激活提示：当用户任务与“slack”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/slack/SKILL.md`\n- **vercel-sandbox**（skill）：Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app Next.js, SvelteKit, Nuxt, Remix, Astro, etc. , wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"… 激活提示：当用户任务与“vercel-sandbox”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skill-data/vercel-sandbox/SKILL.md`\n- **agent-browser**（skill）：Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate… 激活提示：当用户任务与“agent-browser”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skills/agent-browser/SKILL.md`\n\n## 证据索引\n\n- 共索引 70 条证据。\n\n- **AGENTS.md**（documentation）：Instructions for AI coding agents working with this codebase. 证据：`AGENTS.md`\n- **agent-browser**（documentation）：Browser automation CLI for AI agents. Fast native Rust CLI. 证据：`README.md`\n- **agent-browser Daemon Benchmarks**（documentation）：Compares command latency and system metrics between the Node.js daemon published npm version and the Rust native daemon built from source , running inside a Vercel Sandbox https://vercel.com/docs/sandbox microVM. 证据：`benchmarks/README.md`\n- **Skills Evals**（documentation）：Tests whether the thin SKILL.md + CLI-served skills approach works: do agents load the right skill via agent-browser skills get , then produce correct agent-browser commands? 证据：`evals/README.md`\n- **agent-browser Environments**（documentation）：A demo of agent-browser running in a Vercel Sandbox. Pick a URL, take a screenshot or accessibility snapshot, and watch each command execute in real time. 证据：`examples/environments/README.md`\n- **Package**（package_manifest）：{ \"name\": \"agent-browser-benchmarks\", \"version\": \"1.0.0\", \"private\": true, \"type\": \"module\", \"scripts\": { \"bench\": \"tsx bench.ts\" }, \"dependencies\": { \"@vercel/sandbox\": \"^1.8.0\", \"tsx\": \"^4.19.0\" } } 证据：`benchmarks/package.json`\n- **Package**（package_manifest）：{ \"name\": \"docs\", \"version\": \"0.1.0\", \"private\": true, \"scripts\": { \"dev\": \"portless agent-browser next dev\", \"build\": \"next build\", \"start\": \"next start\", \"lint\": \"eslint\" }, \"dependencies\": { \"@ai-sdk/react\": \"^3.0.80\", \"@mdx-js/loader\": \"^3.1.1\", \"@mdx-js/mdx\": \"^3.1.1\", \"@mdx-js/react\": \"^3.1.1\", \"@next/mdx\": \"^16.1.6\", \"@streamdown/code\": \"^1.0.2\", \"@upstash/ratelimit\": \"^2.0.8\", \"@upstash/redis\": \"^1.36.2\", \"@vercel/analytics\": \"^1.6.1\", \"@vercel/speed-insights\": \"^1.3.1\", \"ai\": \"^6.0.78\", \"bash-tool\": \"^1.3.14\", \"clsx\": \"^2.1.1\", \"geist\": \"^1.7.0\", \"just-bash\": \"^2.9.6\", \"next\": \"16.1.1\", \"next-themes\": \"^0.4.6\", \"radix-ui\": \"^1.4.3\", \"react\": \"19.2.3\", \"react-dom\": \"19.2.3\", \"shiki\"… 证据：`docs/package.json`\n- **Package**（package_manifest）：{ \"name\": \"agent-browser-evals\", \"version\": \"1.0.0\", \"private\": true, \"type\": \"module\", \"scripts\": { \"eval\": \"bun run run.ts\", \"eval:claude\": \"bun run run.ts --provider claude\", \"eval:codex\": \"bun run run.ts --provider codex\", \"eval:judge\": \"bun run run.ts --judge\", \"eval:json\": \"bun run run.ts --json\" }, \"devDependencies\": { \"bun-types\": \"^1.3.12\" } } 证据：`evals/package.json`\n- **Package**（package_manifest）：{ \"name\": \"agent-browser\", \"version\": \"0.27.0\", \"description\": \"Browser automation CLI for AI agents\", \"type\": \"module\", \"files\": \"bin\", \"scripts\", \"skill-data\", \"skills\" , \"bin\": { \"agent-browser\": \"./bin/agent-browser.js\" }, \"scripts\": { \"version:sync\": \"node scripts/sync-version.js\", \"version\": \"npm run version:sync && git add cli/Cargo.toml\", \"build:native\": \"npm run version:sync && cargo build --release --manifest-path cli/Cargo.toml && node scripts/copy-native.js\", \"build:linux\": \"npm run version:sync && docker compose -f docker/docker-compose.yml run --rm build-linux\", \"build:macos\": \"npm run version:sync && cargo build --release --manifest-path cli/Cargo.toml --target aarch64-apple-… 证据：`package.json`\n- **Package**（package_manifest）：{ \"name\": \"agent-browser-environments\", \"version\": \"0.1.0\", \"private\": true, \"scripts\": { \"dev\": \"next dev\", \"build\": \"next build\", \"start\": \"next start\", \"lint\": \"next lint\" }, \"dependencies\": { \"@base-ui/react\": \"^1.2.0\", \"@tailwindcss/postcss\": \"^4.2.1\", \"@upstash/ratelimit\": \"^2.0.8\", \"@upstash/redis\": \"^1.36.4\", \"@vercel/sandbox\": \"^1.0.0\", \"class-variance-authority\": \"^0.7.1\", \"clsx\": \"^2.1.1\", \"dotenv\": \"^17.3.1\", \"geist\": \"^1.7.0\", \"lucide-react\": \"^0.577.0\", \"next\": \"^16.1.6\", \"postcss\": \"^8.5.8\", \"react\": \"^19.2.4\", \"react-dom\": \"^19.2.4\", \"react-resizable-panels\": \"^4.7.2\", \"shadcn\": \"^4.0.2\", \"tailwind-merge\": \"^3.5.0\", \"tailwindcss\": \"^4.2.1\", \"tw-animate-css\": \"^1.4.0\" }, \"dev… 证据：`examples/environments/package.json`\n- **Package**（package_manifest）：{ \"name\": \"dashboard\", \"version\": \"0.27.0\", \"private\": true, \"scripts\": { \"dev\": \"next dev\", \"build\": \"next build\", \"start\": \"next start\" }, \"dependencies\": { \"@ai-sdk/react\": \"^3.0.148\", \"@radix-ui/react-popover\": \"^1.1.15\", \"ai\": \"^6.0.146\", \"class-variance-authority\": \"^0.7.1\", \"clsx\": \"^2.1.1\", \"cmdk\": \"^1.1.1\", \"jotai\": \"^2.19.0\", \"lucide-react\": \"^1.7.0\", \"next\": \"16.1.1\", \"next-themes\": \"^0.4.6\", \"radix-ui\": \"^1.4.3\", \"react\": \"^19.1.0\", \"react-dom\": \"^19.1.0\", \"react-resizable-panels\": \"^4.7.6\", \"shadcn\": \"^4.1.0\", \"streamdown\": \"^2.5.0\", \"tailwind-merge\": \"^3.5.0\", \"tw-animate-css\": \"^1.4.0\" }, \"devDependencies\": { \"@tailwindcss/postcss\": \"^4.1.3\", \"@types/node\": \"^22.14.0\", \"@type… 证据：`packages/dashboard/package.json`\n- **AWS Bedrock AgentCore**（skill_instruction）：Run agent-browser on cloud browser sessions hosted by AWS Bedrock AgentCore. All standard agent-browser commands work identically; the only difference is where the browser runs. 证据：`skill-data/agentcore/SKILL.md`\n- **agent-browser core**（skill_instruction）：Fast browser automation CLI for AI agents. Chrome/Chromium via CDP, no Playwright or Puppeteer dependency. Accessibility-tree snapshots with compact @eN refs let agents interact with pages in ~200-400 tokens instead of parsing raw HTML. 证据：`skill-data/core/SKILL.md`\n- **Dogfood**（skill_instruction）：Systematically explore a web application, find issues, and produce a report with full reproduction evidence for every finding. 证据：`skill-data/dogfood/SKILL.md`\n- **Electron App Automation**（skill_instruction）：Automate any Electron desktop app using agent-browser. Electron apps are built on Chromium and expose a Chrome DevTools Protocol CDP port that agent-browser can connect to, enabling the same snapshot-interact workflow used for web pages. 证据：`skill-data/electron/SKILL.md`\n- **Slack Automation**（skill_instruction）：Interact with Slack workspaces to check messages, extract data, and automate common tasks. 证据：`skill-data/slack/SKILL.md`\n- **Browser Automation with Vercel Sandbox**（skill_instruction）：Browser Automation with Vercel Sandbox 证据：`skill-data/vercel-sandbox/SKILL.md`\n- **agent-browser**（skill_instruction）：Fast browser automation CLI for AI agents. Chrome/Chromium via CDP with accessibility-tree snapshots and compact @eN element refs. 证据：`skills/agent-browser/SKILL.md`\n- **Marketplace**（structured_config）：{ \"$schema\": \"https://anthropic.com/claude-code/marketplace.schema.json\", \"name\": \"agent-browser\", \"description\": \"Browser automation for AI agents\", \"owner\": { \"name\": \"Vercel\", \"email\": \"support@vercel.com\" }, \"plugins\": { \"name\": \"agent-browser\", \"description\": \"Automates browser interactions for web testing, form filling, screenshots, and data extraction\", \"source\": \"./\", \"strict\": false, \"skills\": \"./skills/agent-browser\" , \"category\": \"development\" } } 证据：`.claude-plugin/marketplace.json`\n- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`\n- **agent-browser**（documentation）：- React introspection - First-class React DevTools integration with new react tree , react inspect , react renders start stop , and react suspense commands for full component-tree visibility, per-fiber props/hooks/state inspection, render profiling with mount/re-render counts and change details, and Suspense boundary classification with root-cause grouping and recommendations. React DevTools hook is vendored MIT and embedded in the binary with zero runtime dependencies 1257 - Web Vitals - New vitals url command that reports Core Web Vitals LCP, CLS, TTFB, FCP, INP plus React hydration phases for any page 1257 - SPA navigation - New pushstate command for client-side SPA navigations without a… 证据：`CHANGELOG.md`\n- **Authentication Patterns**（documentation）：Login flows, session persistence, OAuth, 2FA, and authenticated browsing. 证据：`skill-data/core/references/authentication.md`\n- **Command Reference**（documentation）：Complete reference for all agent-browser commands. For quick start and common patterns, see SKILL.md. 证据：`skill-data/core/references/commands.md`\n- **Profiling**（documentation）：Capture Chrome DevTools performance profiles during browser automation for performance analysis. 证据：`skill-data/core/references/profiling.md`\n- **Session Management**（documentation）：Multiple isolated browser sessions with state persistence and concurrent browsing. 证据：`skill-data/core/references/session-management.md`\n- **Snapshot and Refs**（documentation）：Compact element references that reduce context usage dramatically for AI agents. 证据：`skill-data/core/references/snapshot-refs.md`\n- **Trust boundaries**（documentation）：Safety rules that apply to every agent-browser task, across all sites and frameworks. Read before driving a real user's browser session. 证据：`skill-data/core/references/trust-boundaries.md`\n- **Video Recording**（documentation）：Capture browser automation as video for debugging, documentation, or verification. 证据：`skill-data/core/references/video-recording.md`\n- **Issue Taxonomy**（documentation）：Reference for categorizing issues found during dogfooding. Read this at the start of a dogfood session to calibrate what to look for. 证据：`skill-data/dogfood/references/issue-taxonomy.md`\n- **Dogfood Report: {APP NAME}**（documentation）：Field Value ------- ------- Date {DATE} App URL {URL} Session {SESSION NAME} Scope {SCOPE} 证据：`skill-data/dogfood/templates/dogfood-report-template.md`\n- **Common Slack Tasks & Patterns**（documentation）：Reference guide for common automations and data extraction patterns when interacting with Slack. 证据：`skill-data/slack/references/slack-tasks.md`\n- **Slack Analysis Report**（documentation）：Date : DATE Workspace : WORKSPACE NAME Analyst : YOUR NAME Scope : WHAT YOU ANALYZED 证据：`skill-data/slack/templates/slack-report-template.md`\n- **Agent Browser.Schema**（structured_config）：{ \"$schema\": \"http://json-schema.org/draft-07/schema \", \"title\": \"Agent Browser Configuration\", \"description\": \"Configuration file for agent-browser e.g., agent-browser.json or ~/.agent-browser/config.json \", \"type\": \"object\", \"properties\": { \"headed\": { \"type\": \"boolean\", \"description\": \"Show browser window instead of running headless.\" }, \"json\": { \"type\": \"boolean\", \"description\": \"Output in JSON format.\" }, \"debug\": { \"type\": \"boolean\", \"description\": \"Enable debug output.\" }, \"session\": { \"type\": \"string\", \"description\": \"Session identifier.\" }, \"sessionName\": { \"type\": \"string\", \"description\": \"Auto-save/load state persistence name.\" }, \"executablePath\": { \"type\": \"string\", \"descripti… 证据：`agent-browser.schema.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ES2022\", \"module\": \"ESNext\", \"moduleResolution\": \"bundler\", \"esModuleInterop\": true, \"strict\": true, \"skipLibCheck\": true, \"outDir\": \"dist\", \"declaration\": true }, \"include\": \" .ts\" } 证据：`benchmarks/tsconfig.json`\n- **Components**（structured_config）：{ \"$schema\": \"https://ui.shadcn.com/schema.json\", \"style\": \"new-york\", \"rsc\": true, \"tsx\": true, \"tailwind\": { \"config\": \"\", \"css\": \"src/app/globals.css\", \"baseColor\": \"neutral\", \"cssVariables\": true, \"prefix\": \"\" }, \"iconLibrary\": \"lucide\", \"aliases\": { \"components\": \"@/components\", \"utils\": \"@/lib/utils\", \"ui\": \"@/components/ui\", \"lib\": \"@/lib\", \"hooks\": \"@/hooks\" }, \"registries\": {} } 证据：`docs/components.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ES2017\", \"lib\": \"dom\", \"dom.iterable\", \"esnext\" , \"allowJs\": true, \"skipLibCheck\": true, \"strict\": true, \"noEmit\": true, \"esModuleInterop\": true, \"module\": \"esnext\", \"moduleResolution\": \"bundler\", \"resolveJsonModule\": true, \"isolatedModules\": true, \"jsx\": \"react-jsx\", \"incremental\": true, \"plugins\": { \"name\": \"next\" } , \"paths\": { \"@/ \": \"./src/ \" } }, \"include\": \"next-env.d.ts\", \" / .ts\", \" / .tsx\", \".next/types/ / .ts\", \".next/dev/types/ / .ts\", \" / .mts\" , \"exclude\": \"node modules\" } 证据：`docs/tsconfig.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ESNext\", \"module\": \"ESNext\", \"moduleResolution\": \"bundler\", \"esModuleInterop\": true, \"strict\": true, \"skipLibCheck\": true, \"outDir\": \"dist\", \"declaration\": true, \"types\": \"bun-types\" }, \"include\": \" .ts\", \"lib/ / .ts\", \"cases/ / .ts\" } 证据：`evals/tsconfig.json`\n- **Browser Protocol**（structured_config）：{ \"version\": { \"major\": \"1\", \"minor\": \"3\" }, \"domains\": { \"domain\": \"Accessibility\", \"experimental\": true, \"dependencies\": \"DOM\" , \"types\": { \"id\": \"AXNodeId\", \"description\": \"Unique accessibility node identifier.\", \"type\": \"string\" }, { \"id\": \"AXValueType\", \"description\": \"Enum of possible property types.\", \"type\": \"string\", \"enum\": \"boolean\", \"tristate\", \"booleanOrUndefined\", \"idref\", \"idrefList\", \"integer\", \"node\", \"nodeList\", \"number\", \"string\", \"computedString\", \"token\", \"tokenList\", \"domRelation\", \"role\", \"internalRole\", \"valueUndefined\" }, { \"id\": \"AXValueSourceType\", \"description\": \"Enum of possible property sources.\", \"type\": \"string\", \"enum\": \"attribute\", \"implicit\", \"style\", \"con… 证据：`cli/cdp-protocol/browser_protocol.json`\n- **Js Protocol**（structured_config）：{ \"version\": { \"major\": \"1\", \"minor\": \"3\" }, \"domains\": { \"domain\": \"Console\", \"description\": \"This domain is deprecated - use Runtime or Log instead.\", \"deprecated\": true, \"dependencies\": \"Runtime\" , \"types\": { \"id\": \"ConsoleMessage\", \"description\": \"Console message.\", \"type\": \"object\", \"properties\": { \"name\": \"source\", \"description\": \"Message source.\", \"type\": \"string\", \"enum\": \"xml\", \"javascript\", \"network\", \"console-api\", \"storage\", \"appcache\", \"rendering\", \"security\", \"other\", \"deprecation\", \"worker\" }, { \"name\": \"level\", \"description\": \"Message severity.\", \"type\": \"string\", \"enum\": \"log\", \"warning\", \"error\", \"debug\", \"info\" }, { \"name\": \"text\", \"description\": \"Message text.\", \"type\":… 证据：`cli/cdp-protocol/js_protocol.json`\n- **Schema**（structured_config）：{ \"$schema\": \"http://json-schema.org/draft-07/schema \", \"title\": \"Agent Browser Configuration\", \"description\": \"Configuration file for agent-browser e.g., agent-browser.json or ~/.agent-browser/config.json \", \"type\": \"object\", \"properties\": { \"headed\": { \"type\": \"boolean\", \"description\": \"Show browser window instead of running headless.\" }, \"json\": { \"type\": \"boolean\", \"description\": \"Output in JSON format.\" }, \"debug\": { \"type\": \"boolean\", \"description\": \"Enable debug output.\" }, \"session\": { \"type\": \"string\", \"description\": \"Session identifier.\" }, \"sessionName\": { \"type\": \"string\", \"description\": \"Auto-save/load state persistence name.\" }, \"executablePath\": { \"type\": \"string\", \"descripti… 证据：`docs/public/schema.json`\n- **Components**（structured_config）：{ \"$schema\": \"https://ui.shadcn.com/schema.json\", \"style\": \"base-nova\", \"rsc\": true, \"tsx\": true, \"tailwind\": { \"config\": \"\", \"css\": \"app/globals.css\", \"baseColor\": \"neutral\", \"cssVariables\": true, \"prefix\": \"\" }, \"iconLibrary\": \"lucide\", \"rtl\": false, \"aliases\": { \"components\": \"@/components\", \"utils\": \"@/lib/utils\", \"ui\": \"@/components/ui\", \"lib\": \"@/lib\", \"hooks\": \"@/hooks\" }, \"menuColor\": \"default\", \"menuAccent\": \"subtle\", \"registries\": {} } 证据：`examples/environments/components.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ES2017\", \"lib\": \"dom\", \"dom.iterable\", \"esnext\" , \"allowJs\": true, \"skipLibCheck\": true, \"strict\": true, \"noEmit\": true, \"esModuleInterop\": true, \"module\": \"esnext\", \"moduleResolution\": \"bundler\", \"resolveJsonModule\": true, \"isolatedModules\": true, \"jsx\": \"react-jsx\", \"incremental\": true, \"plugins\": { \"name\": \"next\" } , \"paths\": { \"@/ \": \"./ \" } }, \"include\": \"next-env.d.ts\", \" / .ts\", \" / .tsx\", \".next/types/ / .ts\", \".next/dev/types/ / .ts\" , \"exclude\": \"node modules\", \"server\" } 证据：`examples/environments/tsconfig.json`\n- **Components**（structured_config）：{ \"$schema\": \"https://ui.shadcn.com/schema.json\", \"style\": \"radix-nova\", \"rsc\": true, \"tsx\": true, \"tailwind\": { \"config\": \"\", \"css\": \"src/app/globals.css\", \"baseColor\": \"neutral\", \"cssVariables\": true, \"prefix\": \"\" }, \"iconLibrary\": \"lucide\", \"rtl\": false, \"aliases\": { \"components\": \"@/components\", \"utils\": \"@/lib/utils\", \"ui\": \"@/components/ui\", \"lib\": \"@/lib\", \"hooks\": \"@/hooks\" }, \"menuColor\": \"default\", \"menuAccent\": \"subtle\", \"registries\": {} } 证据：`packages/dashboard/components.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ES2017\", \"lib\": \"dom\", \"dom.iterable\", \"esnext\" , \"allowJs\": true, \"skipLibCheck\": true, \"strict\": true, \"noEmit\": true, \"esModuleInterop\": true, \"module\": \"esnext\", \"moduleResolution\": \"bundler\", \"resolveJsonModule\": true, \"isolatedModules\": true, \"jsx\": \"react-jsx\", \"incremental\": true, \"plugins\": { \"name\": \"next\" } , \"paths\": { \"@/ \": \"./src/ \" } }, \"include\": \"next-env.d.ts\", \" / .ts\", \" / .tsx\", \".next/types/ / .ts\", \".next/dev/types/ / .ts\" , \"exclude\": \"node modules\" } 证据：`packages/dashboard/tsconfig.json`\n- **Dependencies**（source_file）：Native binaries keep the launcher scripts bin/agent-browser- bin/.install-method !bin/agent-browser !bin/agent-browser.cmd 证据：`.gitignore`\n- **Pre Commit**（source_file）：node scripts/sync-version.js git add cli/Cargo.toml cli/Cargo.lock 证据：`.husky/pre-commit`\n- **.prettierrc**（source_file）：{ \"semi\": true, \"singleQuote\": true, \"trailingComma\": \"es5\", \"printWidth\": 100, \"tabWidth\": 2 } 证据：`.prettierrc`\n- **Vercel Sandbox credentials**（source_file）：Vercel Sandbox credentials SANDBOX VERCEL TOKEN= SANDBOX VERCEL TEAM ID= SANDBOX VERCEL PROJECT ID= 证据：`benchmarks/.env.example`\n- **benchmarks/.gitignore**（source_file）：node modules/ results.json 证据：`benchmarks/.gitignore`\n- **Bench**（source_file）：/ Node.js Daemon vs Rust Native Daemon benchmark. Compares the last published npm version Node.js daemon against the Rust-only build from a given branch, running real agent-browser commands inside a Vercel Sandbox. Captures: - Command latency per-scenario, with warmup + measured iterations + stddev - Cold start time first launch to daemon ready - Daemon memory RSS, peak RSS separated from browser memory - Daemon CPU time - Process tree daemon + browser children - Binary and distribution size on disk Usage: pnpm bench default: 10 iterations, 1 warmup pnpm bench -- --iterations 20 override iterations pnpm bench -- --warmup 2 override warmup count pnpm bench -- --json write results.json pnpm b… 证据：`benchmarks/bench.ts`\n- **Scenarios**（source_file）：/ Benchmark scenarios for comparing Node.js daemon vs Rust native daemon. Each scenario defines CLI commands run via sandbox.runCommand \"agent-browser\", args . Setup/teardown commands run once and are not timed. The commands array is timed over N iterations. / 证据：`benchmarks/scenarios.ts`\n- **!/usr/bin/env node**（source_file）：/ Cross-platform CLI wrapper for agent-browser This wrapper enables npx support on Windows where shell scripts don't work. For global installs, postinstall.js patches the shims to invoke the native binary directly zero overhead . / 证据：`bin/agent-browser.js`\n- **Cargo**（source_file）：package name = \"agent-browser\" version = \"0.27.0\" edition = \"2021\" description = \"Fast browser automation CLI for AI agents\" license = \"Apache-2.0\" repository = \"https://github.com/vercel-labs/agent-browser\" homepage = \"https://agent-browser.dev\" readme = \"../README.md\" keywords = \"browser\", \"automation\", \"ai\", \"cdp\", \"chrome\" categories = \"command-line-utilities\", \"web-programming\" 证据：`cli/Cargo.toml`\n- **allow dead code**（source_file）：use std::collections::HashSet; use std::env; use std::fs; use std::path::Path; 证据：`cli/build.rs`\n- **Multi-platform Rust cross-compilation image**（source_file）：Multi-platform Rust cross-compilation image FROM rust:1.85-bookworm 证据：`docker/Dockerfile.build`\n- **Docker Compose for building agent-browser**（source_file）：Docker Compose for building agent-browser Usage: docker compose -f docker/docker-compose.yml run build-linux docker compose -f docker/docker-compose.yml run build-windows Note: macOS builds should be done natively on macOS for compatibility. 证据：`docker/docker-compose.yml`\n- **See https://help.github.com/articles/ignoring-files/ for more about ignoring files.**（source_file）：See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 证据：`docs/.gitignore`\n- **Eslint.Config**（source_file）：import { defineConfig, globalIgnores } from \"eslint/config\"; import nextVitals from \"eslint-config-next/core-web-vitals\"; import nextTs from \"eslint-config-next/typescript\"; 证据：`docs/eslint.config.mjs`\n- **Mdx Components**（source_file）：import type { MDXComponents } from \"mdx/types\"; import Link from \"next/link\"; import { CodeBlock } from \"@/components/code-block\"; 证据：`docs/mdx-components.tsx`\n- **Next.Config**（source_file）：/ @type {import 'next' .NextConfig} / const nextConfig = { pageExtensions: \"js\", \"jsx\", \"ts\", \"tsx\", \"md\", \"mdx\" , serverExternalPackages: \"just-bash\", \"bash-tool\" , }; 证据：`docs/next.config.mjs`\n- 其余 10 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`AGENTS.md`, `README.md`, `benchmarks/README.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`AGENTS.md`, `README.md`, `benchmarks/README.md`\n\n## 用户开工前应该回答的问题\n\n- 你准备在哪个宿主 AI 或本地环境中使用它？\n- 你只是想先体验工作流，还是准备真实安装？\n- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？\n\n## 验收标准\n\n- 所有能力声明都能回指到 evidence_refs 中的文件路径。\n- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。\n- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。\n\n---\n\n## Doramagic Context Augmentation\n\n下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。\n\n## Human Manual 骨架\n\n使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。\n\n宿主 AI 硬性规则：\n- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。\n- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。\n- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。\n\n- **Introduction to Agent Browser**：importance `high`\n  - source_paths: README.md, AGENTS.md, cli/src/main.rs, package.json\n- **Installation Guide**：importance `high`\n  - source_paths: README.md, cli/src/install.rs, scripts/postinstall.js, docker/Dockerfile.build\n- **Element References System**：importance `high`\n  - source_paths: cli/src/native/snapshot.rs, cli/src/native/element.rs, cli/src/validation.rs\n- **Architecture Overview**：importance `high`\n  - source_paths: cli/src/native/daemon.rs, cli/src/native/mod.rs, cli/src/native/cdp/mod.rs, cli/src/connection.rs\n- **Daemon and CDP Protocol**：importance `high`\n  - source_paths: cli/src/native/cdp/client.rs, cli/src/native/cdp/chrome.rs, cli/src/native/stream/mod.rs, cli/src/native/stream/websocket.rs, cli/src/native/stream/cdp_loop.rs\n- **Navigation Commands**：importance `high`\n  - source_paths: cli/src/commands.rs, cli/src/native/browser.rs, cli/src/flags.rs\n- **Interaction Commands**：importance `high`\n  - source_paths: cli/src/native/interaction.rs, cli/src/native/actions.rs, cli/src/commands.rs\n- **State Inspection Commands**：importance `high`\n  - source_paths: cli/src/native/snapshot.rs, cli/src/native/state.rs, cli/src/commands.rs, cli/src/native/react/mod.rs\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `55f38f4d81981f0191c730005c419958c7d20605`\n- inspected_files: `pnpm-lock.yaml`, `package.json`, `README.md`, `docs/pnpm-lock.yaml`, `docs/package.json`, `docs/tsconfig.json`, `docs/components.json`, `docs/public/schema.json`, `docs/src/lib/utils.ts`, `docs/src/lib/search-index.ts`, `docs/src/lib/mdx-to-markdown.ts`, `docs/src/lib/github.ts`, `docs/src/lib/page-titles.ts`, `docs/src/lib/rate-limit.ts`, `docs/src/lib/docs-navigation.ts`, `docs/src/lib/page-metadata.ts`, `docs/src/app/page.mdx`, `docs/src/app/configuration/page.mdx`, `docs/src/app/skills/page.mdx`, `docs/src/app/dashboard/page.mdx`\n\n宿主 AI 硬性规则：\n- 没有 repo_clone_verified=true 时，不得声称已经读过源码。\n- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。\n- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。\n\n## Doramagic Pitfall Constraints / 踩坑约束\n\n这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。\n\n### Constraint 1: 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Chrome 147.0 crashes with \"trap int3\" when running in docker\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能阻塞安装或首次运行。\n- Evidence: community_evidence:github | cevd_9045278ef5e043dcadccf9288477813c | https://github.com/vercel-labs/agent-browser/issues/1339 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 来源证据：Detected: Trojan:Win32/Posilod.EB!cl\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Detected: Trojan:Win32/Posilod.EB!cl\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_edbde732c7a7410e96ad0fa301e4222d | https://github.com/vercel-labs/agent-browser/issues/1281 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_ab39b89d157047e897e771d2572dfcdd | https://github.com/vercel-labs/agent-browser/issues/1338 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n\n- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_0896b0b429c641f0b93ca9dcbbee6db8 | https://github.com/vercel-labs/agent-browser/issues/1319 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests\n\n- Trigger: Developers should check this security_permissions risk before relying on the project: Dashboard privileged POST routes should reject cross-origin requests\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.\n- Why it matters: Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests\n- Evidence: failure_mode_cluster:github_issue | fmev_bc39fa851aecda51d6ae79863b570093 | https://github.com/vercel-labs/agent-browser/issues/1345 | Dashboard privileged POST routes should reject cross-origin requests\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: 失败模式：security_permissions: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- Trigger: Developers should check this security_permissions risk before relying on the project: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission. Context: Source discussion did not expose a precise runtime context.\n- Why it matters: Developers may expose sensitive permissions or credentials: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- Evidence: failure_mode_cluster:github_issue | fmev_50f6336937705c962c78ed48a466eb98 | https://github.com/vercel-labs/agent-browser/issues/1365 | `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 来源证据：Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support XDG Base Directory paths for agent-browser state, config, and installs\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能影响授权、密钥配置或安全边界。\n- Evidence: community_evidence:github | cevd_a2b8bb7035dd44e0a9e97dc78186f3b2 | https://github.com/vercel-labs/agent-browser/issues/1361 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 8: 失败模式：installation: After failed close, subsequent open reports success but returns stale content from prior URL\n\n- Trigger: Developers should check this installation risk before relying on the project: After failed close, subsequent open reports success but returns stale content from prior URL\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: After failed close, subsequent open reports success but returns stale content from prior URL. Context: Observed when using node, python, linux\n- Why it matters: Developers may fail before the first successful local run: After failed close, subsequent open reports success but returns stale content from prior URL\n- Evidence: failure_mode_cluster:github_issue | fmev_fce1ca55e45e13ba327a52473c958037 | https://github.com/vercel-labs/agent-browser/issues/1367 | After failed close, subsequent open reports success but returns stale content from prior URL\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 9: 失败模式：installation: Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- Trigger: Developers should check this installation risk before relying on the project: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Chrome 147.0 crashes with \"trap int3\" when running in docker. Context: Observed when using docker, windows, linux\n- Why it matters: Developers may fail before the first successful local run: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- Evidence: failure_mode_cluster:github_issue | fmev_de7dc45e4f45905d10cb44680cd26da5 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker, failure_mode_cluster:github_issue | fmev_e97d2c4c42c663165c2763023d5d79e3 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 10: 失败模式：installation: Detected: Trojan:Win32/Posilod.EB!cl\n\n- Trigger: Developers should check this installation risk before relying on the project: Detected: Trojan:Win32/Posilod.EB!cl\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Detected: Trojan:Win32/Posilod.EB!cl. Context: Observed when using windows\n- Why it matters: Developers may fail before the first successful local run: Detected: Trojan:Win32/Posilod.EB!cl\n- Evidence: failure_mode_cluster:github_issue | fmev_11d6daa01783b3f8d6cc4984b34591d9 | https://github.com/vercel-labs/agent-browser/issues/1281 | Detected: Trojan:Win32/Posilod.EB!cl\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n",
      "summary": "给宿主 AI 的上下文和工作边界。",
      "title": "AI Context Pack / 带给我的 AI"
    },
    "boundary_risk_card": {
      "asset_id": "boundary_risk_card",
      "filename": "BOUNDARY_RISK_CARD.md",
      "markdown": "# Boundary & Risk Card / 安装前决策卡\n\n项目：vercel-labs/agent-browser\n\n## Doramagic 试用结论\n\n当前结论：可以进入发布前推荐检查；首次使用仍应从最小权限、临时目录和可回滚配置开始。\n\n## 用户现在可以做\n\n- 可以先阅读 Human Manual，理解项目目的和主要工作流。\n- 可以复制 Prompt Preview 做安装前体验；这只验证交互感，不代表真实运行。\n- 可以把官方 Quick Start 命令放到隔离环境中验证，不要直接进主力环境。\n\n## 现在不要做\n\n- 不要把 Prompt Preview 当成项目实际运行结果。\n- 不要把 metadata-only validation 当成沙箱安装验证。\n- 不要把未验证能力写成“已支持、已跑通、可放心安装”。\n- 不要在首次试用时交出生产数据、私人文件、真实密钥或主力配置目录。\n\n## 安装前检查\n\n- 宿主 AI 是否匹配：local_cli\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker（high）：可能阻塞安装或首次运行。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：Detected: Trojan:Win32/Posilod.EB!cl（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests（high）：Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.\n\n## 风险与权限提示\n\n- no_demo: medium\n\n## 证据缺口\n\n- 暂未发现结构化证据缺口。\n",
      "summary": "安装、权限、验证和推荐前风险。",
      "title": "Boundary & Risk Card / 边界与风险卡"
    },
    "human_manual": {
      "asset_id": "human_manual",
      "filename": "HUMAN_MANUAL.md",
      "markdown": "# https://github.com/vercel-labs/agent-browser 项目说明书\n\n生成时间：2026-05-15 11:32:46 UTC\n\n## 目录\n\n- [Introduction to Agent Browser](#introduction)\n- [Installation Guide](#installation-guide)\n- [Element References System](#element-references)\n- [Architecture Overview](#architecture-overview)\n- [Daemon and CDP Protocol](#daemon-and-cdp)\n- [Navigation Commands](#navigation-commands)\n- [Interaction Commands](#interaction-commands)\n- [State Inspection Commands](#state-inspection-commands)\n- [Browser Engine Integration](#browser-engines)\n- [Authentication and Session Persistence](#authentication)\n\n<a id='introduction'></a>\n\n## Introduction to Agent Browser\n\n### 相关页面\n\n相关主题：[Installation Guide](#installation-guide), [Architecture Overview](#architecture-overview)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n- [examples/environments/app/page.tsx](https://github.com/vercel-labs/agent-browser/blob/main/examples/environments/app/page.tsx)\n</details>\n\n# Introduction to Agent Browser\n\nAgent Browser is a high-performance, native Rust CLI tool designed for browser automation and AI agent integration. Unlike traditional browser automation frameworks that rely on Node.js wrappers or third-party libraries, Agent Browser communicates directly with Chrome/Chromium via the Chrome DevTools Protocol (CDP), providing a lightweight and reliable solution for web interaction tasks.\n\n## Overview\n\nAgent Browser serves as a bridge between AI agents and web browsers, enabling autonomous web navigation, interaction, and data extraction. It is compatible with a wide range of AI agent platforms including Cursor, Claude Code, Codex, Continue, and Windsurf.\n\n| Aspect | Description |\n|--------|-------------|\n| **Language** | Rust (native CLI) |\n| **Protocol** | Chrome DevTools Protocol (CDP) |\n| **Dependencies** | No Playwright or Puppeteer dependency |\n| **Platform** | Chrome/Chromium |\n| **License** | See repository LICENSE |\n\n**资料来源：** [skills/agent-browser/SKILL.md]()\n\n## Architecture\n\nAgent Browser follows a modular architecture with distinct layers for CLI handling, native browser control, and extensible skills.\n\n```mermaid\ngraph TD\n    A[User / AI Agent] --> B[CLI Layer<br/>Rust Commands]\n    B --> C[Native Actions Layer<br/>CDP Dispatcher]\n    C --> D[Chrome/Chromium<br/>via CDP]\n    \n    E[Skills System] --> B\n    E --> F[Core Skills]\n    E --> G[Specialized Skills]\n    \n    G --> G1[Electron Apps]\n    G --> G2[Slack Workspace]\n    G --> G3[Exploratory Testing]\n    G --> G4[Cloud Providers]\n    \n    H[Session Management] --> C\n    H --> H1[Auth Vault]\n    H --> H2[State Persistence]\n    H --> H3[Video Recording]\n```\n\n**资料来源：** [skill-data/core/SKILL.md](), [skills/agent-browser/SKILL.md]()\n\n## Core Concepts\n\n### Accessibility-Tree Snapshots\n\nAgent Browser generates accessibility-tree snapshots that provide structured, human-readable representations of web pages. Each interactive element receives a unique reference ID (e.g., `@e1`, `@e2`) that can be used for subsequent interactions.\n\nExample snapshot output:\n```\nPage: Example - Log in\nURL: https://example.com/login\n\n@e1 [heading] \"Log in\"\n@e2 [form]\n  @e3 [input type=\"email\"] placeholder=\"Email\"\n  @e4 [input type=\"password\"] placeholder=\"Password\"\n  @e5 [button type=\"submit\"] \"Continue\"\n  @e6 [link] \"Forgot password?\"\n```\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md](), [skill-data/core/SKILL.md]()\n\n### Element Reference Notation\n\nElement references follow a consistent notation pattern:\n\n```\n@e1 [tag attribute=\"value\"] \"text content\" placeholder=\"hint\"\n```\n\n| Component | Description |\n|-----------|-------------|\n| `@e1` | Unique reference ID |\n| `tag` | HTML tag name |\n| `attribute=\"value\"` | Key attributes |\n| `\"text content\"` | Visible text |\n| `placeholder=\"hint\"` | Additional attributes |\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md]()\n\n## Command Reference\n\n### Navigation Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser open [url]` | Launch browser with optional navigation |\n| `agent-browser back` | Navigate backward |\n| `agent-browser forward` | Navigate forward |\n| `agent-browser reload` | Reload current page |\n| `agent-browser close` | Close browser |\n| `agent-browser connect <port>` | Connect to existing browser via CDP |\n\n**资料来源：** [skill-data/core/references/commands.md]()\n\n### Interaction Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser click <ref>` | Click an element |\n| `agent-browser fill <ref> <text>` | Type text into input |\n| `agent-browser select <ref> <value>` | Select dropdown option |\n| `agent-browser check <ref>` | Check a checkbox |\n| `agent-browser scroll <direction> <pixels>` | Scroll page |\n\n**资料来源：** [cli/src/native/actions.rs]()\n\n### Data Retrieval Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser snapshot [-i]` | Get page snapshot (interactive only with `-i`) |\n| `agent-browser screenshot [path]` | Capture screenshot |\n| `agent-browser get text <ref>` | Get visible text |\n| `agent-browser get attr <ref> <name>` | Get attribute value |\n| `agent-browser get url` | Get current URL |\n| `agent-browser get title` | Get page title |\n\n**资料来源：** [cli/src/output.rs](), [cli/src/native/actions.rs]()\n\n### Network Control Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser network route <url>` | Intercept network request |\n| `agent-browser network unroute <url>` | Remove interception |\n| `agent-browser network requests [--clear]` | View/clear network requests |\n| `agent-browser network har <start\\|stop> [path]` | Capture HAR file |\n\n**资料来源：** [skill-data/core/references/commands.md](), [cli/src/output.rs]()\n\n### Cookie and Storage Management\n\n```bash\nagent-browser cookies get           # View all cookies\nagent-browser cookies set --url <url> --name <name> --value <val>\nagent-browser cookies clear         # Clear all cookies\nagent-browser storage local         # Manage localStorage\nagent-browser storage session       # Manage sessionStorage\n```\n\n**资料来源：** [cli/src/output.rs]()\n\n### Browser Settings Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser set viewport <w> <h>` | Set viewport size |\n| `agent-browser set device <name>` | Emulate device |\n| `agent-browser set geo <lat> <lng>` | Set geolocation |\n| `agent-browser set offline on\\|off` | Toggle offline mode |\n| `agent-browser set headers <json>` | Set custom headers |\n| `agent-browser set media dark\\|light` | Set color scheme |\n\n**资料来源：** [cli/src/output.rs]()\n\n## Sessions and State Management\n\nAgent Browser supports multiple concurrent browser sessions with state persistence.\n\n```mermaid\ngraph LR\n    A[Session A] --> B[State File A]\n    C[Session B] --> D[State File B]\n    E[Auth Vault] --> A\n    E[Auth Vault] --> C\n```\n\n**Key Features:**\n\n- **Named Sessions**: `--session <name>` flag for multiple sessions\n- **State Persistence**: Save and restore browser state\n- **Auth Vault**: Secure credential storage\n- **Video Recording**: Capture browser activity\n\n**资料来源：** [skill-data/core/SKILL.md](), [skills/agent-browser/SKILL.md]()\n\n## Skills System\n\nAgent Browser uses an extensible skills system that provides specialized workflows for different environments.\n\n### Core Skills\n\n```bash\nagent-browser skills get core             # Core workflows and common patterns\nagent-browser skills get core --full      # Include full command reference\n```\n\n### Specialized Skills\n\n| Skill | Description | Command |\n|-------|-------------|---------|\n| **Electron** | Desktop app automation | `agent-browser skills get electron` |\n| **Slack** | Workspace automation | `agent-browser skills get slack` |\n| **Dogfood** | Exploratory testing/QA | `agent-browser skills get dogfood` |\n| **Vercel Sandbox** | Cloud browser in microVMs | `agent-browser skills get vercel-sandbox` |\n| **AgentCore** | AWS Bedrock cloud browsers | `agent-browser skills get agentcore` |\n\n**资料来源：** [skills/agent-browser/SKILL.md]()\n\n## React Developer Tools Integration\n\nAgent Browser includes built-in React DevTools support for debugging React applications:\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser react_tree` | View React component tree |\n| `agent-browser react_inspect` | Inspect component props/state |\n| `agent-browser react_renders_start` | Track render counts |\n| `agent-browser react_renders_stop` | Stop render tracking |\n\n**资料来源：** [cli/src/native/actions.rs](), [cli/src/react/suspense.rs]()\n\n### Suspense Boundary Analysis\n\nAgent Browser can analyze React Suspense boundaries with actionability scoring:\n\n| Blocker Kind | Weight | Actionability |\n|--------------|--------|---------------|\n| ClientHook | 7 | 90% |\n| RequestApi | 6 | 88% |\n| ServerFetch | 5 | 82% |\n| Cache | 4 | 74% |\n| Stream | 3 | 60% |\n| Unknown | 2 | 35% |\n| Framework | 1 | 18% |\n\n**资料来源：** [cli/src/react/suspense.rs]()\n\n## Dashboard Interface\n\nAgent Browser includes a web-based dashboard for visual browser management:\n\n```mermaid\ngraph TD\n    A[Dashboard] --> B[Controls Panel]\n    A --> C[Result Panel]\n    A --> D[Network Panel]\n    A --> E[Extensions Panel]\n    \n    B --> B1[URL Input]\n    B --> B2[Mode Selector]\n    B --> B3[Action Controls]\n    \n    C --> C1[Screenshot View]\n    C --> C2[Snapshot View]\n    C --> C3[Step History]\n    \n    D --> D1[Request List]\n    D --> D2[HAR Export]\n    \n    E --> E1[Extension List]\n    E --> E2[Extension Details]\n```\n\nThe dashboard is built with React and supports:\n\n- Resizable panels for flexible layouts\n- Theme switching (light/dark)\n- Mobile-responsive design\n- Real-time step history\n\n**资料来源：** [examples/environments/app/page.tsx](), [packages/dashboard/src/components/network-panel.tsx](), [packages/dashboard/src/components/extensions-panel.tsx]()\n\n## Best Practices\n\n### 1. Always Snapshot Before Interacting\n\n```bash\n# CORRECT - Snapshot first to get refs\nagent-browser open https://example.com\nagent-browser snapshot -i          # Get refs first\nagent-browser click @e1            # Use ref\n\n# WRONG - Ref doesn't exist yet\nagent-browser open https://example.com\nagent-browser click @e1            # Will fail!\n```\n\n### 2. Re-snapshot After Navigation\n\nElement references change when the page navigates. Always take a new snapshot after clicking links or navigating to new pages.\n\n### 3. Use Sessions for Complex Workflows\n\n```bash\nagent-browser --session my-session open https://example.com\nagent-browser --session my-session snapshot -i\n# ... perform actions ...\nagent-browser --session my-session close\n```\n\n**资料来源：** [skill-data/core/references/snapshot-refs.md]()\n\n## Installation and Setup\n\n### Prerequisites\n\n- Chrome or Chromium browser installed\n- Operating system: macOS, Linux, or Windows\n\n### Installation\n\nRefer to the repository's installation instructions for your platform. Agent Browser is distributed as a native binary with no runtime dependencies.\n\n### Configuration Files\n\n| File | Purpose |\n|------|---------|\n| `~/.agent-browser/` | Default config directory |\n| Sessions | Stored in config directory |\n| Auth Vault | Encrypted credential storage |\n\n**资料来源：** [AGENTS.md]()\n\n## Summary\n\nAgent Browser provides a powerful, efficient, and AI-agent-friendly approach to browser automation. Its key differentiators include:\n\n- **Native Rust implementation** for high performance\n- **Direct CDP communication** without third-party dependencies\n- **Accessibility-tree snapshots** for reliable element targeting\n- **Session management** for complex multi-step workflows\n- **Extensible skills system** for specialized environments\n- **Built-in React DevTools** integration for debugging\n\nThese features make Agent Browser an ideal choice for AI agents, automated testing pipelines, and developer workflows requiring precise browser control.\n\n---\n\n<a id='installation-guide'></a>\n\n## Installation Guide\n\n### 相关页面\n\n相关主题：[Introduction to Agent Browser](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/vercel-labs/agent-browser/blob/main/README.md)\n- [AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n- [skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/flags.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/flags.rs)\n</details>\n\n# Installation Guide\n\n## Overview\n\nThe agent-browser project is a native Rust CLI tool designed for browser automation, providing AI agents with reliable web interaction capabilities. Unlike traditional browser automation tools that rely on Node.js wrappers, agent-browser delivers a fast, lightweight solution built directly in Rust with Chrome/Chromium support via Chrome DevTools Protocol (CDP). The installation process handles downloading the necessary Chrome browser binaries, setting up platform-specific binaries, and configuring dependencies for the dashboard UI.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n## Prerequisites\n\n### System Requirements\n\nBefore installing agent-browser, ensure your system meets the following requirements:\n\n| Requirement | Details |\n|-------------|---------|\n| **Operating System** | macOS, Linux, or Windows (7 platform binaries built) |\n| **Chrome/Chromium** | Required for browser automation functionality |\n| **Rust Toolchain** | Required for building from source |\n| **Node.js/pnpm** | Required for dashboard development |\n\nThe project builds all 7 platform binaries during CI/CD, including native binaries for different architectures. Chrome is downloaded directly from Chrome for Testing during the installation process, eliminating the need for system-installed Chrome browsers.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n### Required Dependencies\n\n| Dependency | Purpose | Installation Method |\n|------------|---------|---------------------|\n| Chrome/Chromium | Browser automation target | Auto-downloaded via `install` command |\n| Cargo/Rust | Building CLI from source | [rustup.rs](https://rustup.rs) |\n| pnpm | Dashboard package management | `npm install -g pnpm` |\n\n## Installation Methods\n\n### Method 1: npm Package Installation (Recommended)\n\nThe recommended installation method uses the npm registry for cross-platform compatibility:\n\n```bash\nnpm install -g @agent-browser/cli\n```\n\nAfter installation, you must run the setup command to download Chrome binaries:\n\n```bash\nagent-browser install\n```\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n### Method 2: Building from Source\n\nFor development or customization, build the CLI from source:\n\n```bash\n# Clone the repository\ngit clone https://github.com/vercel-labs/agent-browser.git\ncd agent-browser\n\n# Install dependencies and build\ncd cli && cargo build --release\n```\n\nThe Rust codebase architecture follows a modular structure:\n\n```graph TD\n    A[cli/src/native/] --> B[daemon/]\n    A --> C[actions/]\n    A --> D[browser/]\n    A --> E[CDP client/]\n    A --> F[snapshot/]\n    A --> G[state/]\n```\n\nThe `--engine` flag allows selecting between Chrome and Lightpanda browser engines, providing flexibility in automation scenarios.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n### Method 3: Docker Installation\n\nFor containerized environments, Docker builds are supported:\n\n```bash\n# Build from the project's Dockerfile\ndocker build -t agent-browser -f docker/Dockerfile.build .\n```\n\nDocker installation is particularly useful for CI/CD pipelines and reproducible automation environments where system dependencies need to be isolated.\n\n## Post-Installation Setup\n\n### Chrome Binary Download\n\nAfter installing the CLI package, you must download the Chrome binary:\n\n```bash\nagent-browser install\n```\n\nThis command retrieves Chrome directly from Chrome for Testing, ensuring a compatible and up-to-date browser binary is available for all automation tasks. The `--download-path` flag can specify a custom location:\n\n```bash\nagent-browser --download-path /custom/path install\n```\n\n资料来源：[cli/src/flags.rs:45-49](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/flags.rs)\n\n### Verifying Installation\n\nVerify the installation by checking the version and available commands:\n\n```bash\nagent-browser --version\nagent-browser --help\n```\n\nThe CLI provides comprehensive command documentation through the help system:\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser open <url>` | Open a URL in the browser |\n| `agent-browser snapshot` | Capture accessibility tree with element refs |\n| `agent-browser click @<ref>` | Click element by reference |\n| `agent-browser skills get <name>` | Retrieve skill documentation |\n| `agent-browser install` | Download Chrome binaries |\n\n资料来源：[cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n\n## Skill Documentation Loading\n\nAgent-browser uses a skill-based documentation system that loads content dynamically based on the installed version:\n\n```bash\n# Load core workflows and common patterns\nagent-browser skills get core\n\n# Include full command reference and templates\nagent-browser skills get core --full\n\n# List all available skills\nagent-browser skills list\n```\n\nAvailable specialized skills:\n\n| Skill | Purpose |\n|-------|---------|\n| `electron` | Electron desktop apps (VS Code, Slack, Discord, Figma) |\n| `slack` | Slack workspace automation |\n| `dogfood` | Exploratory testing and QA |\n| `vercel-sandbox` | Agent-browser inside Vercel Sandbox microVMs |\n| `agentcore` | AWS Bedrock AgentCore cloud browsers |\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n## Platform-Specific Considerations\n\n### macOS\n\nOn macOS, if you encounter security prompts about unsigned applications, you may need to allow the application in System Preferences > Security & Privacy, or run:\n\n```bash\nxattr -d com.apple.quarantine /path/to/agent-browser\n```\n\n### Linux\n\nLinux distributions require WebKit/GTK dependencies for Chrome. Install via your package manager:\n\n```bash\n# Debian/Ubuntu\nsudo apt-get install libgtk-3-0 libnss3\n\n# Fedora\nsudo dnf install gtk3 nss\n```\n\n### Windows\n\nWindows installations automatically configure the required runtime dependencies. Ensure Windows Subsystem for Linux (WSL) compatibility if running in hybrid environments.\n\n## Running Tests\n\nAfter installation, verify the setup by running the test suite:\n\n```bash\n# Unit tests (fast, no Chrome required)\ncd cli && cargo test\n\n# End-to-end tests (requires Chrome installed)\ncd cli && cargo test e2e -- --ignored --test-threads=1\n```\n\nThe project contains approximately 320 unit tests and 18 e2e tests. E2E tests launch real headless Chrome instances and must run serially to avoid instance contention.\n\n资料来源：[AGENTS.md](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md)\n\n## Troubleshooting\n\n### Chrome Download Failures\n\nIf the `install` command fails to download Chrome:\n\n1. Check network connectivity to `Chrome for Testing`\n2. Verify write permissions to the download directory\n3. Use `--download-path` to specify an alternative location with proper permissions\n\n### Permission Denied Errors\n\nEnsure the agent-browser binary has execute permissions:\n\n```bash\nchmod +x /path/to/agent-browser\n```\n\n### Engine Selection\n\nIf Chrome automation fails, try specifying the engine explicitly:\n\n```bash\nagent-browser --engine chrome open https://example.com\n```\n\nThe `--engine` flag supports Chrome (default) and Lightpanda engines for different automation scenarios.\n\n## Next Steps\n\nAfter successful installation:\n\n1. Load core skill documentation: `agent-browser skills get core --full`\n2. Open a test URL: `agent-browser open https://example.com`\n3. Capture a snapshot: `agent-browser snapshot -i`\n4. Explore specialized skills for your use case\n\n资料来源：[skills/agent-browser/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skills/agent-browser/SKILL.md)\n\n---\n\n<a id='element-references'></a>\n\n## Element References System\n\n### 相关页面\n\n相关主题：[State Inspection Commands](#state-inspection-commands), [Interaction Commands](#interaction-commands)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# Element References System\n\nThe Element References System is a core mechanism in agent-browser that provides stable, human-readable identifiers for DOM elements during browser automation tasks. Instead of relying on fragile CSS selectors or XPath expressions, the system assigns unique reference IDs (such as `@e1`, `@e2`) that persist across page states and can be used reliably in subsequent automation commands.\n\n## Overview\n\nElement references serve as the primary interface between automation scripts and the browser's accessibility tree. When a snapshot is taken, each interactive element receives a reference ID that can be used in commands like `click`, `fill`, `type`, and `get` without requiring re-selection.\n\n```mermaid\ngraph TD\n    A[Browser Page] --> B[snapshot Command]\n    B --> C[Accessibility Tree Traversal]\n    C --> D[Element Identification]\n    D --> E[Reference Assignment]\n    E --> F[@e1 @e2 @e3 ...]\n    F --> G[Automation Commands]\n    G --> H[click @e1]\n    G --> I[fill @e2]\n    G --> J[get text @e3]\n```\n\n## Reference Notation Format\n\nElement references follow a standardized notation format that encodes element metadata:\n\n```\n@e1 [tag type=\"value\"] \"text content\" placeholder=\"hint\"\n│    │   │             │               │\n│    │   │             │               └─ Additional attributes\n│    │   │             └─ Visible text\n│    │   └─ Key attributes shown\n│    └─ HTML tag name\n└─ Unique ref ID\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n### Reference Components\n\n| Component | Description | Example |\n|-----------|-------------|---------|\n| `@eN` | Unique reference identifier | `@e1`, `@e42` |\n| Tag | HTML element type | `button`, `input`, `link` |\n| Type attribute | Element type classification | `type=\"email\"`, `type=\"password\"` |\n| Text content | Visible text on element | `\"Submit\"`, `\"Log in\"` |\n| Placeholder | Input placeholder text | `placeholder=\"Email\"` |\n\n## Common Reference Patterns\n\nThe snapshot system recognizes common element patterns and standardizes their reference notation:\n\n```bash\n@e1 [button] \"Submit\"                    # Button with text\n@e2 [input type=\"email\"]                 # Email input\n@e3 [input type=\"password\"]              # Password input\n@e4 [a href=\"/page\"] \"Link Text\"         # Anchor link\n@e5 [select]                             # Dropdown\n@e6 [textarea] placeholder=\"Message\"     # Text area\n@e7 [div class=\"modal\"]                  # Container element\n@e8 [img alt=\"Logo\"]                     # Image with alt text\n@e9 [checkbox] checked                   # Checked checkbox\n@e10 [radio] selected                    # Selected radio button\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## Snapshot Command Options\n\nThe `snapshot` command generates element references with various filtering and formatting options:\n\n```bash\nagent-browser snapshot                    # Full tree (verbose)\nagent-browser snapshot -i                 # Interactive elements only (preferred)\nagent-browser snapshot -i -u              # Include href URLs on links\nagent-browser snapshot -i -c              # Compact mode (no empty structural nodes)\nagent-browser snapshot -i -d 3            # Cap depth at 3 levels\nagent-browser snapshot -s \"#main\"         # Scope to a CSS selector\nagent-browser snapshot -i --json          # Machine-readable output\n```\n\n资料来源：[skill-data/core/SKILL.md]()\n\n### Option Reference\n\n| Option | Purpose | Use Case |\n|--------|---------|----------|\n| `-i` | Interactive elements only | Preferred for automation |\n| `-u` | Include href URLs | When link destinations matter |\n| `-c` | Compact output | Complex pages with many empty nodes |\n| `-d N` | Depth limit | Focus on specific page sections |\n| `-s SELECTOR` | CSS scope | Target specific page regions |\n| `--json` | JSON format | Programmatic processing |\n\n## Element Reference Commands\n\nElement references are used with various commands to interact with page elements:\n\n### Direct Element Commands\n\n```bash\nagent-browser click @e1                   # Click element\nagent-browser click @e1 --new-tab          # Click and open in new tab\nagent-browser fill @e2 \"text\"             # Fill input field\nagent-browser type @e2 \"text\"             # Type character by character\nagent-browser press Enter                 # Press key on focused element\n```\n\n### State Inspection Commands\n\n```bash\nagent-browser get text @e1                # Get visible text\nagent-browser get html @e1                # Get innerHTML\nagent-browser get attr @e1 href           # Get specific attribute\nagent-browser get value @e1               # Get input value\nagent-browser get title                   # Get page title\nagent-browser get url                     # Get current URL\nagent-browser get count \".item\"           # Count matching elements\n```\n\n### State Checking Commands\n\nThe `is` command verifies element states:\n\n```bash\nagent-browser is visible @e1\nagent-browser is enabled @e1\nagent-browser is checked @e1\n```\n\n资料来源：[cli/src/output.rs]()\n\n## Find Command and Locators\n\nThe `find` command provides an alternative to snapshot-based reference acquisition by locating elements using various criteria:\n\n```bash\nagent-browser find <locator> <value> <action> [text]\n```\n\n### Supported Locators\n\n| Locator | Description | Example |\n|---------|-------------|---------|\n| `role` | ARIA role selector | `find role button click` |\n| `text` | Text content match | `find text \"Submit\" click` |\n| `label` | Label text association | `find label \"Email\" fill` |\n| `placeholder` | Placeholder attribute | `find placeholder \"Search\"` |\n| `alt` | Alt text (images) | `find alt \"Logo\" click` |\n| `title` | Title attribute | `find title \"Help\" click` |\n| `testid` | Test identifier | `find testid \"submit-btn\" click` |\n| `first` | First matching selector | `find first button click` |\n| `last` | Last matching selector | `find last link click` |\n| `nth` | Nth matching element | `find nth 5 button click` |\n\n资料来源：[cli/src/commands.rs]()\n\n### Find Command Options\n\n| Option | Purpose |\n|--------|---------|\n| `--exact` | Perform exact string matching |\n| `--name <name>` | Filter by accessible name (role locator) |\n\n## Action Dispatch System\n\nElement reference commands are dispatched to handlers through the action routing system:\n\n```mermaid\ngraph LR\n    A[Command Input] --> B[\"dispatch(\\\"click\\\", state)\"]\n    B --> C{Match Action}\n    C -->|click| D[handle_click]\n    C -->|fill| E[handle_fill]\n    C -->|get| F[handle_get]\n    C -->|is| G[handle_is]\n    C -->|find| H[handle_find]\n```\n\nThe action router maps command strings to their respective handlers in the native daemon:\n\n```rust\n\"click\" => handle_dispatch(cmd, state).await,\n\"fill\" => handle_dispatch(cmd, state).await,\n\"get\" => handle_dispatch(cmd, state).await,\n\"is\" => handle_dispatch(cmd, state).await,\n\"find\" => handle_dispatch(cmd, state).await,\n```\n\n资料来源：[cli/src/native/actions.rs]()\n\n### Available Element Actions\n\n| Action | Handler | Purpose |\n|--------|---------|---------|\n| `click` | `handle_dispatch` | Mouse click |\n| `fill` | `handle_dispatch` | Fill input with text |\n| `type` | `handle_dispatch` | Character-by-character typing |\n| `press` | `handle_dispatch` | Keyboard press |\n| `hover` | `handle_dispatch` | Mouse hover |\n| `select` | `handle_dispatch` | Select dropdown option |\n| `check` | `handle_dispatch` | Check checkbox/radio |\n| `uncheck` | `handle_dispatch` | Uncheck checkbox |\n| `focus` | `handle_dispatch` | Focus element |\n| `blur` | `handle_dispatch` | Blur element |\n\n## Iframe Support\n\nElement references automatically handle iframe content. When a snapshot is taken, iframe elements are resolved and their child accessibility trees are included inline:\n\n```bash\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Checkout\"\n# @e2 [Iframe] \"payment-frame\"\n#   @e3 [input] \"Card number\"\n#   @e4 [input] \"Expiry\"\n#   @e5 [button] \"Pay\"\n# @e6 [button] \"Cancel\"\n```\n\nReferences to elements inside iframes carry frame context, allowing direct interactions without manual frame switching:\n\n```bash\nagent-browser click @e3                    # Works inside iframe\nagent-browser fill @e4 \"12/25\"\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## Best Practices\n\n### Always Snapshot Before Interacting\n\n```bash\n# CORRECT\nagent-browser open https://example.com\nagent-browser snapshot -i          # Get refs first\nagent-browser click @e1            # Use ref\n\n# WRONG\nagent-browser open https://example.com\nagent-browser click @e1            # Ref doesn't exist yet!\n```\n\n### Re-Snapshot After Navigation\n\n```bash\nagent-browser click @e5            # Navigates to new page\nagent-browser snapshot -i          # Get new refs\nagent-browser click @e1            # Use new refs\n```\n\n### Re-Snapshot After Dynamic Changes\n\n```bash\nagent-browser click @e1            # Opens dropdown\nagent-browser snapshot -i          # See dropdown items\nagent-browser click @e7            # Select item\n```\n\n### Snapshot Specific Regions\n\nFor complex pages, snapshot specific areas to reduce noise:\n\n```bash\n# Snapshot just a form\nagent-browser snapshot @e9\n```\n\n## Session-Dependent References\n\nElement references are session-dependent and may vary between browser sessions. The same element on the same page might receive different reference IDs in different sessions:\n\n| Element | Typical Ref Range | How to Find |\n|---------|------------------|-------------|\n| Home tab | e10-e20 | `snapshot -i \\| grep \"Home\"` |\n| DMs tab | e10-e20 | `snapshot -i \\| grep \"DMs\"` |\n| Activity tab | e10-e20 | `snapshot -i \\| grep \"Activity\"` |\n| Search | e5-e10 | `snapshot -i \\| grep \"Search\"` |\n| More unreads | e20-e30 | `snapshot -i \\| grep \"More unreads\"` |\n| Channel refs | e30+ | `snapshot -i \\| grep \"channel-name\"` |\n\n资料来源：[skill-data/slack/references/slack-tasks.md]()\n\n## Architecture Summary\n\n```mermaid\ngraph TD\n    subgraph \"CLI Layer\"\n        A[User Command] --> B[commands.rs Parser]\n        B --> C[Command Dispatch]\n    end\n    \n    subgraph \"Native Daemon\"\n        C --> D[actions.rs Router]\n        D --> E[State Manager]\n        E --> F[CDP Client]\n    end\n    \n    subgraph \"Browser Layer\"\n        F --> G[Chrome DevTools Protocol]\n        G --> H[Accessibility Tree]\n    end\n    \n    subgraph \"Reference Generation\"\n        H --> I[Element ID Assignment]\n        I --> J[@eN Reference Labels]\n    end\n    \n    J --> K[Snapshot Output]\n    K --> L[Automation Commands]\n```\n\nThe Element References System provides the foundation for reliable browser automation by abstracting DOM complexity behind human-readable identifiers that remain stable across page states and navigation events.\n\n---\n\n<a id='architecture-overview'></a>\n\n## Architecture Overview\n\n### 相关页面\n\n相关主题：[Daemon and CDP Protocol](#daemon-and-cdp), [Introduction to Agent Browser](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/mod.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/mod.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/native/stream/websocket.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/websocket.rs)\n- [cli/src/native/react/suspense.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/react/suspense.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/connection.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/connection.rs)\n</details>\n\n# Architecture Overview\n\nagent-browser is a Rust-based browser automation framework that provides high-performance browser control through native CDP (Chrome DevTools Protocol) communication. The system is designed for AI agent integration, enabling reliable and observable browser automation.\n\n## System Architecture\n\nThe architecture follows a layered approach with clear separation between the CLI interface, daemon process, and browser engine.\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        CLI[CLI Interface]\n        Dashboard[Web Dashboard]\n    end\n\n    subgraph \"Daemon Layer\"\n        WS[WebSocket Server]\n        Dispatcher[Action Dispatcher]\n        State[State Manager]\n    end\n\n    subgraph \"CDP Layer\"\n        CDP[CDP Client]\n        Protocol[Protocol Handler]\n    end\n\n    subgraph \"Browser Engine\"\n        Chrome[Chrome/Chromium]\n        Lightpanda[Lightpanda]\n    end\n\n    CLI --> WS\n    Dashboard --> WS\n    WS --> Dispatcher\n    Dispatcher --> CDP\n    CDP --> Chrome\n    CDP --> Lightpanda\n    Dispatcher --> State\n```\n\n## Core Components\n\n### Daemon Architecture\n\nThe browser automation daemon is the central coordinator that manages browser sessions and handles command dispatching. It runs as a persistent process that maintains browser state across multiple operations.\n\n**Key Responsibilities:**\n\n| Component | Responsibility |\n|-----------|----------------|\n| WebSocket Server | Accepts client connections with origin validation |\n| Action Dispatcher | Routes commands to appropriate handlers |\n| State Manager | Maintains session state and snapshots |\n| CDP Client | Manages protocol-level communication |\n\n资料来源：[cli/src/native/mod.rs]()\n\n### Action Dispatch System\n\nThe action system provides a comprehensive set of browser automation commands. Actions are dispatched based on command type and handle specific browser operations.\n\n**Action Categories:**\n\n| Category | Commands |\n|----------|----------|\n| Navigation | `goto`, `back`, `forward`, `reload`, `waitforurl`, `waitforloadstate` |\n| Interaction | `click`, `fill`, `press`, `select`, `check`, `uncheck`, `multiselect` |\n| Content | `snapshot`, `innertext`, `innerhtml`, `gettext`, `getattribute` |\n| State | `cookies_get`, `cookies_set`, `storage_get`, `storage_set` |\n| Network | `route`, `unroute`, `requests`, `har` |\n| React Debug | `react_tree`, `react_inspect`, `react_renders_start` |\n\n资料来源：[cli/src/native/actions.rs:1-50]()\n\n### CDP Client Layer\n\nThe CDP (Chrome DevTools Protocol) client handles low-level communication with the browser engine. This abstraction allows the system to work with different browser engines through a unified interface.\n\n**Supported Engines:**\n\n| Engine | Selection Flag |\n|--------|----------------|\n| Chrome/Chromium | `--engine chrome` (default) |\n| Lightpanda | `--engine lightpanda` |\n\n资料来源：[cli/src/native/mod.rs]()\n\n## Communication Protocol\n\n### WebSocket Server\n\nThe daemon exposes a WebSocket server for client communication. Security is enforced through origin validation.\n\n```mermaid\ngraph LR\n    Client[Client App] -->|WebSocket| OriginCheck[Origin Check]\n    OriginCheck -->|Allowed| Accept[Accept Connection]\n    OriginCheck -->|Blocked| Reject[403 Forbidden]\n```\n\n**Origin Validation:**\n\nThe server validates the `Origin` header on incoming WebSocket requests. Connections from disallowed origins receive a `403 Forbidden` response before any data exchange occurs.\n\n```rust\nif !is_allowed_origin(origin.as_deref()) {\n    return Err(reject); // Status: FORBIDDEN\n}\n```\n\n资料来源：[cli/src/native/stream/websocket.rs:15-30]()\n\n### Request/Response Flow\n\nAll commands follow a request-response pattern:\n\n1. Client sends JSON command via WebSocket\n2. Server validates origin\n3. Dispatcher routes to appropriate handler\n4. Handler executes CDP operation\n5. Result returned as JSON response\n\n## State Management\n\n### Session State\n\nThe daemon maintains persistent state for each browser session:\n\n| State Component | Description |\n|-----------------|-------------|\n| Tabs | Active tab list and current tab reference |\n| Frame | Current frame hierarchy |\n| Viewport | Window dimensions |\n| Recording | Video recording status |\n\n资料来源：[cli/src/native/stream/websocket.rs:5-15]()\n\n### Snapshot System\n\nThe snapshot system provides accessibility-tree based page representation with stable element references (`@e1`, `@e2`, etc.) for reliable element selection across page mutations.\n\n**Best Practice:** Always snapshot before interacting with elements, as refs change after navigation or dynamic content changes.\n\n资料来源：[skill-data/core/references/snapshot-refs.md]()\n\n## React Inspection System\n\nFor React-based applications, the daemon provides specialized inspection capabilities:\n\n### Blocker Detection\n\nThe system identifies React Suspense boundaries and classifies them by impact:\n\n| Blocker Kind | Weight | Actionability |\n|--------------|--------|---------------|\n| ClientHook | 7 | 90 |\n| RequestApi | 6 | 88 |\n| ServerFetch | 5 | 82 |\n| Cache | 4 | 74 |\n| Stream | 3 | 60 |\n| Unknown | 2 | 35 |\n| Framework | 1 | 18 |\n\n### Boundary Classification\n\n| Boundary Kind | Description |\n|---------------|-------------|\n| RouteSegment | Next.js/App Router segment boundary |\n| ExplicitSuspense | User-declared `<Suspense>` component |\n| Component | Implicit boundary from component structure |\n\n资料来源：[cli/src/native/react/suspense.rs:30-60]()\n\n## CLI Architecture\n\nThe CLI provides both interactive and scripted access to browser automation:\n\n### Command Structure\n\n```\nagent-browser <command> [args]\n```\n\n**Primary Command Groups:**\n\n| Group | Purpose |\n|-------|---------|\n| `agent-browser open` | Navigate to URL |\n| `agent-browser <action>` | Execute automation action |\n| `agent-browser set` | Configure browser settings |\n| `agent-browser network` | Manage network interception |\n| `agent-browser state` | Save/load/restore sessions |\n| `agent-browser tab` | Manage browser tabs |\n| `agent-browser screenshot` | Capture page images |\n| `agent-browser install` | Download Chrome |\n\n资料来源：[cli/src/output.rs]()\n\n## Dashboard Architecture\n\nThe web-based dashboard provides visual monitoring and control:\n\n```mermaid\ngraph TD\n    Dashboard[Dashboard App] -->|API| Daemon\n    Dashboard -->|Display| Results[screenshots/snapshots]\n    Dashboard -->|Controls| Form[Control Form]\n```\n\n**Dashboard Features:**\n\n- Resizable split view (controls + results)\n- Responsive layout for mobile/desktop\n- Real-time screenshot display with base64 encoding\n- Snapshot viewer with step history\n- Step-by-step playback of automation sequences\n\n资料来源：[packages/dashboard/src/components/extensions-panel.tsx]()\n\n## Installation and Dependencies\n\n### Chrome Installation\n\nThe `install` command downloads Chrome directly from Chrome for Testing:\n\n```bash\nagent-browser install\n```\n\nThis ensures the Chrome binary is available for CDP communication without requiring system-wide Chrome installation.\n\n## Testing Architecture\n\n### Unit Tests\n\nFast tests (~320) that verify individual components without Chrome dependency:\n\n```bash\ncd cli && cargo test\n```\n\n### End-to-End Tests\n\nIntegration tests that launch real headless Chrome:\n\n```bash\ncd cli && cargo test e2e -- --ignored --test-threads=1\n```\n\n**Requirements:**\n\n- Chrome must be installed\n- Tests run serially to avoid browser instance contention\n\n## Security Considerations\n\n| Aspect | Implementation |\n|--------|----------------|\n| Origin Validation | WebSocket connections validated before acceptance |\n| Session Isolation | Each session maintains separate state |\n| Credential Storage | Authentication vault for secure credential handling |\n\n## Summary\n\nagent-browser implements a clean three-tier architecture:\n\n1. **Client Layer** - CLI and dashboard provide user interfaces\n2. **Daemon Layer** - Rust-based server handles command dispatch and state\n3. **CDP Layer** - Browser-agnostic protocol client enables Chrome/Lightpanda support\n\nThe design prioritizes reliability (stable element refs), observability (snapshots, screenshots, video recording), and extensibility (skill-based system for specialized automation tasks).\n\n---\n\n<a id='daemon-and-cdp'></a>\n\n## Daemon and CDP Protocol\n\n### 相关页面\n\n相关主题：[Architecture Overview](#architecture-overview), [Browser Engine Integration](#browser-engines)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/cdp/client.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/cdp/client.rs)\n- [cli/src/native/cdp/chrome.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/cdp/chrome.rs)\n- [cli/src/native/stream/mod.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/mod.rs)\n- [cli/src/native/stream/websocket.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/websocket.rs)\n- [cli/src/native/stream/cdp_loop.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/stream/cdp_loop.rs)\n- [cli/cdp-protocol/browser_protocol.json](https://github.com/vercel-labs/agent-browser/blob/main/cli/cdp-protocol/browser_protocol.json)\n- [cli/cdp-protocol/js_protocol.json](https://github.com/vercel-labs/agent-browser/blob/main/cli/cdp-protocol/js_protocol.json)\n</details>\n\n# Daemon and CDP Protocol\n\n## Overview\n\nThe agent-browser project implements a native Rust-based browser automation daemon that communicates with Chrome/Chromium browsers via the Chrome DevTools Protocol (CDP). The architecture separates the automation logic from browser control through WebSocket-based CDP connections, enabling AI agents to interact with web pages through a CLI interface.\n\n**Architecture Layer Diagram:**\n\n```mermaid\ngraph TD\n    A[CLI Interface] --> B[Action Dispatcher]\n    B --> C[CDP Client]\n    C --> D[WebSocket Stream]\n    D --> E[CDP Loop Handler]\n    E --> F[Chrome Browser Instance]\n    \n    G[CDP Protocol Files] --> F\n    H[Generated CDP Types] --> C\n```\n\n## Daemon Architecture\n\n### Native Daemon Components\n\nThe daemon lives in `cli/src/native/` and handles all browser automation tasks. The main components include:\n\n| Component | Location | Purpose |\n|-----------|----------|---------|\n| Daemon | `cli/src/native/daemon/` | Process management and state coordination |\n| Actions | `cli/src/native/actions.rs` | Command handlers for browser operations |\n| Browser | `cli/src/native/browser/` | Browser instance lifecycle |\n| CDP Client | `cli/src/native/cdp/client.rs` | Protocol communication |\n| CDP Loop | `cli/src/native/stream/cdp_loop.rs` | Message processing loop |\n\n资料来源：[cli/src/native/actions.rs](cli/src/native/actions.rs)\n\n### Action Dispatch\n\nThe action handler maps command names to their implementation functions. Supported actions include:\n\n```rust\nlet result = match action {\n    \"launch\" => handle_launch(cmd, state).await,\n    \"navigate\" => handle_navigate(cmd, state).await,\n    \"url\" => handle_url(state).await,\n    \"cdp_url\" => handle_cdp_url(state),\n    \"inspect\" => handle_inspect(state).await,\n    \"title\" => handle_title(state).await,\n    \"content\" => handle_content(state).await,\n    \"evaluate\" => handle_evaluate(cmd, state).await,\n    \"close\" => handle_close(state).await,\n    \"snapshot\" => handle_snapshot(cmd, state).await,\n    \"screenshot\" => handle_screenshot(cmd, state).await,\n    \"click\" => handle_click(cmd, state).await,\n    \"dblclick\" => handle_dblclick(cmd, state).await,\n    \"fill\" => handle_fill(cmd, state).await,\n    \"type\" => handle_type(cmd, state).await,\n    \"press\" => handle_press(cmd, state).await,\n    \"hover\" => handle_hover(cmd, state).await,\n    \"scroll\" => handle_scroll(cmd, state).await,\n    // ... additional actions\n};\n```\n\n资料来源：[cli/src/native/actions.rs:50-75](cli/src/native/actions.rs)\n\n### Browser Engine Selection\n\nThe `--engine` flag selects between Chrome and Lightpanda browsers. Chrome is downloaded from Chrome for Testing via the `install` command.\n\n## CDP Protocol Implementation\n\n### Protocol Files\n\nThe CDP protocol definitions are stored in JSON format:\n\n| File | Description |\n|------|-------------|\n| `browser_protocol.json` | Core browser domains (Page, Network, Runtime, etc.) |\n| `js_protocol.json` | JavaScript debugging domains |\n\n资料来源：[cli/cdp-protocol/browser_protocol.json](cli/cdp-protocol/browser_protocol.json)\n\n### Auto-Generated Types\n\nCDP types are auto-generated from protocol JSON files:\n\n```rust\n/// Auto-generated CDP types from protocol JSON files in `cdp-protocol/`.\n///\n/// To populate: download `browser_protocol.json` and `js_protocol.json` from\n/// <https://github.com/nicolo-ribaudo/nicolo-ribaudo.github.io/> (or any\n/// Chromium source) into `cli/cdp-protocol/` and rebuild.\n#[allow(clippy::upper_case_acronyms)]\npub mod generated {\n    include!(concat!(env!(\"OUT_DIR\"), \"/cdp_generated.rs\"));\n}\n```\n\n资料来源：[cli/src/native/cdp/types.rs](cli/src/native/cdp/types.rs)\n\n### CDP Client Structure\n\nThe CDP client manages communication with the browser:\n\n```mermaid\ngraph LR\n    A[Command] --> B[CDP Client]\n    B --> C[WebSocket Writer]\n    C --> D[Browser CDP Endpoint]\n    \n    E[Browser Events] --> F[WebSocket Reader]\n    F --> G[Event Handler]\n    G --> H[State Updates]\n```\n\n## WebSocket Communication\n\n### Stream Module Architecture\n\nThe WebSocket communication is handled by the stream module located in `cli/src/native/stream/`:\n\n| Module | File | Purpose |\n|--------|------|---------|\n| Stream Core | `cli/src/native/stream/mod.rs` | Stream trait definitions and utilities |\n| WebSocket | `cli/src/native/stream/websocket.rs` | WebSocket connection handling |\n| CDP Loop | `cli/src/native/stream/cdp_loop.rs` | CDP message processing loop |\n\n### WebSocket Connection\n\nThe WebSocket module establishes and maintains connections to the Chrome DevTools endpoint:\n\n```mermaid\nsequenceDiagram\n    participant CLI as CLI Command\n    participant Client as CDP Client\n    participant WS as WebSocket\n    participant Chrome as Chrome Browser\n    \n    CLI->>Client: connect(url)\n    Client->>WS: establish_connection()\n    WS->>Chrome: WebSocket Handshake\n    Chrome-->>WS: 101 Switching Protocols\n    WS-->>Client: Connected\n    \n    loop Message Exchange\n        CLI->>Client: send_command()\n        Client->>WS: write_message()\n        WS->>Chrome: CDP JSON Message\n        Chrome-->>WS: CDP Response/Event\n        WS-->>Client: read_message()\n        Client-->>CLI: Result\n    end\n```\n\n### CDP Loop Handler\n\nThe CDP loop processes incoming messages and manages the event queue:\n\n- Handles CDP events from the browser\n- Routes responses to pending command callbacks\n- Manages connection state and reconnection logic\n\n资料来源：[cli/src/native/stream/cdp_loop.rs](cli/src/native/stream/cdp_loop.rs)\n\n## Browser Connection\n\n### Connection Methods\n\nThe daemon supports multiple connection methods:\n\n| Method | Command | Use Case |\n|--------|---------|----------|\n| Launch new browser | `agent-browser open` | Fresh browser instance |\n| Connect to existing | `agent-browser connect 9222` | Attach to running browser |\n\n```bash\n# Launch with navigation\nagent-browser open <url>\n\n# Connect to running browser on specific port\nagent-browser connect 9222\n\n# Launch without navigation (clean slate)\nagent-browser open\n```\n\n### CDP WebSocket URL\n\nThe CDP WebSocket URL can be retrieved programmatically:\n\n```bash\nagent-browser cdp_url\n```\n\nThis returns the WebSocket debugger URL for programmatic browser attachment.\n\n### Browser Version Info\n\nThe connection retrieves browser metadata:\n\n```rust\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct BrowserVersionInfo {\n    #[serde(rename = \"webSocketDebuggerUrl\")]\n    pub web_socket_debugger_url: Option<String>,\n    #[serde(rename = \"Browser\")]\n    pub browser: Option<String>,\n}\n```\n\n资料来源：[cli/src/native/cdp/types.rs](cli/src/native/cdp/types.rs)\n\n## CDP Protocol Domains\n\n### Supported Domains\n\nThe agent-browser supports CDP domains for:\n\n| Domain | Purpose | Key Commands |\n|--------|---------|--------------|\n| Page | Page navigation and loading | navigate, reload, back, forward |\n| Runtime | JavaScript execution | evaluate, callFunctionOn |\n| DOM | DOM manipulation | getDocument, describeNode |\n| Input | User input simulation | dispatchEvent, insertText |\n| Network | Network request interception | setRequestInterception, getResponseBody |\n| Target | Browser target management | createTarget, attachToTarget |\n\n### Browser Automation Actions\n\nThe following high-level actions are available via CDP:\n\n```bash\n# Navigation\nagent-browser open <url>\nagent-browser back\nagent-browser forward\nagent-browser reload\n\n# DOM Interaction\nagent-browser click @e1\nagent-browser fill @e2 \"text\"\nagent-browser type @e3 \"input\"\nagent-browser hover @e4\nagent-browser scroll down 500\n\n# State Queries\nagent-browser snapshot\nagent-browser screenshot\nagent-browser get text @e1\nagent-browser get attr @e1 href\n\n# JavaScript\nagent-browser evaluate \"document.title\"\n```\n\n## Error Handling\n\n### WebDriver Fallback\n\nThe daemon gracefully handles unsupported actions when using WebDriver backend:\n\n```rust\nErr(anyhow::anyhow!(\n    \"Action '{}' is not supported on the WebDriver backend\",\n    action\n))\n```\n\n### CDP Error Propagation\n\nCDP errors are propagated through the action chain, enabling detailed error messages for debugging failed browser operations.\n\n## Performance Considerations\n\n### Session Management\n\n- Each browser session maintains a persistent CDP connection\n- Sessions can be named and persisted for multi-session workflows\n- State persistence allows resuming automation tasks\n\n### Network Idle Detection\n\nThe daemon supports waiting for network idle states:\n\n```bash\nagent-browser wait --load networkidle\n```\n\nThis is essential for SPAs and applications with dynamic content loading.\n\n## Security Model\n\n### Credential Management\n\nThe daemon provides a secure credential vault for browser authentication:\n\n```bash\nagent-browser set credentials <user> <pass>\n```\n\n### Cookie Management\n\nCookies can be set from various formats:\n\n```bash\nagent-browser cookies set --curl <file> [--domain <host>]\n```\n\nAuto-detects JSON, cURL, and Cookie-header file formats.\n\n## Extension Points\n\n### Custom CDP Scripts\n\nExecute arbitrary JavaScript in the browser context:\n\n```bash\nagent-browser addscript <script>\nagent-browser addinitscript <script>\n```\n\n### Custom Styles\n\nInject CSS for visual testing:\n\n```bash\nagent-browser addstyle <css>\n```\n\n## Summary\n\nThe Daemon and CDP Protocol architecture enables agent-browser to provide a performant, Rust-native browser automation solution. By implementing direct CDP communication over WebSockets, the project avoids dependencies on Node.js wrappers like Playwright or Puppeteer while maintaining full compatibility with Chrome's DevTools Protocol capabilities.\n\nThe separation of concerns between the action dispatcher, CDP client, and WebSocket stream layers ensures maintainability and enables future extensions for additional browser engines and protocol features.\n\n---\n\n<a id='navigation-commands'></a>\n\n## Navigation Commands\n\n### 相关页面\n\n相关主题：[Interaction Commands](#interaction-commands), [State Inspection Commands](#state-inspection-commands)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n</details>\n\n# Navigation Commands\n\nNavigation Commands in agent-browser provide the fundamental mechanisms for controlling browser state, page loading, and session management. These commands enable AI agents and automated scripts to interact with web pages by controlling navigation flow, managing browser windows, and handling page lifecycle events.\n\n## Overview\n\nThe Navigation Commands subsystem handles all operations related to:\n\n- **Browser Launch and Shutdown** — Initialize and terminate browser instances\n- **Page Navigation** — Navigate to URLs, handle history traversal, and manage SPA routing\n- **Session Management** — Connect to existing browser instances via CDP protocol\n- **Pre-navigation Setup** — Configure browser state before initial page load\n\n```mermaid\ngraph TD\n    A[User Command] --> B{Command Type}\n    B -->|open/goto/navigate| C[Parse URL & Flags]\n    B -->|back/forward/reload| D[History Action]\n    B -->|pushstate| E[SPA Navigation]\n    B -->|connect| F[CDP Connection]\n    B -->|close| G[Cleanup Session]\n    \n    C --> H{URL Protocol?}\n    H -->|http/https| I[Direct Navigation]\n    H -->|about/data/file| I\n    H -->|none specified| J[Prepend https://]\n    \n    I --> K[Execute Navigation]\n    D --> L[Browser History API]\n    E --> M[History PushState + Events]\n    F --> N[Remote CDP Session]\n    G --> O[Close All Tabs/Session]\n    \n    K --> P[Return Result JSON]\n    L --> P\n    M --> P\n    N --> P\n    O --> P\n```\n\n## Core Navigation Commands\n\n### `open` — Launch Browser\n\nLaunches a new browser instance. When called without a URL, it opens about:blank and allows staging browser state before the first navigation.\n\n**Usage:**\n\n```bash\nagent-browser open\nagent-browser open <url>\n```\n\n| Variant | Behavior |\n|---------|----------|\n| `open` (no args) | Launch on about:blank; allows `network route`, `cookies set`, or `addinitscript` before first navigation |\n| `open <url>` | Launch and immediately navigate to the specified URL |\n\n**URL Auto-prepend Logic:**\n\nThe CLI automatically prepends `https://` if no protocol is specified. Supported protocols include:\n\n| Protocol | Example |\n|----------|---------|\n| `https://` | `https://example.com` |\n| `http://` | `http://localhost:3000` |\n| `about:` | `about:blank`, `about:version` |\n| `data:` | `data:text/html,<h1>Hello</h1>` |\n| `file://` | `file:///path/to/page.html` |\n| `chrome-extension://` | `chrome-extension://...` |\n| `chrome://` | `chrome://version` |\n\n```rust\nlet url_lower = url.to_lowercase();\nlet url = if url_lower.starts_with(\"http://\")\n    || url_lower.starts_with(\"https://\")\n    || url_lower.starts_with(\"about:\")\n    || url_lower.starts_with(\"data:\")\n    || url_lower.starts_with(\"file:\")\n    || url_lower.starts_with(\"chrome-extension://\")\n    || url_lower.starts_with(\"chrome://\")\n{\n    url.to_string()\n} else {\n    format!(\"https://{}\", url)\n};\n```\n\n资料来源：[cli/src/commands.rs:35-50](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n\n### `goto` / `navigate` — Navigate to URL\n\nAliases for navigation to a specific page. Both commands require a URL argument.\n\n```bash\nagent-browser goto https://example.com\nagent-browser navigate example.com  # auto-prepends https://\n```\n\n资料来源：[cli/src/commands.rs:25-30](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n\n### `pushstate` — SPA Client-side Navigation\n\nPerforms client-side navigation in Single Page Applications (SPA) using `history.pushState`. This command triggers the appropriate navigation events that modern frameworks like Next.js rely on.\n\n```bash\nagent-browser pushstate <url>\n```\n\n**Behavior:**\n\n1. Calls `history.pushState` with the target URL\n2. Dispatches `popstate` and `navigate` events\n3. Auto-detects `window.next.router.push` for Next.js applications and triggers RSC fetch\n\n```bash\nagent-browser pushstate /dashboard\nagent-browser pushstate /products/123\n```\n\n### `back` — Go Back\n\nNavigates the current tab backward in browser history.\n\n```bash\nagent-browser back\n```\n\n### `forward` — Go Forward\n\nNavigates the current tab forward in browser history.\n\n```bash\nagent-browser forward\n```\n\n### `reload` — Reload Page\n\nReloads the current page, respecting cache settings.\n\n```bash\nagent-browser reload\n```\n\n### `close` — Close Browser\n\nCloses the browser instance and terminates the session.\n\n```bash\nagent-browser close\nagent-browser close --all\n```\n\n| Flag | Behavior |\n|------|----------|\n| (default) | Close current session |\n| `--all` | Close all browser sessions |\n\n### `connect` — CDP Remote Connection\n\nConnects to an existing browser instance via Chrome DevTools Protocol (CDP) port.\n\n```bash\nagent-browser connect <port>\n```\n\n```bash\nagent-browser connect 9222  # Connect to browser on port 9222\n```\n\n## Pre-navigation Setup (One-turn Batch)\n\nFor scenarios requiring state staging before the first navigation (e.g., blocking scripts, setting cookies), agent-browser supports batch operations:\n\n```bash\nagent-browser batch \\\n  '[\"open\"]' \\\n  '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n  '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n  '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\nThis pattern:\n\n1. Opens browser on about:blank\n2. Registers a network route to abort all script resources\n3. Sets cookies from a curl-format cookie file\n4. Navigates to the target URL\n\n资料来源：[skill-data/core/references/commands.md:18-26](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n\n## Command Dispatch Architecture\n\nThe command dispatch system maps command strings to handler functions:\n\n```rust\n\"open\" | \"goto\" | \"navigate\" => handle_navigation(cmd, rest, flags, state).await,\n\"back\" => handle_back(cmd, state).await,\n\"forward\" => handle_forward(cmd, state).await,\n\"reload\" => handle_reload(cmd, state).await,\n\"pushstate\" => handle_pushstate(cmd, rest, state).await,\n\"close\" | \"quit\" | \"exit\" => handle_close(cmd, rest, state).await,\n\"connect\" => handle_connect(cmd, rest, state).await,\n```\n\n资料来源：[cli/src/native/actions.rs:30-45](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n\n## Navigation Command Response Format\n\nAll navigation commands return a JSON response indicating success or failure:\n\n**Success Response:**\n\n```json\n{\n  \"id\": \"session-id\",\n  \"action\": \"navigate\",\n  \"url\": \"https://example.com\"\n}\n```\n\n**Error Response (Missing URL):**\n\n```json\n{\n  \"error\": \"MissingArguments\",\n  \"context\": \"goto\",\n  \"message\": \"Expected URL argument\"\n}\n```\n\n## Flags for Navigation Commands\n\n| Flag | Applies To | Purpose |\n|------|------------|---------|\n| `--headed` | `open` | Launch browser in headed (visible) mode |\n| `--wait-until <event>` | `goto`, `navigate`, `open` | Wait for navigation event (load, domcontentloaded, networkidle) |\n| `--provider <name>` | All navigation | Specify CDP provider (e.g., vercel-sandbox) |\n| `--session <name>` | All commands | Use a specific named session |\n\n```bash\nagent-browser open --headed\nagent-browser goto https://example.com --wait-until networkidle\n```\n\n## Common Usage Patterns\n\n### Basic Navigation Flow\n\n```bash\nagent-browser open https://example.com\nagent-browser snapshot -i\nagent-browser click @e1\nagent-browser back\n```\n\n### Debugging with Pre-navigation Setup\n\n```bash\n# Block all third-party scripts\nagent-browser open\nagent-browser network route \"*\" --abort --resource-type script\nagent-browser goto https://example.com\n```\n\n### SPA Navigation with Framework Detection\n\n```bash\nagent-browser open https://my-nextjs-app.com\nagent-browser click @e5  # Navigate to another route\nagent-browser pushstate /new-route  # Trigger client-side navigation\nagent-browser snapshot -i\n```\n\n## Session and Tab Management\n\nNavigation commands operate within the context of a session. Each session can contain multiple tabs:\n\n| Command | Purpose |\n|---------|---------|\n| `tab new [url]` | Open a new tab |\n| `tab list` | List all open tabs |\n| `tab <n>` | Switch to tab by index |\n| `tab close` | Close current tab |\n\n```bash\nagent-browser tab new\nagent-browser tab new https://example.com\nagent-browser tab 2\nagent-browser tab close\n```\n\n## Implementation Details\n\n### URL Parsing in `commands.rs`\n\nThe navigation handler in `cli/src/commands.rs` performs the following steps:\n\n1. **Argument Extraction** — Scans command arguments for the first non-flag value as URL\n2. **Protocol Validation** — Checks if URL starts with a supported protocol scheme\n3. **Auto-prepend** — Adds `https://` prefix if no protocol detected\n4. **Command Construction** — Builds JSON command payload with action type and URL\n\n```mermaid\nsequenceDiagram\n    User->>CLI: agent-browser goto example.com\n    CLI->>Parser: Parse \"goto\" command\n    Parser->>URL Validator: Check \"example.com\"\n    URL Validator->>URL Validator: No protocol prefix\n    URL Validator-->>Parser: Prepend https://\n    Parser->>Builder: Build navigate command\n    Builder->>Browser: Execute navigation\n    Browser-->>User: JSON response\n```\n\n## Related Commands\n\n| Command Category | Commands |\n|------------------|----------|\n| **State Inspection** | `snapshot`, `screenshot`, `get` |\n| **Element Interaction** | `click`, `fill`, `type`, `press` |\n| **Network Control** | `network route`, `cookies`, `storage` |\n| **Browser Settings** | `set viewport`, `set geo`, `set offline` |\n\n---\n\n<a id='interaction-commands'></a>\n\n## Interaction Commands\n\n### 相关页面\n\n相关主题：[Navigation Commands](#navigation-commands), [State Inspection Commands](#state-inspection-commands), [Element References System](#element-references)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/interaction.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/interaction.rs)\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# Interaction Commands\n\nInteraction Commands are the core primitives that enable AI agents to programmatically control and manipulate web pages in the agent-browser system. These commands provide atomic operations for clicking elements, entering text, scrolling, and capturing page state through an accessibility-tree based reference system.\n\n## Architecture Overview\n\nThe interaction system follows a command dispatch pattern where incoming commands are routed to appropriate handlers based on their operation type. The architecture separates concerns between command parsing, execution, and output formatting.\n\n```mermaid\ngraph TD\n    A[User/Agent Input] --> B[Command Parser]\n    B --> C[actions.rs Dispatcher]\n    C --> D[interaction.rs Handlers]\n    D --> E[CDP Protocol Layer]\n    E --> F[Browser Engine]\n    F --> G[Page Response]\n    G --> H[output.rs Formatter]\n    H --> I[Terminal/Agent]\n    \n    C -.->|click, fill, type, scroll| D\n    C -.->|mouse, keyboard| D\n    C -.->|snapshot, screenshot| D\n```\n\n### Component Responsibilities\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| Command Dispatcher | `actions.rs` | Routes commands to handlers |\n| Interaction Handlers | `interaction.rs` | Executes atomic browser operations |\n| Output Formatter | `output.rs` | Formats and presents results |\n| CDP Layer | Native | Chrome DevTools Protocol communication |\n\n## Element Reference System\n\nInteraction commands use an element reference system (`@e1`, `@e2`, etc.) to identify targets on the page. These references are obtained through snapshot operations and represent unique identifiers in the accessibility tree.\n\n```mermaid\ngraph LR\n    A[Page HTML] --> B[Accessibility Tree]\n    B --> C[Snapshot Command]\n    C --> D[@e1 button \"Submit\"]\n    C --> E[@e2 input \"Email\"]\n    D --> F[Click @e1]\n    E --> G[Fill @e2 \"text\"]\n```\n\n**Reference Format:**\n```\n@e1 [tag type=\"value\"] \"text content\" placeholder=\"hint\"\n│    │   │             │               │\n│    │   │             │               └─ Additional attributes\n│    │   │             └─ Visible text\n│    │   └─ Key attributes shown\n│    └─ HTML tag name\n└─ Unique ref ID\n```\n\n资料来源：[skill-data/core/references/snapshot-refs.md:1-50]()\n\n## Core Interaction Commands\n\n### Element Selection Commands\n\n| Command | Description | Parameters |\n|---------|-------------|------------|\n| `find` | Find elements by locator | `<locator> <value> [action] [text]` |\n| `count` | Count matching elements | `<selector>` |\n| `is` | Check element state | `<what> <selector>` |\n\n**Locators supported:** `role`, `text`, `label`, `placeholder`, `alt`, `title`, `testid`, `first`, `last`, `nth`\n\n资料来源：[cli/src/output.rs:1-20]()\n\n### Mouse Commands\n\n```mermaid\ngraph TD\n    A[mouse] --> B[move <x> <y>]\n    A --> C[down <btn>]\n    A --> D[up <btn>]\n    A --> E[wheel <dy> <dx>]\n    \n    B --> F[Dispatch mousemove event]\n    C --> G[Dispatch mousedown event]\n    D --> H[Dispatch mouseup event]\n    E --> I[Dispatch wheel event]\n```\n\n| Command | Description |\n|---------|-------------|\n| `mouse move <x> <y>` | Move cursor to coordinates |\n| `mouse down [btn]` | Press mouse button (default: left) |\n| `mouse up [btn]` | Release mouse button |\n| `mouse wheel <dy> [dx]` | Scroll wheel (delta Y/X) |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Keyboard Commands\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `type` | Type text (with key events) | `type @e1 \"hello\"` |\n| `press` | Press special key | `press Enter` |\n| `setvalue` | Set input value directly | `setvalue @e1 \"value\"` |\n\n**Special Keys:** `Enter`, `Tab`, `Escape`, `Backspace`, `ArrowUp`, `ArrowDown`, `ArrowLeft`, `ArrowRight`, `F1-F12`, `Control`, `Alt`, `Shift`\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Scroll Commands\n\n| Command | Description |\n|---------|-------------|\n| `scroll down <px>` | Scroll down by pixels |\n| `scroll up <px>` | Scroll up by pixels |\n| `scroll left <px>` | Scroll left by pixels |\n| `scroll right <px>` | Scroll right by pixels |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n### State Inspection Commands\n\n```mermaid\ngraph TD\n    A[get command] --> B{Property Type}\n    B -->|attr| C[Get attribute value]\n    B -->|value| D[Get input value]\n    B -->|text| E[Get visible text]\n    B -->|html| F[Get innerHTML]\n    B -->|title| G[Get page title]\n    B -->|url| H[Get current URL]\n    B -->|box| I[Get bounding box]\n    B -->|styles| J[Get computed styles]\n```\n\n| Command | Description |\n|---------|-------------|\n| `get text <ref>` | Get visible text of element |\n| `get value <ref>` | Get input field value |\n| `get attr <ref> <name>` | Get specific attribute |\n| `get html <ref>` | Get innerHTML |\n| `get title` | Get page title |\n| `get url` | Get current URL |\n| `get box <ref>` | Get bounding box coordinates |\n| `get styles <ref>` | Get computed CSS styles |\n| `get cdp-url` | Get CDP debugging URL |\n\n资料来源：[cli/src/output.rs:1-20]()\n\n## Click Variations\n\nThe click command supports several modifiers for different interaction patterns:\n\n| Command | Description |\n|---------|-------------|\n| `click <ref>` | Standard left-click |\n| `click <ref> --new-tab` | Click and open in new tab |\n| `click <ref> --double` | Double-click |\n| `click <ref> --right` | Right-click (context menu) |\n| `tap <ref>` | Mobile-style tap (touch events) |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Form Input Commands\n\n### Text Input\n\n```mermaid\ngraph LR\n    A[Input Commands] --> B[type]\n    A --> C[fill]\n    A --> D[setvalue]\n    \n    B --> E[Triggers keydown/keyup]\n    C --> F[Direct value set]\n    D --> G[Direct value assignment]\n```\n\n| Command | Description | Behavior |\n|---------|-------------|----------|\n| `fill <ref> <text>` | Fill input field | Replaces existing value, triggers input events |\n| `type <ref> <text>` | Type text character by character | Triggers full key event sequence |\n| `setvalue <ref> <value>` | Set value directly | Bypasses sanitization |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Other Input Types\n\n| Command | Target | Description |\n|---------|--------|-------------|\n| `check <ref>` | Checkbox | Check a checkbox |\n| `uncheck <ref>` | Checkbox | Uncheck a checkbox |\n| `select <ref> <value>` | Select | Select option by value |\n| `upload <ref> <path>` | File input | Upload file |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n## Wait and Timing\n\nWait commands control execution timing for dynamic content:\n\n| Command | Description |\n|---------|-------------|\n| `wait <ms>` | Wait for milliseconds |\n| `wait --load` | Wait for page load event |\n| `wait networkidle` | Wait for network to be idle |\n| `wait --load networkidle` | Combined load + network idle |\n\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Command Chaining with Batches\n\nMultiple commands can be executed in a single batch operation for efficiency:\n\n```mermaid\ngraph TD\n    A[Batch Command] --> B[Parse JSON Array]\n    B --> C[Execute Sequentially]\n    C --> D[Command 1]\n    D --> E[Command 2]\n    E --> F[Command N]\n    F --> G[Return Combined Results]\n```\n\nExample batch command:\n```bash\nagent-browser batch \\\n  '[\"open\"]' \\\n  '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n  '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n  '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n资料来源：[skill-data/core/references/commands.md:1-30]()\n\n## State Management\n\n### Browser State Commands\n\n| Command | Description |\n|---------|-------------|\n| `is <state> <ref>` | Check if element is `visible`, `enabled`, `checked` |\n| `is open` | Check if browser is open |\n| `is closed` | Check if browser is closed |\n\n### Visibility and Enabled States\n\n```mermaid\ngraph TD\n    A[Check State] --> B{Element Type}\n    B -->|Button/Input| C[Check: enabled]\n    B -->|Checkbox| D[Check: checked]\n    B -->|Any| E[Check: visible]\n    \n    C --> F[Return boolean]\n    D --> F\n    E --> F\n```\n\n资料来源：[cli/src/output.rs:1-20]()\n\n## Advanced Interactions\n\n### React-Specific Commands\n\nFor React applications, specialized inspection commands are available:\n\n| Command | Description |\n|---------|-------------|\n| `react_tree` | Get component tree |\n| `react_inspect <ref>` | Inspect React component |\n| `react_renders_start` | Start render tracking |\n| `react_renders_stop` | Stop render tracking |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n### Dialog Handling\n\n```mermaid\ngraph TD\n    A[Dialog Appears] --> B{dialog type}\n    B -->|alert| C[handle_alert]\n    B -->|confirm| D[handle_confirm]\n    B -->|prompt| E[handle_prompt]\n    \n    C --> F[dialog accept --message \"text\"]\n    D --> F\n    E --> G[dialog accept \"input\"]\n    G --> F\n```\n\n| Command | Description |\n|---------|-------------|\n| `dialog accept [message]` | Accept dialog with optional message |\n| `dialog dismiss` | Cancel/dismiss dialog |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n\n## Common Workflow Patterns\n\n### Basic Navigation and Interaction\n\n```bash\n# 1. Open page\nagent-browser open https://example.com\n\n# 2. Take snapshot to get refs\nagent-browser snapshot -i\n\n# 3. Interact with elements\nagent-browser click @e1\nagent-browser fill @e2 \"user@example.com\"\nagent-browser press Enter\n\n# 4. Wait for response\nagent-browser wait 1000\n```\n\n### Form Submission Flow\n\n```bash\nagent-browser open https://example.com/login\nagent-browser snapshot -i\nagent-browser fill @e_email \"test@example.com\"\nagent-browser fill @e_password \"secretpassword\"\nagent-browser click @e_submit\nagent-browser wait --load networkidle\nagent-browser screenshot result.png\n```\n\n### Error Handling Pattern\n\n```bash\n# Check if operation succeeded\nagent-browser is visible @e_success_message\n\n# If failed, inspect state\nagent-browser snapshot -i\nagent-browser get text @e_error_message\n```\n\n## Command Reference Summary\n\n### Interaction Operations Matrix\n\n| Category | Commands |\n|----------|----------|\n| **Mouse** | `click`, `mouse move/down/up/wheel`, `dblclick` |\n| **Keyboard** | `type`, `press`, `setvalue` |\n| **Scroll** | `scroll up/down/left/right` |\n| **Forms** | `fill`, `check`, `uncheck`, `select`, `upload` |\n| **Inspect** | `get text/value/attr/html/title/url/box/styles` |\n| **State** | `find`, `count`, `is` |\n| **Timing** | `wait` |\n\n资料来源：[cli/src/native/actions.rs:1-30]()\n资料来源：[cli/src/output.rs:1-20]()\n资料来源：[skill-data/core/SKILL.md:1-50]()\n\n## Best Practices\n\n1. **Always snapshot before interacting** - Element refs are obtained from snapshots and must be fetched after page load or navigation\n2. **Re-snapshot after navigation** - New pages have new accessibility trees with different refs\n3. **Use appropriate wait conditions** - Wait for `networkidle` when content loads dynamically\n4. **Prefer `fill` over `type`** - `fill` is faster and more reliable for automated workflows\n5. **Use `type` for form validation** - When you need key events to trigger validation logic\n\n资料来源：[skill-data/core/references/snapshot-refs.md:1-50]()\n\n---\n\n<a id='state-inspection-commands'></a>\n\n## State Inspection Commands\n\n### 相关页面\n\n相关主题：[Interaction Commands](#interaction-commands), [Element References System](#element-references)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/native/state.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/state.rs)\n- [cli/src/commands.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/commands.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n</details>\n\n# State Inspection Commands\n\nState Inspection Commands in agent-browser provide mechanisms to examine, retrieve, and manage browser state including cookies, web storage, session data, console errors, and DOM element properties. These commands enable debugging, state verification, and persistence of browser sessions across operations.\n\n## Architecture Overview\n\nState inspection in agent-browser operates through a layered architecture where the CLI command layer parses user input, the actions layer dispatches to appropriate handlers, and the browser backend (CDP/WebDriver) executes the actual state retrieval.\n\n```mermaid\ngraph TD\n    A[CLI Input] --> B[commands.rs Parser]\n    B --> C[actions.rs Dispatcher]\n    C --> D[State Handlers]\n    C --> E[Storage Handlers]\n    C --> F[Element Handlers]\n    D --> G[Browser Backend<br/>Chrome CDP / WebDriver]\n    E --> G\n    F --> G\n    G --> H[State Output]\n    \n    D -. includes .-> D1[cookies_get/set/clear]\n    D -. includes .-> D2[state_save/load/list/clean]\n    E -. includes .-> E1[storage_get/set/clear]\n    F -. includes .-> F1[gettext/getattr/isvisible]\n```\n\n资料来源：[cli/src/native/actions.rs:1-150]()\n\n## Command Categories\n\nState inspection commands are organized into five primary categories:\n\n| Category | Purpose | Commands |\n|----------|---------|----------|\n| **Cookie Inspection** | Manage HTTP cookies | `cookies_get`, `cookies_set`, `cookies_clear` |\n| **Web Storage** | Inspect localStorage/sessionStorage | `storage_get`, `storage_set`, `storage_clear` |\n| **Session State** | Save/load browser sessions | `state_save`, `state_load`, `state_list`, `state_clean` |\n| **Element Properties** | Query DOM element attributes | `gettext`, `getattribute`, `inputvalue`, `isvisible`, `isenabled`, `ischecked` |\n| **Error Inspection** | Retrieve console errors | `errors` |\n\n资料来源：[cli/src/native/actions.rs:80-100]()\n\n## Cookie Inspection\n\nCookies can be inspected and managed through the `cookies` command family.\n\n### Get Cookies\n\nRetrieves all cookies for the current domain:\n\n```bash\nagent-browser cookies get\n```\n\n### Set Cookie\n\nSets a cookie with explicit parameters:\n\n```bash\nagent-browser cookies set --url <url> --name <name> --value <value> [--domain <domain>] [--path <path>] [--httpOnly] [--secure] [--sameSite <strict|lax|none>] [--expires <timestamp>]\n```\n\n### Set Cookie from File\n\nAuto-detects and imports cookies from JSON, cURL, or Cookie-header format:\n\n```bash\nagent-browser cookies set --curl <file> [--domain <host>]\n```\n\n### Clear Cookies\n\nRemoves all cookies:\n\n```bash\nagent-browser cookies clear\n```\n\n资料来源：[cli/src/output.rs:1-50]()\n\n## Web Storage Inspection\n\nWeb storage commands manage the browser's localStorage and sessionStorage.\n\n### Storage Commands\n\n| Command | Description |\n|---------|-------------|\n| `storage_get` | Retrieve value from localStorage or sessionStorage |\n| `storage_set` | Set a key-value pair in storage |\n| `storage_clear` | Clear all items from selected storage |\n\n```bash\n# Get storage value\nagent-browser storage_get <local|session> <key>\n\n# Set storage value\nagent-browser storage_set <local|session> <key> <value>\n\n# Clear storage\nagent-browser storage_clear <local|session>\n```\n\n资料来源：[cli/src/native/actions.rs:85-90]()\n\n## Session State Management\n\nThe agent-browser maintains persistent state in `~/.agent-browser` (or `<tempdir>/agent-browser` when home directory cannot be resolved).\n\n### State Directory Structure\n\n```mermaid\ngraph LR\n    A[~/.agent-browser] --> B[sessions/]\n    A --> C[auth/]\n    A --> D[encryption.key]\n    B --> E[<session-id>/]\n    E --> F[state.json]\n    E --> G[screenshots/]\n```\n\n资料来源：[cli/src/native/state.rs:80-95]()\n\n### State Commands\n\n| Command | Description |\n|---------|-------------|\n| `state_save` | Save current browser state to disk |\n| `state_load` | Restore browser state from saved file |\n| `state_list` | List all saved states |\n| `state_clean` | Remove states older than specified days |\n| `state_rename` | Rename an existing state |\n\n```bash\n# Save current state\nagent-browser state_save <path> [--name <name>]\n\n# Load saved state\nagent-browser state_load <path>\n\n# List all states\nagent-browser state_list\n\n# Clean old states (default: 30 days)\nagent-browser state_clean [--days <n>]\n\n# Rename a state\nagent-browser state_rename --path <path> --name <new_name>\n```\n\n### State Directory Resolution\n\n```rust\npub fn get_state_dir() -> PathBuf {\n    if let Some(home) = dirs::home_dir() {\n        home.join(\".agent-browser\")\n    } else {\n        std::env::temp_dir().join(\"agent-browser\")\n    }\n}\n\npub fn get_sessions_dir() -> PathBuf {\n    get_state_dir().join(\"sessions\")\n}\n```\n\n资料来源：[cli/src/native/state.rs:80-90]()\n\n## Element Property Inspection\n\nElement inspection commands retrieve properties and states of DOM elements using element references obtained from snapshots.\n\n### Get Text Content\n\nRetrieves the visible text of an element:\n\n```bash\nagent-browser gettext @e1\n```\n\n### Get HTML Content\n\nRetrieves element innerHTML or innerText:\n\n```bash\nagent-browser innerhtml @e1\nagent-browser innertext @e1\n```\n\n### Get Attributes\n\nRetrieves any attribute value from an element:\n\n```bash\nagent-browser getattribute @e1 href\nagent-browser getattribute @e1 src\n```\n\n### Get Input Value\n\nRetrieves the current value of input elements:\n\n```bash\nagent-browser inputvalue @e1\n```\n\n### Check Element State\n\nVerify element state properties:\n\n```bash\nagent-browser isvisible @e1\nagent-browser isenabled @e1\nagent-browser ischecked @e1\n```\n\n### Count Matching Elements\n\nCount elements matching a selector:\n\n```bash\nagent-browser count \".item-class\"\n```\n\n### Get Bounding Box\n\nRetrieve element dimensions and position:\n\n```bash\nagent-browser boundingbox @e1\n```\n\n### Get Styles\n\nRetrieve computed CSS styles:\n\n```bash\nagent-browser styles @e1\n```\n\n资料来源：[cli/src/native/actions.rs:30-60]()\n\n## Find Elements\n\nThe `find` command locates DOM elements using various locator strategies.\n\n### Supported Locators\n\n| Locator | Description | Example |\n|---------|-------------|---------|\n| `role` | Find by ARIA role | `find role button --exact` |\n| `text` | Find by text content | `find text \"Submit\"` |\n| `label` | Find form label | `find label \"Email\"` |\n| `placeholder` | Find by placeholder | `find placeholder \"Search...\"` |\n| `alt` | Find by alt attribute | `find alt \"profile\"` |\n| `title` | Find by title attribute | `find title \"Close\"` |\n| `testid` | Find by test ID | `find testid submit-btn` |\n| `first` | First element matching selector | `find first \".item\"` |\n| `last` | Last element matching selector | `find last \".item\"` |\n\n### Find Command Syntax\n\n```bash\nagent-browser find <locator> <value> [action] [--exact] [--name <name>]\n```\n\n### Examples\n\n```bash\n# Find button by role and click\nagent-browser find role button --exact click\n\n# Find input by placeholder\nagent-browser find placeholder \"email\" fill \"test@example.com\"\n\n# Find link by text\nagent-browser find text \"Learn more\"\n```\n\n资料来源：[cli/src/commands.rs:150-200]()\n\n## Console Error Inspection\n\nRetrieve JavaScript errors logged to the browser console.\n\n### Get Errors\n\n```bash\nagent-browser errors\n```\n\nReturns a list of all console errors captured during the session.\n\n### Console Monitoring\n\nEnable or disable console message capture:\n\n```bash\nagent-browser console enable\nagent-browser console disable\n```\n\n## Snapshot-Based Inspection\n\nSnapshots provide a hierarchical view of the page DOM with element references.\n\n### Snapshot Modes\n\n| Flag | Description |\n|------|-------------|\n| `-i` | Interactive elements only (preferred) |\n| `-u` | Include href URLs on links |\n| `-c` | Compact mode (no empty structural nodes) |\n| `-d <n>` | Cap depth at n levels |\n| `-s <selector>` | Scope to CSS selector |\n| `--json` | Machine-readable JSON output |\n\n### Snapshot Output Format\n\n```\nPage: Example - Log in\nURL: https://example.com/login\n\n@e1 [heading] \"Log in\"\n@e2 [form]\n  @e3 [input type=\"email\"] placeholder=\"Email\"\n  @e4 [input type=\"password\"] placeholder=\"Password\"\n  @e5 [button type=\"submit\"] \"Continue\"\n  @e6 [link] \"Forgot password?\"\n```\n\n### Snapshot Workflow\n\n```mermaid\ngraph TD\n    A[Open Page] --> B[Snapshot -i]\n    B --> C[Parse Element Refs]\n    C --> D[Click @e3]\n    D --> E[Snapshot -i]\n    E --> F[Find Input Fields]\n    F --> G[Fill @e3 \"email\"]\n    G --> H[Fill @e4 \"password\"]\n    H --> I[Click @e5]\n```\n\n资料来源：[skill-data/core/SKILL.md:1-80]()\n\n## Complete Command Reference\n\n### State Inspection Summary\n\n| Command | Category | Description |\n|---------|----------|-------------|\n| `cookies get` | Cookie | List all cookies |\n| `cookies set --name X --value Y` | Cookie | Set a cookie |\n| `cookies clear` | Cookie | Clear all cookies |\n| `storage_get <type> <key>` | Storage | Get storage value |\n| `storage_set <type> <key> <val>` | Storage | Set storage value |\n| `storage_clear <type>` | Storage | Clear storage |\n| `state_save <path>` | Session | Save browser state |\n| `state_load <path>` | Session | Load browser state |\n| `state_list` | Session | List saved states |\n| `state_clean [days]` | Session | Clean old states |\n| `errors` | Console | Get console errors |\n| `gettext @eN` | Element | Get element text |\n| `getattribute @eN <attr>` | Element | Get attribute |\n| `isvisible @eN` | Element | Check visibility |\n| `count <selector>` | Element | Count elements |\n\n资料来源：[cli/src/native/actions.rs:70-100]()\n\n## Usage Patterns\n\n### Inspecting Page State\n\n```bash\n# Full page inspection workflow\nagent-browser open https://example.com\nagent-browser snapshot -i           # Get element refs\nagent-browser get title             # Page title\nagent-browser get url               # Current URL\nagent-browser errors                # Check for console errors\n```\n\n### Verifying Element State\n\n```bash\nagent-browser click @e1             # Click element\nagent-browser wait 500             # Wait for response\nagent-browser isvisible @e2        # Verify visibility\nagent-browser gettext @e3          # Get text content\n```\n\n### Persisting Session State\n\n```bash\nagent-browser open https://app.example.com\nagent-browser cookies set --name session --value abc123\nagent-browser storage_set local user \"john\"\nagent-browser state_save ./my-session   # Persist state\n# Later...\nagent-browser state_load ./my-session  # Restore state\n```\n\n## Summary\n\nState Inspection Commands in agent-browser provide comprehensive capabilities for examining and managing browser state:\n\n- **Cookie Management**: Full CRUD operations on HTTP cookies with file import support\n- **Web Storage**: Access to localStorage and sessionStorage\n- **Session Persistence**: Save, load, list, and clean browser sessions\n- **Element Inspection**: Query text, attributes, states, and styles\n- **Element Location**: Find elements by role, text, label, placeholder, and other attributes\n- **Console Monitoring**: Capture and retrieve JavaScript errors\n\nThese commands work together with the snapshot system to enable precise browser automation workflows with full state observability.\n\n---\n\n<a id='browser-engines'></a>\n\n## Browser Engine Integration\n\n### 相关页面\n\n相关主题：[Daemon and CDP Protocol](#daemon-and-cdp), [Installation Guide](#installation-guide)\n\nThe provided context does not contain the source files specified in the query (lightpanda.rs, discovery.rs, webdriver/mod.rs, safari.rs, ios.rs). Without access to the actual browser engine integration source files, I cannot generate an accurate technical wiki page that properly cites the specified files.\n\nHowever, based on the available context from this repository, I can provide a partial analysis of browser engine-related components:\n\n<details>\n<summary>Related Context Files</summary>\n\nThe following context files provide indirect information about browser engine integration patterns:\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [cli/src/output.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/output.rs)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [packages/dashboard/src/components/session-tree.tsx](https://github.com/vercel-labs/agent-browser/blob/main/packages/dashboard/src/components/session-tree.tsx)\n\n</details>\n\n# Browser Engine Integration\n\n> **Note:** This page requires the actual source files for browser engine implementations (`lightpanda.rs`, `discovery.rs`, `webdriver/mod.rs`, `safari.rs`, `ios.rs`) which are not available in the current context. The following represents partial analysis based on indirect evidence.\n\n## Architecture Overview\n\nBased on the available context, agent-browser uses a Chrome DevTools Protocol (CDP) based approach for browser automation:\n\n```\n┌─────────────────┐     CDP/WebSocket      ┌─────────────────┐\n│  agent-browser  │ ──────────────────────▶│  Chrome/Chromium│\n│      CLI        │                        │    Browser      │\n└─────────────────┘                        └─────────────────┘\n        │\n        ├── Session Management\n        ├── Element Reference System (@e1, @e2, ...)\n        └── Command Dispatch\n```\n\n## Supported Browser Contexts\n\n| Context Type | Implementation | Protocol |\n|--------------|----------------|----------|\n| Chrome/Chromium | CDP Native | WebSocket |\n| Electron | CDP Native | WebSocket |\n| Remote Debugging | `--remote-debugging-port` | CDP |\n| Safari (iOS) | WebDriver | W3C WebDriver |\n\n## Session Management\n\nSessions are managed through port-based connections:\n\n```typescript\n// From session-tree.tsx\ninterface Session {\n  port: number;\n  session: string;\n  provider?: string;\n  pending?: boolean;\n}\n```\n\nSessions can be connected via:\n\n```bash\nagent-browser connect 9222\n```\n\n## Command Dispatch Architecture\n\nThe CLI uses a dispatch pattern for handling browser commands:\n\n```rust\n// From cli/src/native/actions.rs (partial)\nmatch subcmd.as_str() {\n    \"click\" => handle_click(cmd, state).await,\n    \"fill\" => handle_fill(cmd, state).await,\n    \"snapshot\" => handle_snapshot(cmd, state).await,\n    \"screenshot\" => handle_screenshot(cmd, state).await,\n    \"get\" => handle_get(cmd, state).await,\n    // ... additional commands\n}\n```\n\n## Browser Engine Providers\n\nBased on the codebase structure, agent-browser supports multiple browser engine providers:\n\n| Provider | File Reference | Purpose |\n|----------|----------------|---------|\n| Lightpanda | `lightpanda.rs` | Lightweight browser engine |\n| Safari | `safari.rs` | macOS/iOS Safari via WebDriver |\n| iOS | `ios.rs` | iOS WebKit via WebDriver |\n| Chrome CDP | `discovery.rs` | Auto-discovery of Chrome instances |\n\n## CDP Discovery Mechanism\n\nThe `discovery.rs` module handles automatic detection of browser instances:\n\n- Scans for Chrome/Chromium processes\n- Identifies remote debugging ports\n- Matches browser version compatibility\n- Establishes WebSocket connections\n\n## WebDriver Integration\n\nFor non-Chrome browsers, WebDriver protocols are used:\n\n```bash\n# Safari WebDriver\nagent-browser set driver safari\n\n# iOS WebDriver  \nagent-browser set driver ios\n```\n\n## Session State Management\n\n| State | Description |\n|-------|-------------|\n| Active | Currently connected and responsive |\n| Pending | Connection in progress |\n| Closed | Session terminated |\n\n## Command Reference for Engine Interaction\n\n```bash\n# Connect to specific port\nagent-browser connect <port>\n\n# Session operations\nagent-browser session new\nagent-browser session list\nagent-browser session close\n\n# Engine-specific settings\nagent-browser set viewport <width> <height>\nagent-browser set device <device-name>\nagent-browser set geo <lat> <lng>\nagent-browser set offline [on|off]\n```\n\n## Limitations\n\nThis page cannot provide complete documentation for browser engine integration without access to:\n\n- `cli/src/native/cdp/lightpanda.rs`\n- `cli/src/native/cdp/discovery.rs`\n- `cli/src/native/webdriver/mod.rs`\n- `cli/src/native/webdriver/safari.rs`\n- `cli/src/native/webdriver/ios.rs`\n\nThese files are required for accurate implementation details about:\n\n- CDP command serialization/deserialization\n- WebDriver protocol mapping\n- Browser-specific quirks handling\n- Session lifecycle management\n\n---\n\n**资料来源:** [cli/src/native/actions.rs:1-20](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n**资料来源:** [packages/dashboard/src/components/session-tree.tsx:1-50](https://github.com/vercel-labs/agent-browser/blob/main/packages/dashboard/src/components/session-tree.tsx)\n**资料来源:** [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n\n---\n\n<a id='authentication'></a>\n\n## Authentication and Session Persistence\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cli/src/native/actions.rs](https://github.com/vercel-labs/agent-browser/blob/main/cli/src/native/actions.rs)\n- [skill-data/core/references/authentication.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/authentication.md)\n- [skill-data/core/references/session-management.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/session-management.md)\n- [skill-data/core/SKILL.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/SKILL.md)\n- [skill-data/core/references/commands.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md)\n- [skill-data/core/references/snapshot-refs.md](https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/snapshot-refs.md)\n</details>\n\n# Authentication and Session Persistence\n\nThis page documents the authentication workflows and session persistence mechanisms in agent-browser, covering how to handle login flows, save/restore authenticated states, manage credentials securely, and persist browser sessions across runs.\n\n## Overview\n\nagent-browser provides multiple layers of authentication and session persistence:\n\n1. **Credential Management** — Store and retrieve login credentials via an encrypted auth vault\n2. **State Persistence** — Save and restore full browser state (cookies, localStorage, sessionStorage)\n3. **Session Management** — Auto-save/restore named sessions without manual file handling\n4. **Profile Persistence** — Use Chrome user data directories for full browser profile persistence\n\nThese mechanisms layer on top of the core CDP (Chrome DevTools Protocol) browser automation, using the underlying Playwright-managed browser infrastructure to serialize and deserialize authentication artifacts.\n\n资料来源：[cli/src/native/actions.rs:action_dispatch](../blob/main/cli/src/native/actions.rs) (dispatch table)\n\n---\n\n## Architecture\n\n### Credential and State Flow\n\n```mermaid\ngraph TD\n    User[User / Agent] -->|agent-browser auth save| Vault[Auth Vault<br/>~/.agent-browser/vault/]\n    User -->|agent-browser state save| StateFile[State File<br/>JSON]\n    User -->|--session-name| AutoSave[Auto-Save Location<br/>~/.agent-browser/sessions/]\n    User -->|--profile| ChromeProfile[Chrome Profile Dir<br/>User Data Directory]\n    \n    Vault -->|auth login| Browser[Browser Instance]\n    StateFile -->|state load| Browser\n    AutoSave -->|auto-restore| Browser\n    ChromeProfile -->|attach| Browser\n    \n    Browser -->|cookies, localStorage| StateFile\n    Browser -->|cookies, localStorage| AutoSave\n    Browser -->|full state| ChromeProfile\n```\n\n### Action Handler Dispatch\n\nThe `actions.rs` module dispatches authentication and persistence commands to dedicated handlers:\n\n| Action | Handler | Purpose |\n|--------|---------|---------|\n| `auth_save` | `handle_auth_save` | Store credentials in vault |\n| `auth_list` | `handle_credentials_list` | List saved credentials |\n| `auth_delete` | `handle_credentials_delete` | Remove credential |\n| `auth_show` | `handle_auth_show` | Display credential details |\n| `auth_login` | `handle_auth_login` | Fill + submit login form |\n| `state_save` | `handle_state_save` | Serialize browser state to JSON |\n| `state_load` | `handle_state_load` | Restore browser state from JSON |\n| `state_list` | `handle_state_list` | List saved state files |\n| `cookies_get` | `handle_cookies_get` | Read cookies |\n| `cookies_set` | `handle_cookies_set` | Write cookies |\n| `cookies_clear` | `handle_cookies_clear` | Clear all cookies |\n| `storage_get` | `handle_storage_get` | Read localStorage/sessionStorage |\n| `storage_set` | `handle_storage_set` | Write to storage |\n| `storage_clear` | `handle_storage_clear` | Clear storage |\n\n资料来源：[cli/src/native/actions.rs:action_dispatch](../blob/main/cli/src/native/actions.rs) (dispatch table lines 35-75)\n\n---\n\n## Authentication Vault\n\nThe auth vault provides secure credential storage at `~/.agent-browser/vault/`. It encrypts credentials at rest using an optional `AGENT_BROWSER_ENCRYPTION_KEY`.\n\n### Saving Credentials\n\n```bash\nagent-browser auth save my-app --url https://app.example.com/login \\\n  --username user@example.com --password-stdin\n# (type password, press Ctrl+D)\n```\n\nThe vault stores credentials keyed by a friendly name (`my-app` in this example). The `--url` flag associates the credential with a specific login page for targeted retrieval.\n\n### Using Saved Credentials\n\n```bash\nagent-browser open https://app.example.com/login\nagent-browser auth login my-app\n```\n\nThe `auth login` command fills the username and password fields, clicks the submit button, and waits for navigation — all automatically using the saved credential set.\n\n资料来源：[skill-data/core/references/authentication.md:auth_vault](../blob/main/skill-data/core/references/authentication.md) (auth vault section)\n\n### Credential Management Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser auth save <name>` | Save credentials to vault |\n| `agent-browser auth login <name>` | Fill + submit login form |\n| `agent-browser auth list` | List all stored credentials |\n| `agent-browser auth show <name>` | Display credential details |\n| `agent-browser auth delete <name>` | Remove credential from vault |\n\n---\n\n## Basic Login Flow\n\nFor sites without saved credentials, a manual login flow uses the snapshot-and-interact pattern:\n\n```bash\n# 1. Navigate to login page\nagent-browser open https://app.example.com/login\nagent-browser wait --load networkidle\n\n# 2. Get interactive elements\nagent-browser snapshot -i\n# Output: @e1 [input type=\"email\"], @e2 [input type=\"password\"], @e3 [button] \"Sign In\"\n\n# 3. Fill and submit\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\nagent-browser click @e3\nagent-browser wait --url \"**/dashboard\"\n\n# 4. Verify success\nagent-browser get url  # Should be dashboard, not login\n```\n\nThe `--load networkidle` wait condition ensures the page is fully loaded before attempting to fill form fields.\n\n资料来源：[skill-data/core/references/authentication.md:basic_login_flow](../blob/main/skill-data/core/references/authentication.md) (basic login flow section)\n\n---\n\n## State Persistence\n\nState persistence serializes the browser's authentication artifacts to a JSON file for reuse across runs.\n\n### State File Format\n\n```json\n{\n  \"cookies\": [...],\n  \"localStorage\": {...},\n  \"sessionStorage\": {...},\n  \"origins\": [...]\n}\n```\n\nThe state file contains cookies, Web Storage API data (`localStorage` and `sessionStorage`), and origin permissions.\n\n### Saving State\n\n```bash\n# After successful login, save state\nagent-browser open https://app.example.com/login\n# ... complete login flow ...\nagent-browser state save ./auth-state.json\n```\n\n### Loading State\n\n```bash\n# Restore authenticated session\nagent-browser state load ./auth-state.json\nagent-browser open https://app.example.com/dashboard\n# Already logged in\n```\n\n### Inline State Loading\n\nYou can also use `--state` to load state at browser launch:\n\n```bash\nagent-browser --state ./auth-state.json open https://app.example.com/dashboard\n```\n\n资料来源：[skill-data/core/references/session-management.md:state_file_contents](../blob/main/skill-data/core/references/session-management.md) (state file contents section)\n\n### State Management Commands\n\n| Command | Description |\n|---------|-------------|\n| `agent-browser state save <path>` | Serialize current state to file |\n| `agent-browser state load <path>` | Restore state from file |\n| `agent-browser state list` | List saved state files |\n\n---\n\n## Session Auto-Persistence\n\nNamed sessions (`--session-name`) provide automatic save/restore without explicit file handling. State is persisted to `~/.agent-browser/sessions/<name>.json` and restored automatically on subsequent runs.\n\n### Basic Usage\n\n```bash\n# First run: login once\nagent-browser --session-name twitter open https://twitter.com\n# ... complete login flow ...\nagent-browser close  # state saved automatically\n\n# Subsequent runs: state auto-restored\nagent-browser --session-name twitter open https://twitter.com\n# Already authenticated\n```\n\n### Session Environment Variable\n\n```bash\nexport AGENT_BROWSER_SESSION_NAME=my-app\nagent-browser open https://app.example.com\n# State auto-saved on close, auto-restored on launch\n```\n\n### Session vs State File Comparison\n\n| Feature | `--session-name` | `--state <file>` |\n|---------|------------------|------------------|\n| File management | Automatic | Manual |\n| Location | `~/.agent-browser/sessions/` | User-specified |\n| Reuse across machines | No (local path) | Yes (if file is shared) |\n| Cleanup | `agent-browser close` | Manual `rm` |\n\n---\n\n## Chrome Profile Persistence\n\nFor full browser profile persistence (cookies, IndexedDB, service workers, cache, extensions), use `--profile` to point agent-browser at a Chrome user data directory.\n\n```bash\n# First run: login once\nagent-browser --profile ~/.myapp-profile open https://app.example.com/login\n# ... complete login flow ...\n\n# All subsequent runs: already authenticated\nagent-browser --profile ~/.myapp-profile open https://app.example.com/dashboard\n```\n\nDifferent profiles isolate authentication between projects or test users:\n\n```bash\nagent-browser --profile ~/.profiles/admin open https://app.example.com\nagent-browser --profile ~/.profiles/viewer open https://app.example.com\n```\n\nOr set via environment variable:\n\n```bash\nexport AGENT_BROWSER_PROFILE=~/.myapp-profile\nagent-browser open https://app.example.com/dashboard\n```\n\nProfile persistence is the most complete form of state preservation, but the profile directory can grow large due to cache and IndexedDB storage.\n\n资料来源：[skill-data/core/references/authentication.md:persistent_profiles](../blob/main/skill-data/core/references/authentication.md) (persistent profiles section)\n\n---\n\n## OAuth and SSO Flows\n\nOAuth flows require handling browser redirects between the app and the identity provider:\n\n```bash\n# Start OAuth flow\nagent-browser open https://app.example.com/auth/google\n\n# Wait for redirect to Google\nagent-browser wait --url \"**/accounts.google.com**\"\nagent-browser snapshot -i\n\n# Fill Google credentials\nagent-browser fill @e1 \"user@gmail.com\"\nagent-browser click @e2  # Next button\nagent-browser wait 2000\nagent-browser snapshot -i\nagent-browser fill @e3 \"password\"\nagent-browser click @e4  # Sign in\n\n# Wait for redirect back\nagent-browser wait --url \"**/app.example.com**\"\n\n# Save authenticated state\nagent-browser state save ./oauth-state.json\n```\n\nThe `wait --url` pattern is essential for OAuth flows, as it pauses execution until the expected redirect occurs.\n\n资料来源：[skill-data/core/references/authentication.md:oauth_sso_flows](../blob/main/skill-data/core/references/authentication.md) (OAuth / SSO flows section)\n\n---\n\n## Two-Factor Authentication\n\nFor 2FA flows, use `--headed` mode to show the browser window so the user can enter the code:\n\n```bash\n# Login with credentials\nagent-browser open https://app.example.com/login --headed\nagent-browser snapshot -i\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\nagent-browser click @e3\n\n# Wait for user to complete 2FA manually (browser is visible)\necho \"Complete 2FA in the browser window...\"\nagent-browser wait --url \"**/dashboard\" --timeout 120000\n\n# Save state after 2FA\nagent-browser state save ./2fa-state.json\n```\n\nThe `--timeout 120000` gives the user up to 2 minutes to complete the 2FA challenge.\n\n资料来源：[skill-data/core/references/authentication.md:two_factor_authentication](../blob/main/skill-data/core/references/authentication.md) (two-factor authentication section)\n\n---\n\n## Cookie-Based Authentication\n\n### Reading Cookies\n\n```bash\nagent-browser cookies get\n```\n\n### Setting Cookies Manually\n\n```bash\nagent-browser cookies set session_token \"abc123xyz\" --domain \"app.example.com\"\nagent-browser open https://app.example.com/dashboard\n```\n\n### Importing Cookies from cURL\n\nImport cookies exported from browser DevTools:\n\n```bash\nagent-browser cookies set --curl cookies.txt --domain example.com\n```\n\nThe `--curl` flag auto-detects JSON, cURL dump, or bare Cookie header formats.\n\n### Clearing Cookies\n\n```bash\nagent-browser cookies clear\n```\n\n---\n\n## Web Storage API\n\n### Reading Storage\n\n```bash\nagent-browser storage get --type localStorage\nagent-browser storage get --type sessionStorage\n```\n\n### Setting Storage Values\n\n```bash\nagent-browser storage set --type localStorage --key \"auth_token\" --value \"xyz789\"\n```\n\n### Clearing Storage\n\n```bash\nagent-browser storage clear --type localStorage\nagent-browser storage clear --type sessionStorage\n```\n\n---\n\n## Authentication Reuse Pattern\n\nA common pattern saves login state once and reuses it across multiple runs:\n\n```bash\n#!/bin/bash\nSTATE_FILE=\"/tmp/auth-state.json\"\n\nif [[ -f \"$STATE_FILE\" ]]; then\n    agent-browser state load \"$STATE_FILE\"\n    agent-browser open https://app.example.com/dashboard\nelse\n    # Perform login\n    agent-browser open https://app.example.com/login\n    agent-browser snapshot -i\n    agent-browser fill @e1 \"$USERNAME\"\n    agent-browser fill @e2 \"$PASSWORD\"\n    agent-browser click @e3\n    agent-browser wait --load networkidle\n\n    # Save for future use\n    agent-browser state save \"$STATE_FILE\"\nfi\n```\n\nThis script checks for existing state, loads it if present, otherwise performs login and saves the state.\n\n资料来源：[skill-data/core/references/session-management.md:authenticated_session_reuse](../blob/main/skill-data/core/references/session-management.md) (authenticated session reuse section)\n\n---\n\n## Best Practices\n\n### 1. Name Sessions Semantically\n\n```bash\n# Good: Clear purpose\nagent-browser --session github-auth open https://github.com\nagent-browser --session docs-scrape open https://docs.example.com\n\n# Avoid: Generic names\nagent-browser --session s1 open https://github.com\n```\n\n### 2. Always Clean Up\n\n```bash\n# Close sessions when done\nagent-browser --session auth close\nagent-browser --session scrape close\n```\n\n### 3. Handle State Files Securely\n\n```bash\n# Don't commit state files (contain auth tokens!)\necho \"*.auth-state.json\" >> .gitignore\n\n# Delete after use\nrm /tmp/auth-state.json\n```\n\n### 4. Use Auth Vault for Credentials\n\nStore credentials in the vault instead of hardcoding in scripts:\n\n```bash\n# Secure\nagent-browser auth login my-app\n\n# Insecure (leaks to shell history)\nagent-browser fill @e1 \"user@example.com\"\nagent-browser fill @e2 \"password123\"\n```\n\n### 5. Timeout Long Sessions\n\n```bash\n# Set timeout for automated scripts\ntimeout 60 agent-browser --session long-task get text body\n```\n\n资料来源：[skill-data/core/references/session-management.md:best_practices](../blob/main/skill-data/core/references/session-management.md) (best practices section)\n\n---\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `AGENT_BROWSER_SESSION_NAME` | Default session name for auto-persistence |\n| `AGENT_BROWSER_PROFILE` | Default Chrome profile directory |\n| `AGENT_BROWSER_ENCRYPTION_KEY` | Encryption key for auth vault (32-byte hex) |\n\n---\n\n## Quick Reference\n\n```bash\n# Save credentials to vault\nagent-browser auth save myapp --url https://app.example.com/login --username user@example.com --password-stdin\n\n# Use saved credentials\nagent-browser open https://app.example.com/login\nagent-browser auth login myapp\n\n# Save/restore state\nagent-browser state save ./auth.json\nagent-browser state load ./auth.json\n\n# Auto-persist session\nagent-browser --session-name myapp open https://app.example.com\n# State auto-saved on close, auto-restored on next run\n\n# Full profile persistence\nagent-browser --profile ~/.myapp-profile open https://app.example.com\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：vercel-labs/agent-browser\n\n摘要：发现 38 个潜在踩坑项，其中 7 个为 high/blocking；最高优先级：安装坑 - 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker。\n\n## 1. 安装坑 · 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_9045278ef5e043dcadccf9288477813c | https://github.com/vercel-labs/agent-browser/issues/1339 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_edbde732c7a7410e96ad0fa301e4222d | https://github.com/vercel-labs/agent-browser/issues/1281 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 3. 配置坑 · 来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab39b89d157047e897e771d2572dfcdd | https://github.com/vercel-labs/agent-browser/issues/1338 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 4. 运行坑 · 来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0896b0b429c641f0b93ca9dcbbee6db8 | https://github.com/vercel-labs/agent-browser/issues/1319 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 5. 安全/权限坑 · 失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1345\n- 证据：failure_mode_cluster:github_issue | fmev_bc39fa851aecda51d6ae79863b570093 | https://github.com/vercel-labs/agent-browser/issues/1345 | Dashboard privileged POST routes should reject cross-origin requests\n\n## 6. 安全/权限坑 · 失败模式：security_permissions: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：Developers may expose sensitive permissions or credentials: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1365\n- 证据：failure_mode_cluster:github_issue | fmev_50f6336937705c962c78ed48a466eb98 | https://github.com/vercel-labs/agent-browser/issues/1365 | `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n## 7. 安全/权限坑 · 来源证据：Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a2b8bb7035dd44e0a9e97dc78186f3b2 | https://github.com/vercel-labs/agent-browser/issues/1361 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 8. 安装坑 · 失败模式：installation: After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：Developers may fail before the first successful local run: After failed close, subsequent open reports success but returns stale content from prior URL\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: After failed close, subsequent open reports success but returns stale content from prior URL. Context: Observed when using node, python, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_fce1ca55e45e13ba327a52473c958037 | https://github.com/vercel-labs/agent-browser/issues/1367 | After failed close, subsequent open reports success but returns stale content from prior URL\n\n## 9. 安装坑 · 失败模式：installation: Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：Developers may fail before the first successful local run: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Chrome 147.0 crashes with \"trap int3\" when running in docker. Context: Observed when using docker, windows, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_de7dc45e4f45905d10cb44680cd26da5 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker, failure_mode_cluster:github_issue | fmev_e97d2c4c42c663165c2763023d5d79e3 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n## 10. 安装坑 · 失败模式：installation: Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：Developers may fail before the first successful local run: Detected: Trojan:Win32/Posilod.EB!cl\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Detected: Trojan:Win32/Posilod.EB!cl. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_11d6daa01783b3f8d6cc4984b34591d9 | https://github.com/vercel-labs/agent-browser/issues/1281 | Detected: Trojan:Win32/Posilod.EB!cl\n\n## 11. 安装坑 · 失败模式：installation: Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：Developers may fail before the first successful local run: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature: `network throttle` for emulating slow connections / per-URL delay. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_af068ec0790d0398008062aef7b5d1a5 | https://github.com/vercel-labs/agent-browser/issues/1372 | Feature: `network throttle` for emulating slow connections / per-URL delay\n\n## 12. 安装坑 · 失败模式：installation: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：Developers may fail before the first successful local run: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills. Context: Observed when using node, playwright, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_1ea0ed85aeff64de383d8fa15586474d | https://github.com/vercel-labs/agent-browser/issues/1351 | High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n## 13. 安装坑 · 失败模式：installation: Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：Developers may fail before the first successful local run: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support XDG Base Directory paths for agent-browser state, config, and installs. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_5bd8394953d7b9c8f00eade661671801 | https://github.com/vercel-labs/agent-browser/issues/1361 | Support XDG Base Directory paths for agent-browser state, config, and installs\n\n## 14. 安装坑 · 失败模式：installation: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：Developers may fail before the first successful local run: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1). Context: Observed when using node, python, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_8b48c64a7c8bd1d363fa81928818b489 | https://github.com/vercel-labs/agent-browser/issues/1348 | Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n## 15. 安装坑 · 失败模式：installation: v0.27.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v0.27.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v0.27.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v0.27.0. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_c5cd290a3adea233428e19624c61cbc4 | https://github.com/vercel-labs/agent-browser/releases/tag/v0.27.0 | v0.27.0\n\n## 16. 安装坑 · 来源证据：After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_20b2fb27e3744303957ee3b14657c6fb | https://github.com/vercel-labs/agent-browser/issues/1367 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 17. 安装坑 · 来源证据：Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_36122bb7094447a7a9b2239bd9c771d7 | https://github.com/vercel-labs/agent-browser/issues/1372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 18. 配置坑 · 失败模式：configuration: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_781294606dea03b40a16f8364175701c | https://github.com/vercel-labs/agent-browser/issues/1349 | ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n## 19. 配置坑 · 失败模式：configuration: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_74962e644ba9c7d489e3bdece3e2a4fc | https://github.com/vercel-labs/agent-browser/issues/1371 | Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n## 20. 配置坑 · 失败模式：configuration: Per-session /api/command should require same-origin or token auth\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Per-session /api/command should require same-origin or token auth\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Per-session /api/command should require same-origin or token auth\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Per-session /api/command should require same-origin or token auth. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6007658713bbd7305ceaadde537b784e | https://github.com/vercel-labs/agent-browser/issues/1344 | Per-session /api/command should require same-origin or token auth\n\n## 21. 配置坑 · 失败模式：configuration: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support enabling WebAuthn for passkey authentication with a virtual authenticator. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6d37cbd32f509cb166bf7a0928a6b0b6 | https://github.com/vercel-labs/agent-browser/issues/688 | Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n## 22. 配置坑 · 来源证据：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_32ddde976ec0445da607d0adffc5df4c | https://github.com/vercel-labs/agent-browser/issues/1349 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 23. 配置坑 · 来源证据：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_1f2a7d9ece1a4bb7bd3d903998370d73 | https://github.com/vercel-labs/agent-browser/issues/1371 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 24. 配置坑 · 来源证据：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6ba5505f7fb14ad7a3bc2b5b88a0b59b | https://github.com/vercel-labs/agent-browser/issues/1373 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 25. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | README/documentation is current enough for a first validation pass.\n\n## 26. 运行坑 · 失败模式：runtime: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is ope...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this runtime risk before relying on the project: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：Developers may hit a documented source-backed failure mode: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target. Context: Observed when using python, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_373b5edde1d9ebc3a89e256d7531b186 | https://github.com/vercel-labs/agent-browser/issues/1373 | `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n## 27. 维护坑 · 失败模式：migration: Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this migration risk before relying on the project: Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：Developers may hit a documented source-backed failure mode: Harden inspect-mode DevTools WebSocket handshakes\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Harden inspect-mode DevTools WebSocket handshakes. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f6db656b77e427d890ba72a1ff380949 | https://github.com/vercel-labs/agent-browser/issues/1347 | Harden inspect-mode DevTools WebSocket handshakes\n\n## 28. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | last_activity_observed missing\n\n## 29. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 30. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 31. 安全/权限坑 · 来源证据：Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6acd97eb554140c28938a0eb08e44c34 | https://github.com/vercel-labs/agent-browser/issues/1345 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 安全/权限坑 · 来源证据：Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab6c062eedaf466d8f40864ca24bf8ea | https://github.com/vercel-labs/agent-browser/issues/1347 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 33. 安全/权限坑 · 来源证据：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_648ff78f18f34d51a44b9176d011738f | https://github.com/vercel-labs/agent-browser/issues/1351 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 34. 安全/权限坑 · 来源证据：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a4a36591a7e45c1b85d35b020e63d5a | https://github.com/vercel-labs/agent-browser/issues/688 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 35. 安全/权限坑 · 来源证据：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_fda08c46f8b5454e8e93b061d6d3c992 | https://github.com/vercel-labs/agent-browser/issues/1348 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_21be9bb1198543e1839dd312b41a3f3c | https://github.com/vercel-labs/agent-browser/issues/1365 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 37. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | issue_or_pr_quality=unknown\n\n## 38. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | release_recency=unknown\n\n<!-- canonical_name: vercel-labs/agent-browser; human_manual_source: deepwiki_human_wiki -->\n",
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "Human Manual / 人类版说明书"
    },
    "pitfall_log": {
      "asset_id": "pitfall_log",
      "filename": "PITFALL_LOG.md",
      "markdown": "# Pitfall Log / 踩坑日志\n\n项目：vercel-labs/agent-browser\n\n摘要：发现 38 个潜在踩坑项，其中 7 个为 high/blocking；最高优先级：安装坑 - 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker。\n\n## 1. 安装坑 · 来源证据：Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_9045278ef5e043dcadccf9288477813c | https://github.com/vercel-labs/agent-browser/issues/1339 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_edbde732c7a7410e96ad0fa301e4222d | https://github.com/vercel-labs/agent-browser/issues/1281 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 3. 配置坑 · 来源证据：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：snapshot -s <selector> produces duplicate elements when AX tree contains virtual nodes without backendDOMNodeId\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab39b89d157047e897e771d2572dfcdd | https://github.com/vercel-labs/agent-browser/issues/1338 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 4. 运行坑 · 来源证据：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Feature Request: Chrome Extension-based Connection for Seamless Login State Reuse\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0896b0b429c641f0b93ca9dcbbee6db8 | https://github.com/vercel-labs/agent-browser/issues/1319 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 5. 安全/权限坑 · 失败模式：security_permissions: Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：Developers may expose sensitive permissions or credentials: Dashboard privileged POST routes should reject cross-origin requests\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Dashboard privileged POST routes should reject cross-origin requests. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1345\n- 证据：failure_mode_cluster:github_issue | fmev_bc39fa851aecda51d6ae79863b570093 | https://github.com/vercel-labs/agent-browser/issues/1345 | Dashboard privileged POST routes should reject cross-origin requests\n\n## 6. 安全/权限坑 · 失败模式：security_permissions: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：Developers may expose sensitive permissions or credentials: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--auto-connect` fails too quickly when Chrome asks for remote debugging permission. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/vercel-labs/agent-browser/issues/1365\n- 证据：failure_mode_cluster:github_issue | fmev_50f6336937705c962c78ed48a466eb98 | https://github.com/vercel-labs/agent-browser/issues/1365 | `--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n## 7. 安全/权限坑 · 来源证据：Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a2b8bb7035dd44e0a9e97dc78186f3b2 | https://github.com/vercel-labs/agent-browser/issues/1361 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 8. 安装坑 · 失败模式：installation: After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：Developers may fail before the first successful local run: After failed close, subsequent open reports success but returns stale content from prior URL\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: After failed close, subsequent open reports success but returns stale content from prior URL. Context: Observed when using node, python, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_fce1ca55e45e13ba327a52473c958037 | https://github.com/vercel-labs/agent-browser/issues/1367 | After failed close, subsequent open reports success but returns stale content from prior URL\n\n## 9. 安装坑 · 失败模式：installation: Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 对用户的影响：Developers may fail before the first successful local run: Chrome 147.0 crashes with \"trap int3\" when running in docker\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Chrome 147.0 crashes with \"trap int3\" when running in docker. Context: Observed when using docker, windows, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_de7dc45e4f45905d10cb44680cd26da5 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker, failure_mode_cluster:github_issue | fmev_e97d2c4c42c663165c2763023d5d79e3 | https://github.com/vercel-labs/agent-browser/issues/1339 | Chrome 147.0 crashes with \"trap int3\" when running in docker\n\n## 10. 安装坑 · 失败模式：installation: Detected: Trojan:Win32/Posilod.EB!cl\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Detected: Trojan:Win32/Posilod.EB!cl\n- 对用户的影响：Developers may fail before the first successful local run: Detected: Trojan:Win32/Posilod.EB!cl\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Detected: Trojan:Win32/Posilod.EB!cl. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_11d6daa01783b3f8d6cc4984b34591d9 | https://github.com/vercel-labs/agent-browser/issues/1281 | Detected: Trojan:Win32/Posilod.EB!cl\n\n## 11. 安装坑 · 失败模式：installation: Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：Developers may fail before the first successful local run: Feature: `network throttle` for emulating slow connections / per-URL delay\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature: `network throttle` for emulating slow connections / per-URL delay. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_af068ec0790d0398008062aef7b5d1a5 | https://github.com/vercel-labs/agent-browser/issues/1372 | Feature: `network throttle` for emulating slow connections / per-URL delay\n\n## 12. 安装坑 · 失败模式：installation: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：Developers may fail before the first successful local run: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills. Context: Observed when using node, playwright, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_1ea0ed85aeff64de383d8fa15586474d | https://github.com/vercel-labs/agent-browser/issues/1351 | High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n## 13. 安装坑 · 失败模式：installation: Support XDG Base Directory paths for agent-browser state, config, and installs\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 对用户的影响：Developers may fail before the first successful local run: Support XDG Base Directory paths for agent-browser state, config, and installs\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support XDG Base Directory paths for agent-browser state, config, and installs. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_5bd8394953d7b9c8f00eade661671801 | https://github.com/vercel-labs/agent-browser/issues/1361 | Support XDG Base Directory paths for agent-browser state, config, and installs\n\n## 14. 安装坑 · 失败模式：installation: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：Developers may fail before the first successful local run: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1). Context: Observed when using node, python, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_8b48c64a7c8bd1d363fa81928818b489 | https://github.com/vercel-labs/agent-browser/issues/1348 | Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n## 15. 安装坑 · 失败模式：installation: v0.27.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v0.27.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v0.27.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v0.27.0. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_c5cd290a3adea233428e19624c61cbc4 | https://github.com/vercel-labs/agent-browser/releases/tag/v0.27.0 | v0.27.0\n\n## 16. 安装坑 · 来源证据：After failed close, subsequent open reports success but returns stale content from prior URL\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：After failed close, subsequent open reports success but returns stale content from prior URL\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_20b2fb27e3744303957ee3b14657c6fb | https://github.com/vercel-labs/agent-browser/issues/1367 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 17. 安装坑 · 来源证据：Feature: `network throttle` for emulating slow connections / per-URL delay\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Feature: `network throttle` for emulating slow connections / per-URL delay\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_36122bb7094447a7a9b2239bd9c771d7 | https://github.com/vercel-labs/agent-browser/issues/1372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 18. 配置坑 · 失败模式：configuration: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash. Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_781294606dea03b40a16f8364175701c | https://github.com/vercel-labs/agent-browser/issues/1349 | ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n## 19. 配置坑 · 失败模式：configuration: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_74962e644ba9c7d489e3bdece3e2a4fc | https://github.com/vercel-labs/agent-browser/issues/1371 | Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n## 20. 配置坑 · 失败模式：configuration: Per-session /api/command should require same-origin or token auth\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Per-session /api/command should require same-origin or token auth\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Per-session /api/command should require same-origin or token auth\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Per-session /api/command should require same-origin or token auth. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6007658713bbd7305ceaadde537b784e | https://github.com/vercel-labs/agent-browser/issues/1344 | Per-session /api/command should require same-origin or token auth\n\n## 21. 配置坑 · 失败模式：configuration: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Support enabling WebAuthn for passkey authentication with a virtual authenticator. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_6d37cbd32f509cb166bf7a0928a6b0b6 | https://github.com/vercel-labs/agent-browser/issues/688 | Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n## 22. 配置坑 · 来源证据：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：ERR_NO_SUPPORTED_PROXIES when proxy environment variables contain trailing slash\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_32ddde976ec0445da607d0adffc5df4c | https://github.com/vercel-labs/agent-browser/issues/1349 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 23. 配置坑 · 来源证据：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_1f2a7d9ece1a4bb7bd3d903998370d73 | https://github.com/vercel-labs/agent-browser/issues/1371 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 24. 配置坑 · 来源证据：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：`--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6ba5505f7fb14ad7a3bc2b5b88a0b59b | https://github.com/vercel-labs/agent-browser/issues/1373 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 25. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | README/documentation is current enough for a first validation pass.\n\n## 26. 运行坑 · 失败模式：runtime: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is ope...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this runtime risk before relying on the project: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 对用户的影响：Developers may hit a documented source-backed failure mode: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target. Context: Observed when using python, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_373b5edde1d9ebc3a89e256d7531b186 | https://github.com/vercel-labs/agent-browser/issues/1373 | `--cdp` eval/open silently target a secondary execution context when Chromium DevTools is open on the same target\n\n## 27. 维护坑 · 失败模式：migration: Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this migration risk before relying on the project: Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：Developers may hit a documented source-backed failure mode: Harden inspect-mode DevTools WebSocket handshakes\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Harden inspect-mode DevTools WebSocket handshakes. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f6db656b77e427d890ba72a1ff380949 | https://github.com/vercel-labs/agent-browser/issues/1347 | Harden inspect-mode DevTools WebSocket handshakes\n\n## 28. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | last_activity_observed missing\n\n## 29. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 30. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | no_demo; severity=medium\n\n## 31. 安全/权限坑 · 来源证据：Dashboard privileged POST routes should reject cross-origin requests\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Dashboard privileged POST routes should reject cross-origin requests\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6acd97eb554140c28938a0eb08e44c34 | https://github.com/vercel-labs/agent-browser/issues/1345 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 安全/权限坑 · 来源证据：Harden inspect-mode DevTools WebSocket handshakes\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Harden inspect-mode DevTools WebSocket handshakes\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab6c062eedaf466d8f40864ca24bf8ea | https://github.com/vercel-labs/agent-browser/issues/1347 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 33. 安全/权限坑 · 来源证据：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：High LLM turn count due to frequent `snapshot` calls when using `agent-browser` skills\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_648ff78f18f34d51a44b9176d011738f | https://github.com/vercel-labs/agent-browser/issues/1351 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 34. 安全/权限坑 · 来源证据：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Support enabling WebAuthn for passkey authentication with a virtual authenticator\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a4a36591a7e45c1b85d35b020e63d5a | https://github.com/vercel-labs/agent-browser/issues/688 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 35. 安全/权限坑 · 来源证据：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Windows 11: --headed not surfacing window when invoked from non-TTY context (PowerShell -File via bash 2>&1)\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_fda08c46f8b5454e8e93b061d6d3c992 | https://github.com/vercel-labs/agent-browser/issues/1348 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：`--auto-connect` fails too quickly when Chrome asks for remote debugging permission\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_21be9bb1198543e1839dd312b41a3f3c | https://github.com/vercel-labs/agent-browser/issues/1365 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 37. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | issue_or_pr_quality=unknown\n\n## 38. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1132001614 | https://github.com/vercel-labs/agent-browser | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# agent-browser - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for vercel-labs/agent-browser.\n\nProject:\n- Name: agent-browser\n- Repository: https://github.com/vercel-labs/agent-browser\n- Summary: Browser automation CLI for AI agents\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Browser automation CLI for AI agents\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n- Capability 2: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. introduction: Introduction to Agent Browser. Produce one small intermediate artifact and wait for confirmation.\n2. installation-guide: Installation Guide. Produce one small intermediate artifact and wait for confirmation.\n3. element-references: Element References System. Produce one small intermediate artifact and wait for confirmation.\n4. architecture-overview: Architecture Overview. Produce one small intermediate artifact and wait for confirmation.\n5. daemon-and-cdp: Daemon and CDP Protocol. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/vercel-labs/agent-browser\n- https://github.com/vercel-labs/agent-browser#readme\n- skill-data/agentcore/SKILL.md\n- skill-data/core/SKILL.md\n- skill-data/dogfood/SKILL.md\n- skill-data/electron/SKILL.md\n- skill-data/slack/SKILL.md\n- skill-data/vercel-sandbox/SKILL.md\n- skills/agent-browser/SKILL.md\n- README.md\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "summary": "不安装项目也能感受能力节奏的安全试用 Prompt。",
      "title": "Prompt Preview / 安装前试用 Prompt"
    },
    "quick_start": {
      "asset_id": "quick_start",
      "filename": "QUICK_START.md",
      "markdown": "# Quick Start / 官方入口\n\n项目：vercel-labs/agent-browser\n\n## 官方安装入口\n\n### Node.js / npm · 官方安装入口\n\n```bash\nnpm install -g agent-browser\n```\n\n来源：https://github.com/vercel-labs/agent-browser#readme\n\n## 来源\n\n- repo: https://github.com/vercel-labs/agent-browser\n- docs: https://github.com/vercel-labs/agent-browser#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_567cd1eb369b45518f7850b5520fb183"
}
