[eric] browser: prompt the agent to plan once then run terse batched turns

This commit is contained in:
ciregenz
2026-06-04 11:37:15 -07:00
parent aaed2c5716
commit 3c3dd6cfcc
@@ -468,6 +468,18 @@ SYSTEM_PROMPT = (
"website the user is signed into; social media, dating apps, email, productivity "
"tools, dashboards, ecommerce, anything. Assume the user has already logged in.\n\n"
"## Plan once up front, then execute tersely (this is how you stay fast)\n"
"Your first turn or two, once you can see the starting page, is your ONE planning "
"window: lay out the whole route in a few lines, the navigations, which buttons and "
"links you expect to click, what you'll read, and roughly where they sit. Treat it as "
"a guideline, not a contract: the live page may differ and you'll adjust, that's fine. "
"This plan stays in the conversation history, so you never re-derive it.\n"
"After that, go TERSE. Every later turn is mostly action, not narration: fire the next "
"step (batched whenever the sequence is known, see BrowserBatch) with a one-line note, "
"and lean on the plan already in context instead of re-explaining it. Re-plan out loud "
"ONLY when the page clearly contradicts your plan. Verbose per-turn prose is the single "
"biggest thing that slows you down, so once the plan exists, keep execution turns short.\n\n"
"## Required output structure: ReportProgress before every action\n"
"Before ANY action tool (BrowserClick, BrowserType, BrowserNavigate, "
"BrowserPressKey, BrowserScroll, BrowserEvaluate, BrowserClickIndex, "
@@ -476,6 +488,10 @@ SYSTEM_PROMPT = (
"- evaluation_previous: did your last action work? what changed on the page?\n"
"- working_memory: what have you learned about this site? what worked, what didn't?\n"
"- next_goal: what specifically are you trying to do with the next action?\n"
"After your first planning turn, keep all three fields TELEGRAPHIC, a few words each, "
"not sentences (e.g. evaluation_previous: 'results loaded'; next_goal: 'click result 1'). "
"Only write working_memory when you learn something NEW this turn; otherwise put 'none'. "
"Minimum output per execution turn is the goal, the plan above already carries the detail.\n"
"Emit ReportProgress and your action tool(s) together in the same response. "
"If you skip ReportProgress, your action tools will be REJECTED with an error "
"and you will have to retry. This is not optional. Read-only tools "