mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-07 02:07:45 +02:00
[eric] browser: orchestrator translates the OUTCOME line into a plain human confirmation; drop hardcoded task-specific examples from prompts
This commit is contained in:
@@ -409,9 +409,10 @@ BROWSER_TOOLS_SCHEMA = [
|
||||
"type": "string",
|
||||
"description": (
|
||||
"Optional. A specific button label, visible text, or CSS selector "
|
||||
"you expect to appear (e.g. 'Haik Decie', 'Write a message', "
|
||||
"'button[type=submit]'). The wait ends the moment it's present and "
|
||||
"visible. Be specific, not a generic word like 'Message'."
|
||||
"you expect to appear (e.g. the person's name you searched, a "
|
||||
"placeholder like 'Write a message', or 'button[type=submit]'). The "
|
||||
"wait ends the moment it's present and visible. Be specific, not a "
|
||||
"generic word like 'Message'."
|
||||
),
|
||||
},
|
||||
},
|
||||
@@ -795,8 +796,9 @@ SYSTEM_PROMPT = (
|
||||
"line: 'OUTCOME: DONE - <the verifiable result>' or 'OUTCOME: NOT DONE - <what is "
|
||||
"missing and why>'. The parent agent decides whether to re-dispatch another browser "
|
||||
"from that line alone, so a vague or missing outcome line costs a whole redundant "
|
||||
"agent run. For irreversible actions, DONE requires the proof you observed "
|
||||
"(e.g. 'message visible in thread at 9:31 PM'). Keep the rest of the summary brief."
|
||||
"agent run. For irreversible actions, DONE requires the proof you observed: the exact "
|
||||
"thing now on the page that confirms it, and where or when you saw it. Keep the rest "
|
||||
"of the summary brief."
|
||||
)
|
||||
|
||||
MAX_TURNS = 40
|
||||
|
||||
@@ -139,12 +139,16 @@ def _build_browser_context(dashboard_id: str | None, selected_browser_ids: list[
|
||||
"and faster than spawning one agent per item with BrowserAgents, use parallel "
|
||||
"BrowserAgents only for genuinely DIFFERENT tasks, not for the same flow repeated.",
|
||||
"",
|
||||
"**Trust the agent's OUTCOME line; don't redo its work or re-narrate it.** "
|
||||
"**Trust the agent's OUTCOME line for your DECISION; TRANSLATE it for the user.** "
|
||||
"Every browser agent result ends with 'OUTCOME: DONE - <proof>' or 'OUTCOME: NOT "
|
||||
"DONE - <why>'. DONE with proof means complete: reply to the user in 1-2 short "
|
||||
"sentences passing that proof along, and do NOT dispatch a verification agent. "
|
||||
"NOT DONE means re-dispatch with a sharper task (start from what the agent "
|
||||
"reported), not a duplicate of the old one. Long restatements of what the agent "
|
||||
"DONE - <why>'. That line is internal plumbing for YOU, never show it to the user. "
|
||||
"DONE with proof means complete: confirm it to the user the way a helpful person "
|
||||
"would, one short natural sentence saying what got done plus the human-meaningful "
|
||||
"proof from the result (the name, the time, the title). NEVER echo the literal "
|
||||
"'OUTCOME:' tag or the agent's UI mechanics (composer, textbox, element indices, "
|
||||
"'value now empty'), those mean nothing to a user; and do NOT dispatch a "
|
||||
"verification agent. NOT DONE means re-dispatch with a sharper task (start from "
|
||||
"what the agent reported), not a duplicate. Long restatements of what the agent "
|
||||
"already said just slow the user down.",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user