Repository navigation
OpenCUA-7B/32B agents: OSWorld L2 prompt, opencua action_parser, per-family history - #123
Merged
Merged
Conversation
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.
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.
Stacked on the Fara-7B PR (uses its
click_and_typeaction andrender_system_prompthook); review the last 7 commits, or after that merges.Changes
agent=OpenCUA-7Bandagent=OpenCUA-32B: XLANG's OpenCUA computer-use models, served by vLLM, with OSWorld'sSYSTEM_PROMPT_V1_L2(Thought, Action, then PyAutoGUI code), without the sudo-password sentenceopencuaaction_parser maps its PyAutoGUI andcomputer.*calls onto ours (table below); anything else is a ParseError and retried. It keeps only the first code block and the first step, so a reply that runs on into imagined steps still parsesActionParser.render_history: a per-family format for the text history (the default keeps the shared one). OpenCUA writes earlier steps in OSWorld's own template (# Step N:/## Action:): with the shared format the models copied its headers and ran on into later steps, which cost parse retries and scoremouse_tripleclick,scroll_at(move, then scroll) andkeyboard_press_repeatpyautogui.click(x, y)(clicks=2/3,button=),doubleClick,tripleClick,rightClick,middleClick,computer.triple_clickmouse_click/mouse_dblclick/mouse_tripleclick/mouse_click(button=...)moveTo(+dragTo)mouse_move(mouse_drag_and_drop)scroll(n)/hscroll(n),moveTo+scroll(n),scroll(n, x, y)scroll(...)/scroll_at(...), 100 px per clickwrite/typewrite(+click, +press('enter'))keyboard_type/click_and_type(...)press(key),hotkey(...),press(key, presses=n)keyboard_press/keyboard_press_repeatcomputer.waitnoop(wait_ms=3000)computer.terminate(success)/computer.terminate(failure)send_msg_to_user(...)/report_infeasible(...)Coordinates follow OpenCUA's convention, absolute pixels on the
smart_resized screenshot (1920x1080 is seen as 1932x1092), rescaled to the viewport and clamped; a pair inside [0, 1] is read as relative, as OSWorld does. Measured on synthetic targets served by vLLM, reading them that way cut the mean click error from ~10 to ~6 px at 1920x1080 and from ~15 to ~7 px at 2560x1440 for the 7B, with the same pattern for the 32B.Testing
tests/test_opencua_action_parser.py(98 tests): reply format, every action, malformed and runaway replies, the history template, and coordinate scaling at desktop and phone sizes, through the parser and the agent