{
  "canonical_name": "nottelabs/notte",
  "compilation_id": "pack_255e808812774f75bcff9aa5193d1278",
  "created_at": "2026-05-19T06:39:15.861475+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=mcp_config, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=mcp_config, 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 `pip install notte` 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": "pip install notte",
      "sandbox_container_image": "python:3.12-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "llm_execute_isolated_install",
      "sandbox_validation_id": "sbx_7c72aa1d52be4f4f890b7156152c1ae7"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_810c7b266241f3f0371a8fe76b94e566",
    "canonical_name": "nottelabs/notte",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/nottelabs/notte",
    "slug": "notte",
    "source_packet_id": "phit_360abee9881e44c1aa85b0faa3ddff1f",
    "source_validation_id": "dval_ee6e6f447d8946f9a39f3a30f16f1c16"
  },
  "merchandising": {
    "best_for": "需要流程自动化能力，并使用 chatgpt的用户",
    "github_forks": 180,
    "github_stars": 1953,
    "one_liner_en": "🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.",
    "one_liner_zh": "🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.",
    "primary_category": {
      "category_id": "workflow-automation",
      "confidence": "high",
      "name_en": "Workflow Automation",
      "name_zh": "流程自动化",
      "reason": "matched_keywords:automation, agent, browser"
    },
    "target_user": "使用 chatgpt 等宿主 AI 的用户",
    "title_en": "notte",
    "title_zh": "notte 能力包",
    "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": "Natural-language Web Actions",
        "label_zh": "自然语言网页操作",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-natural-language-web-actions",
        "type": "core_capability"
      },
      {
        "label_en": "Page Observation and Action Planning",
        "label_zh": "页面观察与动作规划",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-page-observation-and-action-planning",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Structured Data Extraction",
        "label_zh": "结构化数据提取",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-structured-data-extraction",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_360abee9881e44c1aa85b0faa3ddff1f",
  "page_model": {
    "artifacts": {
      "artifact_slug": "notte",
      "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": "pip install notte",
          "label": "Python / pip · 官方安装入口",
          "source": "https://github.com/nottelabs/notte#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "页面观察与动作规划",
        "结构化数据提取"
      ],
      "eyebrow": "流程自动化",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要流程自动化能力，并使用 chatgpt的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra."
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "chatgpt",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "mcp_config, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.8.8",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_5224b46e2312471c976888e8a2f8f4a6 | https://github.com/nottelabs/notte/releases/tag/v1.8.8 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.8",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.13",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_56505da48cd74758ab7a9a1d82092e18 | https://github.com/nottelabs/notte/releases/tag/v1.8.13 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.13",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.14",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_8f78a2591cea4f5aad8bfa0cb0ea15a0 | https://github.com/nottelabs/notte/releases/tag/v1.8.14 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.14",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.15",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_f611f1d0dd2440af8e84e9544ab1bdb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.15 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.15",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.6",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_0ed3c86ff7a34e5896a4daeb75552d4d | https://github.com/nottelabs/notte/releases/tag/v1.8.6 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.6",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.9",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_6195971390e8494f88083c862aef7eb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.9 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.9",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "README/documentation is current enough for a first validation pass.",
            "category": "能力坑",
            "evidence": [
              "capability.assumptions | github_repo:900152988 | https://github.com/nottelabs/notte | README/documentation is current enough for a first validation pass."
            ],
            "severity": "medium",
            "suggested_check": "将假设转成下游验证清单。",
            "title": "能力判断依赖假设",
            "user_impact": "假设不成立时，用户拿不到承诺的能力。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个运行相关的待验证问题：v1.8.7",
            "category": "运行坑",
            "evidence": [
              "community_evidence:github | cevd_ab102ac99c2441118475601c34ab0ee9 | https://github.com/nottelabs/notte/releases/tag/v1.8.7 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：v1.8.7",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "未记录 last_activity_observed。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | last_activity_observed missing"
            ],
            "severity": "medium",
            "suggested_check": "补 GitHub 最近 commit、release、issue/PR 响应信号。",
            "title": "维护活跃度未知",
            "user_impact": "新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "downstream_validation.risk_items | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "进入安全/权限治理复核队列。",
            "title": "下游验证发现风险项",
            "user_impact": "下游已经要求复核，不能在页面中弱化。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "risks.scoring_risks | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "把风险写入边界卡，并确认是否需要人工复核。",
            "title": "存在评分风险",
            "user_impact": "风险会影响是否适合普通用户安装。"
          },
          {
            "body": "issue_or_pr_quality=unknown。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | issue_or_pr_quality=unknown"
            ],
            "severity": "low",
            "suggested_check": "抽样最近 issue/PR，判断是否长期无人处理。",
            "title": "issue/PR 响应质量未知",
            "user_impact": "用户无法判断遇到问题后是否有人维护。"
          },
          {
            "body": "release_recency=unknown。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | release_recency=unknown"
            ],
            "severity": "low",
            "suggested_check": "确认最近 release/tag 和 README 安装命令是否一致。",
            "title": "发布节奏不明确",
            "user_impact": "安装命令和文档可能落后于代码，用户踩坑概率升高。"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 13 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：安装坑 - 来源证据：v1.8.8。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 13,
        "forks": 180,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 1953
      },
      "source_url": "https://github.com/nottelabs/notte",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.",
      "title": "notte 能力包",
      "trial_prompt": "# notte - 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 nottelabs/notte.\n\nProject:\n- Name: notte\n- Repository: https://github.com/nottelabs/notte\n- Summary: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\n- Host target: chatgpt\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\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: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. introduction: Introduction to Notte. Produce one small intermediate artifact and wait for confirmation.\n2. quickstart: Quickstart Guide. Produce one small intermediate artifact and wait for confirmation.\n3. architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. agent-core: Agent Core System. Produce one small intermediate artifact and wait for confirmation.\n5. structured-output: Structured Output. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/nottelabs/notte\n- https://github.com/nottelabs/notte#readme\n- README.md\n- src/notte/__init__.py\n- pyproject.toml\n- .env.example\n- docs/setup.md\n- examples/quickstart.py\n- packages/notte-agent/src/notte_agent/__init__.py\n- packages/notte-browser/src/notte_browser/__init__.py\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_release: v1.8.16（https://github.com/nottelabs/notte/releases/tag/v1.8.16）；github/github_release: v1.8.15（https://github.com/nottelabs/notte/releases/tag/v1.8.15）；github/github_release: v1.8.14（https://github.com/nottelabs/notte/releases/tag/v1.8.14）；github/github_release: v1.8.13（https://github.com/nottelabs/notte/releases/tag/v1.8.13）；github/github_release: v1.8.11（https://github.com/nottelabs/notte/releases/tag/v1.8.11）；github/github_release: v1.8.10（https://github.com/nottelabs/notte/releases/tag/v1.8.10）；github/github_release: v1.8.9（https://github.com/nottelabs/notte/releases/tag/v1.8.9）；github/github_release: v1.8.8（https://github.com/nottelabs/notte/releases/tag/v1.8.8）；github/github_release: v1.8.7（https://github.com/nottelabs/notte/releases/tag/v1.8.7）；github/github_release: v1.8.6（https://github.com/nottelabs/notte/releases/tag/v1.8.6）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.16",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.16"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.15",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.15"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.14",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.14"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.13",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.13"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.11",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.11"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.10",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.10"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.9",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.9"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.8",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.8"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.7",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.7"
            },
            {
              "kind": "github_release",
              "source": "github",
              "title": "v1.8.6",
              "url": "https://github.com/nottelabs/notte/releases/tag/v1.8.6"
            }
          ],
          "status": "已收录 10 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "流程自动化",
      "desc": "🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.",
      "effort": "安装已验证",
      "forks": 180,
      "icon": "bolt",
      "name": "notte 能力包",
      "risk": "可发布",
      "slug": "notte",
      "stars": 1953,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "页面观察与动作规划",
        "结构化数据提取"
      ],
      "thumb": "gray",
      "type": "MCP 配置"
    },
    "manual": {
      "markdown": "# https://github.com/nottelabs/notte 项目说明书\n\n生成时间：2026-05-16 12:22:12 UTC\n\n## 目录\n\n- [Introduction to Notte](#introduction)\n- [Quickstart Guide](#quickstart)\n- [System Architecture](#architecture)\n- [Agent Core System](#agent-core)\n- [Structured Output](#structured-output)\n- [Agent Fallback System](#agent-fallback)\n- [Browser Sessions](#sessions)\n- [Actions and Browser Controls](#actions-controls)\n- [Vaults and Credential Management](#vaults-credentials)\n- [Agent Personas](#personas)\n\n<a id='introduction'></a>\n\n## Introduction to Notte\n\n### 相关页面\n\n相关主题：[Quickstart Guide](#quickstart), [System Architecture](#architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n</details>\n\n# Introduction to Notte\n\nNotte is a comprehensive software suite designed for internet-native agentic systems. It provides a robust framework for building, deploying, and managing AI agents capable of interacting with web content programmatically. The project is developed by Notte Labs, Inc. and licensed under the Server Side Public License v1.0.\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## Overview\n\nNotte transforms the internet into a structured, navigable space where each website becomes an accessible map for intelligent agents. The technology enables AI systems to interpret and interact with web content with precision, creating a programmatic layer over the web.\n\nThe suite offers multiple capabilities:\n\n- **Web Scraping**: Extract structured data from any website\n- **Browser Automation**: Navigate and interact with web pages programmatically\n- **Agent Framework**: Build AI agents that can perform complex web tasks\n- **Session Management**: Maintain stateful browsing sessions with cookie handling\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md), [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Architecture\n\nThe Notte architecture consists of several interconnected packages:\n\n```mermaid\ngraph TD\n    A[Client SDK] --> B[notte-core]\n    A --> C[notte-llm]\n    A --> D[notte-agent]\n    B --> E[Actions Module]\n    B --> F[Error Handling]\n    C --> G[Prompts]\n    C --> H[Data Extraction]\n    D --> I[Falco Agent]\n    D --> J[Gufo Agent]\n```\n\n### Core Packages\n\n| Package | Purpose |\n|---------|---------|\n| `notte-core` | Core actions, error handling, and browser interaction primitives |\n| `notte-llm` | LLM integration, prompts for document analysis, data extraction, and action generation |\n| `notte-agent` | Agent implementations (Falco, Gufo) with validation and execution logic |\n| `notte-sdk` | Python SDK for easy integration and API consumption |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py), [packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n## Browser Actions\n\nNotte provides a comprehensive set of browser actions that agents can execute. Actions are defined as typed classes with execution messages and parameter validation.\n\n### Navigation Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to a URL | `url: str` |\n| `goto_new_tab` | Open URL in a new tab | `url: str` |\n| `close_tab` | Close the current tab | None |\n\n**Example Usage:**\n\n```python\nsession.execute(type=\"goto\", url=\"https://console.notte.cc\")\nsession.execute(type=\"goto_new_tab\", url=\"https://example.com\")\nsession.execute(type=\"close_tab\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-100](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n\n## Session Management\n\nThe SDK provides a session-based interface for browser automation. Sessions maintain state across multiple interactions and support cookie persistence.\n\n### Session Lifecycle\n\n```mermaid\ngraph LR\n    A[Start Session] --> B[Execute Actions]\n    B --> C[Observe State]\n    C --> B\n    B --> D[Stop Session]\n    D --> E[Save Cookies]\n```\n\n### Basic Session Usage\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://www.notte.cc\")\n    obs = session.observe()\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Observation Types\n\nSessions support two perception modes for observing page state:\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| `fast` | Simple page perception for quick queries | Basic element detection |\n| `deep` | LLM-powered formatting for rich action spaces | Complex interactions |\n\n```python\n# Fast observation\nobs = session.observe(perception_type='fast')\n\n# Deep observation for LLM-ready action space\nobs = session.observe(perception_type='deep')\nprint(obs.space.description)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Cookie Management\n\nSessions automatically handle cookie persistence:\n\n```python\nclient = NotteClient(cookie_file=\"cookies.json\")\nwith client.Session() as session:\n    # Cookies are loaded on start and saved on stop\n    session.execute(type=\"goto\", url=\"https://example.com\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Agent System\n\nNotte includes sophisticated agent implementations for autonomous web navigation.\n\n### Action Identification System\n\nAgents identify interactive elements using a structured ID system:\n\n| Prefix | Element Type | Examples |\n|--------|--------------|----------|\n| `I` | Input fields | Textboxes, selects, checkboxes |\n| `B` | Buttons | Clickable buttons |\n| `L` | Links | Hypertext links |\n| `F` | Figures/Images | Visual elements |\n| `O` | Select options | Dropdown options |\n| `M` | Miscellaneous | Modals, dialogs |\n\n**ID Format:** `<role_first_letter><index>[:]` (e.g., `B1`, `I2`, `L3:button`)\n\n> **Note:** IDs can change at each step. Agents must not assume IDs persist across observations.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### CAPTCHA Handling\n\nAgents have built-in CAPTCHA detection and handling:\n\n- Never interact directly with CAPTCHA elements\n- Use the `captcha_solve` action when detection occurs\n- Supported types: reCAPTCHA, hCaptcha, image verification, checkbox verification\n\n```json\n{\n  \"action\": \"captcha_solve\",\n  \"captcha_type\": \"recaptcha\"\n}\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### Validation System\n\nThe agent framework includes a validation pipeline:\n\n```mermaid\ngraph TD\n    A[Execute Action] --> B[Validate Output]\n    B --> C{Has Observations?}\n    C -->|No| D[Return Error]\n    C -->|Yes| E[LLM Validation]\n    E --> F{Is Valid?}\n    F -->|Yes| G[Return Success]\n    F -->|No| H[Return Failure]\n```\n\nThe validator uses vision models when available to verify action outcomes against expected results.\n\n资料来源：[packages/notte-agent/src/notte_agent/common/validator.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/validator.py)\n\n## Data Extraction\n\nNotte provides structured data extraction capabilities through LLM-powered document analysis.\n\n### Document Analysis Pipeline\n\n| Stage | Description |\n|-------|-------------|\n| Analysis | Identify sections, content types, and structured data |\n| Category | Classify document type (search-results, item, other) |\n| Extraction | Transform content into structured format |\n\n### Output Format\n\nExtracted data is organized into two sections:\n\n1. **`<document-analysis>`**: Logical breakdown of the document structure\n2. **`<data-extraction>`**: Structured Markdown output with tables and lists\n\n**Example Categories:**\n\n| Category | Use Case |\n|----------|----------|\n| `search-results` | Google Flights, search engine results |\n| `item` | Recipe pages, product details |\n| `other` | General content (Allrecipes homepage) |\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md)\n\n## API Integration\n\n### REST API Endpoint\n\n```bash\ncurl -X POST 'https://api.notte.cc/scrape' \\\n  -H 'Authorization: Bearer <NOTTE-API-KEY>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"url\": \"https://notte.cc\",\n    \"only_main_content\": false\n  }'\n```\n\n### SDK Client Usage\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\n# Basic scraping\nresponse = client.scrape(\n    url=\"https://notte.cc\",\n    scrape_links=True,\n    only_main_content=True\n)\n\n# Structured scraping\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nresponse = client.scrape(\n    url=\"https://example.com/blog\",\n    response_format=Article,\n    instructions=\"Extract only the title, date and content of the articles\"\n)\n```\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## Personas\n\nNotte supports persona-based operations for enhanced privacy and automation:\n\n```python\nimport notte\n\npersona = notte.Persona(\"<your-persona-id>\")\nsms = persona.sms(only_unread=True)\n```\n\n### Available Operations\n\n| Method | Description |\n|--------|-------------|\n| `sms()` | Retrieve SMS messages for the persona |\n| `create_number()` | Create a phone number |\n| `delete_number()` | Delete the persona's phone number |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n\n## Error Handling\n\nNotte defines a comprehensive error hierarchy for different failure scenarios:\n\n### Core Error Classes\n\n| Error | Description |\n|-------|-------------|\n| `InvalidA11yTreeType` | Invalid accessibility tree type |\n| `InvalidA11yChildrenError` | Invalid child element count |\n| `InvalidPlaceholderError` | Unhandled placeholder in vault |\n| `ScrapeFailedError` | Structured data extraction failure |\n\nAll errors provide developer advice and user-facing messages for appropriate handling.\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n## Search Demo\n\nNotte provides a live search demonstration using MCP server integration:\n\n- **Demo URL**: [https://search.notte.cc/](https://search.notte.cc/)\n- **Features**: Real-time search in LLM chatbots leveraging the scraping endpoint\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## License and Citation\n\nThis project is licensed under the **Server Side Public License v1.0 (SSPL-1.0)**.\n\nFor academic or commercial use, cite as:\n\n```bibtex\n@software{notte2025,\n  author = {Pinto, Andrea and Giordano, Lucas and {nottelabs-team}},\n  title = {Notte: Software suite for internet-native agentic systems},\n  url = {https://github.com/nottelabs/notte},\n  year = {2025},\n  publisher = {GitHub},\n  license = {SSPL-1.0},\n  version = {1.4.4}\n}\n```\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n---\n\n<a id='quickstart'></a>\n\n## Quickstart Guide\n\n### 相关页面\n\n相关主题：[Introduction to Notte](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/nottelabs/notte/blob/main/pyproject.toml)\n- [.env.example](https://github.com/nottelabs/notte/blob/main/.env.example)\n- [docs/setup.md](https://github.com/nottelabs/notte/blob/main/docs/setup.md)\n- [examples/quickstart.py](https://github.com/nottelabs/notte/blob/main/examples/quickstart.py)\n</details>\n\n# Quickstart Guide\n\nThe Quickstart Guide provides a streamlined path for developers to begin using the Notte SDK within minutes. It covers environment configuration, SDK initialization, and the fundamental workflows for web scraping and browser automation.\n\n## Prerequisites\n\nBefore starting, ensure your development environment meets the following requirements:\n\n| Requirement | Minimum Version | Notes |\n|-------------|-----------------|-------|\n| Python | 3.10+ | Required for type annotations and modern async features |\n| pip | 21.0+ | For package installation |\n\n## Environment Setup\n\n### 1. Obtain API Credentials\n\nRegister at [notte.cc](https://notte.cc) to obtain your API key. The service requires authentication via Bearer token for all API requests.\n\n### 2. Configure Environment Variables\n\nCreate a `.env` file in your project root with the following variables:\n\n```bash\nNOTTE_API_KEY=your_api_key_here\nNOTTE_API_URL=https://api.notte.cc  # Optional, defaults to this value\n```\n\n资料来源：[.env.example:1-2]()\n\n### 3. Install the SDK\n\nInstall the Notte SDK using pip:\n\n```bash\npip install notte\n```\n\nFor additional providers or extras, install from the project root:\n\n```bash\npip install -e \".[providers]\"\n```\n\n资料来源：[pyproject.toml:1-50]()\n\n## Basic Usage\n\n### SDK Client Initialization\n\nInitialize the Notte client using environment variables or direct configuration:\n\n```python\nfrom notte import Notte\n\n# Using environment variables (recommended)\nclient = Notte()\n\n# Or with explicit parameters\nclient = Notte(\n    api_key=\"your_api_key\",\n    base_url=\"https://api.notte.cc\"\n)\n```\n\n### Simple Web Scraping\n\nPerform basic webpage scraping with minimal configuration:\n\n```python\nresponse = client.scrape(\n    url=\"https://notte.cc\",\n    scrape_links=True,\n    only_main_content=True\n)\nprint(response.content)\n```\n\n资料来源：[examples/quickstart.py:1-20]()\n\n### Structured Data Extraction\n\nExtract structured data using Pydantic models for type-safe responses:\n\n```python\nfrom notte import BaseModel\n\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nresponse = client.scrape(\n    url=\"https://example.com/blog\",\n    response_format=Article,\n    instructions=\"Extract only the title, date and content of the articles\"\n)\n```\n\n资料来源：[README.md:1-30]()\n\n## Session-Based Automation\n\nFor complex interactions requiring multiple steps, use the Session API:\n\n```python\nwith client.session() as session:\n    # Navigate to a page\n    session.execute(type=\"goto\", url=\"https://example.com\")\n    \n    # Observe available actions\n    obs = session.observe(perception_type=\"deep\")\n    \n    # Execute form filling or clicking actions\n    session.execute(type=\"click\", id=\"B1\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-50]()\n\n## API Reference\n\n### Client Configuration Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `api_key` | `str` | Yes | - | Your Notte API key |\n| `base_url` | `str` | No | `https://api.notte.cc` | Base URL for API requests |\n| `timeout` | `int` | No | `60` | Request timeout in seconds |\n\n### Scrape Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `url` | `str` | Yes | - | Target URL to scrape |\n| `only_main_content` | `bool` | No | `True` | Exclude navbars and footers |\n| `scrape_links` | `bool` | No | `True` | Include hyperlinks in response |\n| `response_format` | `BaseModel` | No | `None` | Pydantic model for structured output |\n| `instructions` | `str` | No | `None` | Natural language extraction instructions |\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[Start] --> B[Install SDK]\n    B --> C[Configure API Key]\n    C --> D{Use Case}\n    D -->|Simple Scrape| E[client.scrape]\n    D -->|Structured Data| F[Define BaseModel]\n    F --> G[client.scrape with response_format]\n    D -->|Complex Automation| H[Create Session]\n    H --> I[Observe Actions]\n    I --> J[Execute Actions]\n    J --> K[Return Results]\n    E --> L[End]\n    G --> L\n    K --> L\n```\n\n## cURL Alternative\n\nFor environments without Python, use the REST API directly:\n\n```bash\ncurl -X POST 'https://api.notte.cc/scrape' \\\n  -H 'Authorization: Bearer <NOTTE-API-KEY>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"url\": \"https://notte.cc\",\n    \"only_main_content\": false\n  }'\n```\n\n资料来源：[README.md:40-50]()\n\n## Next Steps\n\n- Review the [Setup Documentation](https://github.com/nottelabs/notte/blob/main/docs/setup.md) for advanced configuration\n- Explore the [Examples Directory](https://github.com/nottelabs/notte/tree/main/examples) for complete use cases\n- Check the [Agent Documentation](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/README.md) for browser automation with AI agents\n\n---\n\n<a id='architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Introduction to Notte](#introduction), [Agent Core System](#agent-core), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/__init__.py)\n- [packages/notte-browser/src/notte_browser/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/__init__.py)\n- [packages/notte-core/src/notte_core/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/__init__.py)\n- [packages/notte-sdk/src/notte_sdk/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/__init__.py)\n- [packages/notte-llm/src/notte_llm/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/__init__.py)\n</details>\n\n# System Architecture\n\nNotte is a software suite designed for internet-native agentic systems, providing a comprehensive infrastructure for browser automation, web interaction, and AI-driven document processing. The architecture follows a modular design pattern with distinct layers for browser control, agent orchestration, LLM integration, and SDK accessibility.\n\n## Overview\n\nThe Notte system is composed of five primary packages that work together to enable autonomous web interaction:\n\n| Package | Purpose |\n|---------|---------|\n| `notte-core` | Core utilities, error handling, and shared data structures |\n| `notte-browser` | Browser interaction and CDP integration layer |\n| `notte-agent` | AI agent orchestration (Gufo and Falco subsystems) |\n| `notte-llm` | LLM prompt management and document processing |\n| `notte-sdk` | Public SDK for client applications |\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    Client[Client Application]\n    SDK[notte-sdk]\n    Agent[notte-agent]\n    Browser[notte-browser]\n    LLM[notte-llm]\n    Core[notte-core]\n    CDP[Chrome DevTools Protocol]\n    Remote[Remote Browser]\n\n    Client --> SDK\n    SDK --> Agent\n    SDK --> LLM\n    Agent --> Browser\n    Browser --> CDP\n    CDP --> Remote\n    LLM --> Core\n    Core --> Browser\n```\n\n## Core Package (`notte-core`)\n\nThe `notte-core` package provides foundational components used across all other packages, including error handling, accessibility tree processing, and placeholder management.\n\n### Error Handling Architecture\n\nThe error system is built on a hierarchical class structure rooted in `NotteBaseError`:\n\n```python\n# Source: packages/notte-core/src/notte_core/errors/processing.py\nclass NotteBaseError(Exception):\n    def __init__(self, agent_message, user_message, dev_message)\n```\n\n**Error Categories:**\n\n| Error Class | Purpose |\n|-------------|---------|\n| `InvalidInternalCheckError` | Internal validation failures with developer guidance |\n| `InvalidA11yTreeType` | Unsupported accessibility tree format |\n| `InvalidA11yChildrenError` | Accessibility tree structure violations |\n| `InvalidPlaceholderError` | Vault placeholder resolution failures |\n| `ScrapeFailedError` | Structured data extraction failures |\n\n### Placeholder System\n\nThe placeholder system enables secure credential management through a vault mechanism. When an action requires sensitive data, the system substitutes placeholders that are resolved at runtime.\n\n```python\n# Source: packages/notte-core/src/notte_core/errors/processing.py\nclass InvalidPlaceholderError(NotteBaseError):\n    def __init__(self, placeholder: str) -> None:\n        dev_message = f\"The placeholder {placeholder} is not handled by your current vault.\"\n        agent_message = f\"Could not perform action with value {placeholder}. Try picking a different value\"\n```\n\n## SDK Package (`notte-sdk`)\n\nThe SDK provides the primary interface for client applications to interact with the Notte system. It exposes session management, observation capabilities, and action execution through a Pythonic API.\n\n### Session Management\n\nSessions are the fundamental unit of work in Notte, representing a single browser session with associated state and context.\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\nclass Session:\n    def __init__(self, ..., timeout_minutes: int = ...):\n        self.response = None\n        self._cookie_file = None\n```\n\n**Session Lifecycle:**\n\n| State | Description |\n|-------|-------------|\n| `created` | Session object instantiated |\n| `started` | `client.start()` called, `session_id` available |\n| `active` | Browser operations in progress |\n| `stopped` | `client.stop()` called, session terminated |\n\n### Observation System\n\nThe observation system retrieves the current state of the webpage and available interactive elements:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\ndef observe(self, *, perception_type: str = None, instructions: str = None, **data):\n    if data.get(\"perception_type\") is None:\n        data[\"perception_type\"] = self.default_perception_type\n    return self.client.page.observe(session_id=self.session_id, **data)\n```\n\n**Perception Types:**\n\n| Type | Description | Use Case |\n|------|-------------|----------|\n| `fast` | Simple page perception for quick queries | Default, rapid action space generation |\n| `deep` | LLM-powered element formatting | Complex pages requiring structured analysis |\n\n### Action Execution\n\nActions are executed through the unified `execute()` method with type-based dispatch:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\ndef execute(self, *, raise_on_failure: bool = None, **kwargs: Unpack[FormFillActionDict]) -> ExecutionResult\n```\n\n### Cookie Management\n\nSessions automatically persist cookies to file for session continuity:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\nif self._cookie_file is not None:\n    cookies = self.get_cookies()\n    create_or_append_cookies_to_file(self._cookie_file, cookies)\n```\n\n## Agent Package (`notte-agent`)\n\nThe agent package contains two distinct agent subsystems: **Gufo** and **Falco**. Both subsystems handle browser automation but use different prompt strategies and action registries.\n\n### Agent Subsystem Comparison\n\n| Aspect | Gufo | Falco |\n|--------|------|-------|\n| System Prompt | `gufo/system.md` | `falco/system.md` |\n| Element Format | Markdown with backticks | `id[:]<type>text</type>` |\n| Tools | Configurable via `BaseTool` | Configurable via `BaseTool` |\n| Action Registry | Custom implementation | `ActionRegistry` class |\n\n### Element Identification System\n\nBoth agents use a consistent element identification scheme for interactive elements:\n\n| Prefix | Element Type | Examples |\n|--------|--------------|----------|\n| `I` | Input fields | Textbox, select, checkbox, radio |\n| `B` | Buttons | Submit, clickable elements |\n| `L` | Links | Hypertext navigation |\n| `F` | Figures/Images | Visual content |\n| `O` | Options | Select dropdown items |\n| `M` | Miscellaneous | Modals, dialogs, overlays |\n\n```json\n{\n  \"id\": \"I1\",\n  \"type\": \"input\",\n  \"label\": \"email\",\n  \"value\": \"user@example.com\"\n}\n```\n\n### Gufo Agent System\n\nThe Gufo agent (`packages/notte-agent/src/notte_agent/gufo/system.md`) operates through structured JSON commands:\n\n```json\n{\n  \"actions\": [{\"type\": \"click\", \"id\": \"B1\"}],\n  \"reasoning\": \"User wants to submit the form\"\n}\n```\n\n### Falco Agent System\n\nThe Falco agent (`packages/notte-agent/src/notte_agent/falco/prompt.py`) uses a prompt-based approach with configurable tools:\n\n```python\n# Source: packages/notte-agent/src/notte_agent/falco/prompt.py\nclass FalcoPrompt(BasePrompt):\n    def __init__(\n        self,\n        prompt_file: Path | None = None,\n        tools: list[BaseTool] | None = None,\n    ) -> None:\n        self.action_registry: ActionRegistry = ActionRegistry(tools)\n```\n\n### CAPTCHA Handling\n\nBoth agents implement strict CAPTCHA detection and handling:\n\n```python\n# Source: packages/notte-agent/src/notte_agent/gufo/system.md\n# CAPTCHA HANDLING - CRITICAL RULES:\n# - NEVER click on captcha elements directly\n# - NEVER use \"click\", \"type\", or any other action on captcha elements\n# - If detected, use ONLY the \"captcha_solve\" action\n```\n\n### Action Examples\n\n**Form Filling:**\n```json\n// Source: packages/notte-agent/src/notte_agent/falco/prompt.py\n{\n  \"type\": \"form_fill\",\n  \"value\": {\n    \"address1\": \"<my address>\",\n    \"city\": \"<my city>\",\n    \"state\": \"<my state>\"\n  }\n}\n```\n\n**Navigation and Extraction:**\n```json\n{\n  \"type\": \"scrape\",\n  \"instructions\": \"Extract the search results from the page\"\n}\n```\n\n## LLM Package (`notte-llm`)\n\nThe LLM package manages prompts and processing for document analysis, categorization, and structured data extraction.\n\n### Prompt Categories\n\n| Category | Purpose | Output Format |\n|----------|---------|---------------|\n| `document-category` | Classify web documents | `<document-category>type</document-category>` |\n| `data-extraction` | Extract structured data | Markdown with sections |\n| `action-listing` | List available actions | JSON action array |\n| `extract-without-json-schema` | LLM-native extraction | Structured JSON |\n\n### Document Categorization\n\nDocuments are classified into categories for downstream processing:\n\n| Category | Description | Example |\n|----------|-------------|---------|\n| `search-results` | Search engine results page | Google search |\n| `item` | Individual item/product page | Recipe, product listing |\n| `other` | Uncategorized content | General pages |\n\n```markdown\n<!-- Source: packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md -->\n<document-category>other</document-category>\n```\n\n### Data Extraction Templates\n\nThe system supports multiple extraction formats:\n\n| Template | Sections | Use Case |\n|----------|----------|----------|\n| `two_sections` | `<document-analysis>`, `<data-extraction>` | Standard extraction |\n| `all_data` | Analysis + detailed extraction | Comprehensive data |\n| `user.md` (base) | Custom format | Flexible extraction |\n\n### Structured Output Generation\n\n```markdown\n<!-- Source: packages/notte-llm/src/notte_llm/prompts/data-extraction/user.md -->\n<document-analysis>\nFound X menus, Y text elements, Z interactive elements\n[Analysis content...]\n</document-analysis>\n<data-extraction>\n[Extracted data in Markdown format...]\n</data-extraction>\n```\n\n## Browser Package (`notte-browser`)\n\nThe browser package provides the low-level interface to the Chrome DevTools Protocol (CDP) for controlling headless browsers.\n\n### Key Responsibilities\n\n- Page navigation and loading\n- Element interaction (click, type, scroll)\n- Screenshot capture\n- Accessibility tree generation\n- Cookie management\n\n### CDP Integration\n\n```python\n# Source: packages/notte-sdk/README.md\nfrom patchright.sync_api import sync_playwright\nfrom notte_sdk import NotteClient\n\nwith notte.Session() as session:\n    # Browser operations via CDP\n    _ = session.execute(type=\"goto\", url=\"https://example.com\")\n```\n\n## Data Flow Architecture\n\n```mermaid\ngraph LR\n    User[User Request]\n    SDK[SDK Session]\n    Agent[Agent Processor]\n    LLM[LLM Processing]\n    Browser[Browser Engine]\n    CDP[CDP Commands]\n    \n    User --> SDK\n    SDK --> Agent\n    Agent --> LLM\n    LLM --> Agent\n    Agent --> Browser\n    Browser --> CDP\n    CDP --> Browser\n    Browser --> Agent\n    Agent --> SDK\n    SDK --> User\n```\n\n## Session State Machine\n\n```mermaid\ngraph TD\n    Init[Session Created] --> Start[client.start]\n    Start --> Active[Session Active]\n    Active --> Observe[session.observe]\n    Active --> Execute[session.execute]\n    Observe --> Active\n    Execute --> Active\n    Active --> Stop[client.stop]\n    Stop --> End[Session Ended]\n    \n    Start -->|Error| Error[Error State]\n    Error -->|Retry| Start\n```\n\n## Configuration Options\n\n### SDK Initialization\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `timeout_minutes` | `int` | - | Session timeout |\n| `open_viewer` | `bool` | `False` | Open browser viewer |\n| `proxies` | `dict` | `None` | Proxy configuration |\n| `_cookie_file` | `str` | `None` | Cookie persistence file |\n\n### Perception Configuration\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `perception_type` | `str` | `fast` or `deep` |\n| `instructions` | `str` | Natural language filtering |\n\n## Error Handling Flow\n\n```mermaid\ngraph TD\n    Action[Action Request]\n    Validate{Validation}\n    Validate -->|Pass| Execute\n    Validate -->|Fail| InvalidError[InvalidInternalCheckError]\n    \n    Execute --> CDP[CDP Call]\n    CDP -->|Success| Result\n    CDP -->|Failure| ScrapeError[ScrapeFailedError]\n    \n    Placeholder{Placeholder Check}\n    Result --> Placeholder\n    Placeholder -->|Found| PlaceholderError[InvalidPlaceholderError]\n    Placeholder -->|None| Complete\n```\n\n## Integration Examples\n\n### Basic Session Usage\n\n```python\n# Source: packages/notte-sdk/README.md\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://example.com\")\n    obs = session.observe()\n    action = obs.space.sample(type='click')\n    result = session.execute(action)\n```\n\n### Agent Deployment\n\n```python\n# Source: packages/notte-sdk/README.md\nwith notte.Session(open_viewer=True) as session:\n    agent = notte.Agent(session=session)\n    agent.start(\n        task=\"Summarize the content of the page\",\n        url=\"https://www.google.com\"\n    )\n```\n\n## Summary\n\nThe Notte architecture provides a robust, layered approach to browser automation:\n\n1. **Core Layer** (`notte-core`): Provides shared utilities, error handling, and base data structures\n2. **Browser Layer** (`notte-browser`): Abstracts Chrome DevTools Protocol for browser control\n3. **Agent Layer** (`notte-agent`): Implements AI-driven automation with Gufo and Falco subsystems\n4. **LLM Layer** (`notte-llm`): Manages document processing and prompt engineering\n5. **SDK Layer** (`notte-sdk`): Exposes the complete API to client applications\n\nThe modular design allows each layer to be used independently or in combination, enabling flexible deployment scenarios from simple web scraping to complex autonomous agent workflows.\n\n---\n\n<a id='agent-core'></a>\n\n## Agent Core System\n\n### 相关页面\n\n相关主题：[Structured Output](#structured-output), [Agent Fallback System](#agent-fallback), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent.py)\n- [packages/notte-agent/src/notte_agent/common/conversation.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/conversation.py)\n- [packages/notte-agent/src/notte_agent/common/perception.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/perception.py)\n- [packages/notte-agent/src/notte_agent/falco/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/agent.py)\n- [packages/notte-agent/src/notte_agent/gufo/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/agent.py)\n- [packages/notte-core/src/notte_core/agent_types.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/agent_types.py)\n</details>\n\n# Agent Core System\n\nThe Agent Core System is the central orchestration layer in Notte that enables AI agents to autonomously navigate and interact with web pages. It provides a unified interface for browser automation tasks, handling perception of web elements, action execution, and conversation management between the agent and web content.\n\n## Architecture Overview\n\nThe Agent Core System consists of multiple layered components that work together to enable autonomous web interaction.\n\n```mermaid\ngraph TD\n    A[Agent Client] --> B[Agent Core]\n    B --> C[Browser Session]\n    C --> D[Web Page]\n    B --> E[Perception Module]\n    B --> F[Conversation Module]\n    E --> G[Action Registry]\n    G --> H[Falco Actions]\n    G --> I[Gufo Actions]\n```\n\n## Agent Types\n\nNotte supports multiple agent implementations, each designed for specific automation scenarios. The agent type determines the underlying action execution engine and available capabilities.\n\n| Agent Type | Description | Use Case |\n|------------|-------------|----------|\n| `falco` | Standard browser automation agent | General web interaction, form filling, navigation |\n| `gufo` | Advanced automation with stealth features | CAPTCHA handling, proxy rotation, anti-detection |\n\n资料来源：[packages/notte-core/src/notte_core/agent_types.py:1-50]()\n\n## Core Components\n\n### Agent Base Class\n\nThe base `Agent` class provides the primary interface for task execution and state management.\n\n```python\nclass Agent:\n    def __init__(\n        self,\n        session: Session,\n        vault: Vault | None = None,\n        max_steps: int = 10,\n        agent_type: AgentType = AgentType.FALCO,\n    )\n    \n    def run(self, task: str) -> AgentResponse\n    def start(self, task: str, url: str | None = None) -> None\n    def status() -> AgentStatus\n    def stop() -> None\n```\n\n**Key Parameters:**\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `session` | `Session` | Required | Browser session for interaction |\n| `vault` | `Vault \\| None` | `None` | Secure credential storage |\n| `max_steps` | `int` | `10` | Maximum action steps before termination |\n| `agent_type` | `AgentType` | `FALCO` | Backend engine selection |\n\n资料来源：[packages/notte-agent/src/notte_agent/agent.py:1-100]()\n\n### Perception Module\n\nThe perception module analyzes web page structure and generates interactive action spaces for the agent.\n\n```python\nclass Perception:\n    def observe(\n        self,\n        perception_type: str = 'fast',\n        instructions: str | None = None\n    ) -> ObservationResponse\n```\n\n**Perception Types:**\n\n| Type | Description | Performance |\n|------|-------------|-------------|\n| `fast` | Simple page element parsing | Low latency |\n| `deep` | LLM-powered element formatting | Higher accuracy, slower |\n\nThe perception system generates element IDs using a role-based prefix system:\n\n- `I` - Input fields (textbox, select, checkbox)\n- `B` - Buttons\n- `L` - Links\n- `F` - Figures/Images\n- `O` - Select options\n- `M` - Miscellaneous elements (modals, dialogs)\n\n资料来源：[packages/notte-agent/src/notte_agent/common/perception.py:1-80]()\n\n### Conversation Module\n\nManages the dialogue history between the agent and web content, maintaining context across multiple interaction steps.\n\n```python\nclass Conversation:\n    def __init__(self, system_prompt: str)\n    def add_user_message(self, content: str) -> None\n    def add_agent_message(self, content: str) -> None\n    def get_messages() -> list[Message]\n```\n\nThe conversation system tracks:\n- User task requests\n- Agent reasoning and decisions\n- Action execution results\n- Page observations\n\n资料来源：[packages/notte-agent/src/notte_agent/common/conversation.py:1-60]()\n\n## Action System\n\n### Action Types\n\nThe agent supports a comprehensive set of browser automation actions through a registry pattern.\n\n```mermaid\ngraph LR\n    A[Agent Decision] --> B[Action Registry]\n    B --> C[FormFillAction]\n    B --> D[ClickAction]\n    B --> E[ScrapeAction]\n    B --> F[CaptchaSolveAction]\n    B --> G[GotoAction]\n```\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to URL | `url: str` |\n| `click` | Click element | `id: str` |\n| `fill` | Fill form fields | `value: dict[str, str]` |\n| `scrape` | Extract structured data | `instructions: str` |\n| `captcha_solve` | Solve CAPTCHA | `captcha_type: str` |\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:1-150]()\n\n### Action Registry\n\nThe `ActionRegistry` maintains available actions and their schemas, enabling dynamic action discovery.\n\n```python\nclass ActionRegistry:\n    def __init__(self, tools: list[BaseTool])\n    def get_action_schemas(self) -> list[ActionSchema]\n    def register(self, action_cls: type[BaseTool]) -> None\n```\n\n### Supported Action Formats\n\nActions are serialized using JSON schema format for agent consumption:\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"id\": {\"type\": \"string\", \"description\": \"Element identifier\"},\n    \"value\": {\"type\": \"string\", \"description\": \"Action value\"}\n  }\n}\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:30-80]()\n\n## Agent Implementations\n\n### Falco Agent\n\nThe default agent implementation using standard Playwright-based browser automation.\n\n```python\nclass FalcoAgent(BaseAgent):\n    def __init__(self, tools: list[BaseTool] | None = None)\n    def execute(self, action: dict) -> ExecutionResult\n```\n\n**Features:**\n- Standard form filling\n- Click-based navigation\n- Basic scraping operations\n- Simple CAPTCHA detection\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/agent.py:1-100]()\n\n### Gufo Agent\n\nAdvanced agent with stealth capabilities for bypassing detection systems.\n\n```python\nclass GufoAgent(BaseAgent):\n    def __init__(self, tools: list[BaseTool] | None = None)\n    def execute(self, action: dict) -> ExecutionResult\n```\n\n**Features:**\n- Automatic CAPTCHA solving\n- Proxy rotation support\n- User agent spoofing\n- Cookie management\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/agent.py:1-100]()\n\n## Session Integration\n\nAgents operate within browser sessions that provide the execution environment.\n\n```python\nwith client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n    agent = client.Agent(session=session, max_steps=15)\n    response = agent.run(\n        task=\"Navigate to the form and submit with sample data\",\n        url=\"https://example.com/form\"\n    )\n```\n\n### Session Configuration\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `browser_type` | `str` | `\"chrome\"` | Browser engine |\n| `open_viewer` | `bool` | `False` | Display browser window |\n| `timeout_minutes` | `int` | `5` | Session timeout |\n| `proxies` | `bool \\| str` | `False` | Proxy configuration |\n| `solve_captchas` | `bool` | `False` | Auto-CAPTCHA solving |\n\n## Workflow Execution\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Agent\n    participant Session\n    participant Browser\n    User->>Agent: run(task)\n    Agent->>Session: observe()\n    Session->>Browser: Get page state\n    Browser-->>Session: Page elements\n    Session-->>Agent: Observation\n    Agent->>Agent: Plan action\n    Agent->>Session: execute(action)\n    Session->>Browser: Perform action\n    Browser-->>Session: Result\n    Session-->>Agent: ExecutionResult\n    Agent->>Agent: Check completion\n    Note over Agent,Browser: Loop until task complete or max_steps\n```\n\n## Error Handling\n\nThe system provides structured error handling for various failure scenarios.\n\n| Error Class | Description | Resolution |\n|-------------|-------------|------------|\n| `InvalidPlaceholderError` | Vault credential unavailable | Select alternative value |\n| `ScrapeFailedError` | Data extraction failed | Retry with different instructions |\n| `InvalidA11yTreeType` | Unknown accessibility tree type | Check code implementation |\n| `InvalidA11yChildrenError` | Element hierarchy mismatch | Verify page structure |\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py:1-100]()\n\n## SDK Usage Example\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\n# Basic agent usage\nwith client.Session(open_viewer=True) as session:\n    agent = client.Agent(session=session, max_steps=10)\n    response = agent.run(\n        task=\"Find the search box and search for 'python tutorials'\",\n        url=\"https://www.google.com\"\n    )\n    print(response.answer)\n\n# With persona (digital identity)\nwith client.Persona(create_phone_number=True) as persona:\n    with client.Session(browser_type=\"chrome\") as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=15)\n        response = agent.run(\n            task=\"Complete the registration form\",\n            url=\"https://example.com/register\"\n        )\n```\n\n## Best Practices\n\n1. **Set appropriate max_steps** - Balance between task completion and resource usage\n2. **Use fast perception** for simple tasks, deep perception for complex page analysis\n3. **Implement vault storage** for reusable credentials across sessions\n4. **Handle errors gracefully** - Check execution results before proceeding\n5. **Use stealth features** when bypassing detection is required\n\n---\n\n<a id='structured-output'></a>\n\n## Structured Output\n\n### 相关页面\n\n相关主题：[Agent Core System](#agent-core)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-core/src/notte_core/utils/pydantic_schema.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n- [packages/notte-browser/src/notte_browser/scraping/schema.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/scraping/schema.py)\n- [packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md)\n- [packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md)\n</details>\n\n# Structured Output\n\nStructured Output enables Notte to extract web page content and return it as typed, structured data using Pydantic models. This feature bridges the gap between unstructured web content and programmatic data processing, allowing developers to define expected output schemas and receive validated, type-safe data.\n\n## Overview\n\nNotte's Structured Output system consists of two complementary approaches:\n\n1. **Schema-Based Extraction**: Uses dynamically generated JSON schemas from Pydantic models\n2. **Natural Language Extraction**: Uses instructions-based extraction without strict schema enforcement\n\nThe system leverages Pydantic for schema definition, ensuring type safety and validation at the application layer. When a `response_format` is provided, Notte generates a corresponding JSON Schema that guides the LLM in producing correctly structured output.\n\n资料来源：[packages/notte-core/src/notte_core/utils/pydantic_schema.py](packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[User Request] --> B[Define Pydantic Model]\n    B --> C[response_format Parameter]\n    C --> D{Schema Type}\n    D -->|With Schema| E[Generate JSON Schema]\n    D -->|Without Schema| F[Instructions-Only Extraction]\n    E --> G[Prompt Engineering]\n    F --> G\n    G --> H[LLM Processing]\n    H --> I[Output Validation]\n    I --> J[Typed Response]\n```\n\n## Core Components\n\n### Pydantic Schema Generation\n\nThe `pydantic_schema.py` module provides utilities for converting Python Pydantic models into JSON schemas that can be consumed by LLMs.\n\n| Function | Purpose |\n|----------|---------|\n| `model_to_json_schema()` | Converts Pydantic model class to JSON schema |\n| `validate_response()` | Validates LLM output against expected schema |\n| `extract_structured_data()` | Extracts and parses structured data from response |\n\n资料来源：[packages/notte-core/src/notte_core/utils/pydantic_schema.py](packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n\n### Scraping Schema\n\nThe `schema.py` module defines the scraping configuration and response handling for structured output.\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `response_format` | `type[BaseModel]` | `None` | Pydantic model for structured output |\n| `instructions` | `str` | `None` | Natural language extraction instructions |\n| `raise_on_failure` | `bool` | `True` | Raise exception on extraction failure |\n\n资料来源：[packages/notte-browser/src/notte_browser/scraping/schema.py](packages/notte-browser/src/notte_browser/scraping/schema.py)\n\n## Usage Patterns\n\n### Basic Structured Extraction\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\nclass Product(BaseModel):\n    title: str\n    price: str\n    description: str | None = None\n\nclient = NotteClient()\ndata = client.scrape(\n    url=\"https://example.com/product\",\n    response_format=Product,\n    instructions=\"Extract the product title, price, and description\"\n)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/client.py](packages/notte-sdk/src/notte_sdk/client.py)\n\n### Session-Based Extraction\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://example.com/blog\")\n    data = session.scrape(\n        response_format=Article,\n        instructions=\"Extract the title, date and content of the articles\"\n    )\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Error Handling\n\n```python\nfrom notte_sdk import NotteClient\nfrom notte_core.errors import ScrapeFailedError\n\nclient = NotteClient()\n\n# With raise_on_failure=False, returns StructuredData wrapper\nresult = client.scrape(\n    url=\"https://example.com\",\n    response_format=Product,\n    raise_on_failure=False\n)\n\nif not result.success:\n    print(f\"Extraction failed: {result.error}\")\nelse:\n    data = result.data\n```\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](packages/notte-core/src/notte_core/errors/processing.py)\n\n## Prompt Engineering\n\n### JSON Schema Generation Prompt\n\nThe `generate-json-schema/system.md` template guides the LLM in producing valid JSON output conforming to a specified schema. This prompt includes:\n\n- Success examples showing correct JSON output\n- Failure examples demonstrating invalid output handling\n- Timestamp context for time-sensitive extraction\n\n```markdown\nToday is: {{timestamp}}\n\nTransform the following document into structured JSON output based on the provided user request:\n\n```markdown\n{{& document}}\n```\n```\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md](packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md)\n\n### Extraction Without Schema\n\nThe `extract-without-json-schema/system.md` template provides an alternative approach for natural language extraction:\n\n```markdown\n```json\n{{& success_example}}\n```\n\nExample of a valid output if you cannot answer the user request:\n```json\n{{& failure_example}}\n```\n```\n\nThis approach allows flexible extraction when strict schema conformance is not required.\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md](packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md)\n\n## Scrape Action Configuration\n\nThe underlying scrape action provides granular control over extraction:\n\n```python\nsession.execute(type=\"scrape\", only_images=True)  # Scrape only images\nsession.execute(type=\"scrape\", response_format={\"type\": \"object\", \"properties\": {...}})  # With JSON schema\n```\n\n| Action Parameter | Description |\n|-----------------|-------------|\n| `instructions` | Natural language instructions for extraction |\n| `only_main_content` | Exclude navbars, footers (default: `True`) |\n| `selector` | Playwright selector to scope extraction |\n| `only_images` | Extract images only |\n| `scrape_links` | Include links in output (default: `True`) |\n| `scrape_images` | Include image data |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py](packages/notte-core/src/notte_core/actions/actions.py)\n\n## Workflow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant SDK as NotteClient\n    participant LLM as LLM Engine\n    participant API as Notte API\n\n    User->>SDK: scrape(url, response_format=Model)\n    SDK->>LLM: Generate JSON Schema from Model\n    SDK->>API: POST /scrape with schema + instructions\n    API->>LLM: Process page with schema\n    LLM-->>API: Structured JSON response\n    API-->>SDK: Validated response\n    SDK-->>User: Typed Model instance\n```\n\n## Best Practices\n\n1. **Define Clear Schemas**: Use descriptive field names and include type annotations\n2. **Provide Contextual Instructions**: Give the LLM context about what to extract\n3. **Handle Optional Fields**: Use `| None` for fields that may not always be present\n4. **Validate Output**: Enable `raise_on_failure=True` for production use\n5. **Scope Extraction**: Use selectors when extracting from specific page regions\n\n## Error Handling\n\n| Error Type | Cause | Resolution |\n|------------|-------|------------|\n| `ScrapeFailedError` | Extraction validation failed | Check instructions and schema compatibility |\n| `LLMParsingError` | Malformed JSON in response | Ensure schema is properly generated |\n| `InvalidPlaceholderError` | Missing credential reference | Configure vault for required credentials |\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](packages/notte-core/src/notte_core/errors/processing.py)\n\n---\n\n<a id='agent-fallback'></a>\n\n## Agent Fallback System\n\n### 相关页面\n\n相关主题：[Agent Core System](#agent-core), [Actions and Browser Controls](#actions-controls)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent_fallback.py)\n- [packages/notte-sdk/src/notte_sdk/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/agent_fallback.py)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n</details>\n\n# Agent Fallback System\n\n## Overview\n\nThe Agent Fallback System in Notte provides a robust mechanism for handling agent execution failures and gracefully recovering from errors during browser automation tasks. When an agent encounters execution issues—whether due to captcha detection, action failures, or other runtime errors—the fallback system intercepts these failures, analyzes the error context, and determines the appropriate recovery strategy.\n\nThe system operates across two primary layers: the SDK layer (`notte_sdk`) and the agent layer (`notte_agent`), ensuring consistent error handling and recovery whether agents are executed locally or through the Notte API.\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[Agent Execution] --> B{Action Execution Success?}\n    B -->|Yes| C[Continue Normal Flow]\n    B -->|No| D[Fallback System Triggered]\n    D --> E{Error Type Classification}\n    E -->|Captcha| F[Captcha Handler]\n    E -->|Action Failure| G[Retry Strategy]\n    E -->|Fatal Error| H[Graceful Degradation]\n    F --> I[Attempt Resolution]\n    G --> J[Apply Retry Policy]\n    H --> K[Report to User]\n    I --> C\n    J --> C\n    K --> L[Session Cleanup]\n```\n\n## Core Components\n\n### FallbackAction Class\n\nThe `FallbackAction` class represents the fundamental unit of fallback handling. It encapsulates the error context and provides structured data for downstream processing.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `error_type` | `str` | Classification of the error (e.g., \"captcha\", \"action_failure\") |\n| `error_message` | `str` | Detailed description of the failure |\n| `metadata` | `dict` | Additional context including HTML element data, playwright code, and execution state |\n| `retry_count` | `int` | Number of retry attempts performed |\n| `timestamp` | `datetime` | When the error occurred |\n\n资料来源：[packages/notte-agent/src/notte_agent/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent_fallback.py)\n\n### AgentFallbackManager\n\nThe `AgentFallbackManager` serves as the central coordinator for fallback operations, managing the lifecycle of error handling and recovery strategies.\n\n```mermaid\nsequenceDiagram\n    participant Agent as Agent\n    participant FallbackManager as FallbackManager\n    participant RecoveryStrategy as RecoveryStrategy\n    participant Session as Session\n    \n    Agent->>FallbackManager: Register failure context\n    FallbackManager->>FallbackManager: Classify error type\n    FallbackManager->>RecoveryStrategy: Select appropriate strategy\n    RecoveryStrategy->>Session: Apply recovery action\n    Session-->>Agent: Resume or terminate\n```\n\n#### Key Methods\n\n| Method | Purpose |\n|--------|---------|\n| `register_failure()` | Records a new failure event in the fallback system |\n| `classify_error()` | Determines the error category based on error characteristics |\n| `select_recovery_strategy()` | Chooses the optimal recovery approach |\n| `apply_recovery()` | Executes the chosen recovery mechanism |\n| `should_retry()` | Evaluates whether additional attempts are warranted |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/agent_fallback.py)\n\n## Error Classification\n\nThe fallback system categorizes failures into distinct types, each with tailored handling strategies:\n\n| Error Type | Description | Default Recovery |\n|------------|-------------|------------------|\n| `captcha` | CAPTCHA or verification challenges detected | Initiate captcha solving flow |\n| `action_failure` | Interactive element action failed | Retry with modified selectors |\n| `navigation_error` | Page navigation or URL resolution failure | Retry with exponential backoff |\n| `timeout_error` | Operation exceeded time limits | Extend timeout and retry |\n| `invalid_state` | Agent reached an inconsistent state | Reset to known good state |\n| `fatal_error` | Unrecoverable error requiring termination | Graceful session cleanup |\n\n## Recovery Strategies\n\n### 1. Captcha Resolution Strategy\n\nWhen the system detects CAPTCHA challenges, it automatically triggers the captcha solving mechanism.\n\n```python\n# Captcha detection triggers automatic resolution\nif error_type == \"captcha\":\n    captcha_type = detect_captcha_type(metadata)\n    captcha_action = CaptchaSolveAction(captcha_type=captcha_type)\n    result = session.execute(captcha_action)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### 2. Retry with Backoff Strategy\n\nFor transient failures, the system implements configurable retry logic with exponential backoff:\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `max_retries` | `3` | Maximum retry attempts |\n| `base_delay` | `1000` | Initial delay in milliseconds |\n| `backoff_factor` | `2.0` | Multiplier for each retry |\n| `jitter` | `True` | Randomization to prevent thundering herd |\n\n### 3. Graceful Degradation Strategy\n\nWhen recovery is not possible, the system performs controlled cleanup:\n\n```python\n# Graceful termination sequence\ntry:\n    session.stop()\nexcept Exception as e:\n    logger.warning(f\"Session cleanup warning: {e}\")\nfinally:\n    fallback_manager.record_final_state(error_context)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Integration with Session Management\n\nThe fallback system integrates tightly with the Notte session lifecycle:\n\n```mermaid\ngraph LR\n    A[Session Start] --> B[Agent Initialization]\n    B --> C[Task Execution]\n    C --> D{Success?}\n    D -->|Yes| E[Complete Task]\n    D -->|No| F[Fallback Check]\n    F --> G{Retryable?}\n    G -->|Yes| H[Apply Recovery]\n    G -->|No| I[Log Failure]\n    H --> C\n    I --> J[Session Cleanup]\n    E --> J\n```\n\n### Session Callback Integration\n\nThe SDK exposes callback hooks for fallback integration:\n\n```python\nsession.on_failure(callback=fallback_manager.handle_failure)\nsession.on_retry(callback=fallback_manager.prepare_retry)\nsession.on_success(callback=fallback_manager.record_success)\n```\n\n## Configuration Options\n\n| Configuration | Type | Default | Description |\n|---------------|------|---------|-------------|\n| `fallback_enabled` | `bool` | `True` | Enable/disable fallback system |\n| `max_retry_attempts` | `int` | `3` | Global retry limit |\n| `fallback_timeout_ms` | `int` | `30000` | Timeout for fallback operations |\n| `capture_screenshots` | `bool` | `True` | Screenshot on failure for debugging |\n| `verbose_logging` | `bool` | `False` | Detailed fallback logging |\n\n## Usage Patterns\n\n### Basic Usage with SDK\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Session() as session:\n    agent = client.Agent(session=session)\n    agent.start(task=\"Navigate and extract data\", url=\"https://example.com\")\n    \n    # Fallback system handles failures automatically\n    status = agent.status()\n```\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n### Custom Fallback Handler\n\n```python\nclass CustomFallbackHandler:\n    def handle_failure(self, fallback_action: FallbackAction) -> RecoveryResult:\n        # Custom logic for specific error types\n        if fallback_action.error_type == \"captcha\":\n            return RecoveryResult(strategy=\"custom_captcha_solver\")\n        return RecoveryResult(strategy=\"default\")\n```\n\n## Error Reporting and Monitoring\n\nThe fallback system generates structured error reports containing:\n\n| Field | Description |\n|-------|-------------|\n| `session_id` | Unique identifier for the session |\n| `agent_id` | Identifier of the agent that failed |\n| `error_type` | Classification of the failure |\n| `error_message` | Human-readable error description |\n| `playwright_code` | Relevant browser automation code |\n| `html_element` | DOM element context when available |\n| `timestamp` | ISO 8601 timestamp of the failure |\n| `retry_history` | Array of previous retry attempts |\n\n## Best Practices\n\n1. **Enable Verbose Logging During Development**: Set `verbose_logging=True` to capture detailed fallback behavior\n2. **Configure Appropriate Timeouts**: Match `fallback_timeout_ms` to your expected operation durations\n3. **Monitor Retry Counts**: Track `retry_count` to identify persistent issues\n4. **Preserve Error Context**: Always include `metadata` for effective debugging\n5. **Test Fallback Paths**: Regularly validate fallback behavior under failure conditions\n\n## Related Components\n\n| Component | Purpose |\n|-----------|---------|\n| `FalcoPrompt` | Agent instruction and action generation |\n| `SessionManager` | Browser session lifecycle |\n| `CaptchaSolveAction` | Specialized captcha resolution |\n| `ScrapeAction` | Data extraction with fallback support |\n| `ErrorProcessing` | Low-level error handling |\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n\n---\n\n<a id='sessions'></a>\n\n## Browser Sessions\n\n### 相关页面\n\n相关主题：[Actions and Browser Controls](#actions-controls), [Vaults and Credential Management](#vaults-credentials)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-browser/src/notte_browser/session.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/session.py)\n- [packages/notte-browser/src/notte_browser/captcha.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/captcha.py)\n- [packages/notte-browser/src/notte_browser/controller.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/controller.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-mcp/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-mcp/README.md)\n- [packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n</details>\n\n# Browser Sessions\n\n## Overview\n\nBrowser Sessions in Notte provide a managed environment for automating web interactions through a cloud-based browser infrastructure. Sessions encapsulate the state of a browser instance, allowing developers to navigate websites, interact with elements, extract data, and handle complex web automation tasks programmatically.\n\nThe session system abstracts away the complexities of browser automation, providing a high-level API for:\n- Navigating to URLs and managing browser tabs\n- Observing page elements and available actions\n- Executing automated interactions (clicks, form fills, scrolling)\n- Scraping structured and unstructured data from web pages\n- Solving CAPTCHA challenges automatically\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[Session]\n    B --> C[Browser Controller]\n    C --> D[Cloud Browser Instance]\n    E[Actions] --> B\n    B --> F[Observations]\n    B --> G[Scrape Results]\n    H[Captcha Handler] --> C\n```\n\n### Core Components\n\n| Component | Package | Responsibility |\n|-----------|---------|----------------|\n| `Session` | `notte-sdk` | High-level API for session management |\n| `BrowserController` | `notte-browser` | Low-level browser control and state |\n| `CaptchaSolver` | `notte-browser` | Automatic CAPTCHA resolution |\n| `ActionExecutor` | `notte-core` | Action execution and validation |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py]()\n资料来源：[packages/notte-browser/src/notte_browser/controller.py]()\n\n## Session Lifecycle\n\n### Starting a Session\n\nSessions can be initialized using the context manager pattern for automatic cleanup:\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://www.example.com\")\n    # Perform actions...\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:30-40]()\n\n### Session States\n\n```mermaid\nstateDiagram-v2\n    [*] --> Idle: Client initialized\n    Idle --> Active: Session started\n    Active --> Active: Actions executed\n    Active --> Stopping: stop() called\n    Stopping --> Stopped: Cleanup complete\n    Stopped --> [*]: Context exited\n```\n\n### Stopping a Session\n\nWhen a session stops, cookies are automatically saved if configured:\n\n```python\ndef stop(self) -> None:\n    if self._cookie_file is not None:\n        try:\n            cookies = self.get_cookies()\n            create_or_append_cookies_to_file(self._cookie_file, cookies)\n        except Exception as e:\n            logger.error(f\"🍪 Error saving cookies to {self._cookie_file}: {e}\")\n    self.response = self.client.stop(session_id=self.session_id)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:50-65]()\n\n## Session Configuration\n\n### Configuration Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `timeout_minutes` | `int` | `5` | Session timeout in minutes |\n| `proxies` | `bool` | `True` | Enable proxy support |\n| `cookie_file` | `str` | `None` | Path to cookie persistence file |\n| `open_viewer` | `bool` | `False` | Open visual browser viewer |\n\n### Creating a Configured Session\n\n```python\nwith client.Session(timeout_minutes=10, open_viewer=True) as session:\n    status = session.status()\n    session.viewer()\n```\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## Page Interaction\n\n### Observation\n\nThe `observe()` method retrieves interactive elements on the current page. Notte supports two perception modes:\n\n#### Fast Perception\nA quick, simple page scan for basic element identification:\n\n```python\nobs = session.observe(perception_type='fast')\n```\n\n#### Deep Perception\nLLM-powered analysis for richer action space generation:\n\n```python\nobs = session.observe(perception_type='deep')\nprint(obs.space.description)\n```\n\n#### Focused Observation\nUse `instructions` to narrow the action space to a specific intent:\n\n```python\nactions = session.observe(instructions=\"Fill the email input\")\nprint(actions[0].model_dump())\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:90-110]()\n\n### Element Identification\n\nElements are identified using structured IDs with the format `<role_first_letter><index>[:]`:\n\n| Role Letter | Element Type |\n|-------------|--------------|\n| `I` | Input fields (textbox, select, checkbox) |\n| `B` | Buttons |\n| `L` | Links |\n| `F` | Figures and images |\n| `O` | Options in select elements |\n| `M` | Miscellaneous (modals, dialogs) |\n\nExample element ID: `I2[:]<button>` represents an input field at index 2.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md]()\n\n## Browser Actions\n\n### Action Types\n\nNotte provides comprehensive browser automation actions:\n\n#### Navigation Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to a URL | `url: str` |\n| `goto_new_tab` | Open URL in new tab | `url: str` |\n| `close_tab` | Close current tab | - |\n| `scroll` | Scroll the page | `direction: str`, `amount: int` |\n| `scroll_to` | Scroll to element | `id: str` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py]()\n\n#### Interaction Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `click` | Click an element | `id: str` |\n| `fill` | Fill input field | `id: str`, `value: str` |\n| `select` | Select option | `id: str`, `option: str` |\n| `check` | Check checkbox | `id: str` |\n| `press` | Press keyboard key | `key: str` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py]()\n\n#### Data Extraction Actions\n\n```python\n# Scrape entire page\nmarkdown = session.scrape()\n\n# Scrape with instructions\nresult = session.scrape(instructions=\"Extract title and price\")\n\n# Scrape only images\nsession.scrape(only_images=True)\n\n# Structured scraping with JSON schema\nsession.scrape(response_format={\"type\": \"object\", \"properties\": {...}})\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:30-60]()\n\n### Executing Actions\n\n```python\n# Get observations\nobs = session.observe()\n\n# Sample and execute an action\naction = obs.space.sample(type='click')\nresult = session.execute(action)\nassert result.success\n```\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## CAPTCHA Handling\n\nNotte includes automatic CAPTCHA solving capabilities:\n\n```python\nsession.execute(type=\"captcha_solve\", captcha_type=\"recaptcha\")\nsession.execute(type=\"captcha_solve\")  # Auto-detect\n```\n\n### Supported CAPTCHA Types\n\n| Type | Description |\n|------|-------------|\n| `recaptcha` | Google reCAPTCHA |\n| `hcaptcha` | hCaptcha |\n| `image` | Image-based CAPTCHA |\n| `text` | Text-based CAPTCHA |\n| `auth0` | Auth0 CAPTCHA |\n| `cloudflare` | Cloudflare CAPTCHA |\n| `datadome` | DataDome CAPTCHA |\n| `arkose labs` | Arkose Labs CAPTCHA |\n| `geetest` | Geetest CAPTCHA |\n| `press&hold` | Press and hold challenge |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:70-95]()\n\n## MCP Server Integration\n\nNotte sessions can be accessed via the Model Context Protocol (MCP):\n\n### Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `notte_new_session` | Start a new cloud browser session |\n| `notte_list_sessions` | List all active sessions |\n| `notte_stop_session` | Stop the current session |\n| `notte_observe` | Observe elements on current page |\n| `notte_screenshot` | Take a screenshot |\n| `notte_scrape` | Extract structured data |\n| `notte_step` | Execute an action |\n\n资料来源：[packages/notte-mcp/README.md]()\n\n### Server Setup\n\n```bash\npip install notte-mcp\nexport NOTTE_API_KEY=\"your-api-key\"\npython -m notte_mcp.server\n```\n\n资料来源：[packages/notte-mcp/README.md]()\n\n## Cookie Management\n\nSessions automatically persist cookies for authenticated workflows:\n\n```python\nwith client.Session(cookie_file=\"cookies.json\") as session:\n    session.execute(type=\"goto\", url=\"https://example.com/login\")\n    # Login once - cookies saved automatically on exit\n```\n\nOn subsequent runs, cookies are loaded automatically:\n\n```python\ndef get_cookies(self) -> dict:\n    \"\"\"Load cookies from file\"\"\"\n    # Implementation handles file existence\n    pass\n\ndef create_or_append_cookies_to_file(self, cookies: dict) -> None:\n    \"\"\"Persist cookies after session\"\"\"\n    pass\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:45-65]()\n\n## Error Handling\n\n### Session Errors\n\n```python\ntry:\n    with client.Session() as session:\n        session.execute(type=\"goto\", url=\"https://example.com\")\nexcept ValueError as e:\n    # Session not started\n    print(f\"Error: {e}\")\nexcept RuntimeError as e:\n    # Session failed to close\n    print(f\"Error: {e}\")\n```\n\n### Action Execution Errors\n\n```python\nresult = session.execute(action, raise_on_failure=True)\nif not result.success:\n    print(f\"Action failed: {result.error}\")\n```\n\n### Graceful Shutdown\n\nThe context manager ensures proper cleanup even on exceptions:\n\n```python\nwith client.Session() as session:\n    try:\n        # Perform actions\n        session.execute(type=\"goto\", url=\"https://example.com\")\n    except Exception as e:\n        logger.error(f\"Session error: {e}\")\n    finally:\n        # Cleanup happens automatically\n        pass\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:50-70]()\n\n## Best Practices\n\n### Resource Management\n- Always use the `with` statement for automatic session cleanup\n- Set appropriate `timeout_minutes` based on task complexity\n- Enable `open_viewer=True` for debugging complex interactions\n\n### Performance Optimization\n- Use `perception_type='fast'` for simple, quick operations\n- Use `perception_type='deep'` when LLM interpretation is needed\n- Filter observations with `instructions` to reduce processing overhead\n\n### Reliability\n- Implement retry logic for flaky network conditions\n- Handle CAPTCHAs proactively using the built-in solver\n- Persist cookies for authenticated workflows\n\n### Security\n- Store API keys in environment variables\n- Never commit cookie files with sensitive credentials to version control\n- Rotate proxy configurations periodically\n\n## API Reference\n\n### NotteClient.Session\n\n| Method | Description |\n|--------|-------------|\n| `__enter__()` | Start session |\n| `__exit__()` | Stop session |\n| `execute()` | Execute browser action |\n| `observe()` | Get page elements |\n| `scrape()` | Extract page data |\n| `status()` | Get session status |\n| `viewer()` | Open visual viewer |\n| `cdp_url()` | Get CDP connection URL |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py]()\n\n---\n\n<a id='actions-controls'></a>\n\n## Actions and Browser Controls\n\n### 相关页面\n\n相关主题：[Browser Sessions](#sessions), [Agent Core System](#agent-core)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n- [packages/notte-agent/src/notte_agent/falco/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/system.md)\n</details>\n\n# Actions and Browser Controls\n\n## Overview\n\nActions and Browser Controls form the core interaction layer of the Notte system, enabling AI agents to navigate, interact with, and extract data from web pages. The action system provides a structured, type-safe mechanism for executing browser operations through a unified API.\n\nActions in Notte are classified into two primary categories:\n\n1. **Browser Actions** - High-level navigation and tab management operations\n2. **Interaction Actions** - Element-level interactions such as clicking, filling forms, and solving captchas\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-100]()\n\n## Action Hierarchy\n\nNotte implements a class-based action system using Python's type system for validation and safety. All actions inherit from base classes that define common behavior.\n\n```mermaid\ngraph TD\n    A[BaseAction] --> B[BrowserAction]\n    A --> C[InteractionAction]\n    \n    B --> D[GotoAction]\n    B --> E[GotoNewTabAction]\n    B --> F[CloseTabAction]\n    \n    C --> G[ClickAction]\n    C --> H[FillAction]\n    C --> I[ScrapeAction]\n    C --> J[CaptchaSolveAction]\n    C --> K[FormFillAction]\n```\n\n### Base Classes\n\n| Class | Purpose | Key Properties |\n|-------|---------|----------------|\n| `BaseAction` | Abstract base for all actions | `type`, `description`, `param` |\n| `BrowserAction` | Navigation and tab operations | `execution_message()` |\n| `InteractionAction` | Element-level interactions | `id`, `text_label` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-200]()\n\n## Browser Actions\n\nBrowser Actions manage page navigation and tab lifecycle. These actions operate at the browser level rather than the page element level.\n\n### GotoAction\n\nNavigates the current tab to a specified URL.\n\n```python\nsession.execute(type=\"goto\", url=\"https://www.example.com\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"goto\"]` | Action type identifier |\n| `url` | `str` | Target URL to navigate to |\n| `param` | `ActionParameter` | Parameter definition for LLM tooling |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:50-80]()\n\n### GotoNewTabAction\n\nOpens a URL in a new browser tab. The action returns immediately without waiting for navigation completion.\n\n```python\nsession.execute(type=\"goto_new_tab\", url=\"https://www.example.com\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"goto_new_tab\"]` | Action type identifier |\n| `url` | `str` | Target URL to open in new tab |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:82-115]()\n\n### CloseTabAction\n\nCloses the currently active browser tab.\n\n```python\nsession.execute(type=\"close_tab\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:117-140]()\n\n## Interaction Actions\n\nInteraction Actions target specific page elements identified by their DOM IDs. These actions require the agent to first observe the page to obtain valid element identifiers.\n\n### ClickAction\n\nSimulates a mouse click on a page element.\n\n```python\nsession.execute(type=\"click\", id=\"submit-button\")\nsession.execute(type=\"click\", id=\"B1\", text_label=\"Submit Form\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"click\"]` | Action type identifier |\n| `id` | `str` | Element identifier from page observation |\n| `text_label` | `str \\| None` | Optional text label for logging |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:150-180]()\n\n### FillAction\n\nFills an input field with a specified value. By default, the field is cleared before filling.\n\n```python\nsession.execute(type=\"fill\", id=\"email-input\", value=\"user@example.com\")\nsession.execute(type=\"fill\", id=\"name-input\", value=\"John Doe\", clear_before_fill=False)\n```\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `id` | `str` | - | Element identifier |\n| `value` | `str \\| ValueWithPlaceholder` | - | Value to fill |\n| `clear_before_fill` | `bool` | `True` | Clear field before filling |\n| `text_label` | `str \\| None` | `None` | Descriptive label |\n\nThe `ValueWithPlaceholder` type allows for complex fill values with embedded placeholders that may be resolved dynamically.\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:182-230]()\n\n### FormFillAction\n\nSupports batch filling of multiple form fields in a single action, improving efficiency for multi-field forms.\n\n```python\nform_values = {\n    \"address1\": \"123 Main St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n}\nsession.execute(type=\"form_fill\", value=form_values)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:50-70]()\n\n### CaptchaSolveAction\n\nAttempts to solve captcha challenges detected on the page.\n\n```python\nsession.execute(type=\"captcha_solve\", captcha_type=\"recaptcha\")\n```\n\n**Supported Captcha Types:**\n- `recaptcha` - Google reCAPTCHA\n- `hcaptcha` - hCaptcha\n- Image verification challenges\n\n> **Critical Rule:** Agents must never click on captcha elements directly. When any captcha is detected, the `captcha_solve` action must be used exclusively.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md:40-60]()\n\n### ScrapeAction\n\nExtracts structured data from the current page based on natural language instructions.\n\n```python\nsession.execute(\n    type=\"scrape\",\n    instructions=\"Extract the search results from the Google search page\"\n)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:80-90]()\n\n## Action Execution Flow\n\nThe following diagram illustrates how actions flow through the Notte system from agent decision to browser execution:\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant SDK as Notte SDK\n    participant API as Notte API\n    participant Browser as Browser Engine\n    \n    Agent->>SDK: session.execute(type=\"click\", id=\"B1\")\n    SDK->>API: POST /sessions/{id}/execute\n    API->>Browser: playwright.click(\"#B1\")\n    Browser-->>API: Success/Failure\n    API-->>SDK: ExecutionResult\n    SDK-->>Agent: ExecutionResult\n    \n    Note over Agent,Browser: Action parameters validated<br/>at SDK layer\n```\n\n### Session-Level Execution\n\nActions are executed within a `Session` context that maintains browser state and provides observation capabilities:\n\n```python\nfrom notte_sdk import Notte\n\nnotte = Notte(api_key=\"your-api-key\")\nsession = notte.sessions.create()\n\n# Execute actions\nsession.execute(type=\"goto\", url=\"https://example.com\")\n\n# Observe available actions\nobs = session.observe()\nprint(obs.space.description)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-60]()\n\n### Perception Types\n\nWhen observing available actions, the system supports different perception depths:\n\n| Perception Type | Description | Use Case |\n|-----------------|-------------|----------|\n| `fast` | Simple page perception | Quick action queries |\n| `deep` | LLM-powered element formatting | Rich, structured action space |\n\n```python\n# Fast perception for quick queries\nobs = session.observe(perception_type=\"fast\")\n\n# Deep perception for comprehensive action space\nobs = session.observe(perception_type=\"deep\")\n```\n\nThe `instructions` parameter can narrow the action space to a specific intent:\n\n```python\nactions = session.observe(instructions=\"Fill the email input\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:40-70]()\n\n## Action Registry\n\nThe `ActionRegistry` manages available actions and generates JSON schemas for agent tooling:\n\n```python\nclass ActionRegistry:\n    def __init__(self, tools: list[BaseTool] | None = None) -> None:\n        self.tools = tools or []\n    \n    def get_schema(self, action_cls: type) -> dict[str, Any]:\n        # Generates JSON schema for action class\n```\n\nThe registry processes each tool to extract action descriptions and parameter schemas, enabling dynamic action space generation for agents.\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:1-50]()\n\n## Element ID Format\n\nInteractive elements are referenced using a structured ID format that encodes element type and position:\n\n| Prefix | Element Type | Example |\n|--------|--------------|---------|\n| `I` | Input fields (textbox, select, checkbox) | `I1`, `I2` |\n| `B` | Buttons | `B1`, `B2` |\n| `L` | Links | `L1`, `L2` |\n| `F` | Figures and images | `F1` |\n| `O` | Options in select elements | `O1` |\n| `M` | Miscellaneous (modals, dialogs) | `M1` |\n\n> **Important:** Element IDs can and will change at each page observation. Agents must not cache or assume ID persistence across steps.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md:10-30]()\n\n## Action Response Format\n\nAll action executions return an `ExecutionResult` containing:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `success` | `bool` | Whether the action succeeded |\n| `message` | `str` | Human-readable result description |\n| `error` | `str \\| None` | Error details if failed |\n\nWhen `raise_on_failure` is set, execution will raise an exception on failure; otherwise, the result is returned with error information included.\n\n## Best Practices\n\n1. **Always observe before acting** - Use `session.observe()` to get current element IDs before executing interaction actions\n2. **Handle captchas properly** - Use `captcha_solve` when captchas are detected; never click captcha elements directly\n3. **Validate IDs per step** - Element IDs change between observations; never assume ID stability\n4. **Use batch operations** - Prefer `FormFillAction` over multiple `FillAction` calls for multi-field forms\n5. **Set appropriate perception types** - Use `fast` for quick checks, `deep` when comprehensive element understanding is needed\n\n---\n\n<a id='vaults-credentials'></a>\n\n## Vaults and Credential Management\n\n### 相关页面\n\n相关主题：[Agent Personas](#personas), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-browser/src/notte_browser/vault.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/vault.py)\n- [packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n- [packages/notte-core/src/notte_core/credentials/types.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/types.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/vaults.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/vaults.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n- [packages/notte-integrations/src/notte_integrations/credentials/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-integrations/src/notte_integrations/credentials/README.md)\n</details>\n\n# Vaults and Credential Management\n\n## Overview\n\nNotte's Vaults and Credential Management system provides a secure, centralized mechanism for storing, retrieving, and automatically injecting website credentials during browser automation tasks. The system eliminates the need for agents to manually handle authentication credentials, reducing security risks and improving automation reliability.\n\nThe vault architecture spans multiple layers:\n\n| Layer | Package | Purpose |\n|-------|---------|---------|\n| Core Types | `notte-core` | Defines credential data models and base classes |\n| Browser Integration | `notte-browser` | Handles credential injection during page interactions |\n| SDK API | `notte-sdk` | Provides REST API endpoints for vault operations |\n| External Integrations | `notte-integrations` | Supports third-party vault solutions (e.g., HashiCorp Vault) |\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[VaultsClient]\n    B --> C[Cloud Vault API]\n    C --> D[NotteVault]\n    \n    E[Agent Session] --> F[Browser Session]\n    F --> G[NotteBrowser Vault]\n    G --> D\n    \n    H[Persona] --> I[Vault Association]\n    I --> D\n    \n    J[HashiCorpVault] --> K[External Vault Server]\n    \n    D -.-> L[Credential Replacement]\n    L --> F\n```\n\n## Credential Types\n\n### Base Credential Model\n\nThe credential system is built on a flexible data model defined in `notte-core`. Credentials are identified by URL and support multiple authentication fields:\n\n```python\n# Simplified from packages/notte-core/src/notte_core/credentials/types.py\nclass Credential(BaseModel):\n    url: str                    # Target website URL\n    username: str | None = None # Username or email\n    email: str | None = None    # Email address\n    password: str | None = None # Password\n    totp_secret: str | None = None # TOTP 2FA secret\n    notes: str | None = None    # Additional notes\n    metadata: dict | None = None # Custom metadata\n```\n\n### Credential Actions\n\nWhen an agent needs to authenticate, the system creates a `CredentialAction` that describes the required credential field:\n\n```python\n# From packages/notte-core/src/notte_core/credentials/types.py\nclass CredentialAction(BaseModel):\n    url: str                          # Target URL\n    action: Literal[\"fill\", \"verify\"] # Operation type\n    field: Literal[\"username\", \"password\", \"email\", \"totp\"] # Required field\n    locator: LocatorAttributes | None = None # DOM element context\n```\n\n## Vault Implementation\n\n### Browser Vault (`notte-browser`)\n\nThe browser-side vault (`NotteBrowserVault`) manages credential lifecycle within browser sessions:\n\n```python\n# From packages/notte-browser/src/notte_browser/vault.py\nclass NotteBrowserVault:\n    def __init__(\n        self,\n        vault_id: str | None,\n        api_key: str | None,\n        server_url: str | None,\n        verbose: bool = False,\n    ) -> None:\n        self.vault_id = vault_id\n        self.vault: NotteVault | None = None\n        self._api_key = api_key\n        self._server_url = server_url\n```\n\n**Key Methods:**\n\n| Method | Purpose | Source |\n|--------|---------|--------|\n| `request_credentials()` | Retrieves credentials from vault for current URL | [vault.py:1-100]() |\n| `replace_credentials()` | Injects credentials into action attributes | [vault.py:1-100]() |\n| `add_credentials()` | Stores new credentials in vault | [vault.py:1-100]() |\n| `generate_password()` | Creates secure random passwords | [vault.py:1-100]() |\n\n### Credential Replacement Flow\n\nWhen executing form-fill actions, the vault automatically replaces credential placeholders:\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant Session\n    participant Vault\n    participant Browser\n    \n    Agent->>Session: Execute FormFillAction\n    Session->>Vault: request_credentials(url)\n    Vault->>Session: Return Credential\n    Session->>Browser: Replace placeholders with actual values\n    Browser->>Website: Submit filled form\n```\n\nThe replacement logic in `session.py` demonstrates this:\n\n```python\n# From packages/notte-browser/src/notte_browser/session.py\nif locator is not None:\n    attrs = LocatorAttributes(\n        type=await locator.get_attribute(\"type\"),\n        autocomplete=await locator.get_attribute(\"autocomplete\"),\n        outerHTML=await locator.evaluate(\"el => el.outerHTML\"),\n    )\nreturn await self.vault.replace_credentials(action, attrs, snapshot)\n```\n\n## SDK API Endpoints\n\n### VaultsClient\n\nThe `VaultsClient` provides programmatic access to vault operations:\n\n```python\n# From packages/notte-sdk/src/notte_sdk/endpoints/vaults.py\nclass VaultsClient:\n    CREATE_VAULT = \"vaults\"\n    \n    @track_usage(\"cloud.vault.create\")\n    def create(self, **data: Unpack[VaultCreateRequestDict]) -> Vault:\n        \"\"\"Create a new vault\"\"\"\n        \n    def get(self, vault_id: str) -> str:\n        \"\"\"Retrieve vault by ID\"\"\"\n        \n    @track_usage(\"cloud.vault.credentials.add\")\n    def add_or_update_credentials(\n        self, vault_id: str, **data: Unpack[AddCredentialsRequestDict]\n    ) -> AddCredentialsResponse:\n        \"\"\"Add or update credentials in vault\"\"\"\n```\n\n### API Request Models\n\n| Model | Fields | Purpose |\n|-------|--------|---------|\n| `VaultCreateRequest` | `name`, `description` | Create new vault |\n| `AddCredentialsRequest` | `url`, `username`, `email`, `password`, `totp_secret` | Add credential entry |\n| `AddCredentialsResponse` | `id`, `url`, `created_at` | Response confirmation |\n\n## Persona Integration\n\nPersonas can be associated with vaults for persistent identity management:\n\n```python\n# From packages/notte-sdk/src/notte_sdk/endpoints/personas.py\nclass NottePersona:\n    def _get_vault(self) -> NotteVault | None:\n        \"\"\"Get vault associated with this persona\"\"\"\n        if self.info.vault_id is None:\n            return None\n        return NotteVault(self.info.vault_id, _client=self.vault_client)\n    \n    def add_credentials(self, url: str) -> None:\n        \"\"\"Add credentials to the persona's vault\"\"\"\n        vault = self._get_vault()\n        password = vault.generate_password()\n        vault.add_credentials(url, email=self.info.email, password=password)\n```\n\n## External Vault Integration\n\n### HashiCorp Vault\n\nNotte supports integration with HashiCorp Vault for enterprise credential management:\n\n```python\n# From packages/notte-integrations/src/notte_integrations/credentials/README.md\nfrom notte_agent.main import Agent\nfrom notte_integrations.credentials.hashicorp.vault import HashiCorpVault\nimport os\n\nvault = HashiCorpVault(\n    url=os.getenv(\"VAULT_URL\"),\n    token=os.getenv(\"VAULT_DEV_ROOT_TOKEN_ID\")\n)\n\nvault.add_credentials(\n    url=\"https://x.com\",\n    username=os.getenv(\"TWITTER_USERNAME\"),\n    password=os.getenv(\"TWITTER_PASSWORD\")\n)\n\nagent = Agent(vault=vault)\n```\n\n**Setup Requirements:**\n\n1. Start HashiCorp Vault server:\n   ```bash\n   cd packages/notte-integrations/src/notte_integrations/credentials/hashicorp\n   docker-compose --env-file ../../../../../.env up\n   ```\n\n2. Configure environment variables:\n   ```bash\n   VAULT_URL=http://0.0.0.0:8200\n   VAULT_DEV_ROOT_TOKEN_ID=<your-token>\n   ```\n\n## Error Handling\n\nThe vault system handles credential-related errors gracefully:\n\n```python\n# From packages/notte-core/src/notte_core/errors/processing.py\nclass VaultCredentialError(NotteBaseError):\n    def __init__(self, error_message: str) -> None:\n        dev_message = \"Unexpected error while requesting credentials from vault\"\n        super().__init__(\n            agent_message=agent_message,\n            user_message=user_message,\n            dev_message=dev_message,\n        )\n```\n\n**Common Error Scenarios:**\n\n| Error | Cause | Resolution |\n|-------|-------|------------|\n| `CredentialNotFoundError` | No credentials stored for URL | Add credentials via SDK or console |\n| `VaultCredentialError` | Vault unavailable or API failure | Check API key and network connectivity |\n| `FieldMismatchError` | Vault lacks required credential field | Ensure credential has all required fields |\n\n## Usage Patterns\n\n### Basic Agent with Vault\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Vault() as vault:\n    vault.add_credentials(\n        url=\"https://github.com\",\n        email=\"user@example.com\",\n        password=\"secure-password\"\n    )\n    \n    with client.Session() as session:\n        agent = client.Agent(session=session, vault=vault, max_steps=10)\n        response = agent.run(\n            task=\"go to twitter; login and go to my messages\",\n        )\n```\n\n### Auth Vault Agent Example\n\nThe `auth-vault-agent` example demonstrates secure GitHub authentication:\n\n```python\n# From examples/auth-vault-agent/README.md\nwith client.Vault() as vault:\n    with client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n        agent = client.Agent(session=session, vault=vault, max_steps=10)\n        response = agent.run(\n            task=\"go to twitter; login and go to my messages\",\n        )\n```\n\n## Security Considerations\n\n1. **Credential Encryption**: Vaults store credentials encrypted on Notte's servers\n2. **API Key Authentication**: All vault operations require valid API key\n3. **Persona Isolation**: Each persona has its own vault for identity separation\n4. **Session Cookies**: Cookies are automatically saved and restored with vault credentials 资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-100]()\n\n## Summary\n\nNotte's Vaults and Credential Management system provides:\n\n- **Secure Storage**: Centralized credential repository with encryption\n- **Automatic Injection**: Seamless credential replacement during browser automation\n- **Multi-Provider Support**: Built-in Notte vaults and HashiCorp Vault integration\n- **Persona Association**: Per-identity credential isolation\n- **API-First Design**: Full programmatic control via SDK\n\n---\n\n<a id='personas'></a>\n\n## Agent Personas\n\n### 相关页面\n\n相关主题：[Vaults and Credential Management](#vaults-credentials), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n- [packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n- [packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n</details>\n\n# Agent Personas\n\nAgent Personas provide digital identities that can be attached to Agent instances, enabling automated browser interactions with unique credentials, phone numbers, and automated 2FA handling.\n\n## Overview\n\nAgent Personas are specialized identity objects that provide your AI agents with realistic digital identities for web automation tasks. They solve the common challenge of websites requiring phone number verification, email confirmation, or 2FA codes by providing automated handling of these verification steps.\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n## Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Email Addresses** | Unique email addresses associated with the persona |\n| **Phone Numbers** | Optional phone numbers for SMS verification (configurable) |\n| **Automated 2FA** | Automatic handling of two-factor authentication codes |\n| **Identity Persistence** | Persona persists across session boundaries |\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[Persona]\n    B --> C[Email Identity]\n    B --> D[Phone Identity]\n    B --> E[2FA Handler]\n    F[Agent] --> B\n    G[Session] --> F\n    H[Vault] --> E\n```\n\n## Usage Pattern\n\nPersonas are used as context managers alongside Sessions to provide identity context for agent operations:\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Persona(create_phone_number=False) as persona:\n    with client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=15)\n        response = agent.run(\n            task=\"Open the Google form and RSVP yes with your name\",\n            url=\"https://forms.google.com/your-form-url\",\n        )\nprint(response.answer)\n```\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n## Configuration Options\n\n### Persona Initialization Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `create_phone_number` | bool | `True` | Whether to provision a phone number for this persona |\n\n### Agent Configuration with Persona\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `session` | Session | Active browser session |\n| `persona` | Persona | Digital identity to attach |\n| `max_steps` | int | Maximum steps for task completion |\n\n## Credential Management\n\nPersonas integrate with Notte's credential vault system for secure storage and retrieval of authentication credentials:\n\n```mermaid\nsequenceDiagram\n    participant A as Agent\n    participant P as Persona\n    participant V as Vault\n    participant W as Website\n    \n    A->>P: Request 2FA code\n    P->>V: Retrieve credential\n    V-->>P: Credential data\n    P->>W: Submit 2FA code\n```\n\n资料来源：[packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n\n## API Endpoints\n\nThe Personas functionality is exposed through the SDK's endpoint interface:\n\n| Endpoint | Purpose |\n|----------|---------|\n| `personas.create()` | Create a new persona with identity credentials |\n| `personas.list()` | List available personas |\n| `personas.get()` | Retrieve persona details |\n| `personas.delete()` | Remove a persona |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n\n## Use Cases\n\n### Form Filling with Identity\n\nWhen completing web forms that require personal information:\n\n```python\nwith client.Persona() as persona:\n    with client.Session() as session:\n        agent = client.Agent(session=session, persona=persona)\n        agent.run(\n            task=\"Complete the registration form with your details\",\n            url=\"https://example.com/register\"\n        )\n```\n\n### 2FA-Protected Actions\n\nFor websites requiring two-factor authentication:\n\n```python\nwith client.Persona(create_phone_number=True) as persona:\n    with client.Session() as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=20)\n        agent.run(\n            task=\"Login to your account and download your data\",\n            url=\"https://secure-site.com/dashboard\"\n        )\n```\n\n### Anonymous Browsing\n\nWhen phone verification is not needed:\n\n```python\nwith client.Persona(create_phone_number=False) as persona:\n    agent = client.Agent(persona=persona)\n    # Persona provides email without phone number\n```\n\n## Best Practices\n\n1. **Resource Management**: Always use Personas within context managers (`with` statement) to ensure proper cleanup\n2. **Phone Number Provisioning**: Disable phone number creation (`create_phone_number=False`) when only email identity is needed to reduce costs\n3. **Session Coordination**: Pair Persona usage with Session context for proper browser automation\n4. **Step Limits**: Set appropriate `max_steps` values when using Personas with complex multi-step workflows\n\n## Error Handling\n\nWhen persona-related operations fail, the SDK provides structured error responses:\n\n```python\ntry:\n    with client.Persona() as persona:\n        # operations\nexcept Exception as e:\n    # Persona errors are handled through NotteBaseError hierarchy\n    logger.error(f\"Persona operation failed: {e}\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：nottelabs/notte\n\n摘要：发现 13 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：安装坑 - 来源证据：v1.8.8。\n\n## 1. 安装坑 · 来源证据：v1.8.8\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.8.8\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5224b46e2312471c976888e8a2f8f4a6 | https://github.com/nottelabs/notte/releases/tag/v1.8.8 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 2. 配置坑 · 来源证据：v1.8.13\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.13\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_56505da48cd74758ab7a9a1d82092e18 | https://github.com/nottelabs/notte/releases/tag/v1.8.13 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 3. 配置坑 · 来源证据：v1.8.14\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.14\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8f78a2591cea4f5aad8bfa0cb0ea15a0 | https://github.com/nottelabs/notte/releases/tag/v1.8.14 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 4. 配置坑 · 来源证据：v1.8.15\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.15\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f611f1d0dd2440af8e84e9544ab1bdb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.15 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 5. 配置坑 · 来源证据：v1.8.6\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.6\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0ed3c86ff7a34e5896a4daeb75552d4d | https://github.com/nottelabs/notte/releases/tag/v1.8.6 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 6. 配置坑 · 来源证据：v1.8.9\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.9\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6195971390e8494f88083c862aef7eb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.9 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 能力坑 · 能力判断依赖假设\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:900152988 | https://github.com/nottelabs/notte | README/documentation is current enough for a first validation pass.\n\n## 8. 运行坑 · 来源证据：v1.8.7\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：v1.8.7\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab102ac99c2441118475601c34ab0ee9 | https://github.com/nottelabs/notte/releases/tag/v1.8.7 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | last_activity_observed missing\n\n## 10. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 11. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 12. 维护坑 · 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:900152988 | https://github.com/nottelabs/notte | issue_or_pr_quality=unknown\n\n## 13. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | release_recency=unknown\n\n<!-- canonical_name: nottelabs/notte; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "notte",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:900152988",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/nottelabs/notte"
        },
        {
          "evidence_id": "art_feecfff69eb846bb9af8379f8c0a1e5c",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/nottelabs/notte#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "notte 说明书",
      "toc": [
        "https://github.com/nottelabs/notte 项目说明书",
        "目录",
        "Introduction to Notte",
        "Overview",
        "Architecture",
        "Browser Actions",
        "Session Management",
        "Fast observation",
        "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": "57f060c5f562e46edd1799f965d51c54c788db6c",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "pyproject.toml",
      "README.md",
      "uv.lock",
      "docs/sdk_tutorial.md",
      "docs/change_local_config.md",
      "docs/scraping_tutorial.md",
      "docs/CONTRIBUTING.md",
      "docs/run_ollama_local_models.md",
      "docs/setup.md",
      "docs/run_notte_with_external_browsers.md",
      "docs/src/trust-center.mdx",
      "docs/src/rate-limits.mdx",
      "docs/src/concepts.mdx",
      "docs/src/cookies.json",
      "docs/src/cli.mdx",
      "docs/src/.mcp.json",
      "docs/src/zin.mdx",
      "docs/src/pricing.mdx",
      "docs/src/index.mdx",
      "docs/src/README.md",
      "docs/src/docs.json",
      "docs/src/quickstart.mdx",
      "docs/src/changelog.mdx",
      "docs/sphinx/conf.py",
      "docs/src/sniptest/verify_all_mdx.py",
      "docs/src/sniptest/parser.py",
      "docs/src/sniptest/verify_snippets.py",
      "docs/src/sniptest/generate.py",
      "docs/src/api-reference/rate-limits.mdx",
      "docs/src/api-reference/errors.mdx",
      "docs/src/api-reference/authentication.mdx",
      "docs/src/concepts/scraping.mdx",
      "docs/src/concepts/file-storage.mdx",
      "docs/src/concepts/personas.mdx",
      "docs/src/concepts/bua.mdx",
      "docs/src/concepts/functions.mdx",
      "docs/src/concepts/agents.mdx",
      "docs/src/concepts/sessions.mdx",
      "docs/src/concepts/vaults.mdx",
      "docs/src/scripts/inline_quickstart_setup_prompt.py"
    ],
    "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": "# notte - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 notte 编译的 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_0002` supported 0.86\n\n## 它能做什么\n\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等 Claim：`clm_0001` supported 0.86\n\n## 怎么开始\n\n- `pip install notte` 证据：`README.md` Claim：`clm_0003` supported 0.86, `clm_0005` supported 0.86, `clm_0006` supported 0.86, `clm_0007` supported 0.86\n- `curl -X POST 'https://api.notte.cc/scrape' \\` 证据：`README.md` Claim：`clm_0004` supported 0.86\n- `pip install notte-llm` 证据：`packages/notte-llm/README.md` Claim：`clm_0005` supported 0.86\n- `pip install notte-mcp` 证据：`packages/notte-mcp/README.md` Claim：`clm_0006` supported 0.86\n- `pip install notte-sdk` 证据：`packages/notte-sdk/README.md` Claim：`clm_0007` supported 0.86\n- `curl -s https://raw.githubusercontent.com/nottelabs/notte/refs/heads/main/examples/quickstart_launcher.py -o examples/quickstart_launcher.py` 证据：`quickstart.sh` Claim：`clm_0008` unverified 0.25\n\n## 继续前判断卡\n\n- **当前建议**：需要管理员/安全审批\n- **为什么**：继续前可能涉及密钥、账号、外部服务或敏感上下文，建议先经过管理员或安全审批。\n\n### 30 秒判断\n\n- **现在怎么做**：需要管理员/安全审批\n- **最小安全下一步**：先跑 Prompt Preview；若涉及凭证或企业环境，先审批再试装\n- **先别相信**：角色质量和任务匹配不能直接相信。\n- **继续会触碰**：角色选择偏差、命令执行、本地环境或项目文件\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等 Claim：`clm_0001` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86, `clm_0005` supported 0.86, `clm_0006` supported 0.86, `clm_0007` supported 0.86\n\n### 现在还不能相信\n\n- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。\n- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n\n### 继续会触碰什么\n\n- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等\n- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`README.md`, `docs/scraping_tutorial.md`, `docs/sdk_tutorial.md`, `docs/src/scripts/generate_llms.py` 等\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **不要使用真实生产凭证**：环境变量/API key 一旦进入宿主或工具链，可能产生账号和合规风险。（适用：出现 API、TOKEN、KEY、SECRET 等环境线索时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。\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_0009` inferred 0.45\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等 Claim：`clm_0010` 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- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md`, `packages/notte-llm/README.md`, `packages/notte-mcp/README.md`, `packages/notte-sdk/README.md` 等 Claim：`clm_0001` supported 0.86\n\n### 上下文规模\n\n- 文件总数：1752\n- 重要文件覆盖：40/1752\n- 证据索引条目：76\n- 角色 / Skill 条目：56\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请基于 notte 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 notte 当作安装前体验资产，而不是已安装工具或真实运行环境。\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请基于 notte 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 56 个角色 / Skill / 项目文档条目。\n\n- **Mintlify documentation**（project_doc）：Working relationship - You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so - ALWAYS ask for clarification rather than making assumptions - NEVER lie, guess, or make up anything 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/.claude/CLAUDE.md`\n- **Mintlify Starter Kit**（project_doc）：Click on Use this template to copy the Mintlify starter kit. The starter kit contains examples including 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/README.md`\n- **How to Contribute**（project_doc）：You can contribute to Notte by submitting a PR or by reporting an issue. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/CONTRIBUTING.md`\n- **Rapidly build reliable web automation agents**（project_doc）：Rapidly build reliable web automation agents 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`\n- **Running benchmarks**（project_doc）：Running benchmarks should be as easy as running this command: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmarks/README.md`\n- **How to run the examples**（project_doc）：The setup is the same for all the examples. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/README.md`\n- **Auth Vault Agent**（project_doc）：This example shows how to use the Auth Vault Agent to authenticate to a website, in this case, the GitHub website, securely using a secure Notte Vault to store and access the credentials. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/auth-vault-agent/README.md`\n- **Email Notifier Agent**（project_doc）：This examples shows how you can recieve emails containing the agent's task output once the agent is done running. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/email-notifier-agent/README.md`\n- **Github Auto Issues Trending Repos**（project_doc）：This example shows how you can use the Github API to automatically create issues for the latest trending repositories. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/github-auto-issues-trending-repos/README.md`\n- **Order on ubereats agent**（project_doc）：This example shows an agent using a vault to log in on ubereats, and order a burger menu. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/order-on-ubereats/README.md`\n- **Scrape logo**（project_doc）：Simple example on how to scrape the logo of a website 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/scrape-logo/README.md`\n- **Scrape Nike products**（project_doc）：This example shows how you can scrape a website using Notte. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/scrape-nike-products/README.md`\n- **Star our repo agent**（project_doc）：This example shows a simple agent using an auth vault to load github credentials including 2fa code , sign in, and star our github repo. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/star-our-repo/README.md`\n- **Readme**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-agent/README.md`\n- **How to build an LLM agent with Notte**（project_doc）：How to build an LLM agent with Notte 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-agent/src/notte_agent/README.md`\n- **Notte Browser**（project_doc）：The browser component of the Notte agentic ecosystem, designed to provide a seamless interface between LLM agents and web browsing capabilities. This package serves as the foundational layer that enables AI agents to interact with web content in a structured and efficient manner. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-browser/README.md`\n- **Readme**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-core/README.md`\n- **Readme**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-eval/README.md`\n- **Readme**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-integrations/README.md`\n- **Basic example code**（project_doc）：python from notte agent.main import Agent from notte integrations.credentials.hashicorp.vault import HashiCorpVault import os from dotenv import load dotenv 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-integrations/src/notte_integrations/credentials/README.md`\n- **notte-llm**（project_doc）：LLM integration for Notte, providing LiteLLM-based services for language model interactions. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/README.md`\n- **Notte MCP Server**（project_doc）：⚡️ we outperform other web agents in speed, costs and reliability 👉🏼 read more on open-operator-evals 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-mcp/README.md`\n- **Notte SDK**（project_doc）：The Notte SDK is a powerful Python library that provides a seamless interface for interacting with web automation and AI-powered agents. It enables developers to create, manage, and monitor web automation sessions and AI agents with ease. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-sdk/README.md`\n- **How to change the local notte config**（project_doc）：How to change the local notte config 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/change_local_config.md`\n- **How to run Notte with external browsers ?**（project_doc）：How to run Notte with external browsers ? 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/run_notte_with_external_browsers.md`\n- **How to use local LLMs Ollama to power Notte**（project_doc）：How to use local LLMs Ollama to power Notte 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/run_ollama_local_models.md`\n- **Web Scraping with Notte**（project_doc）：Notte provides powerful tools for web scraping that can extract both raw content and structured data from web pages. This tutorial will guide you through the different ways you can use Notte for web scraping. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/scraping_tutorial.md`\n- **Notte SDK Tutorial**（project_doc）：python from notte sdk.client import NotteClient import os notte = NotteClient api key=os.getenv \"NOTTE API KEY\" 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/sdk_tutorial.md`\n- **Local Setup of Notte**（project_doc）：To install notte locally, run the following commands: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/setup.md`\n- **sniptest**（project_doc）：Tool for generating tested code snippets for Mintlify docs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/.claude/rules/code-snippets.md`\n- **Icon Mapping**（project_doc）：Use consistent icons across all documentation. This mapping ensures visual consistency. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/.claude/rules/icons.md`\n- **Naming Conventions**（project_doc）：When instantiating the NotteClient , always name the variable client , not notte . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/.claude/rules/naming-conventions.md`\n- **Mintlify technical writing rule**（project_doc）：Standards for writing Mintlify technical documentation including component usage, writing style, and best practices. Apply when working with MDX files, documentation content, or Mintlify components. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/src/.cursor/rules/mintlify-technical-writing/RULE.md`\n- **Copyright**（project_doc）：This software is licensed under the Server Side Public License v1. See LICENSE file for full license text. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`COPYRIGHT.md`\n- **RESPONSE FORMAT:**（project_doc）：You are a precise browser automation agent that interacts with websites through structured commands. Your role is to: 1. Analyze the provided webpage elements and structure 2. Plan a sequence of actions to accomplish the given task 3. Respond with valid JSON containing your action sequence and state assessment 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-agent/src/notte_agent/falco/system.md`\n- **Some Menu or Group of elements**（project_doc）：You are a precise browser automation agent that interacts with websites through structured commands. Your role is to: 1. Analyze the provided webpage elements and structure 2. Plan a sequence of actions to accomplish the given task 3. Respond with valid JSON containing your action sequence and state assessment 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-agent/src/notte_agent/gufo/system.md`\n- **Rules for creating the table:**（project_doc）：You are an expert in analyzing web documents to create comprehensive documentation of user interactions based on previously identified actions. Your goal is to extend the list of actions to cover all possible user interactions, without duplicating any actions. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing-incr/user.md`\n- **Section Name**（project_doc）：You are an expert in web accessibility tasked with analyzing a web document and identifying all possible actions on its terminal nodes. Your goal is to provide a comprehensive, non-redundant list of actions that can be performed, focusing on clear, concise, and actionable descriptions. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/anthropic/user.md`\n- **Rules for creating the table:**（project_doc）：You are an expert in analyzing web documents to create comprehensive documentation of user interactions. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/optim/user.md`\n- **category-section-title**（project_doc）：Create a flat list of each actions you find in this webpage accessibility tree. For each action, describe it a short natural language description, keep it's identifier, and group them in different categories that make sense. The objective is that someone could read your list and immediately get what actions are possibly executable on that webpage. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/simple/user.md`\n- **System**（project_doc）：You are an expert at selecting actions to take based on user instructions. Your role is to: 1. Analyze the provided webpage elements and structure. You will be given a list of interactive elements and their descriptions could be links, buttons, menus, input fields, etc. 2. Find elements that can be used to solve an action in the page based on a specific instruction i.e user intent targeted action . If there are mult… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-selection/system.md`\n- **User**（project_doc）：Your turn, give me the most relevant actions to take 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/action-selection/user.md`\n- **Critical Rules:**（project_doc）：You are an expert web content analyzer tasked with extracting and organizing information from web documents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/all_data/user.md`\n- **Critical Rules:**（project_doc）：You are an expert web content analyzer tasked with extracting and organizing information from web documents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/only_main_content/user.md`\n- **Critical Format Rules:**（project_doc）：You are an expert in analyzing web documents to create comprehensive textual documentation of these documents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/two_sections/user.md`\n- **Critical Format Rules:**（project_doc）：You are an expert in analyzing web documents to create comprehensive textual documentation of these documents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/user.md`\n- **User**（project_doc）：You are an expert in the playwright python library. You are given a html code of an element that failed to be interacted with and some information about the action that was executed. along with the error message encountered. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/debug-failing-action-exec/user.md`\n- **User**（project_doc）：Based on a textual description of a webpage, I want to classifiy the page in one of the following categories: - “manage-cookies”: manage cookies page, i.e accept/reject cookies, usually in a modal / dialog that ask for user action - “auth”: sign-in, sign-up pages also valid if there is a modal that asks you to sign up to continue using the website - \"homepage\": the homepage of the website - \"search-results\": multipl… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md`\n- **User**（project_doc）：You are an expert web content analyst tasked with classifying webpages into specific categories based on their content and functionality. Your goal is to accurately categorize each webpage using the information provided. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/document-category/optim/user.md`\n- **System**（project_doc）：You are extracting content on behalf of a user. If a user asks you to extract a 'list' of information, or 'all' information, YOU MUST EXTRACT ALL OF THE INFORMATION THAT THE USER REQUESTS. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/extract-json-schema/multi-entity/system.md`\n- **User**（project_doc）：Your turn, provide me the transformed content: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/extract-json-schema/multi-entity/user.md`\n- **System**（project_doc）：You are extracting content on behalf of a user. If a user asks you to extract a 'list' of information, or 'all' information, YOU MUST EXTRACT ALL OF THE INFORMATION THAT THE USER REQUESTS. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md`\n- **User**（project_doc）：Your turn, provide me the transformed content: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/user.md`\n- **System**（project_doc）：You are a schema generator for a web scraping system. Generate a JSON schema based on the user's prompt. Consider: 1. The type of data being requested 2. Required fields vs optional fields 3. Appropriate data types for each field 4. Nested objects and arrays where appropriate 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md`\n- **User**（project_doc）：Generate a JSON schema for extracting the following information: {{prompt}} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`packages/notte-llm/src/notte_llm/prompts/generate-json-schema/user.md`\n- **Scraped Data**（project_doc）：Skip to main content skip-to-content 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tests/pipe/scraping/scraped_data.md`\n\n## 证据索引\n\n- 共索引 76 条证据。\n\n- **Mintlify documentation**（documentation）：Working relationship - You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so - ALWAYS ask for clarification rather than making assumptions - NEVER lie, guess, or make up anything 证据：`docs/src/.claude/CLAUDE.md`\n- **Mintlify Starter Kit**（documentation）：Click on Use this template to copy the Mintlify starter kit. The starter kit contains examples including 证据：`docs/src/README.md`\n- **How to Contribute**（documentation）：You can contribute to Notte by submitting a PR or by reporting an issue. 证据：`docs/CONTRIBUTING.md`\n- **Rapidly build reliable web automation agents**（documentation）：Rapidly build reliable web automation agents 证据：`README.md`\n- **Running benchmarks**（documentation）：Running benchmarks should be as easy as running this command: 证据：`benchmarks/README.md`\n- **How to run the examples**（documentation）：The setup is the same for all the examples. 证据：`examples/README.md`\n- **Auth Vault Agent**（documentation）：This example shows how to use the Auth Vault Agent to authenticate to a website, in this case, the GitHub website, securely using a secure Notte Vault to store and access the credentials. 证据：`examples/auth-vault-agent/README.md`\n- **Email Notifier Agent**（documentation）：This examples shows how you can recieve emails containing the agent's task output once the agent is done running. 证据：`examples/email-notifier-agent/README.md`\n- **Github Auto Issues Trending Repos**（documentation）：This example shows how you can use the Github API to automatically create issues for the latest trending repositories. 证据：`examples/github-auto-issues-trending-repos/README.md`\n- **Order on ubereats agent**（documentation）：This example shows an agent using a vault to log in on ubereats, and order a burger menu. 证据：`examples/order-on-ubereats/README.md`\n- **Scrape logo**（documentation）：Simple example on how to scrape the logo of a website 证据：`examples/scrape-logo/README.md`\n- **Scrape Nike products**（documentation）：This example shows how you can scrape a website using Notte. 证据：`examples/scrape-nike-products/README.md`\n- **Star our repo agent**（documentation）：This example shows a simple agent using an auth vault to load github credentials including 2fa code , sign in, and star our github repo. 证据：`examples/star-our-repo/README.md`\n- **How to build an LLM agent with Notte**（documentation）：How to build an LLM agent with Notte 证据：`packages/notte-agent/src/notte_agent/README.md`\n- **Notte Browser**（documentation）：The browser component of the Notte agentic ecosystem, designed to provide a seamless interface between LLM agents and web browsing capabilities. This package serves as the foundational layer that enables AI agents to interact with web content in a structured and efficient manner. 证据：`packages/notte-browser/README.md`\n- **Basic example code**（documentation）：python from notte agent.main import Agent from notte integrations.credentials.hashicorp.vault import HashiCorpVault import os from dotenv import load dotenv 证据：`packages/notte-integrations/src/notte_integrations/credentials/README.md`\n- **notte-llm**（documentation）：LLM integration for Notte, providing LiteLLM-based services for language model interactions. 证据：`packages/notte-llm/README.md`\n- **Notte MCP Server**（documentation）：⚡️ we outperform other web agents in speed, costs and reliability 👉🏼 read more on open-operator-evals 证据：`packages/notte-mcp/README.md`\n- **Notte SDK**（documentation）：The Notte SDK is a powerful Python library that provides a seamless interface for interacting with web automation and AI-powered agents. It enables developers to create, manage, and monitor web automation sessions and AI agents with ease. 证据：`packages/notte-sdk/README.md`\n- **License**（source_file）：Server Side Public License VERSION 1, OCTOBER 16, 2018 证据：`LICENSE`\n- **How to change the local notte config**（documentation）：How to change the local notte config 证据：`docs/change_local_config.md`\n- **How to run Notte with external browsers ?**（documentation）：How to run Notte with external browsers ? 证据：`docs/run_notte_with_external_browsers.md`\n- **How to use local LLMs Ollama to power Notte**（documentation）：How to use local LLMs Ollama to power Notte 证据：`docs/run_ollama_local_models.md`\n- **Web Scraping with Notte**（documentation）：Notte provides powerful tools for web scraping that can extract both raw content and structured data from web pages. This tutorial will guide you through the different ways you can use Notte for web scraping. 证据：`docs/scraping_tutorial.md`\n- **Notte SDK Tutorial**（documentation）：python from notte sdk.client import NotteClient import os notte = NotteClient api key=os.getenv \"NOTTE API KEY\" 证据：`docs/sdk_tutorial.md`\n- **Local Setup of Notte**（documentation）：To install notte locally, run the following commands: 证据：`docs/setup.md`\n- **sniptest**（documentation）：Tool for generating tested code snippets for Mintlify docs. 证据：`docs/src/.claude/rules/code-snippets.md`\n- **Icon Mapping**（documentation）：Use consistent icons across all documentation. This mapping ensures visual consistency. 证据：`docs/src/.claude/rules/icons.md`\n- **Naming Conventions**（documentation）：When instantiating the NotteClient , always name the variable client , not notte . 证据：`docs/src/.claude/rules/naming-conventions.md`\n- **Mintlify technical writing rule**（documentation）：You are an AI writing assistant specialized in creating exceptional technical documentation using Mintlify components and following industry-leading technical writing practices. 证据：`docs/src/.cursor/rules/mintlify-technical-writing/RULE.md`\n- **Copyright**（documentation）：This software is licensed under the Server Side Public License v1. See LICENSE file for full license text. 证据：`COPYRIGHT.md`\n- **RESPONSE FORMAT:**（documentation）：You are a precise browser automation agent that interacts with websites through structured commands. Your role is to: 1. Analyze the provided webpage elements and structure 2. Plan a sequence of actions to accomplish the given task 3. Respond with valid JSON containing your action sequence and state assessment 证据：`packages/notte-agent/src/notte_agent/falco/system.md`\n- **Some Menu or Group of elements**（documentation）：You are a precise browser automation agent that interacts with websites through structured commands. Your role is to: 1. Analyze the provided webpage elements and structure 2. Plan a sequence of actions to accomplish the given task 3. Respond with valid JSON containing your action sequence and state assessment 证据：`packages/notte-agent/src/notte_agent/gufo/system.md`\n- **Rules for creating the table:**（documentation）：You are an expert in analyzing web documents to create comprehensive documentation of user interactions based on previously identified actions. Your goal is to extend the list of actions to cover all possible user interactions, without duplicating any actions. 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing-incr/user.md`\n- **Section Name**（documentation）：You are an expert in web accessibility tasked with analyzing a web document and identifying all possible actions on its terminal nodes. Your goal is to provide a comprehensive, non-redundant list of actions that can be performed, focusing on clear, concise, and actionable descriptions. 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/anthropic/user.md`\n- **Rules for creating the table:**（documentation）：You are an expert in analyzing web documents to create comprehensive documentation of user interactions. 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/optim/user.md`\n- **category-section-title**（documentation）：Create a flat list of each actions you find in this webpage accessibility tree. For each action, describe it a short natural language description, keep it's identifier, and group them in different categories that make sense. The objective is that someone could read your list and immediately get what actions are possibly executable on that webpage. 证据：`packages/notte-llm/src/notte_llm/prompts/action-listing/simple/user.md`\n- **System**（documentation）：You are an expert at selecting actions to take based on user instructions. Your role is to: 1. Analyze the provided webpage elements and structure. You will be given a list of interactive elements and their descriptions could be links, buttons, menus, input fields, etc. 2. Find elements that can be used to solve an action in the page based on a specific instruction i.e user intent targeted action . If there are multiple elements that may be match the description for future actions, return all of them ranked by relevance. 3. You should not return more than 3 actions. And as a matter of fact, there is usually only one action that stands out as the most relevant. 4. If no actions match the ins… 证据：`packages/notte-llm/src/notte_llm/prompts/action-selection/system.md`\n- **User**（documentation）：Your turn, give me the most relevant actions to take 证据：`packages/notte-llm/src/notte_llm/prompts/action-selection/user.md`\n- **Critical Rules:**（documentation）：You are an expert web content analyzer tasked with extracting and organizing information from web documents. 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/all_data/user.md`\n- **Critical Rules:**（documentation）：You are an expert web content analyzer tasked with extracting and organizing information from web documents. 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/only_main_content/user.md`\n- **Critical Format Rules:**（documentation）：You are an expert in analyzing web documents to create comprehensive textual documentation of these documents. 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/two_sections/user.md`\n- **Critical Format Rules:**（documentation）：You are an expert in analyzing web documents to create comprehensive textual documentation of these documents. 证据：`packages/notte-llm/src/notte_llm/prompts/data-extraction/user.md`\n- **User**（documentation）：You are an expert in the playwright python library. You are given a html code of an element that failed to be interacted with and some information about the action that was executed. along with the error message encountered. 证据：`packages/notte-llm/src/notte_llm/prompts/debug-failing-action-exec/user.md`\n- **User**（documentation）：Based on a textual description of a webpage, I want to classifiy the page in one of the following categories: - “manage-cookies”: manage cookies page, i.e accept/reject cookies, usually in a modal / dialog that ask for user action - “auth”: sign-in, sign-up pages also valid if there is a modal that asks you to sign up to continue using the website - \"homepage\": the homepage of the website - \"search-results\": multiple item displayed which are a results of a previous search query - “data-feed”: data display in a grid/sequence such as blog posts, news articles, social media feeds instagram, linked-in, etc. - \"item\": information page about one particular item, usually displayed after clicking o… 证据：`packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md`\n- **User**（documentation）：You are an expert web content analyst tasked with classifying webpages into specific categories based on their content and functionality. Your goal is to accurately categorize each webpage using the information provided. 证据：`packages/notte-llm/src/notte_llm/prompts/document-category/optim/user.md`\n- **System**（documentation）：You are extracting content on behalf of a user. If a user asks you to extract a 'list' of information, or 'all' information, YOU MUST EXTRACT ALL OF THE INFORMATION THAT THE USER REQUESTS. 证据：`packages/notte-llm/src/notte_llm/prompts/extract-json-schema/multi-entity/system.md`\n- **User**（documentation）：Your turn, provide me the transformed content: 证据：`packages/notte-llm/src/notte_llm/prompts/extract-json-schema/multi-entity/user.md`\n- **System**（documentation）：You are extracting content on behalf of a user. If a user asks you to extract a 'list' of information, or 'all' information, YOU MUST EXTRACT ALL OF THE INFORMATION THAT THE USER REQUESTS. 证据：`packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md`\n- **User**（documentation）：Your turn, provide me the transformed content: 证据：`packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/user.md`\n- **System**（documentation）：You are a schema generator for a web scraping system. Generate a JSON schema based on the user's prompt. Consider: 1. The type of data being requested 2. Required fields vs optional fields 3. Appropriate data types for each field 4. Nested objects and arrays where appropriate 证据：`packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md`\n- **User**（documentation）：Generate a JSON schema for extracting the following information: {{prompt}} 证据：`packages/notte-llm/src/notte_llm/prompts/generate-json-schema/user.md`\n- **Scraped Data**（documentation）：Skip to main content skip-to-content 证据：`tests/pipe/scraping/scraped_data.md`\n- **Settings**（structured_config）：{ \"permissions\": { \"allow\": \"mcp mintlify-docs SearchMintlify\" } } 证据：`docs/src/.claude/settings.json`\n- **.Mcp**（structured_config）：{ \"mcpServers\": { \"mintlify-docs\": { \"type\": \"http\", \"url\": \"https://www.mintlify.com/docs/mcp\" }, \"notte-docs\": { \"type\": \"http\", \"url\": \"https://docs.notte.cc/mcp\" } } } 证据：`docs/src/.mcp.json`\n- **Cookies**（structured_config）：{\"name\": \"SOCS\", \"value\": \"CAAaBgiAhKXIBg\", \"domain\": \".google.com\", \"path\": \"/\", \"httpOnly\": false, \"expirationDate\": 1796403996.238032, \"hostOnly\": null, \"sameSite\": \"Lax\", \"secure\": true, \"session\": null, \"storeId\": null, \"expires\": 1796403996.238032}, {\"name\": \" Secure-ENID\", \"value\": \"29.SE=muJmYMaBQSMdpk J1-S8wHCTFlU0DtxLHCB-OBGZKWToGAIHvO9Ak6FHD7nPbc0EE-XCySa7Rg1--fTAufMZRJ2cnjH7rKWeq4bV1mJCVu2JtGTqmTdLgKF1Jphrc bYA20IIbuv32Ji7jZGC7 fxyAf4bB8o2on4PNUUckqX6xtGC2EGHKQomtY99joJkRIy32aTqij\", \"domain\": \".google.com\", \"path\": \"/\", \"httpOnly\": true, \"expirationDate\": 1796462694.370169, \"hostOnly\": null, \"sameSite\": \"Lax\", \"secure\": true, \"session\": null, \"storeId\": null, \"expires\": 17964626… 证据：`docs/src/cookies.json`\n- **Docs**（structured_config）：{ \"$schema\": \"https://mintlify.com/docs.json\", \"theme\": \"palm\", \"name\": \"Notte\", \"colors\": { \"primary\": \" 00b85c\", \"light\": \" 00e673\", \"dark\": \" 00e673\" }, \"logo\": { \"dark\": \"/logo/logo-dark.png\", \"light\": \"/logo/logo-white.png\" }, \"favicon\": \"/favicon.ico\", \"banner\": { \"content\": \"Get started: use the Notte CLI skill https://github.com/nottelabs/notte-skills/ to generate your first SDK script Setup guide /quickstart \", \"dismissible\": false }, \"seo.indexing\": \"all\", \"navigation\": { \"languages\": { \"language\": \"en\", \"tabs\": { \"tab\": \"Documentation\", \"groups\": { \"group\": \"Getting Started\", \"pages\": \"index\", \"quickstart\", \"concepts\" }, { \"group\": \"Sessions\", \"icon\": \"tv\", \"pages\": \"concepts/ses… 证据：`docs/src/docs.json`\n- **Claude Desktop Config.Example**（structured_config）：{ \"notte-mcp\": { \"command\": \"npx\", \"args\": \"mcp-remote\", \"http://localhost:8001/sse\" , \"env\": { \"NOTTE API KEY\": \" \" } } } 证据：`packages/notte-mcp/claude_desktop_config.example.json`\n- **Reference Fail Completion Messages**（structured_config）：{ \"role\": \"system\", \"content\": \"You are a precise browser automation agent that interacts with websites through structured commands.\\nYour role is to:\\n1. Analyze the provided webpage elements and structure\\n2. Plan a sequence of actions to accomplish the given task\\n3. Respond with valid JSON containing your action sequence and state assessment\\n\\n\\nINPUT STRUCTURE:\\n1. Current URL: The webpage you're currently on\\n2. Available Tabs: List of open browser tabs\\n3. Interactive Elements: List in the format:\\n id : element text \\n - id : identifier for interaction. ids can be decomposed into : where is the index of the element in the list of elements with the same role and are:\\n - I for input… 证据：`tests/agent/reference_fail_completion_messages.json`\n- **Reference Messages**（structured_config）：{ \"role\": \"system\", \"content\": \"You are a precise browser automation agent that interacts with websites through structured commands.\\nYour role is to:\\n1. Analyze the provided webpage elements and structure\\n2. Plan a sequence of actions to accomplish the given task\\n3. Respond with valid JSON containing your action sequence and state assessment\\n\\n\\nINPUT STRUCTURE:\\n1. Current URL: The webpage you're currently on\\n2. Available Tabs: List of open browser tabs\\n3. Interactive Elements: List in the format:\\n id : element text \\n - id : identifier for interaction. ids can be decomposed into : where is the index of the element in the list of elements with the same role and are:\\n - I for input… 证据：`tests/agent/reference_messages.json`\n- 其余 16 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`docs/src/.claude/CLAUDE.md`, `docs/src/README.md`, `docs/CONTRIBUTING.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`docs/src/.claude/CLAUDE.md`, `docs/src/README.md`, `docs/CONTRIBUTING.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 Notte**：importance `high`\n  - source_paths: README.md, src/notte/__init__.py\n- **Quickstart Guide**：importance `high`\n  - source_paths: pyproject.toml, .env.example, docs/setup.md, examples/quickstart.py\n- **System Architecture**：importance `high`\n  - source_paths: packages/notte-agent/src/notte_agent/__init__.py, packages/notte-browser/src/notte_browser/__init__.py, packages/notte-core/src/notte_core/__init__.py, packages/notte-sdk/src/notte_sdk/__init__.py, packages/notte-llm/src/notte_llm/__init__.py\n- **Agent Core System**：importance `high`\n  - source_paths: packages/notte-agent/src/notte_agent/agent.py, packages/notte-agent/src/notte_agent/common/conversation.py, packages/notte-agent/src/notte_agent/common/perception.py, packages/notte-agent/src/notte_agent/falco/agent.py, packages/notte-agent/src/notte_agent/gufo/agent.py\n- **Structured Output**：importance `high`\n  - source_paths: packages/notte-core/src/notte_core/utils/pydantic_schema.py, packages/notte-browser/src/notte_browser/scraping/schema.py, packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md, packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md\n- **Agent Fallback System**：importance `medium`\n  - source_paths: packages/notte-agent/src/notte_agent/agent_fallback.py, packages/notte-sdk/src/notte_sdk/agent_fallback.py\n- **Browser Sessions**：importance `high`\n  - source_paths: packages/notte-browser/src/notte_browser/session.py, packages/notte-browser/src/notte_browser/captcha.py, packages/notte-browser/src/notte_browser/controller.py, packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\n- **Actions and Browser Controls**：importance `high`\n  - source_paths: packages/notte-core/src/notte_core/actions/actions.py, packages/notte-browser/src/notte_browser/action_selection/pipe.py, packages/notte-browser/src/notte_browser/dom/types.py, packages/notte-browser/src/notte_browser/form_filling.py\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `57f060c5f562e46edd1799f965d51c54c788db6c`\n- inspected_files: `pyproject.toml`, `README.md`, `uv.lock`, `docs/sdk_tutorial.md`, `docs/change_local_config.md`, `docs/scraping_tutorial.md`, `docs/CONTRIBUTING.md`, `docs/run_ollama_local_models.md`, `docs/setup.md`, `docs/run_notte_with_external_browsers.md`, `docs/src/trust-center.mdx`, `docs/src/rate-limits.mdx`, `docs/src/concepts.mdx`, `docs/src/cookies.json`, `docs/src/cli.mdx`, `docs/src/.mcp.json`, `docs/src/zin.mdx`, `docs/src/pricing.mdx`, `docs/src/index.mdx`, `docs/src/README.md`\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: 来源证据：v1.8.8\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.8.8\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_5224b46e2312471c976888e8a2f8f4a6 | https://github.com/nottelabs/notte/releases/tag/v1.8.8 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 来源证据：v1.8.13\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.13\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_56505da48cd74758ab7a9a1d82092e18 | https://github.com/nottelabs/notte/releases/tag/v1.8.13 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 来源证据：v1.8.14\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.14\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_8f78a2591cea4f5aad8bfa0cb0ea15a0 | https://github.com/nottelabs/notte/releases/tag/v1.8.14 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 来源证据：v1.8.15\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.15\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_f611f1d0dd2440af8e84e9544ab1bdb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.15 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 来源证据：v1.8.6\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.6\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_0ed3c86ff7a34e5896a4daeb75552d4d | https://github.com/nottelabs/notte/releases/tag/v1.8.6 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: 来源证据：v1.8.9\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.9\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_6195971390e8494f88083c862aef7eb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.9 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 能力判断依赖假设\n\n- Trigger: README/documentation is current enough for a first validation pass.\n- Host AI rule: 将假设转成下游验证清单。\n- Why it matters: 假设不成立时，用户拿不到承诺的能力。\n- Evidence: capability.assumptions | github_repo:900152988 | https://github.com/nottelabs/notte | README/documentation is current enough for a first validation pass.\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 8: 来源证据：v1.8.7\n\n- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：v1.8.7\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_ab102ac99c2441118475601c34ab0ee9 | https://github.com/nottelabs/notte/releases/tag/v1.8.7 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 9: 维护活跃度未知\n\n- Trigger: 未记录 last_activity_observed。\n- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。\n- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- Evidence: evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | last_activity_observed missing\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 10: 下游验证发现风险项\n\n- Trigger: no_demo\n- Host AI rule: 进入安全/权限治理复核队列。\n- Why it matters: 下游已经要求复核，不能在页面中弱化。\n- Evidence: downstream_validation.risk_items | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\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项目：nottelabs/notte\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 是否匹配：chatgpt\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 来源证据：v1.8.8（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 来源证据：v1.8.13（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 来源证据：v1.8.14（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 来源证据：v1.8.15（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 来源证据：v1.8.6（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\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/nottelabs/notte 项目说明书\n\n生成时间：2026-05-16 12:22:12 UTC\n\n## 目录\n\n- [Introduction to Notte](#introduction)\n- [Quickstart Guide](#quickstart)\n- [System Architecture](#architecture)\n- [Agent Core System](#agent-core)\n- [Structured Output](#structured-output)\n- [Agent Fallback System](#agent-fallback)\n- [Browser Sessions](#sessions)\n- [Actions and Browser Controls](#actions-controls)\n- [Vaults and Credential Management](#vaults-credentials)\n- [Agent Personas](#personas)\n\n<a id='introduction'></a>\n\n## Introduction to Notte\n\n### 相关页面\n\n相关主题：[Quickstart Guide](#quickstart), [System Architecture](#architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n</details>\n\n# Introduction to Notte\n\nNotte is a comprehensive software suite designed for internet-native agentic systems. It provides a robust framework for building, deploying, and managing AI agents capable of interacting with web content programmatically. The project is developed by Notte Labs, Inc. and licensed under the Server Side Public License v1.0.\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## Overview\n\nNotte transforms the internet into a structured, navigable space where each website becomes an accessible map for intelligent agents. The technology enables AI systems to interpret and interact with web content with precision, creating a programmatic layer over the web.\n\nThe suite offers multiple capabilities:\n\n- **Web Scraping**: Extract structured data from any website\n- **Browser Automation**: Navigate and interact with web pages programmatically\n- **Agent Framework**: Build AI agents that can perform complex web tasks\n- **Session Management**: Maintain stateful browsing sessions with cookie handling\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md), [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Architecture\n\nThe Notte architecture consists of several interconnected packages:\n\n```mermaid\ngraph TD\n    A[Client SDK] --> B[notte-core]\n    A --> C[notte-llm]\n    A --> D[notte-agent]\n    B --> E[Actions Module]\n    B --> F[Error Handling]\n    C --> G[Prompts]\n    C --> H[Data Extraction]\n    D --> I[Falco Agent]\n    D --> J[Gufo Agent]\n```\n\n### Core Packages\n\n| Package | Purpose |\n|---------|---------|\n| `notte-core` | Core actions, error handling, and browser interaction primitives |\n| `notte-llm` | LLM integration, prompts for document analysis, data extraction, and action generation |\n| `notte-agent` | Agent implementations (Falco, Gufo) with validation and execution logic |\n| `notte-sdk` | Python SDK for easy integration and API consumption |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py), [packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n## Browser Actions\n\nNotte provides a comprehensive set of browser actions that agents can execute. Actions are defined as typed classes with execution messages and parameter validation.\n\n### Navigation Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to a URL | `url: str` |\n| `goto_new_tab` | Open URL in a new tab | `url: str` |\n| `close_tab` | Close the current tab | None |\n\n**Example Usage:**\n\n```python\nsession.execute(type=\"goto\", url=\"https://console.notte.cc\")\nsession.execute(type=\"goto_new_tab\", url=\"https://example.com\")\nsession.execute(type=\"close_tab\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-100](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n\n## Session Management\n\nThe SDK provides a session-based interface for browser automation. Sessions maintain state across multiple interactions and support cookie persistence.\n\n### Session Lifecycle\n\n```mermaid\ngraph LR\n    A[Start Session] --> B[Execute Actions]\n    B --> C[Observe State]\n    C --> B\n    B --> D[Stop Session]\n    D --> E[Save Cookies]\n```\n\n### Basic Session Usage\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://www.notte.cc\")\n    obs = session.observe()\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Observation Types\n\nSessions support two perception modes for observing page state:\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| `fast` | Simple page perception for quick queries | Basic element detection |\n| `deep` | LLM-powered formatting for rich action spaces | Complex interactions |\n\n```python\n# Fast observation\nobs = session.observe(perception_type='fast')\n\n# Deep observation for LLM-ready action space\nobs = session.observe(perception_type='deep')\nprint(obs.space.description)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Cookie Management\n\nSessions automatically handle cookie persistence:\n\n```python\nclient = NotteClient(cookie_file=\"cookies.json\")\nwith client.Session() as session:\n    # Cookies are loaded on start and saved on stop\n    session.execute(type=\"goto\", url=\"https://example.com\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Agent System\n\nNotte includes sophisticated agent implementations for autonomous web navigation.\n\n### Action Identification System\n\nAgents identify interactive elements using a structured ID system:\n\n| Prefix | Element Type | Examples |\n|--------|--------------|----------|\n| `I` | Input fields | Textboxes, selects, checkboxes |\n| `B` | Buttons | Clickable buttons |\n| `L` | Links | Hypertext links |\n| `F` | Figures/Images | Visual elements |\n| `O` | Select options | Dropdown options |\n| `M` | Miscellaneous | Modals, dialogs |\n\n**ID Format:** `<role_first_letter><index>[:]` (e.g., `B1`, `I2`, `L3:button`)\n\n> **Note:** IDs can change at each step. Agents must not assume IDs persist across observations.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### CAPTCHA Handling\n\nAgents have built-in CAPTCHA detection and handling:\n\n- Never interact directly with CAPTCHA elements\n- Use the `captcha_solve` action when detection occurs\n- Supported types: reCAPTCHA, hCaptcha, image verification, checkbox verification\n\n```json\n{\n  \"action\": \"captcha_solve\",\n  \"captcha_type\": \"recaptcha\"\n}\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### Validation System\n\nThe agent framework includes a validation pipeline:\n\n```mermaid\ngraph TD\n    A[Execute Action] --> B[Validate Output]\n    B --> C{Has Observations?}\n    C -->|No| D[Return Error]\n    C -->|Yes| E[LLM Validation]\n    E --> F{Is Valid?}\n    F -->|Yes| G[Return Success]\n    F -->|No| H[Return Failure]\n```\n\nThe validator uses vision models when available to verify action outcomes against expected results.\n\n资料来源：[packages/notte-agent/src/notte_agent/common/validator.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/validator.py)\n\n## Data Extraction\n\nNotte provides structured data extraction capabilities through LLM-powered document analysis.\n\n### Document Analysis Pipeline\n\n| Stage | Description |\n|-------|-------------|\n| Analysis | Identify sections, content types, and structured data |\n| Category | Classify document type (search-results, item, other) |\n| Extraction | Transform content into structured format |\n\n### Output Format\n\nExtracted data is organized into two sections:\n\n1. **`<document-analysis>`**: Logical breakdown of the document structure\n2. **`<data-extraction>`**: Structured Markdown output with tables and lists\n\n**Example Categories:**\n\n| Category | Use Case |\n|----------|----------|\n| `search-results` | Google Flights, search engine results |\n| `item` | Recipe pages, product details |\n| `other` | General content (Allrecipes homepage) |\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md)\n\n## API Integration\n\n### REST API Endpoint\n\n```bash\ncurl -X POST 'https://api.notte.cc/scrape' \\\n  -H 'Authorization: Bearer <NOTTE-API-KEY>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"url\": \"https://notte.cc\",\n    \"only_main_content\": false\n  }'\n```\n\n### SDK Client Usage\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\n# Basic scraping\nresponse = client.scrape(\n    url=\"https://notte.cc\",\n    scrape_links=True,\n    only_main_content=True\n)\n\n# Structured scraping\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nresponse = client.scrape(\n    url=\"https://example.com/blog\",\n    response_format=Article,\n    instructions=\"Extract only the title, date and content of the articles\"\n)\n```\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## Personas\n\nNotte supports persona-based operations for enhanced privacy and automation:\n\n```python\nimport notte\n\npersona = notte.Persona(\"<your-persona-id>\")\nsms = persona.sms(only_unread=True)\n```\n\n### Available Operations\n\n| Method | Description |\n|--------|-------------|\n| `sms()` | Retrieve SMS messages for the persona |\n| `create_number()` | Create a phone number |\n| `delete_number()` | Delete the persona's phone number |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n\n## Error Handling\n\nNotte defines a comprehensive error hierarchy for different failure scenarios:\n\n### Core Error Classes\n\n| Error | Description |\n|-------|-------------|\n| `InvalidA11yTreeType` | Invalid accessibility tree type |\n| `InvalidA11yChildrenError` | Invalid child element count |\n| `InvalidPlaceholderError` | Unhandled placeholder in vault |\n| `ScrapeFailedError` | Structured data extraction failure |\n\nAll errors provide developer advice and user-facing messages for appropriate handling.\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n## Search Demo\n\nNotte provides a live search demonstration using MCP server integration:\n\n- **Demo URL**: [https://search.notte.cc/](https://search.notte.cc/)\n- **Features**: Real-time search in LLM chatbots leveraging the scraping endpoint\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n## License and Citation\n\nThis project is licensed under the **Server Side Public License v1.0 (SSPL-1.0)**.\n\nFor academic or commercial use, cite as:\n\n```bibtex\n@software{notte2025,\n  author = {Pinto, Andrea and Giordano, Lucas and {nottelabs-team}},\n  title = {Notte: Software suite for internet-native agentic systems},\n  url = {https://github.com/nottelabs/notte},\n  year = {2025},\n  publisher = {GitHub},\n  license = {SSPL-1.0},\n  version = {1.4.4}\n}\n```\n\n资料来源：[README.md](https://github.com/nottelabs/notte/blob/main/README.md)\n\n---\n\n<a id='quickstart'></a>\n\n## Quickstart Guide\n\n### 相关页面\n\n相关主题：[Introduction to Notte](#introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/nottelabs/notte/blob/main/pyproject.toml)\n- [.env.example](https://github.com/nottelabs/notte/blob/main/.env.example)\n- [docs/setup.md](https://github.com/nottelabs/notte/blob/main/docs/setup.md)\n- [examples/quickstart.py](https://github.com/nottelabs/notte/blob/main/examples/quickstart.py)\n</details>\n\n# Quickstart Guide\n\nThe Quickstart Guide provides a streamlined path for developers to begin using the Notte SDK within minutes. It covers environment configuration, SDK initialization, and the fundamental workflows for web scraping and browser automation.\n\n## Prerequisites\n\nBefore starting, ensure your development environment meets the following requirements:\n\n| Requirement | Minimum Version | Notes |\n|-------------|-----------------|-------|\n| Python | 3.10+ | Required for type annotations and modern async features |\n| pip | 21.0+ | For package installation |\n\n## Environment Setup\n\n### 1. Obtain API Credentials\n\nRegister at [notte.cc](https://notte.cc) to obtain your API key. The service requires authentication via Bearer token for all API requests.\n\n### 2. Configure Environment Variables\n\nCreate a `.env` file in your project root with the following variables:\n\n```bash\nNOTTE_API_KEY=your_api_key_here\nNOTTE_API_URL=https://api.notte.cc  # Optional, defaults to this value\n```\n\n资料来源：[.env.example:1-2]()\n\n### 3. Install the SDK\n\nInstall the Notte SDK using pip:\n\n```bash\npip install notte\n```\n\nFor additional providers or extras, install from the project root:\n\n```bash\npip install -e \".[providers]\"\n```\n\n资料来源：[pyproject.toml:1-50]()\n\n## Basic Usage\n\n### SDK Client Initialization\n\nInitialize the Notte client using environment variables or direct configuration:\n\n```python\nfrom notte import Notte\n\n# Using environment variables (recommended)\nclient = Notte()\n\n# Or with explicit parameters\nclient = Notte(\n    api_key=\"your_api_key\",\n    base_url=\"https://api.notte.cc\"\n)\n```\n\n### Simple Web Scraping\n\nPerform basic webpage scraping with minimal configuration:\n\n```python\nresponse = client.scrape(\n    url=\"https://notte.cc\",\n    scrape_links=True,\n    only_main_content=True\n)\nprint(response.content)\n```\n\n资料来源：[examples/quickstart.py:1-20]()\n\n### Structured Data Extraction\n\nExtract structured data using Pydantic models for type-safe responses:\n\n```python\nfrom notte import BaseModel\n\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nresponse = client.scrape(\n    url=\"https://example.com/blog\",\n    response_format=Article,\n    instructions=\"Extract only the title, date and content of the articles\"\n)\n```\n\n资料来源：[README.md:1-30]()\n\n## Session-Based Automation\n\nFor complex interactions requiring multiple steps, use the Session API:\n\n```python\nwith client.session() as session:\n    # Navigate to a page\n    session.execute(type=\"goto\", url=\"https://example.com\")\n    \n    # Observe available actions\n    obs = session.observe(perception_type=\"deep\")\n    \n    # Execute form filling or clicking actions\n    session.execute(type=\"click\", id=\"B1\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-50]()\n\n## API Reference\n\n### Client Configuration Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `api_key` | `str` | Yes | - | Your Notte API key |\n| `base_url` | `str` | No | `https://api.notte.cc` | Base URL for API requests |\n| `timeout` | `int` | No | `60` | Request timeout in seconds |\n\n### Scrape Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `url` | `str` | Yes | - | Target URL to scrape |\n| `only_main_content` | `bool` | No | `True` | Exclude navbars and footers |\n| `scrape_links` | `bool` | No | `True` | Include hyperlinks in response |\n| `response_format` | `BaseModel` | No | `None` | Pydantic model for structured output |\n| `instructions` | `str` | No | `None` | Natural language extraction instructions |\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[Start] --> B[Install SDK]\n    B --> C[Configure API Key]\n    C --> D{Use Case}\n    D -->|Simple Scrape| E[client.scrape]\n    D -->|Structured Data| F[Define BaseModel]\n    F --> G[client.scrape with response_format]\n    D -->|Complex Automation| H[Create Session]\n    H --> I[Observe Actions]\n    I --> J[Execute Actions]\n    J --> K[Return Results]\n    E --> L[End]\n    G --> L\n    K --> L\n```\n\n## cURL Alternative\n\nFor environments without Python, use the REST API directly:\n\n```bash\ncurl -X POST 'https://api.notte.cc/scrape' \\\n  -H 'Authorization: Bearer <NOTTE-API-KEY>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"url\": \"https://notte.cc\",\n    \"only_main_content\": false\n  }'\n```\n\n资料来源：[README.md:40-50]()\n\n## Next Steps\n\n- Review the [Setup Documentation](https://github.com/nottelabs/notte/blob/main/docs/setup.md) for advanced configuration\n- Explore the [Examples Directory](https://github.com/nottelabs/notte/tree/main/examples) for complete use cases\n- Check the [Agent Documentation](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/README.md) for browser automation with AI agents\n\n---\n\n<a id='architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Introduction to Notte](#introduction), [Agent Core System](#agent-core), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/__init__.py)\n- [packages/notte-browser/src/notte_browser/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/__init__.py)\n- [packages/notte-core/src/notte_core/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/__init__.py)\n- [packages/notte-sdk/src/notte_sdk/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/__init__.py)\n- [packages/notte-llm/src/notte_llm/__init__.py](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/__init__.py)\n</details>\n\n# System Architecture\n\nNotte is a software suite designed for internet-native agentic systems, providing a comprehensive infrastructure for browser automation, web interaction, and AI-driven document processing. The architecture follows a modular design pattern with distinct layers for browser control, agent orchestration, LLM integration, and SDK accessibility.\n\n## Overview\n\nThe Notte system is composed of five primary packages that work together to enable autonomous web interaction:\n\n| Package | Purpose |\n|---------|---------|\n| `notte-core` | Core utilities, error handling, and shared data structures |\n| `notte-browser` | Browser interaction and CDP integration layer |\n| `notte-agent` | AI agent orchestration (Gufo and Falco subsystems) |\n| `notte-llm` | LLM prompt management and document processing |\n| `notte-sdk` | Public SDK for client applications |\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    Client[Client Application]\n    SDK[notte-sdk]\n    Agent[notte-agent]\n    Browser[notte-browser]\n    LLM[notte-llm]\n    Core[notte-core]\n    CDP[Chrome DevTools Protocol]\n    Remote[Remote Browser]\n\n    Client --> SDK\n    SDK --> Agent\n    SDK --> LLM\n    Agent --> Browser\n    Browser --> CDP\n    CDP --> Remote\n    LLM --> Core\n    Core --> Browser\n```\n\n## Core Package (`notte-core`)\n\nThe `notte-core` package provides foundational components used across all other packages, including error handling, accessibility tree processing, and placeholder management.\n\n### Error Handling Architecture\n\nThe error system is built on a hierarchical class structure rooted in `NotteBaseError`:\n\n```python\n# Source: packages/notte-core/src/notte_core/errors/processing.py\nclass NotteBaseError(Exception):\n    def __init__(self, agent_message, user_message, dev_message)\n```\n\n**Error Categories:**\n\n| Error Class | Purpose |\n|-------------|---------|\n| `InvalidInternalCheckError` | Internal validation failures with developer guidance |\n| `InvalidA11yTreeType` | Unsupported accessibility tree format |\n| `InvalidA11yChildrenError` | Accessibility tree structure violations |\n| `InvalidPlaceholderError` | Vault placeholder resolution failures |\n| `ScrapeFailedError` | Structured data extraction failures |\n\n### Placeholder System\n\nThe placeholder system enables secure credential management through a vault mechanism. When an action requires sensitive data, the system substitutes placeholders that are resolved at runtime.\n\n```python\n# Source: packages/notte-core/src/notte_core/errors/processing.py\nclass InvalidPlaceholderError(NotteBaseError):\n    def __init__(self, placeholder: str) -> None:\n        dev_message = f\"The placeholder {placeholder} is not handled by your current vault.\"\n        agent_message = f\"Could not perform action with value {placeholder}. Try picking a different value\"\n```\n\n## SDK Package (`notte-sdk`)\n\nThe SDK provides the primary interface for client applications to interact with the Notte system. It exposes session management, observation capabilities, and action execution through a Pythonic API.\n\n### Session Management\n\nSessions are the fundamental unit of work in Notte, representing a single browser session with associated state and context.\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\nclass Session:\n    def __init__(self, ..., timeout_minutes: int = ...):\n        self.response = None\n        self._cookie_file = None\n```\n\n**Session Lifecycle:**\n\n| State | Description |\n|-------|-------------|\n| `created` | Session object instantiated |\n| `started` | `client.start()` called, `session_id` available |\n| `active` | Browser operations in progress |\n| `stopped` | `client.stop()` called, session terminated |\n\n### Observation System\n\nThe observation system retrieves the current state of the webpage and available interactive elements:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\ndef observe(self, *, perception_type: str = None, instructions: str = None, **data):\n    if data.get(\"perception_type\") is None:\n        data[\"perception_type\"] = self.default_perception_type\n    return self.client.page.observe(session_id=self.session_id, **data)\n```\n\n**Perception Types:**\n\n| Type | Description | Use Case |\n|------|-------------|----------|\n| `fast` | Simple page perception for quick queries | Default, rapid action space generation |\n| `deep` | LLM-powered element formatting | Complex pages requiring structured analysis |\n\n### Action Execution\n\nActions are executed through the unified `execute()` method with type-based dispatch:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\ndef execute(self, *, raise_on_failure: bool = None, **kwargs: Unpack[FormFillActionDict]) -> ExecutionResult\n```\n\n### Cookie Management\n\nSessions automatically persist cookies to file for session continuity:\n\n```python\n# Source: packages/notte-sdk/src/notte_sdk/endpoints/sessions.py\nif self._cookie_file is not None:\n    cookies = self.get_cookies()\n    create_or_append_cookies_to_file(self._cookie_file, cookies)\n```\n\n## Agent Package (`notte-agent`)\n\nThe agent package contains two distinct agent subsystems: **Gufo** and **Falco**. Both subsystems handle browser automation but use different prompt strategies and action registries.\n\n### Agent Subsystem Comparison\n\n| Aspect | Gufo | Falco |\n|--------|------|-------|\n| System Prompt | `gufo/system.md` | `falco/system.md` |\n| Element Format | Markdown with backticks | `id[:]<type>text</type>` |\n| Tools | Configurable via `BaseTool` | Configurable via `BaseTool` |\n| Action Registry | Custom implementation | `ActionRegistry` class |\n\n### Element Identification System\n\nBoth agents use a consistent element identification scheme for interactive elements:\n\n| Prefix | Element Type | Examples |\n|--------|--------------|----------|\n| `I` | Input fields | Textbox, select, checkbox, radio |\n| `B` | Buttons | Submit, clickable elements |\n| `L` | Links | Hypertext navigation |\n| `F` | Figures/Images | Visual content |\n| `O` | Options | Select dropdown items |\n| `M` | Miscellaneous | Modals, dialogs, overlays |\n\n```json\n{\n  \"id\": \"I1\",\n  \"type\": \"input\",\n  \"label\": \"email\",\n  \"value\": \"user@example.com\"\n}\n```\n\n### Gufo Agent System\n\nThe Gufo agent (`packages/notte-agent/src/notte_agent/gufo/system.md`) operates through structured JSON commands:\n\n```json\n{\n  \"actions\": [{\"type\": \"click\", \"id\": \"B1\"}],\n  \"reasoning\": \"User wants to submit the form\"\n}\n```\n\n### Falco Agent System\n\nThe Falco agent (`packages/notte-agent/src/notte_agent/falco/prompt.py`) uses a prompt-based approach with configurable tools:\n\n```python\n# Source: packages/notte-agent/src/notte_agent/falco/prompt.py\nclass FalcoPrompt(BasePrompt):\n    def __init__(\n        self,\n        prompt_file: Path | None = None,\n        tools: list[BaseTool] | None = None,\n    ) -> None:\n        self.action_registry: ActionRegistry = ActionRegistry(tools)\n```\n\n### CAPTCHA Handling\n\nBoth agents implement strict CAPTCHA detection and handling:\n\n```python\n# Source: packages/notte-agent/src/notte_agent/gufo/system.md\n# CAPTCHA HANDLING - CRITICAL RULES:\n# - NEVER click on captcha elements directly\n# - NEVER use \"click\", \"type\", or any other action on captcha elements\n# - If detected, use ONLY the \"captcha_solve\" action\n```\n\n### Action Examples\n\n**Form Filling:**\n```json\n// Source: packages/notte-agent/src/notte_agent/falco/prompt.py\n{\n  \"type\": \"form_fill\",\n  \"value\": {\n    \"address1\": \"<my address>\",\n    \"city\": \"<my city>\",\n    \"state\": \"<my state>\"\n  }\n}\n```\n\n**Navigation and Extraction:**\n```json\n{\n  \"type\": \"scrape\",\n  \"instructions\": \"Extract the search results from the page\"\n}\n```\n\n## LLM Package (`notte-llm`)\n\nThe LLM package manages prompts and processing for document analysis, categorization, and structured data extraction.\n\n### Prompt Categories\n\n| Category | Purpose | Output Format |\n|----------|---------|---------------|\n| `document-category` | Classify web documents | `<document-category>type</document-category>` |\n| `data-extraction` | Extract structured data | Markdown with sections |\n| `action-listing` | List available actions | JSON action array |\n| `extract-without-json-schema` | LLM-native extraction | Structured JSON |\n\n### Document Categorization\n\nDocuments are classified into categories for downstream processing:\n\n| Category | Description | Example |\n|----------|-------------|---------|\n| `search-results` | Search engine results page | Google search |\n| `item` | Individual item/product page | Recipe, product listing |\n| `other` | Uncategorized content | General pages |\n\n```markdown\n<!-- Source: packages/notte-llm/src/notte_llm/prompts/document-category/base/user.md -->\n<document-category>other</document-category>\n```\n\n### Data Extraction Templates\n\nThe system supports multiple extraction formats:\n\n| Template | Sections | Use Case |\n|----------|----------|----------|\n| `two_sections` | `<document-analysis>`, `<data-extraction>` | Standard extraction |\n| `all_data` | Analysis + detailed extraction | Comprehensive data |\n| `user.md` (base) | Custom format | Flexible extraction |\n\n### Structured Output Generation\n\n```markdown\n<!-- Source: packages/notte-llm/src/notte_llm/prompts/data-extraction/user.md -->\n<document-analysis>\nFound X menus, Y text elements, Z interactive elements\n[Analysis content...]\n</document-analysis>\n<data-extraction>\n[Extracted data in Markdown format...]\n</data-extraction>\n```\n\n## Browser Package (`notte-browser`)\n\nThe browser package provides the low-level interface to the Chrome DevTools Protocol (CDP) for controlling headless browsers.\n\n### Key Responsibilities\n\n- Page navigation and loading\n- Element interaction (click, type, scroll)\n- Screenshot capture\n- Accessibility tree generation\n- Cookie management\n\n### CDP Integration\n\n```python\n# Source: packages/notte-sdk/README.md\nfrom patchright.sync_api import sync_playwright\nfrom notte_sdk import NotteClient\n\nwith notte.Session() as session:\n    # Browser operations via CDP\n    _ = session.execute(type=\"goto\", url=\"https://example.com\")\n```\n\n## Data Flow Architecture\n\n```mermaid\ngraph LR\n    User[User Request]\n    SDK[SDK Session]\n    Agent[Agent Processor]\n    LLM[LLM Processing]\n    Browser[Browser Engine]\n    CDP[CDP Commands]\n    \n    User --> SDK\n    SDK --> Agent\n    Agent --> LLM\n    LLM --> Agent\n    Agent --> Browser\n    Browser --> CDP\n    CDP --> Browser\n    Browser --> Agent\n    Agent --> SDK\n    SDK --> User\n```\n\n## Session State Machine\n\n```mermaid\ngraph TD\n    Init[Session Created] --> Start[client.start]\n    Start --> Active[Session Active]\n    Active --> Observe[session.observe]\n    Active --> Execute[session.execute]\n    Observe --> Active\n    Execute --> Active\n    Active --> Stop[client.stop]\n    Stop --> End[Session Ended]\n    \n    Start -->|Error| Error[Error State]\n    Error -->|Retry| Start\n```\n\n## Configuration Options\n\n### SDK Initialization\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `timeout_minutes` | `int` | - | Session timeout |\n| `open_viewer` | `bool` | `False` | Open browser viewer |\n| `proxies` | `dict` | `None` | Proxy configuration |\n| `_cookie_file` | `str` | `None` | Cookie persistence file |\n\n### Perception Configuration\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `perception_type` | `str` | `fast` or `deep` |\n| `instructions` | `str` | Natural language filtering |\n\n## Error Handling Flow\n\n```mermaid\ngraph TD\n    Action[Action Request]\n    Validate{Validation}\n    Validate -->|Pass| Execute\n    Validate -->|Fail| InvalidError[InvalidInternalCheckError]\n    \n    Execute --> CDP[CDP Call]\n    CDP -->|Success| Result\n    CDP -->|Failure| ScrapeError[ScrapeFailedError]\n    \n    Placeholder{Placeholder Check}\n    Result --> Placeholder\n    Placeholder -->|Found| PlaceholderError[InvalidPlaceholderError]\n    Placeholder -->|None| Complete\n```\n\n## Integration Examples\n\n### Basic Session Usage\n\n```python\n# Source: packages/notte-sdk/README.md\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://example.com\")\n    obs = session.observe()\n    action = obs.space.sample(type='click')\n    result = session.execute(action)\n```\n\n### Agent Deployment\n\n```python\n# Source: packages/notte-sdk/README.md\nwith notte.Session(open_viewer=True) as session:\n    agent = notte.Agent(session=session)\n    agent.start(\n        task=\"Summarize the content of the page\",\n        url=\"https://www.google.com\"\n    )\n```\n\n## Summary\n\nThe Notte architecture provides a robust, layered approach to browser automation:\n\n1. **Core Layer** (`notte-core`): Provides shared utilities, error handling, and base data structures\n2. **Browser Layer** (`notte-browser`): Abstracts Chrome DevTools Protocol for browser control\n3. **Agent Layer** (`notte-agent`): Implements AI-driven automation with Gufo and Falco subsystems\n4. **LLM Layer** (`notte-llm`): Manages document processing and prompt engineering\n5. **SDK Layer** (`notte-sdk`): Exposes the complete API to client applications\n\nThe modular design allows each layer to be used independently or in combination, enabling flexible deployment scenarios from simple web scraping to complex autonomous agent workflows.\n\n---\n\n<a id='agent-core'></a>\n\n## Agent Core System\n\n### 相关页面\n\n相关主题：[Structured Output](#structured-output), [Agent Fallback System](#agent-fallback), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent.py)\n- [packages/notte-agent/src/notte_agent/common/conversation.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/conversation.py)\n- [packages/notte-agent/src/notte_agent/common/perception.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/common/perception.py)\n- [packages/notte-agent/src/notte_agent/falco/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/agent.py)\n- [packages/notte-agent/src/notte_agent/gufo/agent.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/agent.py)\n- [packages/notte-core/src/notte_core/agent_types.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/agent_types.py)\n</details>\n\n# Agent Core System\n\nThe Agent Core System is the central orchestration layer in Notte that enables AI agents to autonomously navigate and interact with web pages. It provides a unified interface for browser automation tasks, handling perception of web elements, action execution, and conversation management between the agent and web content.\n\n## Architecture Overview\n\nThe Agent Core System consists of multiple layered components that work together to enable autonomous web interaction.\n\n```mermaid\ngraph TD\n    A[Agent Client] --> B[Agent Core]\n    B --> C[Browser Session]\n    C --> D[Web Page]\n    B --> E[Perception Module]\n    B --> F[Conversation Module]\n    E --> G[Action Registry]\n    G --> H[Falco Actions]\n    G --> I[Gufo Actions]\n```\n\n## Agent Types\n\nNotte supports multiple agent implementations, each designed for specific automation scenarios. The agent type determines the underlying action execution engine and available capabilities.\n\n| Agent Type | Description | Use Case |\n|------------|-------------|----------|\n| `falco` | Standard browser automation agent | General web interaction, form filling, navigation |\n| `gufo` | Advanced automation with stealth features | CAPTCHA handling, proxy rotation, anti-detection |\n\n资料来源：[packages/notte-core/src/notte_core/agent_types.py:1-50]()\n\n## Core Components\n\n### Agent Base Class\n\nThe base `Agent` class provides the primary interface for task execution and state management.\n\n```python\nclass Agent:\n    def __init__(\n        self,\n        session: Session,\n        vault: Vault | None = None,\n        max_steps: int = 10,\n        agent_type: AgentType = AgentType.FALCO,\n    )\n    \n    def run(self, task: str) -> AgentResponse\n    def start(self, task: str, url: str | None = None) -> None\n    def status() -> AgentStatus\n    def stop() -> None\n```\n\n**Key Parameters:**\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `session` | `Session` | Required | Browser session for interaction |\n| `vault` | `Vault \\| None` | `None` | Secure credential storage |\n| `max_steps` | `int` | `10` | Maximum action steps before termination |\n| `agent_type` | `AgentType` | `FALCO` | Backend engine selection |\n\n资料来源：[packages/notte-agent/src/notte_agent/agent.py:1-100]()\n\n### Perception Module\n\nThe perception module analyzes web page structure and generates interactive action spaces for the agent.\n\n```python\nclass Perception:\n    def observe(\n        self,\n        perception_type: str = 'fast',\n        instructions: str | None = None\n    ) -> ObservationResponse\n```\n\n**Perception Types:**\n\n| Type | Description | Performance |\n|------|-------------|-------------|\n| `fast` | Simple page element parsing | Low latency |\n| `deep` | LLM-powered element formatting | Higher accuracy, slower |\n\nThe perception system generates element IDs using a role-based prefix system:\n\n- `I` - Input fields (textbox, select, checkbox)\n- `B` - Buttons\n- `L` - Links\n- `F` - Figures/Images\n- `O` - Select options\n- `M` - Miscellaneous elements (modals, dialogs)\n\n资料来源：[packages/notte-agent/src/notte_agent/common/perception.py:1-80]()\n\n### Conversation Module\n\nManages the dialogue history between the agent and web content, maintaining context across multiple interaction steps.\n\n```python\nclass Conversation:\n    def __init__(self, system_prompt: str)\n    def add_user_message(self, content: str) -> None\n    def add_agent_message(self, content: str) -> None\n    def get_messages() -> list[Message]\n```\n\nThe conversation system tracks:\n- User task requests\n- Agent reasoning and decisions\n- Action execution results\n- Page observations\n\n资料来源：[packages/notte-agent/src/notte_agent/common/conversation.py:1-60]()\n\n## Action System\n\n### Action Types\n\nThe agent supports a comprehensive set of browser automation actions through a registry pattern.\n\n```mermaid\ngraph LR\n    A[Agent Decision] --> B[Action Registry]\n    B --> C[FormFillAction]\n    B --> D[ClickAction]\n    B --> E[ScrapeAction]\n    B --> F[CaptchaSolveAction]\n    B --> G[GotoAction]\n```\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to URL | `url: str` |\n| `click` | Click element | `id: str` |\n| `fill` | Fill form fields | `value: dict[str, str]` |\n| `scrape` | Extract structured data | `instructions: str` |\n| `captcha_solve` | Solve CAPTCHA | `captcha_type: str` |\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:1-150]()\n\n### Action Registry\n\nThe `ActionRegistry` maintains available actions and their schemas, enabling dynamic action discovery.\n\n```python\nclass ActionRegistry:\n    def __init__(self, tools: list[BaseTool])\n    def get_action_schemas(self) -> list[ActionSchema]\n    def register(self, action_cls: type[BaseTool]) -> None\n```\n\n### Supported Action Formats\n\nActions are serialized using JSON schema format for agent consumption:\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"id\": {\"type\": \"string\", \"description\": \"Element identifier\"},\n    \"value\": {\"type\": \"string\", \"description\": \"Action value\"}\n  }\n}\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:30-80]()\n\n## Agent Implementations\n\n### Falco Agent\n\nThe default agent implementation using standard Playwright-based browser automation.\n\n```python\nclass FalcoAgent(BaseAgent):\n    def __init__(self, tools: list[BaseTool] | None = None)\n    def execute(self, action: dict) -> ExecutionResult\n```\n\n**Features:**\n- Standard form filling\n- Click-based navigation\n- Basic scraping operations\n- Simple CAPTCHA detection\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/agent.py:1-100]()\n\n### Gufo Agent\n\nAdvanced agent with stealth capabilities for bypassing detection systems.\n\n```python\nclass GufoAgent(BaseAgent):\n    def __init__(self, tools: list[BaseTool] | None = None)\n    def execute(self, action: dict) -> ExecutionResult\n```\n\n**Features:**\n- Automatic CAPTCHA solving\n- Proxy rotation support\n- User agent spoofing\n- Cookie management\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/agent.py:1-100]()\n\n## Session Integration\n\nAgents operate within browser sessions that provide the execution environment.\n\n```python\nwith client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n    agent = client.Agent(session=session, max_steps=15)\n    response = agent.run(\n        task=\"Navigate to the form and submit with sample data\",\n        url=\"https://example.com/form\"\n    )\n```\n\n### Session Configuration\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `browser_type` | `str` | `\"chrome\"` | Browser engine |\n| `open_viewer` | `bool` | `False` | Display browser window |\n| `timeout_minutes` | `int` | `5` | Session timeout |\n| `proxies` | `bool \\| str` | `False` | Proxy configuration |\n| `solve_captchas` | `bool` | `False` | Auto-CAPTCHA solving |\n\n## Workflow Execution\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Agent\n    participant Session\n    participant Browser\n    User->>Agent: run(task)\n    Agent->>Session: observe()\n    Session->>Browser: Get page state\n    Browser-->>Session: Page elements\n    Session-->>Agent: Observation\n    Agent->>Agent: Plan action\n    Agent->>Session: execute(action)\n    Session->>Browser: Perform action\n    Browser-->>Session: Result\n    Session-->>Agent: ExecutionResult\n    Agent->>Agent: Check completion\n    Note over Agent,Browser: Loop until task complete or max_steps\n```\n\n## Error Handling\n\nThe system provides structured error handling for various failure scenarios.\n\n| Error Class | Description | Resolution |\n|-------------|-------------|------------|\n| `InvalidPlaceholderError` | Vault credential unavailable | Select alternative value |\n| `ScrapeFailedError` | Data extraction failed | Retry with different instructions |\n| `InvalidA11yTreeType` | Unknown accessibility tree type | Check code implementation |\n| `InvalidA11yChildrenError` | Element hierarchy mismatch | Verify page structure |\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py:1-100]()\n\n## SDK Usage Example\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\n# Basic agent usage\nwith client.Session(open_viewer=True) as session:\n    agent = client.Agent(session=session, max_steps=10)\n    response = agent.run(\n        task=\"Find the search box and search for 'python tutorials'\",\n        url=\"https://www.google.com\"\n    )\n    print(response.answer)\n\n# With persona (digital identity)\nwith client.Persona(create_phone_number=True) as persona:\n    with client.Session(browser_type=\"chrome\") as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=15)\n        response = agent.run(\n            task=\"Complete the registration form\",\n            url=\"https://example.com/register\"\n        )\n```\n\n## Best Practices\n\n1. **Set appropriate max_steps** - Balance between task completion and resource usage\n2. **Use fast perception** for simple tasks, deep perception for complex page analysis\n3. **Implement vault storage** for reusable credentials across sessions\n4. **Handle errors gracefully** - Check execution results before proceeding\n5. **Use stealth features** when bypassing detection is required\n\n---\n\n<a id='structured-output'></a>\n\n## Structured Output\n\n### 相关页面\n\n相关主题：[Agent Core System](#agent-core)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-core/src/notte_core/utils/pydantic_schema.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n- [packages/notte-browser/src/notte_browser/scraping/schema.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/scraping/schema.py)\n- [packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md)\n- [packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md)\n</details>\n\n# Structured Output\n\nStructured Output enables Notte to extract web page content and return it as typed, structured data using Pydantic models. This feature bridges the gap between unstructured web content and programmatic data processing, allowing developers to define expected output schemas and receive validated, type-safe data.\n\n## Overview\n\nNotte's Structured Output system consists of two complementary approaches:\n\n1. **Schema-Based Extraction**: Uses dynamically generated JSON schemas from Pydantic models\n2. **Natural Language Extraction**: Uses instructions-based extraction without strict schema enforcement\n\nThe system leverages Pydantic for schema definition, ensuring type safety and validation at the application layer. When a `response_format` is provided, Notte generates a corresponding JSON Schema that guides the LLM in producing correctly structured output.\n\n资料来源：[packages/notte-core/src/notte_core/utils/pydantic_schema.py](packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[User Request] --> B[Define Pydantic Model]\n    B --> C[response_format Parameter]\n    C --> D{Schema Type}\n    D -->|With Schema| E[Generate JSON Schema]\n    D -->|Without Schema| F[Instructions-Only Extraction]\n    E --> G[Prompt Engineering]\n    F --> G\n    G --> H[LLM Processing]\n    H --> I[Output Validation]\n    I --> J[Typed Response]\n```\n\n## Core Components\n\n### Pydantic Schema Generation\n\nThe `pydantic_schema.py` module provides utilities for converting Python Pydantic models into JSON schemas that can be consumed by LLMs.\n\n| Function | Purpose |\n|----------|---------|\n| `model_to_json_schema()` | Converts Pydantic model class to JSON schema |\n| `validate_response()` | Validates LLM output against expected schema |\n| `extract_structured_data()` | Extracts and parses structured data from response |\n\n资料来源：[packages/notte-core/src/notte_core/utils/pydantic_schema.py](packages/notte-core/src/notte_core/utils/pydantic_schema.py)\n\n### Scraping Schema\n\nThe `schema.py` module defines the scraping configuration and response handling for structured output.\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `response_format` | `type[BaseModel]` | `None` | Pydantic model for structured output |\n| `instructions` | `str` | `None` | Natural language extraction instructions |\n| `raise_on_failure` | `bool` | `True` | Raise exception on extraction failure |\n\n资料来源：[packages/notte-browser/src/notte_browser/scraping/schema.py](packages/notte-browser/src/notte_browser/scraping/schema.py)\n\n## Usage Patterns\n\n### Basic Structured Extraction\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\nclass Product(BaseModel):\n    title: str\n    price: str\n    description: str | None = None\n\nclient = NotteClient()\ndata = client.scrape(\n    url=\"https://example.com/product\",\n    response_format=Product,\n    instructions=\"Extract the product title, price, and description\"\n)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/client.py](packages/notte-sdk/src/notte_sdk/client.py)\n\n### Session-Based Extraction\n\n```python\nfrom notte_sdk import NotteClient\nfrom pydantic import BaseModel\n\nclass Article(BaseModel):\n    title: str\n    content: str\n    date: str\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://example.com/blog\")\n    data = session.scrape(\n        response_format=Article,\n        instructions=\"Extract the title, date and content of the articles\"\n    )\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n### Error Handling\n\n```python\nfrom notte_sdk import NotteClient\nfrom notte_core.errors import ScrapeFailedError\n\nclient = NotteClient()\n\n# With raise_on_failure=False, returns StructuredData wrapper\nresult = client.scrape(\n    url=\"https://example.com\",\n    response_format=Product,\n    raise_on_failure=False\n)\n\nif not result.success:\n    print(f\"Extraction failed: {result.error}\")\nelse:\n    data = result.data\n```\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](packages/notte-core/src/notte_core/errors/processing.py)\n\n## Prompt Engineering\n\n### JSON Schema Generation Prompt\n\nThe `generate-json-schema/system.md` template guides the LLM in producing valid JSON output conforming to a specified schema. This prompt includes:\n\n- Success examples showing correct JSON output\n- Failure examples demonstrating invalid output handling\n- Timestamp context for time-sensitive extraction\n\n```markdown\nToday is: {{timestamp}}\n\nTransform the following document into structured JSON output based on the provided user request:\n\n```markdown\n{{& document}}\n```\n```\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md](packages/notte-llm/src/notte_llm/prompts/generate-json-schema/system.md)\n\n### Extraction Without Schema\n\nThe `extract-without-json-schema/system.md` template provides an alternative approach for natural language extraction:\n\n```markdown\n```json\n{{& success_example}}\n```\n\nExample of a valid output if you cannot answer the user request:\n```json\n{{& failure_example}}\n```\n```\n\nThis approach allows flexible extraction when strict schema conformance is not required.\n\n资料来源：[packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md](packages/notte-llm/src/notte_llm/prompts/extract-without-json-schema/system.md)\n\n## Scrape Action Configuration\n\nThe underlying scrape action provides granular control over extraction:\n\n```python\nsession.execute(type=\"scrape\", only_images=True)  # Scrape only images\nsession.execute(type=\"scrape\", response_format={\"type\": \"object\", \"properties\": {...}})  # With JSON schema\n```\n\n| Action Parameter | Description |\n|-----------------|-------------|\n| `instructions` | Natural language instructions for extraction |\n| `only_main_content` | Exclude navbars, footers (default: `True`) |\n| `selector` | Playwright selector to scope extraction |\n| `only_images` | Extract images only |\n| `scrape_links` | Include links in output (default: `True`) |\n| `scrape_images` | Include image data |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py](packages/notte-core/src/notte_core/actions/actions.py)\n\n## Workflow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant SDK as NotteClient\n    participant LLM as LLM Engine\n    participant API as Notte API\n\n    User->>SDK: scrape(url, response_format=Model)\n    SDK->>LLM: Generate JSON Schema from Model\n    SDK->>API: POST /scrape with schema + instructions\n    API->>LLM: Process page with schema\n    LLM-->>API: Structured JSON response\n    API-->>SDK: Validated response\n    SDK-->>User: Typed Model instance\n```\n\n## Best Practices\n\n1. **Define Clear Schemas**: Use descriptive field names and include type annotations\n2. **Provide Contextual Instructions**: Give the LLM context about what to extract\n3. **Handle Optional Fields**: Use `| None` for fields that may not always be present\n4. **Validate Output**: Enable `raise_on_failure=True` for production use\n5. **Scope Extraction**: Use selectors when extracting from specific page regions\n\n## Error Handling\n\n| Error Type | Cause | Resolution |\n|------------|-------|------------|\n| `ScrapeFailedError` | Extraction validation failed | Check instructions and schema compatibility |\n| `LLMParsingError` | Malformed JSON in response | Ensure schema is properly generated |\n| `InvalidPlaceholderError` | Missing credential reference | Configure vault for required credentials |\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](packages/notte-core/src/notte_core/errors/processing.py)\n\n---\n\n<a id='agent-fallback'></a>\n\n## Agent Fallback System\n\n### 相关页面\n\n相关主题：[Agent Core System](#agent-core), [Actions and Browser Controls](#actions-controls)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-agent/src/notte_agent/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent_fallback.py)\n- [packages/notte-sdk/src/notte_sdk/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/agent_fallback.py)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n</details>\n\n# Agent Fallback System\n\n## Overview\n\nThe Agent Fallback System in Notte provides a robust mechanism for handling agent execution failures and gracefully recovering from errors during browser automation tasks. When an agent encounters execution issues—whether due to captcha detection, action failures, or other runtime errors—the fallback system intercepts these failures, analyzes the error context, and determines the appropriate recovery strategy.\n\nThe system operates across two primary layers: the SDK layer (`notte_sdk`) and the agent layer (`notte_agent`), ensuring consistent error handling and recovery whether agents are executed locally or through the Notte API.\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[Agent Execution] --> B{Action Execution Success?}\n    B -->|Yes| C[Continue Normal Flow]\n    B -->|No| D[Fallback System Triggered]\n    D --> E{Error Type Classification}\n    E -->|Captcha| F[Captcha Handler]\n    E -->|Action Failure| G[Retry Strategy]\n    E -->|Fatal Error| H[Graceful Degradation]\n    F --> I[Attempt Resolution]\n    G --> J[Apply Retry Policy]\n    H --> K[Report to User]\n    I --> C\n    J --> C\n    K --> L[Session Cleanup]\n```\n\n## Core Components\n\n### FallbackAction Class\n\nThe `FallbackAction` class represents the fundamental unit of fallback handling. It encapsulates the error context and provides structured data for downstream processing.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `error_type` | `str` | Classification of the error (e.g., \"captcha\", \"action_failure\") |\n| `error_message` | `str` | Detailed description of the failure |\n| `metadata` | `dict` | Additional context including HTML element data, playwright code, and execution state |\n| `retry_count` | `int` | Number of retry attempts performed |\n| `timestamp` | `datetime` | When the error occurred |\n\n资料来源：[packages/notte-agent/src/notte_agent/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/agent_fallback.py)\n\n### AgentFallbackManager\n\nThe `AgentFallbackManager` serves as the central coordinator for fallback operations, managing the lifecycle of error handling and recovery strategies.\n\n```mermaid\nsequenceDiagram\n    participant Agent as Agent\n    participant FallbackManager as FallbackManager\n    participant RecoveryStrategy as RecoveryStrategy\n    participant Session as Session\n    \n    Agent->>FallbackManager: Register failure context\n    FallbackManager->>FallbackManager: Classify error type\n    FallbackManager->>RecoveryStrategy: Select appropriate strategy\n    RecoveryStrategy->>Session: Apply recovery action\n    Session-->>Agent: Resume or terminate\n```\n\n#### Key Methods\n\n| Method | Purpose |\n|--------|---------|\n| `register_failure()` | Records a new failure event in the fallback system |\n| `classify_error()` | Determines the error category based on error characteristics |\n| `select_recovery_strategy()` | Chooses the optimal recovery approach |\n| `apply_recovery()` | Executes the chosen recovery mechanism |\n| `should_retry()` | Evaluates whether additional attempts are warranted |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/agent_fallback.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/agent_fallback.py)\n\n## Error Classification\n\nThe fallback system categorizes failures into distinct types, each with tailored handling strategies:\n\n| Error Type | Description | Default Recovery |\n|------------|-------------|------------------|\n| `captcha` | CAPTCHA or verification challenges detected | Initiate captcha solving flow |\n| `action_failure` | Interactive element action failed | Retry with modified selectors |\n| `navigation_error` | Page navigation or URL resolution failure | Retry with exponential backoff |\n| `timeout_error` | Operation exceeded time limits | Extend timeout and retry |\n| `invalid_state` | Agent reached an inconsistent state | Reset to known good state |\n| `fatal_error` | Unrecoverable error requiring termination | Graceful session cleanup |\n\n## Recovery Strategies\n\n### 1. Captcha Resolution Strategy\n\nWhen the system detects CAPTCHA challenges, it automatically triggers the captcha solving mechanism.\n\n```python\n# Captcha detection triggers automatic resolution\nif error_type == \"captcha\":\n    captcha_type = detect_captcha_type(metadata)\n    captcha_action = CaptchaSolveAction(captcha_type=captcha_type)\n    result = session.execute(captcha_action)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n\n### 2. Retry with Backoff Strategy\n\nFor transient failures, the system implements configurable retry logic with exponential backoff:\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `max_retries` | `3` | Maximum retry attempts |\n| `base_delay` | `1000` | Initial delay in milliseconds |\n| `backoff_factor` | `2.0` | Multiplier for each retry |\n| `jitter` | `True` | Randomization to prevent thundering herd |\n\n### 3. Graceful Degradation Strategy\n\nWhen recovery is not possible, the system performs controlled cleanup:\n\n```python\n# Graceful termination sequence\ntry:\n    session.stop()\nexcept Exception as e:\n    logger.warning(f\"Session cleanup warning: {e}\")\nfinally:\n    fallback_manager.record_final_state(error_context)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n\n## Integration with Session Management\n\nThe fallback system integrates tightly with the Notte session lifecycle:\n\n```mermaid\ngraph LR\n    A[Session Start] --> B[Agent Initialization]\n    B --> C[Task Execution]\n    C --> D{Success?}\n    D -->|Yes| E[Complete Task]\n    D -->|No| F[Fallback Check]\n    F --> G{Retryable?}\n    G -->|Yes| H[Apply Recovery]\n    G -->|No| I[Log Failure]\n    H --> C\n    I --> J[Session Cleanup]\n    E --> J\n```\n\n### Session Callback Integration\n\nThe SDK exposes callback hooks for fallback integration:\n\n```python\nsession.on_failure(callback=fallback_manager.handle_failure)\nsession.on_retry(callback=fallback_manager.prepare_retry)\nsession.on_success(callback=fallback_manager.record_success)\n```\n\n## Configuration Options\n\n| Configuration | Type | Default | Description |\n|---------------|------|---------|-------------|\n| `fallback_enabled` | `bool` | `True` | Enable/disable fallback system |\n| `max_retry_attempts` | `int` | `3` | Global retry limit |\n| `fallback_timeout_ms` | `int` | `30000` | Timeout for fallback operations |\n| `capture_screenshots` | `bool` | `True` | Screenshot on failure for debugging |\n| `verbose_logging` | `bool` | `False` | Detailed fallback logging |\n\n## Usage Patterns\n\n### Basic Usage with SDK\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Session() as session:\n    agent = client.Agent(session=session)\n    agent.start(task=\"Navigate and extract data\", url=\"https://example.com\")\n    \n    # Fallback system handles failures automatically\n    status = agent.status()\n```\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n### Custom Fallback Handler\n\n```python\nclass CustomFallbackHandler:\n    def handle_failure(self, fallback_action: FallbackAction) -> RecoveryResult:\n        # Custom logic for specific error types\n        if fallback_action.error_type == \"captcha\":\n            return RecoveryResult(strategy=\"custom_captcha_solver\")\n        return RecoveryResult(strategy=\"default\")\n```\n\n## Error Reporting and Monitoring\n\nThe fallback system generates structured error reports containing:\n\n| Field | Description |\n|-------|-------------|\n| `session_id` | Unique identifier for the session |\n| `agent_id` | Identifier of the agent that failed |\n| `error_type` | Classification of the failure |\n| `error_message` | Human-readable error description |\n| `playwright_code` | Relevant browser automation code |\n| `html_element` | DOM element context when available |\n| `timestamp` | ISO 8601 timestamp of the failure |\n| `retry_history` | Array of previous retry attempts |\n\n## Best Practices\n\n1. **Enable Verbose Logging During Development**: Set `verbose_logging=True` to capture detailed fallback behavior\n2. **Configure Appropriate Timeouts**: Match `fallback_timeout_ms` to your expected operation durations\n3. **Monitor Retry Counts**: Track `retry_count` to identify persistent issues\n4. **Preserve Error Context**: Always include `metadata` for effective debugging\n5. **Test Fallback Paths**: Regularly validate fallback behavior under failure conditions\n\n## Related Components\n\n| Component | Purpose |\n|-----------|---------|\n| `FalcoPrompt` | Agent instruction and action generation |\n| `SessionManager` | Browser session lifecycle |\n| `CaptchaSolveAction` | Specialized captcha resolution |\n| `ScrapeAction` | Data extraction with fallback support |\n| `ErrorProcessing` | Low-level error handling |\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n\n---\n\n<a id='sessions'></a>\n\n## Browser Sessions\n\n### 相关页面\n\n相关主题：[Actions and Browser Controls](#actions-controls), [Vaults and Credential Management](#vaults-credentials)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-browser/src/notte_browser/session.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/session.py)\n- [packages/notte-browser/src/notte_browser/captcha.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/captcha.py)\n- [packages/notte-browser/src/notte_browser/controller.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/controller.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-mcp/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-mcp/README.md)\n- [packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n</details>\n\n# Browser Sessions\n\n## Overview\n\nBrowser Sessions in Notte provide a managed environment for automating web interactions through a cloud-based browser infrastructure. Sessions encapsulate the state of a browser instance, allowing developers to navigate websites, interact with elements, extract data, and handle complex web automation tasks programmatically.\n\nThe session system abstracts away the complexities of browser automation, providing a high-level API for:\n- Navigating to URLs and managing browser tabs\n- Observing page elements and available actions\n- Executing automated interactions (clicks, form fills, scrolling)\n- Scraping structured and unstructured data from web pages\n- Solving CAPTCHA challenges automatically\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[Session]\n    B --> C[Browser Controller]\n    C --> D[Cloud Browser Instance]\n    E[Actions] --> B\n    B --> F[Observations]\n    B --> G[Scrape Results]\n    H[Captcha Handler] --> C\n```\n\n### Core Components\n\n| Component | Package | Responsibility |\n|-----------|---------|----------------|\n| `Session` | `notte-sdk` | High-level API for session management |\n| `BrowserController` | `notte-browser` | Low-level browser control and state |\n| `CaptchaSolver` | `notte-browser` | Automatic CAPTCHA resolution |\n| `ActionExecutor` | `notte-core` | Action execution and validation |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py]()\n资料来源：[packages/notte-browser/src/notte_browser/controller.py]()\n\n## Session Lifecycle\n\n### Starting a Session\n\nSessions can be initialized using the context manager pattern for automatic cleanup:\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\nwith client.Session() as session:\n    session.execute(type=\"goto\", url=\"https://www.example.com\")\n    # Perform actions...\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:30-40]()\n\n### Session States\n\n```mermaid\nstateDiagram-v2\n    [*] --> Idle: Client initialized\n    Idle --> Active: Session started\n    Active --> Active: Actions executed\n    Active --> Stopping: stop() called\n    Stopping --> Stopped: Cleanup complete\n    Stopped --> [*]: Context exited\n```\n\n### Stopping a Session\n\nWhen a session stops, cookies are automatically saved if configured:\n\n```python\ndef stop(self) -> None:\n    if self._cookie_file is not None:\n        try:\n            cookies = self.get_cookies()\n            create_or_append_cookies_to_file(self._cookie_file, cookies)\n        except Exception as e:\n            logger.error(f\"🍪 Error saving cookies to {self._cookie_file}: {e}\")\n    self.response = self.client.stop(session_id=self.session_id)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:50-65]()\n\n## Session Configuration\n\n### Configuration Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `timeout_minutes` | `int` | `5` | Session timeout in minutes |\n| `proxies` | `bool` | `True` | Enable proxy support |\n| `cookie_file` | `str` | `None` | Path to cookie persistence file |\n| `open_viewer` | `bool` | `False` | Open visual browser viewer |\n\n### Creating a Configured Session\n\n```python\nwith client.Session(timeout_minutes=10, open_viewer=True) as session:\n    status = session.status()\n    session.viewer()\n```\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## Page Interaction\n\n### Observation\n\nThe `observe()` method retrieves interactive elements on the current page. Notte supports two perception modes:\n\n#### Fast Perception\nA quick, simple page scan for basic element identification:\n\n```python\nobs = session.observe(perception_type='fast')\n```\n\n#### Deep Perception\nLLM-powered analysis for richer action space generation:\n\n```python\nobs = session.observe(perception_type='deep')\nprint(obs.space.description)\n```\n\n#### Focused Observation\nUse `instructions` to narrow the action space to a specific intent:\n\n```python\nactions = session.observe(instructions=\"Fill the email input\")\nprint(actions[0].model_dump())\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:90-110]()\n\n### Element Identification\n\nElements are identified using structured IDs with the format `<role_first_letter><index>[:]`:\n\n| Role Letter | Element Type |\n|-------------|--------------|\n| `I` | Input fields (textbox, select, checkbox) |\n| `B` | Buttons |\n| `L` | Links |\n| `F` | Figures and images |\n| `O` | Options in select elements |\n| `M` | Miscellaneous (modals, dialogs) |\n\nExample element ID: `I2[:]<button>` represents an input field at index 2.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md]()\n\n## Browser Actions\n\n### Action Types\n\nNotte provides comprehensive browser automation actions:\n\n#### Navigation Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `goto` | Navigate to a URL | `url: str` |\n| `goto_new_tab` | Open URL in new tab | `url: str` |\n| `close_tab` | Close current tab | - |\n| `scroll` | Scroll the page | `direction: str`, `amount: int` |\n| `scroll_to` | Scroll to element | `id: str` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py]()\n\n#### Interaction Actions\n\n| Action | Description | Parameters |\n|--------|-------------|------------|\n| `click` | Click an element | `id: str` |\n| `fill` | Fill input field | `id: str`, `value: str` |\n| `select` | Select option | `id: str`, `option: str` |\n| `check` | Check checkbox | `id: str` |\n| `press` | Press keyboard key | `key: str` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py]()\n\n#### Data Extraction Actions\n\n```python\n# Scrape entire page\nmarkdown = session.scrape()\n\n# Scrape with instructions\nresult = session.scrape(instructions=\"Extract title and price\")\n\n# Scrape only images\nsession.scrape(only_images=True)\n\n# Structured scraping with JSON schema\nsession.scrape(response_format={\"type\": \"object\", \"properties\": {...}})\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:30-60]()\n\n### Executing Actions\n\n```python\n# Get observations\nobs = session.observe()\n\n# Sample and execute an action\naction = obs.space.sample(type='click')\nresult = session.execute(action)\nassert result.success\n```\n\n资料来源：[packages/notte-sdk/README.md]()\n\n## CAPTCHA Handling\n\nNotte includes automatic CAPTCHA solving capabilities:\n\n```python\nsession.execute(type=\"captcha_solve\", captcha_type=\"recaptcha\")\nsession.execute(type=\"captcha_solve\")  # Auto-detect\n```\n\n### Supported CAPTCHA Types\n\n| Type | Description |\n|------|-------------|\n| `recaptcha` | Google reCAPTCHA |\n| `hcaptcha` | hCaptcha |\n| `image` | Image-based CAPTCHA |\n| `text` | Text-based CAPTCHA |\n| `auth0` | Auth0 CAPTCHA |\n| `cloudflare` | Cloudflare CAPTCHA |\n| `datadome` | DataDome CAPTCHA |\n| `arkose labs` | Arkose Labs CAPTCHA |\n| `geetest` | Geetest CAPTCHA |\n| `press&hold` | Press and hold challenge |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:70-95]()\n\n## MCP Server Integration\n\nNotte sessions can be accessed via the Model Context Protocol (MCP):\n\n### Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `notte_new_session` | Start a new cloud browser session |\n| `notte_list_sessions` | List all active sessions |\n| `notte_stop_session` | Stop the current session |\n| `notte_observe` | Observe elements on current page |\n| `notte_screenshot` | Take a screenshot |\n| `notte_scrape` | Extract structured data |\n| `notte_step` | Execute an action |\n\n资料来源：[packages/notte-mcp/README.md]()\n\n### Server Setup\n\n```bash\npip install notte-mcp\nexport NOTTE_API_KEY=\"your-api-key\"\npython -m notte_mcp.server\n```\n\n资料来源：[packages/notte-mcp/README.md]()\n\n## Cookie Management\n\nSessions automatically persist cookies for authenticated workflows:\n\n```python\nwith client.Session(cookie_file=\"cookies.json\") as session:\n    session.execute(type=\"goto\", url=\"https://example.com/login\")\n    # Login once - cookies saved automatically on exit\n```\n\nOn subsequent runs, cookies are loaded automatically:\n\n```python\ndef get_cookies(self) -> dict:\n    \"\"\"Load cookies from file\"\"\"\n    # Implementation handles file existence\n    pass\n\ndef create_or_append_cookies_to_file(self, cookies: dict) -> None:\n    \"\"\"Persist cookies after session\"\"\"\n    pass\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:45-65]()\n\n## Error Handling\n\n### Session Errors\n\n```python\ntry:\n    with client.Session() as session:\n        session.execute(type=\"goto\", url=\"https://example.com\")\nexcept ValueError as e:\n    # Session not started\n    print(f\"Error: {e}\")\nexcept RuntimeError as e:\n    # Session failed to close\n    print(f\"Error: {e}\")\n```\n\n### Action Execution Errors\n\n```python\nresult = session.execute(action, raise_on_failure=True)\nif not result.success:\n    print(f\"Action failed: {result.error}\")\n```\n\n### Graceful Shutdown\n\nThe context manager ensures proper cleanup even on exceptions:\n\n```python\nwith client.Session() as session:\n    try:\n        # Perform actions\n        session.execute(type=\"goto\", url=\"https://example.com\")\n    except Exception as e:\n        logger.error(f\"Session error: {e}\")\n    finally:\n        # Cleanup happens automatically\n        pass\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:50-70]()\n\n## Best Practices\n\n### Resource Management\n- Always use the `with` statement for automatic session cleanup\n- Set appropriate `timeout_minutes` based on task complexity\n- Enable `open_viewer=True` for debugging complex interactions\n\n### Performance Optimization\n- Use `perception_type='fast'` for simple, quick operations\n- Use `perception_type='deep'` when LLM interpretation is needed\n- Filter observations with `instructions` to reduce processing overhead\n\n### Reliability\n- Implement retry logic for flaky network conditions\n- Handle CAPTCHAs proactively using the built-in solver\n- Persist cookies for authenticated workflows\n\n### Security\n- Store API keys in environment variables\n- Never commit cookie files with sensitive credentials to version control\n- Rotate proxy configurations periodically\n\n## API Reference\n\n### NotteClient.Session\n\n| Method | Description |\n|--------|-------------|\n| `__enter__()` | Start session |\n| `__exit__()` | Stop session |\n| `execute()` | Execute browser action |\n| `observe()` | Get page elements |\n| `scrape()` | Extract page data |\n| `status()` | Get session status |\n| `viewer()` | Open visual viewer |\n| `cdp_url()` | Get CDP connection URL |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py]()\n\n---\n\n<a id='actions-controls'></a>\n\n## Actions and Browser Controls\n\n### 相关页面\n\n相关主题：[Browser Sessions](#sessions), [Agent Core System](#agent-core)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-core/src/notte_core/actions/actions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/actions/actions.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/sessions.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/sessions.py)\n- [packages/notte-agent/src/notte_agent/falco/prompt.py](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/prompt.py)\n- [packages/notte-agent/src/notte_agent/gufo/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/gufo/system.md)\n- [packages/notte-agent/src/notte_agent/falco/system.md](https://github.com/nottelabs/notte/blob/main/packages/notte-agent/src/notte_agent/falco/system.md)\n</details>\n\n# Actions and Browser Controls\n\n## Overview\n\nActions and Browser Controls form the core interaction layer of the Notte system, enabling AI agents to navigate, interact with, and extract data from web pages. The action system provides a structured, type-safe mechanism for executing browser operations through a unified API.\n\nActions in Notte are classified into two primary categories:\n\n1. **Browser Actions** - High-level navigation and tab management operations\n2. **Interaction Actions** - Element-level interactions such as clicking, filling forms, and solving captchas\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-100]()\n\n## Action Hierarchy\n\nNotte implements a class-based action system using Python's type system for validation and safety. All actions inherit from base classes that define common behavior.\n\n```mermaid\ngraph TD\n    A[BaseAction] --> B[BrowserAction]\n    A --> C[InteractionAction]\n    \n    B --> D[GotoAction]\n    B --> E[GotoNewTabAction]\n    B --> F[CloseTabAction]\n    \n    C --> G[ClickAction]\n    C --> H[FillAction]\n    C --> I[ScrapeAction]\n    C --> J[CaptchaSolveAction]\n    C --> K[FormFillAction]\n```\n\n### Base Classes\n\n| Class | Purpose | Key Properties |\n|-------|---------|----------------|\n| `BaseAction` | Abstract base for all actions | `type`, `description`, `param` |\n| `BrowserAction` | Navigation and tab operations | `execution_message()` |\n| `InteractionAction` | Element-level interactions | `id`, `text_label` |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:1-200]()\n\n## Browser Actions\n\nBrowser Actions manage page navigation and tab lifecycle. These actions operate at the browser level rather than the page element level.\n\n### GotoAction\n\nNavigates the current tab to a specified URL.\n\n```python\nsession.execute(type=\"goto\", url=\"https://www.example.com\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"goto\"]` | Action type identifier |\n| `url` | `str` | Target URL to navigate to |\n| `param` | `ActionParameter` | Parameter definition for LLM tooling |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:50-80]()\n\n### GotoNewTabAction\n\nOpens a URL in a new browser tab. The action returns immediately without waiting for navigation completion.\n\n```python\nsession.execute(type=\"goto_new_tab\", url=\"https://www.example.com\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"goto_new_tab\"]` | Action type identifier |\n| `url` | `str` | Target URL to open in new tab |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:82-115]()\n\n### CloseTabAction\n\nCloses the currently active browser tab.\n\n```python\nsession.execute(type=\"close_tab\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:117-140]()\n\n## Interaction Actions\n\nInteraction Actions target specific page elements identified by their DOM IDs. These actions require the agent to first observe the page to obtain valid element identifiers.\n\n### ClickAction\n\nSimulates a mouse click on a page element.\n\n```python\nsession.execute(type=\"click\", id=\"submit-button\")\nsession.execute(type=\"click\", id=\"B1\", text_label=\"Submit Form\")\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `type` | `Literal[\"click\"]` | Action type identifier |\n| `id` | `str` | Element identifier from page observation |\n| `text_label` | `str \\| None` | Optional text label for logging |\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:150-180]()\n\n### FillAction\n\nFills an input field with a specified value. By default, the field is cleared before filling.\n\n```python\nsession.execute(type=\"fill\", id=\"email-input\", value=\"user@example.com\")\nsession.execute(type=\"fill\", id=\"name-input\", value=\"John Doe\", clear_before_fill=False)\n```\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `id` | `str` | - | Element identifier |\n| `value` | `str \\| ValueWithPlaceholder` | - | Value to fill |\n| `clear_before_fill` | `bool` | `True` | Clear field before filling |\n| `text_label` | `str \\| None` | `None` | Descriptive label |\n\nThe `ValueWithPlaceholder` type allows for complex fill values with embedded placeholders that may be resolved dynamically.\n\n资料来源：[packages/notte-core/src/notte_core/actions/actions.py:182-230]()\n\n### FormFillAction\n\nSupports batch filling of multiple form fields in a single action, improving efficiency for multi-field forms.\n\n```python\nform_values = {\n    \"address1\": \"123 Main St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n}\nsession.execute(type=\"form_fill\", value=form_values)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:50-70]()\n\n### CaptchaSolveAction\n\nAttempts to solve captcha challenges detected on the page.\n\n```python\nsession.execute(type=\"captcha_solve\", captcha_type=\"recaptcha\")\n```\n\n**Supported Captcha Types:**\n- `recaptcha` - Google reCAPTCHA\n- `hcaptcha` - hCaptcha\n- Image verification challenges\n\n> **Critical Rule:** Agents must never click on captcha elements directly. When any captcha is detected, the `captcha_solve` action must be used exclusively.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md:40-60]()\n\n### ScrapeAction\n\nExtracts structured data from the current page based on natural language instructions.\n\n```python\nsession.execute(\n    type=\"scrape\",\n    instructions=\"Extract the search results from the Google search page\"\n)\n```\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:80-90]()\n\n## Action Execution Flow\n\nThe following diagram illustrates how actions flow through the Notte system from agent decision to browser execution:\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant SDK as Notte SDK\n    participant API as Notte API\n    participant Browser as Browser Engine\n    \n    Agent->>SDK: session.execute(type=\"click\", id=\"B1\")\n    SDK->>API: POST /sessions/{id}/execute\n    API->>Browser: playwright.click(\"#B1\")\n    Browser-->>API: Success/Failure\n    API-->>SDK: ExecutionResult\n    SDK-->>Agent: ExecutionResult\n    \n    Note over Agent,Browser: Action parameters validated<br/>at SDK layer\n```\n\n### Session-Level Execution\n\nActions are executed within a `Session` context that maintains browser state and provides observation capabilities:\n\n```python\nfrom notte_sdk import Notte\n\nnotte = Notte(api_key=\"your-api-key\")\nsession = notte.sessions.create()\n\n# Execute actions\nsession.execute(type=\"goto\", url=\"https://example.com\")\n\n# Observe available actions\nobs = session.observe()\nprint(obs.space.description)\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-60]()\n\n### Perception Types\n\nWhen observing available actions, the system supports different perception depths:\n\n| Perception Type | Description | Use Case |\n|-----------------|-------------|----------|\n| `fast` | Simple page perception | Quick action queries |\n| `deep` | LLM-powered element formatting | Rich, structured action space |\n\n```python\n# Fast perception for quick queries\nobs = session.observe(perception_type=\"fast\")\n\n# Deep perception for comprehensive action space\nobs = session.observe(perception_type=\"deep\")\n```\n\nThe `instructions` parameter can narrow the action space to a specific intent:\n\n```python\nactions = session.observe(instructions=\"Fill the email input\")\n```\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:40-70]()\n\n## Action Registry\n\nThe `ActionRegistry` manages available actions and generates JSON schemas for agent tooling:\n\n```python\nclass ActionRegistry:\n    def __init__(self, tools: list[BaseTool] | None = None) -> None:\n        self.tools = tools or []\n    \n    def get_schema(self, action_cls: type) -> dict[str, Any]:\n        # Generates JSON schema for action class\n```\n\nThe registry processes each tool to extract action descriptions and parameter schemas, enabling dynamic action space generation for agents.\n\n资料来源：[packages/notte-agent/src/notte_agent/falco/prompt.py:1-50]()\n\n## Element ID Format\n\nInteractive elements are referenced using a structured ID format that encodes element type and position:\n\n| Prefix | Element Type | Example |\n|--------|--------------|---------|\n| `I` | Input fields (textbox, select, checkbox) | `I1`, `I2` |\n| `B` | Buttons | `B1`, `B2` |\n| `L` | Links | `L1`, `L2` |\n| `F` | Figures and images | `F1` |\n| `O` | Options in select elements | `O1` |\n| `M` | Miscellaneous (modals, dialogs) | `M1` |\n\n> **Important:** Element IDs can and will change at each page observation. Agents must not cache or assume ID persistence across steps.\n\n资料来源：[packages/notte-agent/src/notte_agent/gufo/system.md:10-30]()\n\n## Action Response Format\n\nAll action executions return an `ExecutionResult` containing:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `success` | `bool` | Whether the action succeeded |\n| `message` | `str` | Human-readable result description |\n| `error` | `str \\| None` | Error details if failed |\n\nWhen `raise_on_failure` is set, execution will raise an exception on failure; otherwise, the result is returned with error information included.\n\n## Best Practices\n\n1. **Always observe before acting** - Use `session.observe()` to get current element IDs before executing interaction actions\n2. **Handle captchas properly** - Use `captcha_solve` when captchas are detected; never click captcha elements directly\n3. **Validate IDs per step** - Element IDs change between observations; never assume ID stability\n4. **Use batch operations** - Prefer `FormFillAction` over multiple `FillAction` calls for multi-field forms\n5. **Set appropriate perception types** - Use `fast` for quick checks, `deep` when comprehensive element understanding is needed\n\n---\n\n<a id='vaults-credentials'></a>\n\n## Vaults and Credential Management\n\n### 相关页面\n\n相关主题：[Agent Personas](#personas), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-browser/src/notte_browser/vault.py](https://github.com/nottelabs/notte/blob/main/packages/notte-browser/src/notte_browser/vault.py)\n- [packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n- [packages/notte-core/src/notte_core/credentials/types.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/types.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/vaults.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/vaults.py)\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n- [packages/notte-integrations/src/notte_integrations/credentials/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-integrations/src/notte_integrations/credentials/README.md)\n</details>\n\n# Vaults and Credential Management\n\n## Overview\n\nNotte's Vaults and Credential Management system provides a secure, centralized mechanism for storing, retrieving, and automatically injecting website credentials during browser automation tasks. The system eliminates the need for agents to manually handle authentication credentials, reducing security risks and improving automation reliability.\n\nThe vault architecture spans multiple layers:\n\n| Layer | Package | Purpose |\n|-------|---------|---------|\n| Core Types | `notte-core` | Defines credential data models and base classes |\n| Browser Integration | `notte-browser` | Handles credential injection during page interactions |\n| SDK API | `notte-sdk` | Provides REST API endpoints for vault operations |\n| External Integrations | `notte-integrations` | Supports third-party vault solutions (e.g., HashiCorp Vault) |\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[VaultsClient]\n    B --> C[Cloud Vault API]\n    C --> D[NotteVault]\n    \n    E[Agent Session] --> F[Browser Session]\n    F --> G[NotteBrowser Vault]\n    G --> D\n    \n    H[Persona] --> I[Vault Association]\n    I --> D\n    \n    J[HashiCorpVault] --> K[External Vault Server]\n    \n    D -.-> L[Credential Replacement]\n    L --> F\n```\n\n## Credential Types\n\n### Base Credential Model\n\nThe credential system is built on a flexible data model defined in `notte-core`. Credentials are identified by URL and support multiple authentication fields:\n\n```python\n# Simplified from packages/notte-core/src/notte_core/credentials/types.py\nclass Credential(BaseModel):\n    url: str                    # Target website URL\n    username: str | None = None # Username or email\n    email: str | None = None    # Email address\n    password: str | None = None # Password\n    totp_secret: str | None = None # TOTP 2FA secret\n    notes: str | None = None    # Additional notes\n    metadata: dict | None = None # Custom metadata\n```\n\n### Credential Actions\n\nWhen an agent needs to authenticate, the system creates a `CredentialAction` that describes the required credential field:\n\n```python\n# From packages/notte-core/src/notte_core/credentials/types.py\nclass CredentialAction(BaseModel):\n    url: str                          # Target URL\n    action: Literal[\"fill\", \"verify\"] # Operation type\n    field: Literal[\"username\", \"password\", \"email\", \"totp\"] # Required field\n    locator: LocatorAttributes | None = None # DOM element context\n```\n\n## Vault Implementation\n\n### Browser Vault (`notte-browser`)\n\nThe browser-side vault (`NotteBrowserVault`) manages credential lifecycle within browser sessions:\n\n```python\n# From packages/notte-browser/src/notte_browser/vault.py\nclass NotteBrowserVault:\n    def __init__(\n        self,\n        vault_id: str | None,\n        api_key: str | None,\n        server_url: str | None,\n        verbose: bool = False,\n    ) -> None:\n        self.vault_id = vault_id\n        self.vault: NotteVault | None = None\n        self._api_key = api_key\n        self._server_url = server_url\n```\n\n**Key Methods:**\n\n| Method | Purpose | Source |\n|--------|---------|--------|\n| `request_credentials()` | Retrieves credentials from vault for current URL | [vault.py:1-100]() |\n| `replace_credentials()` | Injects credentials into action attributes | [vault.py:1-100]() |\n| `add_credentials()` | Stores new credentials in vault | [vault.py:1-100]() |\n| `generate_password()` | Creates secure random passwords | [vault.py:1-100]() |\n\n### Credential Replacement Flow\n\nWhen executing form-fill actions, the vault automatically replaces credential placeholders:\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant Session\n    participant Vault\n    participant Browser\n    \n    Agent->>Session: Execute FormFillAction\n    Session->>Vault: request_credentials(url)\n    Vault->>Session: Return Credential\n    Session->>Browser: Replace placeholders with actual values\n    Browser->>Website: Submit filled form\n```\n\nThe replacement logic in `session.py` demonstrates this:\n\n```python\n# From packages/notte-browser/src/notte_browser/session.py\nif locator is not None:\n    attrs = LocatorAttributes(\n        type=await locator.get_attribute(\"type\"),\n        autocomplete=await locator.get_attribute(\"autocomplete\"),\n        outerHTML=await locator.evaluate(\"el => el.outerHTML\"),\n    )\nreturn await self.vault.replace_credentials(action, attrs, snapshot)\n```\n\n## SDK API Endpoints\n\n### VaultsClient\n\nThe `VaultsClient` provides programmatic access to vault operations:\n\n```python\n# From packages/notte-sdk/src/notte_sdk/endpoints/vaults.py\nclass VaultsClient:\n    CREATE_VAULT = \"vaults\"\n    \n    @track_usage(\"cloud.vault.create\")\n    def create(self, **data: Unpack[VaultCreateRequestDict]) -> Vault:\n        \"\"\"Create a new vault\"\"\"\n        \n    def get(self, vault_id: str) -> str:\n        \"\"\"Retrieve vault by ID\"\"\"\n        \n    @track_usage(\"cloud.vault.credentials.add\")\n    def add_or_update_credentials(\n        self, vault_id: str, **data: Unpack[AddCredentialsRequestDict]\n    ) -> AddCredentialsResponse:\n        \"\"\"Add or update credentials in vault\"\"\"\n```\n\n### API Request Models\n\n| Model | Fields | Purpose |\n|-------|--------|---------|\n| `VaultCreateRequest` | `name`, `description` | Create new vault |\n| `AddCredentialsRequest` | `url`, `username`, `email`, `password`, `totp_secret` | Add credential entry |\n| `AddCredentialsResponse` | `id`, `url`, `created_at` | Response confirmation |\n\n## Persona Integration\n\nPersonas can be associated with vaults for persistent identity management:\n\n```python\n# From packages/notte-sdk/src/notte_sdk/endpoints/personas.py\nclass NottePersona:\n    def _get_vault(self) -> NotteVault | None:\n        \"\"\"Get vault associated with this persona\"\"\"\n        if self.info.vault_id is None:\n            return None\n        return NotteVault(self.info.vault_id, _client=self.vault_client)\n    \n    def add_credentials(self, url: str) -> None:\n        \"\"\"Add credentials to the persona's vault\"\"\"\n        vault = self._get_vault()\n        password = vault.generate_password()\n        vault.add_credentials(url, email=self.info.email, password=password)\n```\n\n## External Vault Integration\n\n### HashiCorp Vault\n\nNotte supports integration with HashiCorp Vault for enterprise credential management:\n\n```python\n# From packages/notte-integrations/src/notte_integrations/credentials/README.md\nfrom notte_agent.main import Agent\nfrom notte_integrations.credentials.hashicorp.vault import HashiCorpVault\nimport os\n\nvault = HashiCorpVault(\n    url=os.getenv(\"VAULT_URL\"),\n    token=os.getenv(\"VAULT_DEV_ROOT_TOKEN_ID\")\n)\n\nvault.add_credentials(\n    url=\"https://x.com\",\n    username=os.getenv(\"TWITTER_USERNAME\"),\n    password=os.getenv(\"TWITTER_PASSWORD\")\n)\n\nagent = Agent(vault=vault)\n```\n\n**Setup Requirements:**\n\n1. Start HashiCorp Vault server:\n   ```bash\n   cd packages/notte-integrations/src/notte_integrations/credentials/hashicorp\n   docker-compose --env-file ../../../../../.env up\n   ```\n\n2. Configure environment variables:\n   ```bash\n   VAULT_URL=http://0.0.0.0:8200\n   VAULT_DEV_ROOT_TOKEN_ID=<your-token>\n   ```\n\n## Error Handling\n\nThe vault system handles credential-related errors gracefully:\n\n```python\n# From packages/notte-core/src/notte_core/errors/processing.py\nclass VaultCredentialError(NotteBaseError):\n    def __init__(self, error_message: str) -> None:\n        dev_message = \"Unexpected error while requesting credentials from vault\"\n        super().__init__(\n            agent_message=agent_message,\n            user_message=user_message,\n            dev_message=dev_message,\n        )\n```\n\n**Common Error Scenarios:**\n\n| Error | Cause | Resolution |\n|-------|-------|------------|\n| `CredentialNotFoundError` | No credentials stored for URL | Add credentials via SDK or console |\n| `VaultCredentialError` | Vault unavailable or API failure | Check API key and network connectivity |\n| `FieldMismatchError` | Vault lacks required credential field | Ensure credential has all required fields |\n\n## Usage Patterns\n\n### Basic Agent with Vault\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Vault() as vault:\n    vault.add_credentials(\n        url=\"https://github.com\",\n        email=\"user@example.com\",\n        password=\"secure-password\"\n    )\n    \n    with client.Session() as session:\n        agent = client.Agent(session=session, vault=vault, max_steps=10)\n        response = agent.run(\n            task=\"go to twitter; login and go to my messages\",\n        )\n```\n\n### Auth Vault Agent Example\n\nThe `auth-vault-agent` example demonstrates secure GitHub authentication:\n\n```python\n# From examples/auth-vault-agent/README.md\nwith client.Vault() as vault:\n    with client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n        agent = client.Agent(session=session, vault=vault, max_steps=10)\n        response = agent.run(\n            task=\"go to twitter; login and go to my messages\",\n        )\n```\n\n## Security Considerations\n\n1. **Credential Encryption**: Vaults store credentials encrypted on Notte's servers\n2. **API Key Authentication**: All vault operations require valid API key\n3. **Persona Isolation**: Each persona has its own vault for identity separation\n4. **Session Cookies**: Cookies are automatically saved and restored with vault credentials 资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/sessions.py:1-100]()\n\n## Summary\n\nNotte's Vaults and Credential Management system provides:\n\n- **Secure Storage**: Centralized credential repository with encryption\n- **Automatic Injection**: Seamless credential replacement during browser automation\n- **Multi-Provider Support**: Built-in Notte vaults and HashiCorp Vault integration\n- **Persona Association**: Per-identity credential isolation\n- **API-First Design**: Full programmatic control via SDK\n\n---\n\n<a id='personas'></a>\n\n## Agent Personas\n\n### 相关页面\n\n相关主题：[Vaults and Credential Management](#vaults-credentials), [Browser Sessions](#sessions)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n- [packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n- [packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n</details>\n\n# Agent Personas\n\nAgent Personas provide digital identities that can be attached to Agent instances, enabling automated browser interactions with unique credentials, phone numbers, and automated 2FA handling.\n\n## Overview\n\nAgent Personas are specialized identity objects that provide your AI agents with realistic digital identities for web automation tasks. They solve the common challenge of websites requiring phone number verification, email confirmation, or 2FA codes by providing automated handling of these verification steps.\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n## Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Email Addresses** | Unique email addresses associated with the persona |\n| **Phone Numbers** | Optional phone numbers for SMS verification (configurable) |\n| **Automated 2FA** | Automatic handling of two-factor authentication codes |\n| **Identity Persistence** | Persona persists across session boundaries |\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[NotteClient] --> B[Persona]\n    B --> C[Email Identity]\n    B --> D[Phone Identity]\n    B --> E[2FA Handler]\n    F[Agent] --> B\n    G[Session] --> F\n    H[Vault] --> E\n```\n\n## Usage Pattern\n\nPersonas are used as context managers alongside Sessions to provide identity context for agent operations:\n\n```python\nfrom notte_sdk import NotteClient\n\nclient = NotteClient()\n\nwith client.Persona(create_phone_number=False) as persona:\n    with client.Session(browser_type=\"chrome\", open_viewer=True) as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=15)\n        response = agent.run(\n            task=\"Open the Google form and RSVP yes with your name\",\n            url=\"https://forms.google.com/your-form-url\",\n        )\nprint(response.answer)\n```\n\n资料来源：[packages/notte-sdk/README.md](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/README.md)\n\n## Configuration Options\n\n### Persona Initialization Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `create_phone_number` | bool | `True` | Whether to provision a phone number for this persona |\n\n### Agent Configuration with Persona\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `session` | Session | Active browser session |\n| `persona` | Persona | Digital identity to attach |\n| `max_steps` | int | Maximum steps for task completion |\n\n## Credential Management\n\nPersonas integrate with Notte's credential vault system for secure storage and retrieval of authentication credentials:\n\n```mermaid\nsequenceDiagram\n    participant A as Agent\n    participant P as Persona\n    participant V as Vault\n    participant W as Website\n    \n    A->>P: Request 2FA code\n    P->>V: Retrieve credential\n    V-->>P: Credential data\n    P->>W: Submit 2FA code\n```\n\n资料来源：[packages/notte-core/src/notte_core/credentials/base.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/credentials/base.py)\n\n## API Endpoints\n\nThe Personas functionality is exposed through the SDK's endpoint interface:\n\n| Endpoint | Purpose |\n|----------|---------|\n| `personas.create()` | Create a new persona with identity credentials |\n| `personas.list()` | List available personas |\n| `personas.get()` | Retrieve persona details |\n| `personas.delete()` | Remove a persona |\n\n资料来源：[packages/notte-sdk/src/notte_sdk/endpoints/personas.py](https://github.com/nottelabs/notte/blob/main/packages/notte-sdk/src/notte_sdk/endpoints/personas.py)\n\n## Use Cases\n\n### Form Filling with Identity\n\nWhen completing web forms that require personal information:\n\n```python\nwith client.Persona() as persona:\n    with client.Session() as session:\n        agent = client.Agent(session=session, persona=persona)\n        agent.run(\n            task=\"Complete the registration form with your details\",\n            url=\"https://example.com/register\"\n        )\n```\n\n### 2FA-Protected Actions\n\nFor websites requiring two-factor authentication:\n\n```python\nwith client.Persona(create_phone_number=True) as persona:\n    with client.Session() as session:\n        agent = client.Agent(session=session, persona=persona, max_steps=20)\n        agent.run(\n            task=\"Login to your account and download your data\",\n            url=\"https://secure-site.com/dashboard\"\n        )\n```\n\n### Anonymous Browsing\n\nWhen phone verification is not needed:\n\n```python\nwith client.Persona(create_phone_number=False) as persona:\n    agent = client.Agent(persona=persona)\n    # Persona provides email without phone number\n```\n\n## Best Practices\n\n1. **Resource Management**: Always use Personas within context managers (`with` statement) to ensure proper cleanup\n2. **Phone Number Provisioning**: Disable phone number creation (`create_phone_number=False`) when only email identity is needed to reduce costs\n3. **Session Coordination**: Pair Persona usage with Session context for proper browser automation\n4. **Step Limits**: Set appropriate `max_steps` values when using Personas with complex multi-step workflows\n\n## Error Handling\n\nWhen persona-related operations fail, the SDK provides structured error responses:\n\n```python\ntry:\n    with client.Persona() as persona:\n        # operations\nexcept Exception as e:\n    # Persona errors are handled through NotteBaseError hierarchy\n    logger.error(f\"Persona operation failed: {e}\")\n```\n\n资料来源：[packages/notte-core/src/notte_core/errors/processing.py](https://github.com/nottelabs/notte/blob/main/packages/notte-core/src/notte_core/errors/processing.py)\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：nottelabs/notte\n\n摘要：发现 13 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：安装坑 - 来源证据：v1.8.8。\n\n## 1. 安装坑 · 来源证据：v1.8.8\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.8.8\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5224b46e2312471c976888e8a2f8f4a6 | https://github.com/nottelabs/notte/releases/tag/v1.8.8 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 2. 配置坑 · 来源证据：v1.8.13\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.13\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_56505da48cd74758ab7a9a1d82092e18 | https://github.com/nottelabs/notte/releases/tag/v1.8.13 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 3. 配置坑 · 来源证据：v1.8.14\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.14\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8f78a2591cea4f5aad8bfa0cb0ea15a0 | https://github.com/nottelabs/notte/releases/tag/v1.8.14 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 4. 配置坑 · 来源证据：v1.8.15\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.15\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f611f1d0dd2440af8e84e9544ab1bdb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.15 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 5. 配置坑 · 来源证据：v1.8.6\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.6\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0ed3c86ff7a34e5896a4daeb75552d4d | https://github.com/nottelabs/notte/releases/tag/v1.8.6 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 6. 配置坑 · 来源证据：v1.8.9\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.9\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6195971390e8494f88083c862aef7eb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.9 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 能力坑 · 能力判断依赖假设\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:900152988 | https://github.com/nottelabs/notte | README/documentation is current enough for a first validation pass.\n\n## 8. 运行坑 · 来源证据：v1.8.7\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：v1.8.7\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab102ac99c2441118475601c34ab0ee9 | https://github.com/nottelabs/notte/releases/tag/v1.8.7 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | last_activity_observed missing\n\n## 10. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 11. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 12. 维护坑 · 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:900152988 | https://github.com/nottelabs/notte | issue_or_pr_quality=unknown\n\n## 13. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | release_recency=unknown\n\n<!-- canonical_name: nottelabs/notte; 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项目：nottelabs/notte\n\n摘要：发现 13 个潜在踩坑项，其中 0 个为 high/blocking；最高优先级：安装坑 - 来源证据：v1.8.8。\n\n## 1. 安装坑 · 来源证据：v1.8.8\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.8.8\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5224b46e2312471c976888e8a2f8f4a6 | https://github.com/nottelabs/notte/releases/tag/v1.8.8 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 2. 配置坑 · 来源证据：v1.8.13\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.13\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_56505da48cd74758ab7a9a1d82092e18 | https://github.com/nottelabs/notte/releases/tag/v1.8.13 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 3. 配置坑 · 来源证据：v1.8.14\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.14\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8f78a2591cea4f5aad8bfa0cb0ea15a0 | https://github.com/nottelabs/notte/releases/tag/v1.8.14 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 4. 配置坑 · 来源证据：v1.8.15\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.15\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f611f1d0dd2440af8e84e9544ab1bdb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.15 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 5. 配置坑 · 来源证据：v1.8.6\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.6\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0ed3c86ff7a34e5896a4daeb75552d4d | https://github.com/nottelabs/notte/releases/tag/v1.8.6 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 6. 配置坑 · 来源证据：v1.8.9\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v1.8.9\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6195971390e8494f88083c862aef7eb6 | https://github.com/nottelabs/notte/releases/tag/v1.8.9 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 能力坑 · 能力判断依赖假设\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:900152988 | https://github.com/nottelabs/notte | README/documentation is current enough for a first validation pass.\n\n## 8. 运行坑 · 来源证据：v1.8.7\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：v1.8.7\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ab102ac99c2441118475601c34ab0ee9 | https://github.com/nottelabs/notte/releases/tag/v1.8.7 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | last_activity_observed missing\n\n## 10. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 11. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:900152988 | https://github.com/nottelabs/notte | no_demo; severity=medium\n\n## 12. 维护坑 · 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:900152988 | https://github.com/nottelabs/notte | issue_or_pr_quality=unknown\n\n## 13. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:900152988 | https://github.com/nottelabs/notte | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# notte - 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 nottelabs/notte.\n\nProject:\n- Name: notte\n- Repository: https://github.com/nottelabs/notte\n- Summary: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\n- Host target: chatgpt\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\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: 🌸 Best framework to build web agents, and deploy serverless web automation functions on reliable browser infra.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. introduction: Introduction to Notte. Produce one small intermediate artifact and wait for confirmation.\n2. quickstart: Quickstart Guide. Produce one small intermediate artifact and wait for confirmation.\n3. architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. agent-core: Agent Core System. Produce one small intermediate artifact and wait for confirmation.\n5. structured-output: Structured Output. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/nottelabs/notte\n- https://github.com/nottelabs/notte#readme\n- README.md\n- src/notte/__init__.py\n- pyproject.toml\n- .env.example\n- docs/setup.md\n- examples/quickstart.py\n- packages/notte-agent/src/notte_agent/__init__.py\n- packages/notte-browser/src/notte_browser/__init__.py\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项目：nottelabs/notte\n\n## 官方安装入口\n\n### Python / pip · 官方安装入口\n\n```bash\npip install notte\n```\n\n来源：https://github.com/nottelabs/notte#readme\n\n## 来源\n\n- repo: https://github.com/nottelabs/notte\n- docs: https://github.com/nottelabs/notte#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_ee6e6f447d8946f9a39f3a30f16f1c16"
}
