Commit Graph

8388 Commits

Author SHA1 Message Date
Saurav Panda 87e9537874 updated prompt for flash mode! 2026-02-05 19:45:27 -08:00
Saurav Panda 11d0f378a7 Added guidance for using network tools 2026-02-03 21:32:35 -08:00
Saurav Panda 6f6557a92b added network capture tool to agent 2026-02-03 19:37:52 -08:00
Saurav Panda 4d5794ad7d updated agent success with simple judge (#4014)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds a lightweight, always-on judge that validates agent success using
only the task and final response to reduce false positives. The full
judge now logs verdicts without changing success; the simple judge can
override success when requirements aren’t met.

- **New Features**
- Simple judge: text-only check runs at completion and flips success to
failure when the final result doesn’t fully satisfy the task; adds a
brief note to extracted content.
- New SimpleJudgeResult schema and construct_simple_judge_messages
helper.

- **Refactors**
- Full judge no longer overrides success; it attaches verdicts and logs
differences for telemetry comparison.
- Simple judge runs only when the agent self-reports success and ignores
errors to avoid unintended overrides.

<sup>Written for commit da5b4237ba.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 23:04:30 -08:00
Saurav Panda da5b4237ba fixed lint issue 2026-02-02 23:01:52 -08:00
Saurav Panda 0dba38ed95 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 22:16:11 -08:00
Saurav Panda 8565c7d267 updated agent success with simple judge 2026-02-02 22:14:45 -08:00
Saurav Panda c94f5b3d27 align agent success with simple judge (#4009)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Agent-reported success is now overridden by the simple judge. Prompts
require verification before calling done; if the judge flags failure, we
trigger one extra retry and handle no-task cases safely.

- **New Features**
- Added detailed pre_done_verification rules to standard, no_thinking,
anthropic_flash, flash, and flash_anthropic prompts.
- Judge-driven retry: one automatic retry when the simple judge
evaluates failure; safe fallback when the judge receives no task.

<sup>Written for commit bce72138c4.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 21:57:56 -08:00
Saurav Panda 65405d8a79 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 21:50:02 -08:00
Saurav Panda bce72138c4 fixed lint issue 2026-02-02 21:49:48 -08:00
Saurav Panda ba64bcc2ad added basic planing to agents (#4008)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds basic inline planning to agents. Agents now create a high‑level
plan, track progress, and can replan after stalls, improving reliability
and clarity.

- **New Features**
- Planning on by default with three settings: enable_planning,
planning_replan_on_stall, and planning_exploration_limit.
- New state: plan (list of steps), current step index, plan generation
step.
- Model output supports optional fields: current_plan_item and
plan_update. Flash mode disables planning and removes these fields.
- Plan is rendered into the agent context (<plan>) with status markers
([x], [>], [ ], [-]) and updates are applied after each step.
- Nudges: replan after N consecutive failures, and planning nudge after
N steps without a plan.
  - System prompts updated with planning instructions.
- Added CI tests for plan creation, advancement, replanning, rendering,
nudges, schemas, and edge cases.

- **Migration**
- No breaking changes. Planning is enabled by default; disable with
enable_planning=False.
- current_plan_item and plan_update are optional; consumers don’t need
changes.
  - Set planning_replan_on_stall=0 to disable replan nudges.
- Set planning_exploration_limit=0 to disable planning exploration
nudges.

<sup>Written for commit 4d5976c427.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 21:49:19 -08:00
Saurav Panda 4d5976c427 Merge branch 'main' into improve-agent-planning 2026-02-02 21:45:06 -08:00
Saurav Panda 527f21e89f Merge branch 'main' into align-agent-success-with-judge 2026-02-02 21:41:25 -08:00
Saurav Panda dae6dc6d0e update agent success with judge verdict 2026-02-02 18:34:11 -08:00
Saurav Panda 023367052c in flash mode disable planning 2026-02-02 18:28:28 -08:00
Magnus Müller 68db1d820c Update pyproject.toml (#4013)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Bump package version to 0.11.8 in pyproject.toml to prepare the next
patch release.

<sup>Written for commit 043e162b12.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
0.11.8
2026-02-02 17:59:01 -08:00
shawn pana 043e162b12 Update pyproject.toml 2026-02-02 17:58:06 -08:00
Saurav Panda 74e26e0b93 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 17:14:43 -08:00
Saurav Panda f1fbdbc1a8 removed self verify injection to agent 2026-02-02 17:10:01 -08:00
Saurav Panda 4a522a6f1c dynamic planing exploration 2026-02-02 16:26:50 -08:00
Saurav Panda 6224e19758 added fallback incase of no task for judge 2026-02-02 16:24:31 -08:00
Saurav Panda 9bb251f3d6 improved verification note 2026-02-02 16:23:45 -08:00
Saurav Panda 39d6258755 Improve Markdown Chunker (#4006)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Introduces structure-aware Markdown chunking that splits by logical
blocks and preserves context (e.g., table headers), replacing naive
truncation for more reliable extraction. Also normalizes HTML tables to
improve markdown conversion.

- **New Features**
- Added structure-aware chunker that keeps code fences, table rows, and
list items intact; prefers splitting at headers; carries table headers
into overlaps for multi-chunk tables; supports overlap lines and
start_from_char; returns MarkdownChunk with precise offsets and
has_more.
- HTMLSerializer now normalizes tables by inserting thead/tbody when the
first row has th cells.

- **Refactors**
- Extraction uses the new chunker instead of char-based truncation and
updates content_stats (truncated_at_char, next_start_char, chunk_index,
total_chunks) with clear errors when start_from_char is beyond content.
- Added tests covering chunk boundaries, table continuity, overlap
behavior, start_from_char, and end-to-end HTML→markdown→chunking.

<sup>Written for commit b88e440b75.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 16:16:25 -08:00
Saurav Panda 71e7481034 added one more retry if simple judge thinks it failed the task 2026-02-02 16:13:57 -08:00
Saurav Panda b88e440b75 Merge branch 'main' into markdown-chunking-for-extraction 2026-02-02 16:10:00 -08:00
Saurav Panda 48206d62ad fixed code style issues 2026-02-02 16:08:29 -08:00
Saurav Panda 0fa8b0a38a Improve multiact for agent (#4010)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Add two-layer page-change guards to multi_act to stop executing queued
actions after navigation and reduce stale DOM errors. Also raise the
default max_actions_per_step from 3 to 5 and update the system prompt
for safer, more efficient chaining.

- **New Features**
  - multi_act now stops remaining actions when:
    - An action is tagged terminates_sequence=True (static guard).
    - The URL or focus target changes after an action (runtime guard).
- Action registry supports terminates_sequence; enabled for navigate,
search, go_back, and switch.
- Default max_actions_per_step increased to 5; prompt updated to clarify
safe chaining and auto-skip after page changes.
- New tests cover metadata, static/runtime guards, and safe
non-navigating chains.

- **Migration**
- When registering custom actions that change the page, set
terminates_sequence=True.
  - No other changes required.

<sup>Written for commit 693bf54d84.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 16:04:18 -08:00
Saurav Panda 693bf54d84 Merge branch 'main' into experimental-improvements 2026-02-02 15:59:21 -08:00
shawn pana cd65a4dedd cli additions (#4007)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds a full set of CLI commands for cookies, waits, mouse interactions,
and data retrieval, plus local and cloud profile management with cookie
sync. Real browser mode now runs headless by default and correctly loads
Chrome profiles.

- **New Features**
- Cookie management: get/set/clear/export/import with optional URL
filter; bulk import via CDP for speed.
- Wait conditions: wait for CSS selector
(visible/hidden/attached/detached) or page text with timeouts.
- Mouse interactions: hover, double-click, and right-click by element
index (auto scrolls into view).
- Info retrieval: get title, HTML (optionally by selector), element
text/value/attributes, and bbox.
- Profiles: list local Chrome profiles; cloud profiles
(list/create/get/update/delete); view cookie counts by domain; sync
local Chrome cookies to a new cloud profile with optional --domain
filter; updated docs.
  - CLI quality: profile commands run without starting the server.

- **Migration**
  - Real browser is headless by default; pass --headed to show a window.
- Real mode uses Chrome’s user data dir with --profile mapped to the
profile directory (default "Default").
- Remote mode uses --profile as the cloud profile ID and requires
BROWSER_USE_API_KEY.
- For reusing logins, pick a specific local Chrome profile (use profile
list-local).

<sup>Written for commit 92de59c6cc.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-02 15:55:05 -08:00
Saurav Panda f88d79a3c3 fixed test for chunking 2026-02-02 15:44:05 -08:00
Saurav Panda 5babac8e82 fixed goodhart law failure 2026-02-02 14:33:26 -08:00
ShawnPana 92de59c6cc fix(cli): fix pyright type errors in CLI
- Remove invalid cdp_url parameter from create_browser_session calls
- Replace deleted GetCookiesEvent with direct _cdp_get_cookies() call
- Add type assertion for cookies_file after error check
- Use unique variable names for CDP results to avoid type conflicts
- Add type ignores for CDP typed return values used as dicts
2026-02-02 13:05:11 -08:00
Saurav Panda defe37dd28 Improve multiact for agent 2026-02-02 12:50:03 -08:00
Saurav Panda 7c05e73bbf improve markdown splitting based on header 2026-02-02 12:37:28 -08:00
Saurav Panda c33e9494c5 align agent success with simple judge 2026-02-02 12:33:27 -08:00
Saurav Panda 5ad365e31b added basic planing to agents 2026-02-02 12:28:29 -08:00
ShawnPana 4de76454a7 fix(cli): fix error check in profile sync and remove deleted event import 2026-02-02 10:57:21 -08:00
Saurav Panda 0b0adfb36c fixed parsing issue with non table data 2026-02-02 10:52:44 -08:00
ShawnPana ad47a97518 style: apply ruff formatting 2026-02-02 10:51:08 -08:00
shawn pana 7d02013b71 Merge branch 'main' into main 2026-02-02 10:47:30 -08:00
ShawnPana a961021670 refactor(cli): move CDP logic into CLI, remove events and watchdogs
Move all CLI-specific CDP logic directly into browser.py command
handlers instead of using events and watchdogs. This keeps the CLI
self-contained and avoids adding CLI-specific code to the core library.

- Remove 14 CLI-specific events from events.py
- Remove 3 watchdog files (cookies, interactions, wait)
- Remove watchdog registrations from session.py
- Implement direct CDP calls in browser.py for cookies, wait, hover,
  dblclick, rightclick, and get commands
2026-02-02 10:44:30 -08:00
Saurav Panda e66eac8a37 Improve Markdown Chunker 2026-02-02 00:05:09 -08:00
Saurav Panda 6abac049cb added extraction schema (#4005)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds extraction_schema support to enforce structured extraction when the
LLM doesn’t provide output_schema. If not set, the agent auto-derives it
from output_model_schema; explicit output_schema still takes precedence
and no schema falls back to free text.

- **New Features**
- Agent: new extraction_schema param; auto-bridged from
output_model_schema.model_json_schema() when not provided.
- Registry: whitelists and forwards extraction_schema as a special
action param.
- Tools: extract() uses extraction_schema when output_schema is absent;
act()/multi_act() thread the param through; free-text path preserved
when no schema exists.
- Tests: added CI coverage for injection, precedence over output_schema,
free-text fallback, and end-to-end threading via act().

<sup>Written for commit beefe832af.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-01 21:39:33 -08:00
Saurav Panda beefe832af Merge branch 'main' into schema-enforced-extraction-v2 2026-02-01 20:33:32 -08:00
Saurav Panda db832bcb83 added extraction schema 2026-02-01 20:26:50 -08:00
Saurav Panda 3b51ba7db6 schema enforcement in extract tool (#3996)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds schema-enforced structured extraction to the extract tool. When a
JSON Schema is provided, extraction returns validated JSON with
metadata; otherwise it falls back to free-text unchanged.

- **New Features**
- Added output_schema to ExtractAction to request structured JSON;
hidden from generated JSON schema via SkipJsonSchema to avoid Gemini
INVALID_ARGUMENT.
- New schema_dict_to_pydantic_model converts JSON Schema to a strict
Pydantic model; supports objects, arrays, nesting, enums; rejects
$ref/allOf/anyOf/oneOf/etc; only explicitly nullable fields accept null;
non-required primitives get zero defaults, arrays [], nested objects
None, and optional enum fields default to None.
- LLM extraction uses output_format to enforce the schema and returns
<structured_result> with ExtractionResult metadata (is_partial,
source_url, content_stats).
  - Invalid schemas log a warning and fall back to free-text.

- **Migration**
- Optional: pass a JSON Schema dict with top-level type "object" and
properties to get structured JSON.
- Avoid unsupported keywords ($ref, allOf, anyOf, oneOf, not,
$defs/definitions, if/then/else, dependentSchemas/dependentRequired).
  - No changes needed if you keep using free-text extraction.

<sup>Written for commit 1db41f4518.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-01 19:53:02 -08:00
Saurav Panda 1db41f4518 Merge branch 'main' into schema-enforced-extraction 2026-02-01 19:49:34 -08:00
Saurav Panda 4f39d3d79c docs: add quotes around browser-use[cli] for shell compatibility (#4002)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Add quotes around browser-use[cli] in CLI examples to prevent bracket
expansion and ensure cross-shell compatibility. Updates uvx and pip
install commands in SKILL.md.

<sup>Written for commit 00ec02ea21.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-01 16:37:24 -08:00
ShawnPana 00ec02ea21 docs: add quotes around browser-use[cli] for shell compatibility 2026-01-31 23:11:49 -08:00
Saurav Panda ba68695d65 Merge branch 'main' into schema-enforced-extraction 2026-01-31 22:47:48 -08:00