Commit Graph

1481 Commits

Author SHA1 Message Date
Saurav Panda 66b4d25b35 fix filter-success guidance 2026-03-17 09:13:22 -07:00
Saurav Panda 347904198c Merge branch 'main' into fix-hallucination-ssies 2026-03-10 18:57:29 -07:00
Saurav Panda 032ee15c19 fix: add strict data grounding rules to prevent hallucination 2026-03-10 18:51:13 -07:00
Saurav Panda 990e0ce828 Merge branch 'main' into fix-duplicate-extraction 2026-03-10 16:22:10 -07:00
Saurav Panda ce25884751 fix: prevent duplicate items in multi-page extraction via already_collected parameter 2026-03-10 16:12:46 -07:00
Saurav Panda 081e4ee94f added check for hard constraints 2026-03-10 12:45:02 -07:00
Saurav Panda 2895720eb0 fix: remove unused variable assignments 2026-03-07 14:37:31 -08:00
sudhanshu112233shukla d864bd7a8e fix(agent): disable json escaping in conversation history (#3090) 2026-03-01 14:11:02 -05:00
Laith Weinberger e3ca7ea550 use cleaner example for browser state format 2026-03-01 10:23:32 -05:00
Mr-Neutr0n 66b857959c docs: fix browser state format documentation in system_prompt.md (#3782)
The system_prompt.md incorrectly documented the browser state format as:
  [index]<type>text</type>
  Example: [33]<div>User form</div>

But the actual serializer output format is:
  [index]<tagname attribute=value />
  With text content as child nodes on separate lines

This update:
- Corrects the format description to match actual DOMTreeSerializer output
- Updates examples to show realistic tree structure
- Documents |SCROLL| prefix for scrollable containers
- Documents |SHADOW(open/closed)| prefix for shadow DOM elements

Fixes #3782
2026-03-01 10:23:32 -05:00
Saurav Panda 08bf06f734 Merge branch 'main' into websocket-connection-issues 2026-02-24 17:18:33 -08:00
Saurav Panda 719d0361e5 Fix reconnection wait timeout to cover full auto-reconnect window
The circuit breaker and agent error handler were using a hardcoded 20s
timeout, but the worst-case auto-reconnect window is ~48s (3 attempts *
15s + 7s delays). Handlers would raise ConnectionError while reconnection
was still in progress. Now both use BrowserSession.RECONNECT_WAIT_TIMEOUT
(54s) derived from the actual reconnect parameters.
2026-02-23 17:47:52 -08:00
Saurav Panda abd0326a6f Add WebSocket reconnection for remote browser CDP connections 2026-02-23 16:34:21 -08:00
reformedot ed28e50806 feat: added automatic captcha solver handling via CAPTCHA watchdog 2026-02-23 10:51:02 -08:00
Saurav Panda adf3bf9f43 fixed ruff formatting issues 2026-02-21 09:42:20 -08:00
Saurav Panda cb6fce4d1c remove simple judge 2026-02-20 19:10:02 -08:00
Saurav Panda 0184d8d5ae Merge branch 'main' into cookie-accept-issue 2026-02-17 20:47:28 -08:00
Magnus Müller ae3ad7244b Merge branch 'main' into cursor/agent-event-output-truncation-bd60 2026-02-17 17:36:10 -08:00
Magnus Müller 868db5e657 Update MAX_STRING_LENGTH to 500000
Increased the maximum string length from 100K to 500K characters.
2026-02-17 17:33:50 -08:00
Cursor Agent e03a18935e Fix UnboundLocalError for action_name in multi_act exception handler
Move action_name extraction before the try block so it's always
defined when the except block references it. Previously, if
_check_stop_or_pause() raised InterruptedError before action_name
was assigned, the exception handler would fail with:

  UnboundLocalError: cannot access local variable 'action_name'
  where it is not associated with a value

Also reuse the action_data dict for the 'done' action check since
it's now available earlier in the loop.

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-18 01:24:06 +00:00
Cursor Agent cc4e5185d5 fix: truncate done_output to max length in UpdateAgentTaskEvent.from_agent()
The done_output field has max_length=100000, but agent.history.final_result()
can return arbitrarily long strings (e.g., large data extractions). This caused
Pydantic validation errors when constructing UpdateAgentTaskEvent at the end of
agent.run(), crashing the entire run even though the task itself succeeded.

Truncate done_output to MAX_STRING_LENGTH before passing to the constructor.

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-18 01:21:41 +00:00
laithrw e9c7061187 Merge branch 'main' into keep-alive-eventbus-fix 2026-02-17 16:51:54 -05:00
Saurav Panda 7833fcd137 added cookie overlay fix 2026-02-17 11:47:23 -08:00
Cursor Agent 270e418cea feat(agent): expose max_clickable_elements_length as Agent parameter
- Add max_clickable_elements_length parameter to Agent.__init__ with default 40000
- Add max_clickable_elements_length to AgentSettings
- Pass parameter through MessageManager to AgentMessagePrompt
- Bump version to 0.11.10a2

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-17 02:07:09 +00:00
Laith Weinberger 3de7f1d9c8 fix keep-alive hang 2026-02-16 19:56:41 -05:00
Saurav Panda ae3b8be538 reverted to original gaurd for multi action failure 2026-02-10 20:56:03 -08:00
Saurav Panda 8263a8d91d change max failure to 5 2026-02-10 19:12:45 -08:00
Saurav Panda 126a420dce fixed cdp error timeout detection in browser closed 2026-02-10 19:04:00 -08:00
Saurav Panda 42cbf9ca15 Changed consecutive failure to 7 2026-02-10 18:31:30 -08:00
Saurav Panda 33831f2b12 increase default consecutive failure to 5 2026-02-10 17:08:35 -08:00
Saurav Panda 07817c2c5b Fixed structured output issue with simple judge 2026-02-09 17:09:35 -08:00
laithrw 7f3e26bef0 Merge branch 'main' into fix/sensitive-data-placeholder-instructions 2026-02-09 14:30:09 -05:00
Laith Weinberger e1e170a5fd fix agent not stopping: consecutive_failures counter was resetting on multi-action error steps 2026-02-08 17:25:39 -05:00
laithrw 880b636422 Merge branch 'main' into 3895 2026-02-08 11:15:44 -05:00
Laith Weinberger 9e95241bbb stop agent if browser closed 2026-02-08 11:14:49 -05:00
ashish-cheruku ab83ee7a8a fix: improve sensitive_data placeholder instructions for LLM clarity
Fixes #3970

The LLM was typing literal placeholder names (e.g., 'user_name') instead
of wrapping them in <secret> tags (e.g., '<secret>user_name</secret>').

Changes to _get_sensitive_data_description():
- Added clear 'SENSITIVE DATA' header to draw attention
- Changed placeholder list format from Python list to bullet points
- Added explicit 'MUST' instruction emphasizing the required format
- Added concrete example using the first actual placeholder name
- Added explanation that the system will replace tags with actual values

This makes it much clearer to the LLM that it needs to wrap placeholder
names in <secret> tags for the automatic replacement mechanism to work.
2026-02-06 18:10:14 +05:30
Saurav Panda d1c9a38c00 Merge branch 'main' into message-compaction 2026-02-05 20:29:03 -08:00
Saurav Panda 6b9910a546 changed the threshold for compaction 2026-02-05 16:41:08 -08:00
Saurav Panda 79501fe2cd added message compaction for agent 2026-02-05 12:26:11 -08:00
Saurav Panda 3c57cdc756 Merge branch 'main' into update-action-loop-prompt 2026-02-05 12:08:33 -08:00
Saurav Panda 995cb0176b updated default max step to 500 2026-02-05 11:20:47 -08:00
Saurav Panda bb5914f251 added milder nudge for action loop 2026-02-05 11:17:20 -08:00
Saurav Panda 332694bf1a Added date info to simple judge 2026-02-04 17:04:39 -08:00
Saurav Panda cec4aea3bc increased threshold for loop detection 2026-02-04 16:34:42 -08:00
Saurav Panda b96b9436fc fixed agent loop detection 2026-02-03 16:00:08 -08:00
Saurav Panda bd4ead5d2e Action Loop detection 2026-02-03 15:19:59 -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 65405d8a79 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 21:50:02 -08:00