Legato

Legato vs UI-TARS-desktop: which should you use for computer use?

UI-TARS-desktop is a desktop app and TypeScript SDK that operates your own computer, a browser or an Android device with ByteDance's UI-TARS and Seed vision models. Legato is a Python harness that drives a sandbox you attach, with any OpenAI-compatible model that returns tool calls.

Not benchmarked against each other; this page compares architecture only.

UI-TARS-desktop (@ui-tars/sdk and app) Legato (legato.Harness)
Models Any OpenAI-compatible baseURL; the prompt and parser expect UI-TARS's Thought: / Action: click(start_box=...) text format Tool calls, or JSON actions in the reply text; it does not parse UI-TARS's text format
Desktops Your local computer through nut-js; browser, Browserbase and ADB operators; remote computer and browser operators in the app E2B Desktop, or any sandbox given a screenshot function and an execute function; no local-machine operator
Interface Electron app for Windows and macOS; TypeScript SDK Python library and CLI
Wait after action App: 1 s between turns, settable from 0 to 3 s; SDK: none unless loopIntervalInMs is set; wait action: 5 s Until the screen stops changing, capped at 2 s per action
Screenshots kept Last 5, a sliding window Last 8, dropped 4 at a time
Actions per turn Every parsed action Up to 3, with one screenshot after them
Call bounds 30 s timeout per call; no retries by default; 65,535 output tokens for UI-TARS-1.5, 1,000 otherwise; 100 turns 4,096 output tokens with a cut-off note; 60 s timeout; 1 retry; 30 turns by default
License Apache-2.0 Apache-2.0

When to use UI-TARS-desktop instead

Code

# pip install "legatolabs[e2b]"
import os
import legato
from e2b_desktop import Sandbox

agent = legato.Harness(model="qwen/qwen3.8-27b", base_url="https://openrouter.ai/api/v1",
                       api_key=os.environ["OPENROUTER_API_KEY"])
desk = Sandbox.create()                     # needs E2B_API_KEY
try:
    result = agent.run("Add a Total row under the table and save", legato.attach(desk))
    print(result.report())
finally:
    desk.kill()

Sources

Edit this page on GitHub · Markdown