Repository navigation
Fara-7B agent: native prompt, fara action_parser, click_and_type - #121
Merged
Merged
Conversation
added 2 commits
November 16, 2026 20:46
…es and optionally submits
…action_parser Microsoft's Fara-7B (Qwen2.5-VL-7B fine-tuned for web computer use) with the system prompt and tool grammar of microsoft/fara, without visit_url and web_search. A new ActionParser.render_system_prompt hook fills in the screen size per viewport (a no-op for every other parser); the fara parser maps its actions onto ours and reads coordinates as viewport pixels.
aaronsmulktis
marked this pull request as draft
November 16, 2026 23:30
added 7 commits
November 17, 2026 13:50
…eat actions Single-step forms of what PyAutoGUI agents emit: a triple click that selects a field's text, a wheel scroll over a given point, and one key pressed n times.
…ncua action_parser
… replies and coordinate scaling
…Thought ends the step A runaway reply can repeat its L2 sections and go on to the next step without a step header; the last code block was then that imagined step's. The coordinate notes now give the measured errors per model.
…r the text history None (the default) keeps the shared History section.
…late In the shared format OpenCUA copied the history's "### Thoughts:" / "### Action:" layout into its replies, often without the code, and went on into imagined steps. Earlier steps are now its Action lines under "# Step N:", followed by its instruction line, as OSWorld writes the history it keeps as text.
aaronsmulktis
marked this pull request as ready for review
November 23, 2026 21:33
OpenCUA-7B/32B agents: OSWorld L2 prompt, opencua action_parser, per-family history
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
agent=Fara-7B: Microsoft's Fara-7B (Qwen2.5-VL-7B fine-tuned for web computer use), served by vLLM, with its native prompt and tool grammarvisit_urlandweb_search(the apps are local);The screen's resolution is WxHis filled in per viewport (1932x1092 on desktop, 392x840 on phone)faraaction_parser maps Fara's actions onto ours (table below) and accepts the reference agent's fallbacks: a missing</tool_call>, Python-literal payloads,argumentsas a JSON stringclick_and_type(x, y, text, press_enter, clear): one action that clicks a field, types and optionally submits, since BrowserGym runs one action per step and Fara'stypedoes all threeActionParser.render_system_prompt(prompt, viewport): a hook for prompts that depend on the screen size; a no-op for every other parserleft_click{coordinate}mouse_click(x, y)mouse_move{coordinate}mouse_move(x, y)type{text, coordinate?, press_enter?, delete_existing_text?}click_and_type(...),press_enterdefaulting to True as in the reference agentkey{keys}keyboard_press('Control+a')scroll{pixels}scroll(0, ∓400)wait{time}noop(wait_ms=...), capped at 10 shistory_backgo_back()pause_and_memorize_factnoop()(the fact stays in the history)terminate{failure}/terminate{success}report_infeasible(...)/send_msg_to_user(...)Coordinates are read as viewport pixels: on synthetic targets served by vLLM, Fara's clicks landed within ~2 px of the target at 1920x1080 when read that way, against ~10 px when read in the resized-screenshot space the reference harness assumes.
Testing
tests/test_fara_action_parser.py(59 tests): every action, malformed replies, coordinate handling at desktop and phone sizes, and the rendered system prompt