Skip to content

Fara-7B agent: native prompt, fara action_parser, click_and_type - #121

Merged
aaronsmulktis merged 10 commits into
mainfrom
aaronsmulktis/fara-7b
Nov 25, 2026
Merged

aaronsmulktis merged 10 commits into
mainfrom
aaronsmulktis/fara-7b

Conversation

@aaronsmulktis

Copy link
Copy Markdown
Contributor

Changes

  1. 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 grammar
  2. The system prompt is microsoft/fara's, without visit_url and web_search (the apps are local); The screen's resolution is WxH is filled in per viewport (1932x1092 on desktop, 392x840 on phone)
  3. A fara action_parser maps Fara's actions onto ours (table below) and accepts the reference agent's fallbacks: a missing </tool_call>, Python-literal payloads, arguments as a JSON string
  4. click_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's type does all three
  5. ActionParser.render_system_prompt(prompt, viewport): a hook for prompts that depend on the screen size; a no-op for every other parser
Fara OpenApps
left_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_enter defaulting to True as in the reference agent
key{keys} keyboard_press('Control+a')
scroll{pixels} scroll(0, ∓400)
wait{time} noop(wait_ms=...), capped at 10 s
history_back go_back()
pause_and_memorize_fact noop() (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

  1. tests/test_fara_action_parser.py (59 tests): every action, malformed replies, coordinate handling at desktop and phone sizes, and the rendered system prompt
  2. On a cluster with vLLM: 2/2 on the smoke tasks, and clicks landed on their targets across desktop and phone runs

aaronsmulktis user added 2 commits November 16, 2026 20:46
…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.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@aaronsmulktis aaronsmulktis self-assigned this Nov 16, 2026
@aaronsmulktis
aaronsmulktis marked this pull request as draft November 16, 2026 23:30
aaronsmulktis user 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.
…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
aaronsmulktis marked this pull request as ready for review November 23, 2026 21:33

@marksibrahim marksibrahim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

OpenCUA-7B/32B agents: OSWorld L2 prompt, opencua action_parser, per-family history
@aaronsmulktis
aaronsmulktis merged commit 9982fc2 into main Nov 25, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants