yak-browser-use 0.5.3.post1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yak_browser_use-0.5.3.post1/MANIFEST.in +2 -0
- yak_browser_use-0.5.3.post1/PKG-INFO +421 -0
- yak_browser_use-0.5.3.post1/README.md +388 -0
- yak_browser_use-0.5.3.post1/pyproject.toml +69 -0
- yak_browser_use-0.5.3.post1/setup.cfg +4 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/__main__.py +77 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/errors.py +58 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/routes.py +1202 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/server.py +61 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/service.py +402 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/api/state.py +159 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/__init__.py +41 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/daemon.py +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/discover.py +228 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/helpers.py +176 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/launcher.py +486 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/playwright_bridge.py +1727 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/profiles.py +124 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/protocols.py +41 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cdp/session.py +84 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/_init.py +33 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/logs.py +179 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/run.py +112 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/serve.py +45 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/cli/web.py +16 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/__init__.py +33 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/diff.py +327 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/generator.py +308 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/graph.py +236 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/models.py +59 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/parser.py +138 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/prepare.py +38 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/resolver.py +137 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/schema.py +155 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/compiler/step_type.py +26 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/__init__.py +61 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/conversation_loop.py +378 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/error_classifier.py +156 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/iteration_budget.py +96 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/pipeline_events.py +39 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/pipeline_tools.py +494 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/retry_utils.py +37 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/skill_tools.py +95 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/tool_executor.py +785 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/tool_guardrails.py +189 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/tools.py +46 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_harness/turn_context.py +96 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_lifecycle/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_lifecycle/compensation.py +132 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_lifecycle/guardian.py +349 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/_param_resolver.py +137 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/agent.py +303 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/delivery.py +78 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/eval_agent.py +76 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/events.py +61 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/executor.py +1023 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/ops.py +232 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/runner.py +109 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/runner_preset.py +508 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/scratchpad.py +144 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/state.py +20 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/engine/step_machine.py +180 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/llm/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/llm/client.py +179 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/llm/messages.py +38 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/params/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/params/manager.py +132 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/document-clean.md +24 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/fallback-assessment.md +21 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/navigation-guard.md +11 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/recovery-plan.md +29 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/replan-after-goal.md +26 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_archived/skill/ph-tool-generation.md +133 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/_loader.py +66 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/chat/system.md +131 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/eval_agent/js_lib.js +59 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/eval_agent/system.md +29 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/generate-handler.md +31 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guardrails/blocked.md +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guardrails/exact_failure.md +6 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guardrails/no_progress.md +5 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guardrails/same_tool_failure.md +5 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guardrails/warning_prefix.md +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guidance/error_recovery.md +19 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/guidance/tool_strategy.md +56 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/planner-expand.md +63 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/planner-plan.md +78 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/replan-on-failure.md +36 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/skill/goal-execution/SKILL.md +48 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/skill/skill-authoring/SKILL.md +77 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/prompts/skill/web-standard-paths/SKILL.md +71 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/abap-DLDM7-KI.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/apex-DNDY2TF8.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/azcli-Y6nb8tq_.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/bat-BwHxbl9M.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/bicep-CFznDFnq.js +2 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/cameligo-Bf6VGUru.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/clojure-Dnu-v4kV.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/codicon-ngg6Pgfi.ttf +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/coffee-Bd8akH9Z.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/cpp-BbWJElDN.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/csharp-Co3qMtFm.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/csp-D-4FJmMZ.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/css-DdJfP1eB.js +3 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/css.worker-B4z49cGk.js +93 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/cssMode-BKVMOhiw.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/cypher-cTPe9QuQ.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/dart-BOtBlQCF.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/dockerfile-BG73LgW2.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/ecl-BEgZUVRK.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/elixir-BkW5O-1t.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/flow9-BeJ5waoc.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/freemarker2-DTeYIFpS.js +3 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/fsharp-PahG7c26.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/go-acbASCJo.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/graphql-BxJiqAUM.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/handlebars-ClLV9qLZ.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/hcl-DtV1sZF8.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/html-CeHr6nkO.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/html.worker-DtiGdgqp.js +470 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/htmlMode-7i4spDmy.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/index-BIT5wDuc.css +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/index-CPBAgT27.js +81 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/ini-Kd9XrMLS.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/java-CXBNlu9o.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/javascript-BPUrVTmd.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/json.worker-leyajbqV.js +58 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/jsonMode-BB46bPtH.js +7 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/julia-cl7-CwDS.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/kotlin-s7OhZKlX.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/less-9HpZscsL.js +2 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/lexon-OrD6JF1K.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/liquid-DEi7G6zA.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/lspLanguageFeatures-CWVggkyz.js +4 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/lua-Cyyb5UIc.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/m3-B8OfTtLu.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/markdown-BFxVWTOG.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/mdx-Dj8j_y7K.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/mips-CiqrrVzr.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/monaco-C-jspPYF.js +906 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/monaco-CJZrZ56I.css +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/msdax-DmeGPVcC.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/mysql-C_tMU-Nz.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/objective-c-BDtDVThU.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/pascal-vHIfCaH5.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/pascaligo-DtZ0uQbO.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/perl-Ub6l9XKa.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/pgsql-BlNEE0v7.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/php-BBUBE1dy.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/pla-DSh2-awV.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/postiats-CocnycG-.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/powerquery-tScXyioY.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/powershell-COWaemsV.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/protobuf-Brw8urJB.js +2 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/pug-8SOpv6rk.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/python--7VVDvlg.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/qsharp-Bw9ernYp.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/r-j7ic8hl3.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/razor-fy4Z9muo.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/redis-Bu5POkcn.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/redshift-Bs9aos_-.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/restructuredtext-CqXO7rUv.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/ruby-zBfavPgS.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/rust-BzKRNQWT.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/sb-BBc9UKZt.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/scala-D9hQfWCl.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/scheme-BPhDTwHR.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/scss-CBJaRo0y.js +3 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/shell-DiJ1NA_G.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/solidity-Db0IVjzk.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/sophia-CnS9iZB_.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/sparql-CJmd_6j2.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/sql-ClhHkBeG.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/st-CHwy0fLd.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/swift-Bqt4WxQ4.js +3 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/systemverilog-Bs9z6M-B.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/tcl-Dm6ycUr_.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/ts.worker-59MjiAqk.js +67731 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/tsMode-CLI8G9FG.js +11 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/twig-Csy3S7wG.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/typescript-DkhtSYnQ.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/typespec-Btyra-wh.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/vb-Db0cS2oM.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/wgsl-BTesnYfV.js +298 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/xml-C_ipiDoN.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/assets/yaml-CKMSl9WO.js +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/index.html +37 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/static/monacoeditorwork/editor.worker.bundle.js +14319 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/_path_utils.py +17 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/adapters.py +244 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/captcha.py +150 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/data.py +306 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/edit_pipeline.py +160 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/extract.py +331 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/file_read.py +73 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/file_write.py +43 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/format_convert.py +198 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/record_step.py +139 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/registry.py +855 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/todo.py +39 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/tools/todo_store.py +97 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/_path.py +14 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/browser.py +58 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/logging.py +55 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/response_logger.py +119 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/skill_loader.py +404 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/utils/tool_cdp.py +84 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/workspace/__init__.py +5 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/workspace/manager.py +197 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/workspace/path_guard.py +59 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/workspace/session_store.py +196 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use/workspace/version_manager.py +231 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/PKG-INFO +421 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/SOURCES.txt +594 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/dependency_links.txt +1 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/entry_points.txt +2 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/requires.txt +15 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/scm_file_list.json +493 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/scm_version.json +8 -0
- yak_browser_use-0.5.3.post1/src/yak_browser_use.egg-info/top_level.txt +1 -0
- yak_browser_use-0.5.3.post1/tests/__init__.py +0 -0
- yak_browser_use-0.5.3.post1/tests/_debug_a11y.py +16 -0
- yak_browser_use-0.5.3.post1/tests/conftest.py +118 -0
- yak_browser_use-0.5.3.post1/tests/run_a11y_on_html.py +85 -0
- yak_browser_use-0.5.3.post1/tests/run_progressive_profile.py +145 -0
- yak_browser_use-0.5.3.post1/tests/test_a11y_snapshot.py +398 -0
- yak_browser_use-0.5.3.post1/tests/test_agent.py +0 -0
- yak_browser_use-0.5.3.post1/tests/test_api_routes.py +412 -0
- yak_browser_use-0.5.3.post1/tests/test_compiler_diff.py +346 -0
- yak_browser_use-0.5.3.post1/tests/test_compiler_generator.py +448 -0
- yak_browser_use-0.5.3.post1/tests/test_compiler_graph.py +337 -0
- yak_browser_use-0.5.3.post1/tests/test_compiler_parser.py +293 -0
- yak_browser_use-0.5.3.post1/tests/test_compiler_resolver.py +214 -0
- yak_browser_use-0.5.3.post1/tests/test_conversation_loop.py +65 -0
- yak_browser_use-0.5.3.post1/tests/test_delivery.py +92 -0
- yak_browser_use-0.5.3.post1/tests/test_error_classifier.py +83 -0
- yak_browser_use-0.5.3.post1/tests/test_events.py +124 -0
- yak_browser_use-0.5.3.post1/tests/test_exact_match.py +92 -0
- yak_browser_use-0.5.3.post1/tests/test_executor_helpers.py +383 -0
- yak_browser_use-0.5.3.post1/tests/test_file_io.py +111 -0
- yak_browser_use-0.5.3.post1/tests/test_format_convert.py +143 -0
- yak_browser_use-0.5.3.post1/tests/test_harness_tools.py +117 -0
- yak_browser_use-0.5.3.post1/tests/test_integration_agent_reform.py +543 -0
- yak_browser_use-0.5.3.post1/tests/test_iteration_budget.py +123 -0
- yak_browser_use-0.5.3.post1/tests/test_ops.py +168 -0
- yak_browser_use-0.5.3.post1/tests/test_orchestration_filter.py +196 -0
- yak_browser_use-0.5.3.post1/tests/test_param_resolver.py +291 -0
- yak_browser_use-0.5.3.post1/tests/test_path_guard.py +74 -0
- yak_browser_use-0.5.3.post1/tests/test_pipeline_tools.py +598 -0
- yak_browser_use-0.5.3.post1/tests/test_progressive.py +519 -0
- yak_browser_use-0.5.3.post1/tests/test_prompts_loader.py +24 -0
- yak_browser_use-0.5.3.post1/tests/test_registry.py +355 -0
- yak_browser_use-0.5.3.post1/tests/test_retry_utils.py +26 -0
- yak_browser_use-0.5.3.post1/tests/test_run_check.py +165 -0
- yak_browser_use-0.5.3.post1/tests/test_runner.py +155 -0
- yak_browser_use-0.5.3.post1/tests/test_runner_preset.py +436 -0
- yak_browser_use-0.5.3.post1/tests/test_schema.py +158 -0
- yak_browser_use-0.5.3.post1/tests/test_scratchpad.py +132 -0
- yak_browser_use-0.5.3.post1/tests/test_session_persist.py +165 -0
- yak_browser_use-0.5.3.post1/tests/test_state.py +53 -0
- yak_browser_use-0.5.3.post1/tests/test_step_machine.py +468 -0
- yak_browser_use-0.5.3.post1/tests/test_todo_store.py +158 -0
- yak_browser_use-0.5.3.post1/tests/test_tool_executor.py +65 -0
- yak_browser_use-0.5.3.post1/tests/test_tool_guardrails.py +79 -0
- yak_browser_use-0.5.3.post1/tests/test_turn_context.py +175 -0
- yak_browser_use-0.5.3.post1/tests/test_version_manager.py +285 -0
- yak_browser_use-0.5.3.post1/tests/test_workspace_manager.py +324 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yak-browser-use
|
|
3
|
+
Version: 0.5.3.post1
|
|
4
|
+
Summary: A clean, learnable browser automation framework — Chat mode + Preset replay via Playwright CDP
|
|
5
|
+
Author-email: SlimeSB <x56277534@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/SlimeSB/yak-browser-use
|
|
8
|
+
Project-URL: Source, https://github.com/SlimeSB/yak-browser-use
|
|
9
|
+
Project-URL: BugTracker, https://github.com/SlimeSB/yak-browser-use/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
16
|
+
Classifier: Topic :: Software Development :: Testing
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
20
|
+
Requires-Dist: ddddocr>=1.6.1
|
|
21
|
+
Requires-Dist: openai>=1.0.0
|
|
22
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
23
|
+
Requires-Dist: playwright>=1.48.0
|
|
24
|
+
Requires-Dist: pydantic>=2.0
|
|
25
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: fastapi>=0.115.0
|
|
28
|
+
Requires-Dist: uvicorn[standard]>=0.30.0
|
|
29
|
+
Requires-Dist: websockets==15.0.1
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.25.0; extra == "dev"
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<picture>
|
|
36
|
+
<source media="(prefers-color-scheme: dark)" srcset="logo.png">
|
|
37
|
+
<img src="logo.png" alt="yak-browser-use logo" width="240">
|
|
38
|
+
</picture>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<h1 align="center">Yak Browser-Use</h1>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<strong>CHAT · BROWSER · AUTOMATE</strong>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<em>An AI Agent framework that chats with you while operating the browser</em>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<img src="https://img.shields.io/badge/python-%E2%89%A53.12-blue?style=flat-square&logo=python" alt="Python ≥3.12">
|
|
53
|
+
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License">
|
|
54
|
+
<img src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" alt="Alpha">
|
|
55
|
+
<img src="https://img.shields.io/badge/Playwright-ready-45ba4b?style=flat-square&logo=playwright" alt="Playwright">
|
|
56
|
+
<img src="https://img.shields.io/badge/Electron-desktop-47848F?style=flat-square&logo=electron" alt="Electron Desktop">
|
|
57
|
+
<img src="https://img.shields.io/badge/Web%20UI-uvx-8A2BE2?style=flat-square&logo=web" alt="Web UI">
|
|
58
|
+
<a href="./README.zh-CN.md"><img src="https://img.shields.io/badge/README-中文-blue?style=flat-square" alt="中文"></a>
|
|
59
|
+
</p>
|
|
60
|
+
<p align="center">
|
|
61
|
+
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a>
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## What is Ybu?
|
|
67
|
+
|
|
68
|
+
**yak-browser-use** (aliased as **ybu**) is a browser automation AI Agent framework. Its core interaction model:
|
|
69
|
+
|
|
70
|
+
> **You chat with the Agent → Agent controls the browser → You watch it happen in real-time**
|
|
71
|
+
|
|
72
|
+
Two modes:
|
|
73
|
+
- **Chat Mode** — natural language conversational control, Agent browses while chatting
|
|
74
|
+
- **Preset Mode** — replay recorded pipelines, Agent executes pre-defined steps autonomously
|
|
75
|
+
|
|
76
|
+
Built on [Playwright](https://playwright.dev/) `connect_over_cdp()` and an OpenAI-compatible LLM client.
|
|
77
|
+
|
|
78
|
+
> **Built from the ground up.** ybu is an independent codebase with its own conversation loop, progressive snapshot engine, CDP integration, and pipeline compiler — designed entirely from scratch for this project. It has zero browser-use dependencies and shares no code with any other browser automation framework.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Features
|
|
83
|
+
|
|
84
|
+
| # | Feature | Why It Matters |
|
|
85
|
+
|---|--------|----------------|
|
|
86
|
+
| 1 | **Live DOM highlighting with cross-tab isolation** — Two-layer overlay (container + floating divs), RAF-throttled repaint, MutationObserver for lightweight re-render. Periodic background guard prevents desync across tabs. Every tab gets its own highlight state. | Most browser AI tools have no live highlights, or use inline styles that tear on scroll and leak across tabs. Ybu's system survived real production stress tests — it stays put after navigation, scroll, and SPA transitions. |
|
|
87
|
+
| 2 | **Three snapshot strategies for different page types** — `progressive` (density-adaptive DOM walk, ≤200 elements, fold dense containers with `expand_branch`) for normal pages; `a11y` (accessibility tree, works in iframes and locked DOM) for tricky pages; `simplified` (structured summary: headings, links, lists, tables, body text) for low-token overview. The LLM selects the right mode — you never worry about the choice. | Single-strategy snapshots fail on different page types (SPA, iframe-heavy, locked DOM). Three strategies maximize coverage without the LLM having to figure out the page's quirks — it just picks the right mode for the job. |
|
|
88
|
+
| 3 | **Progressive snapshot's adaptive density disclosure** — Not truncation. The walker reads the document depth-first, measures container density per depth, folds anything above threshold, and presents a flattened view with `expand_branch` handles the LLM can pull on demand. | Other frameworks truncate at N elements and lose the rest. Progressive's fold-and-expand lets the LLM see the page shape and dig into relevant sections without wasting tokens on boilerplate. |
|
|
89
|
+
| 4 | **Pipeline as byproduct** — Ybu doesn't require pre-defined pipelines. Chat first, record later. `pipeline.yaml` is a recording artifact from chat sessions, not a design starting point. Useful flows get saved and replayed. | Lowers the adoption bar: you don't plan automation flows, you just chat and the Agent writes them for you. Pipeline design emerges from real interaction instead of upfront spec. |
|
|
90
|
+
| 5 | **Shared Store dual-syntax template resolution** — `{path}` (whole-value reference, preserves type) and `${path}` (inline string interpolation, `$` prefix disambiguates from JSON braces). Designed as two separate needs, not accidental inconsistency. | Pass entire data structures between tools (`{step_3}`), or interpolate values inside URLs and templates (`https://${host}/api`). Each syntax has clear semantics and failure modes. |
|
|
91
|
+
| 6 | **Scratchpad for heavy data** — HTML dumps, screenshot base64, element lists go to in-memory scratchpad. LLM sees summaries and fetches detail on demand via `browser_source(cached=true)` or `browser_get_element_by_number(@e5)`. | Keeps the LLM context window clean without discarding data. The Agent decides what detail it needs rather than guessing up-front. |
|
|
92
|
+
| 7 | **Eval Agent + Shared Store data bridge** — The eval subagent inherits the main conversation's `shared_store`. Tools write results via `source_key`, and eval reads them through `{path}` / `${path}` template resolution. Eval can verify tool outputs inline, and tool flows can trigger eval as a verification step. | Eval is not a separate post-hoc system — it lives in the same data flow as tools. The shared store bridges tool production and eval consumption, enabling real-time verification loops. |
|
|
93
|
+
| 8 | **Three-step pipeline with programmatic checks** — Pipeline steps are `goal → ops → check`, where `check` supports `url_contains`, `element_exists`, `text_contains`, `element_visible` — deterministic programmatic verification, not LLM opinion. | Most pipeline frameworks leave verification to the LLM. Ybu's programmatic checks are fast, deterministic, and independent of LLM cost/latency — a trivial check doesn't need a model call. |
|
|
94
|
+
| 9 | **Structured error recovery ecosystem** — `error_classifier` (categorizes failures) → `retry_utils` (configurable backoff) → `turn_context` (per-turn retry counters), guided by `error_recovery` system prompt. All wired together, not ad-hoc try/except. | Real browser automation fails constantly (network timeout, element not found, CDP disconnect). A structured recovery pipeline means the Agent survives real-world chaos without dumping errors on the user. |
|
|
95
|
+
| 10 | **Guardian approval gate + circuit breaker + compensation rollback** — Three-layer safety lifecycle. Guardian gates sensitive operations for human approval, circuit breaker prevents cascading failures, compensation undoes changes on rollback. | Browser automation can break things. The safety lifecycle means destructive operations require approval, repeated failures don't cascade, and rollback is possible — not just "oops." |
|
|
96
|
+
| 11 | **Chat + Browser Sync & Streaming LLM** — User types commands → Agent operates browser → reasoning, text deltas, and tool calls stream back via WebSocket in real-time | No config files, no scripts. Just natural language driving the browser. See the Agent think as it works, not just the final result. |
|
|
97
|
+
| 12 | **Rich Browser Toolkit** — 22 browser atomics (goto, click, fill, snapshot, scroll, eval, hover, tab…) covering daily automation | Broad enough for real-world tasks, granular enough for precise control. |
|
|
98
|
+
| 13 | **Custom Tool Scripts** — Hot-load Python scripts via ToolRegistry; built-in captcha, file I/O, format conversion | Extend the agent without modifying core code. Drop in a script, it just works. |
|
|
99
|
+
| 14 | **Electron Desktop + Web UI** — React + Vite + Monaco Editor frontend with diff editor; FastAPI backend serving REST endpoints, WebSocket event streams, and static frontend. Run as Electron desktop app or `uvx yak-browser-use` for instant browser-based UI. | An IDE-like environment for building pipelines, with an API that integrates into any frontend or CI pipeline. One-command web launch removes the Electron dependency for quick demos. |
|
|
100
|
+
| 15 | **Connection Health & Session Persistence** — CDP heartbeat + process watcher + auto-disconnect handling; per-pipeline session directories with full conversation history | Keeps long-running automation alive through network blips and browser restarts. Never lose context — pick up where you left off. |
|
|
101
|
+
| 16 | **Flexible Providers** — DeepSeek / OpenAI / any OpenAI-compatible provider via flat JSON config | Use the model you want, not the one we chose for you. |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Quick Start
|
|
106
|
+
|
|
107
|
+
### Prerequisites
|
|
108
|
+
|
|
109
|
+
| Dependency | Version | Install |
|
|
110
|
+
|------------|---------|---------|
|
|
111
|
+
| Python | ≥ 3.12 | [python.org](https://python.org) |
|
|
112
|
+
| [uv](https://docs.astral.sh/uv/) | ≥ 0.4 | `powershell -c "irm https://astral.sh/uv/install.ps1 \| iex"` |
|
|
113
|
+
| Node.js | ≥ 18 | [nodejs.org](https://nodejs.org) |
|
|
114
|
+
| Chrome / Chromium | ≥ 120 | Your existing Chrome, or `uv run playwright install chromium` |
|
|
115
|
+
|
|
116
|
+
### Install
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Windows one-click
|
|
120
|
+
install.bat
|
|
121
|
+
|
|
122
|
+
# Or manual three steps
|
|
123
|
+
cd backend
|
|
124
|
+
uv sync # Install Python deps
|
|
125
|
+
uv run playwright install chromium # Install Playwright Chromium
|
|
126
|
+
cd ../electron
|
|
127
|
+
npm install # Install Electron frontend deps
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Start
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# CLI mode
|
|
134
|
+
cd backend
|
|
135
|
+
uv run python __main__.py --help
|
|
136
|
+
|
|
137
|
+
# Start REST API server
|
|
138
|
+
uv run python __main__.py serve --port 8080
|
|
139
|
+
|
|
140
|
+
# Start Web UI (browser-based, no Electron needed)
|
|
141
|
+
uv run python __main__.py web
|
|
142
|
+
# Or one-command: uvx yak-browser-use
|
|
143
|
+
|
|
144
|
+
# Start Electron desktop
|
|
145
|
+
cd electron
|
|
146
|
+
npm run electron:dev
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Configure Provider
|
|
150
|
+
|
|
151
|
+
Create `userdata/provider.json` (or configure via Electron Settings → LLM Provider):
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"model": "deepseek-chat",
|
|
156
|
+
"api_key": "sk-xxx...xxxx",
|
|
157
|
+
"api_base": "https://api.deepseek.com"
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Commands
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
ybu run <path> Execute a pipeline.yaml
|
|
167
|
+
ybu serve [--port PORT] Start the REST API server
|
|
168
|
+
ybu web Start the Web UI (browser, no Electron)
|
|
169
|
+
ybu logs [-f] [--source all] View unified logs
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
> CLI commands: `serve`, `run`, `web`, `logs`. Config via Web UI / Electron Settings (not CLI subcommands).
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## How It Works
|
|
177
|
+
|
|
178
|
+
### Two-Layer Architecture
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
┌─────────────────────────────────────────────────────┐
|
|
182
|
+
│ Orchestration Layer │
|
|
183
|
+
│ conversation_loop → LLM decides → tool_executor │
|
|
184
|
+
│ chat mode / preset mode / error recovery │
|
|
185
|
+
└──────────────────┬──────────────────────────────────┘
|
|
186
|
+
│
|
|
187
|
+
┌──────────────────▼──────────────────────────────────┐
|
|
188
|
+
│ Browser Control Layer (CDP) │
|
|
189
|
+
│ PlaywrightBridge → connect_over_cdp() → Chrome │
|
|
190
|
+
│ CDPHelpers / ToolContext / ToolCDPHelpers │
|
|
191
|
+
└─────────────────────────────────────────────────────┘
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Two Execution Modes
|
|
195
|
+
|
|
196
|
+
#### Chat Mode (Interactive)
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
POST /api/chat { message: "Open Baidu and search for coffee" }
|
|
200
|
+
└→ service.process_chat_message()
|
|
201
|
+
└→ run_conversation_loop()
|
|
202
|
+
├→ Load chat/system.md + pipeline context
|
|
203
|
+
├→ LLM call (browser_* / goal_run / todo / skill / expand_branch)
|
|
204
|
+
├→ LLM returns tool calls → tool_executor (with shared_store)
|
|
205
|
+
│ ├→ browser_goto → ops.py → PlaywrightBridge.goto()
|
|
206
|
+
│ ├→ browser_click → ops.py → PlaywrightBridge.click()
|
|
207
|
+
│ ├→ browser_snapshot → progressive/a11y/raw snapshot
|
|
208
|
+
│ └→ record_step → append to pipeline.yaml
|
|
209
|
+
└→ LLM returns text → end turn
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Key Points:**
|
|
213
|
+
- User watches the browser and types commands; Agent operates autonomously
|
|
214
|
+
- Streaming LLM response (reasoning + text) pushed in real-time
|
|
215
|
+
- WebSocket event stream: turn_start / tool_start / text_chunk
|
|
216
|
+
- Agent auto-records operation steps to pipeline.yaml
|
|
217
|
+
- Tool-to-tool data passing via shared_store (`${}` templates / `_source_key`)
|
|
218
|
+
|
|
219
|
+
#### Preset Mode (Pipeline Replay)
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
POST /api/run { pipeline: "..." }
|
|
223
|
+
└→ run_pipeline() / run_preset_loop()
|
|
224
|
+
├→ Load previously recorded pipeline.yaml
|
|
225
|
+
├→ Feed step list into conversation_loop
|
|
226
|
+
├→ System prompt = build_system_prompt() + Step list
|
|
227
|
+
├→ error_recovery.md loaded unconditionally in Agent init
|
|
228
|
+
├→ LLM sees the full step list
|
|
229
|
+
├→ Executes steps one by one with browser_* tools
|
|
230
|
+
├→ shared_store passthrough for data flow
|
|
231
|
+
└→ Guided error recovery via error_recovery.md prompt + retry utilities
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Key Points:**
|
|
235
|
+
- Repeatable automation workflow
|
|
236
|
+
- Pipeline three-step design: **goal** → **ops** (browser ops) → **check** (programmatic verification)
|
|
237
|
+
- `check` supports: `url_contains` / `element_exists` / `text_contains` / `element_visible`
|
|
238
|
+
- Pipeline context injected into system prompt for workspace awareness
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Project Structure
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
yak-browser-use/
|
|
246
|
+
├── __main__.py # CLI entry (run/serve/logs)
|
|
247
|
+
├── pyproject.toml # Project config + deps
|
|
248
|
+
│
|
|
249
|
+
├── api/ # FastAPI REST + WebSocket
|
|
250
|
+
│ ├── routes.py # Route registration
|
|
251
|
+
│ ├── service.py # Business logic
|
|
252
|
+
│ ├── server.py # Server lifecycle
|
|
253
|
+
│ └── state.py / errors.py # Engine state & error types
|
|
254
|
+
│
|
|
255
|
+
├── engine/ # Core execution engine ★
|
|
256
|
+
│ ├── agent.py # Agent entry + streaming LLM call
|
|
257
|
+
│ ├── runner.py # Chat mode runner
|
|
258
|
+
│ ├── runner_preset.py # Preset mode orchestrator
|
|
259
|
+
│ ├── executor.py # Pipeline wrappers (browser/tool/goal)
|
|
260
|
+
│ ├── ops.py # Browser op dispatcher via BrowserBridge
|
|
261
|
+
│ ├── scratchpad.py # In-memory data cache
|
|
262
|
+
│ ├── step_machine.py # Pipeline DAG walker
|
|
263
|
+
│ ├── eval_agent.py # Eval Agent for verification
|
|
264
|
+
│ ├── delivery.py / events.py / state.py
|
|
265
|
+
│ ├── _param_resolver.py # Templated param resolution
|
|
266
|
+
│ │
|
|
267
|
+
│ ├── _harness/ # Conversation loop infrastructure ★
|
|
268
|
+
│ │ ├── conversation_loop.py # Core agent turn loop
|
|
269
|
+
│ │ ├── tools.py # Tool definitions (browser_*/goal_run/…)
|
|
270
|
+
│ │ ├── tool_executor.py # Sequental dispatcher + shared_store
|
|
271
|
+
│ │ ├── pipeline_tools.py # Pipeline CRUD tools
|
|
272
|
+
│ │ ├── pipeline_events.py # Centralized WS event propagation
|
|
273
|
+
│ │ ├── iteration_budget.py # LLM turn budget control
|
|
274
|
+
│ │ ├── tool_guardrails.py # Tool call guardrails
|
|
275
|
+
│ │ ├── turn_context.py # Per-turn context (retry counters)
|
|
276
|
+
│ │ ├── error_classifier.py # Error classification
|
|
277
|
+
│ │ ├── retry_utils.py # Retry utilities
|
|
278
|
+
│ │ └── skill_tools.py # Skill injection
|
|
279
|
+
│ │
|
|
280
|
+
│ └── _lifecycle/ # Pipeline lifecycle management
|
|
281
|
+
│ ├── guardian.py # Approval gate + circuit breaker
|
|
282
|
+
│ └── compensation.py # Rollback / undo support
|
|
283
|
+
│
|
|
284
|
+
├── cdp/ # Chrome DevTools Protocol layer ★
|
|
285
|
+
│ ├── playwright_bridge.py # PlaywrightBridge — unified driver
|
|
286
|
+
│ │ # (health check / process watch / disconnect)
|
|
287
|
+
│ ├── helpers.py # CDPHelpers high-level API
|
|
288
|
+
│ ├── protocols.py # BrowserBridge protocol interface
|
|
289
|
+
│ ├── profiles.py / session.py # Profile & session management
|
|
290
|
+
│ ├── discover.py # Chrome discovery / connection
|
|
291
|
+
│ └── launcher.py # Chrome launch / port mgmt
|
|
292
|
+
│
|
|
293
|
+
├── compiler/ # Pipeline compilation
|
|
294
|
+
│ ├── models.py / schema.py # Data classes & Pydantic models
|
|
295
|
+
│ ├── parser.py # YAML parser
|
|
296
|
+
│ ├── graph.py / resolver.py# DAG builder + dependency resolver
|
|
297
|
+
│ ├── prepare.py # Pre-execution step preparation
|
|
298
|
+
│ ├── step_type.py # Unified step type inference
|
|
299
|
+
│ ├── diff.py # Op diff computation
|
|
300
|
+
│ ├── generator.py # Handler prompt & code generation
|
|
301
|
+
│
|
|
302
|
+
├── tools/ # Tool registry + implementations
|
|
303
|
+
│ ├── registry.py # ToolRegistry — central dispatch (43 tools)
|
|
304
|
+
│ ├── adapters.py # Tool data adaptation (csv↔json, field mapping)
|
|
305
|
+
│ ├── captcha.py # DOM-based CAPTCHA recognition (ddddocr)
|
|
306
|
+
│ ├── file_read.py / file_write.py / format_convert.py
|
|
307
|
+
│ ├── extract.py / data.py # Data extraction & processing
|
|
308
|
+
│ ├── todo.py / todo_store.py # Todo list management
|
|
309
|
+
│ ├── record_step.py # Pipeline step recording
|
|
310
|
+
│ ├── edit_pipeline.py # Pipeline editing with rollback
|
|
311
|
+
│ └── _path_utils.py # Path traversal prevention
|
|
312
|
+
│
|
|
313
|
+
├── llm/ # LLM client layer
|
|
314
|
+
│ ├── client.py # LLMClient — OpenAI-compatible adapter
|
|
315
|
+
│ └── messages.py # Message types (vendored OpenAI format)
|
|
316
|
+
│
|
|
317
|
+
├── prompts/ # Prompt templates (Markdown)
|
|
318
|
+
│ ├── _loader.py # Prompt loader (load_prompt / build_system_prompt)
|
|
319
|
+
│ ├── chat/system.md # Chat mode system prompt (main)
|
|
320
|
+
│ ├── eval_agent/ # Eval Agent prompts
|
|
321
|
+
│ │ ├── system.md
|
|
322
|
+
│ │ └── js_lib.js
|
|
323
|
+
│ ├── guidance/ # Strategy & recovery guidance
|
|
324
|
+
│ │ ├── tool_strategy.md # Tool selection strategy
|
|
325
|
+
│ │ └── error_recovery.md # Error recovery instructions
|
|
326
|
+
│ ├── guardrails/ # Guardrail prompt fragments
|
|
327
|
+
│ │ ├── blocked.md / exact_failure.md / no_progress.md
|
|
328
|
+
│ │ └── same_tool_failure.md / warning_prefix.md
|
|
329
|
+
│ ├── skill/ # System skills
|
|
330
|
+
│ │ ├── goal-execution/SKILL.md
|
|
331
|
+
│ │ ├── skill-authoring/SKILL.md
|
|
332
|
+
│ │ └── web-standard-paths/SKILL.md
|
|
333
|
+
│ ├── planner-plan.md / planner-expand.md
|
|
334
|
+
│ ├── replan-on-failure.md / generate-handler.md
|
|
335
|
+
│ └── _archived/ # Deprecated prompts
|
|
336
|
+
│
|
|
337
|
+
├── params/ # Persistent parameter manager (ParamManager)
|
|
338
|
+
├── workspace/ # Workspace management (manager/version/path/session)
|
|
339
|
+
│ └── session_store.py # Per-pipeline session persistence
|
|
340
|
+
├── cli/ # CLI (run.py / serve.py / logs.py / web.py)
|
|
341
|
+
├── utils/ # Utilities (browser/logging/tool_cdp/skill_loader/…)
|
|
342
|
+
├── tests/ # 800+ unit & integration tests
|
|
343
|
+
│
|
|
344
|
+
├── electron/ # Electron desktop frontend
|
|
345
|
+
│ └── src/
|
|
346
|
+
│ └── renderer/ # React + Vite + Monaco Editor (diff)
|
|
347
|
+
│
|
|
348
|
+
├── docs/ # Documentation
|
|
349
|
+
│ └── architecture-overview.md # Full architecture deep-dive
|
|
350
|
+
│
|
|
351
|
+
├── logo.png # Project logo
|
|
352
|
+
├── install.bat # Windows one-click installer
|
|
353
|
+
├── run.bat # Quick launch script
|
|
354
|
+
├── README.md # This file (English)
|
|
355
|
+
└── README.zh-CN.md # Chinese translation
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Key Design Decisions
|
|
361
|
+
|
|
362
|
+
1. **PlaywrightBridge Unified Driver** — All browser operations go through `PlaywrightBridge` (`connect_over_cdp()`), gaining auto-wait / auto-scroll / auto-retry, plus health check heartbeat, process watcher, disconnect handling, and SSRF guard. `BrowserBridge` protocol (`cdp/protocols.py`) defines the interface contract.
|
|
363
|
+
|
|
364
|
+
2. **File as Contract** — pipeline.yaml is a static contract, strictly validated at compile time (DAG cycle detection, file reference validation), minimizing surprises at runtime.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Development
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
# Create and activate venv
|
|
372
|
+
cd backend
|
|
373
|
+
uv venv
|
|
374
|
+
source .venv/bin/activate # Linux/macOS
|
|
375
|
+
.venv\Scripts\activate # Windows
|
|
376
|
+
|
|
377
|
+
# Install dev dependencies
|
|
378
|
+
uv sync --dev
|
|
379
|
+
|
|
380
|
+
# Run tests
|
|
381
|
+
uv run pytest
|
|
382
|
+
|
|
383
|
+
# Coverage
|
|
384
|
+
uv run pytest --cov=.
|
|
385
|
+
|
|
386
|
+
# Open Chrome remote debugging port
|
|
387
|
+
chrome.exe --remote-debugging-port=9222
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Dev Commands
|
|
391
|
+
|
|
392
|
+
| Command | Description |
|
|
393
|
+
|---------|-------------|
|
|
394
|
+
| `uv run python __main__.py serve --port 8080` | Start API server |
|
|
395
|
+
| `uv run python __main__.py web` | Start Web UI (browser) |
|
|
396
|
+
| `uv run python __main__.py run path/to/pipeline.yaml` | Run a pipeline |
|
|
397
|
+
| `uv run python __main__.py logs -f` | Tail logs live |
|
|
398
|
+
| `cd electron && npm run electron:dev` | Start Electron frontend |
|
|
399
|
+
| `cd electron && npm run dev:web` | Start Web frontend dev server (Vite HMR + proxy) |
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Architecture Docs
|
|
404
|
+
|
|
405
|
+
For a full architectural deep-dive (data flow diagrams, design principles, execution paths), see [`docs/architecture-overview.md`](docs/architecture-overview.md).
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## License
|
|
410
|
+
|
|
411
|
+
MIT © 2026 Yak Browser-Use Contributors
|
|
412
|
+
|
|
413
|
+
See [`ACKNOWLEDGMENTS.md`](ACKNOWLEDGMENTS.md) for project references and contributor credits.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
<p align="center">
|
|
418
|
+
<img src="logo.png" alt="yak" width="64">
|
|
419
|
+
<br/>
|
|
420
|
+
<sub>Built with yak power · Chat · Browser · Automate</sub>
|
|
421
|
+
</p>
|