Skip to main content

Legato

The fast, open-source computer-use runtime. Bring any model.

Legato enters three invoices from a text file into a Windows desktop app

A real run on a Windows desktop, shown at 2x with the real-time clock: Legato reads three invoices from Notepad and enters them into a desktop app that has no API.

Start

Tell Claude Code, Codex or Cursor:

Set up Legato for me: https://legato.computer/setup

Or in a terminal:

pip install legatolabs
legato setup          # your model, where it works, your coding agents; then a first task

Or on a Mac, with no code: download Legato for Mac, hold Fn and say what to do.

One agent, four ways in

Choose your model once. Every way in runs the same agent with it.

How What for
Mac app Hold Fn, say the task Your own apps, no code (docs)
Terminal legato run "Find the next Caltrain from SF to Palo Alto" One task at a time, scripts, cron
Your coding agent Claude Code, Codex or Cursor gets a computer (MCP); legato setup adds it Test the app you are building, do the GUI part of a task (docs)
Python legato.run("..."), or legato.Harness(...).run(task, desktop) Your own agent, RL rollouts (docs)

Any model with an OpenAI-compatible API and vision: Qwen, Claude, GPT, Gemini, Grok, through OpenRouter or the maker's own API, or on your own GPU with vLLM (Ollama and LM Studio serve the same API; untested so far), where nothing leaves your machine (models).

Any computer (desktops):

  • In the background on your Mac (the default there): it works in one app's window while you keep using the Mac. Your mouse and keyboard stay yours.
  • Your whole screen on macOS, Windows or Linux.
  • A desktop container (Docker), a cloud desktop (E2B), or any sandbox or VM you can run a command in.
import legato

result = legato.run("On Wikipedia, look up the Eiffel Tower and tell me how tall it is")
print(result.answer)      # The Eiffel Tower is 330 metres (1,083 ft) tall.
print(result.report())    # done or failed, the turns, and where the time went

Results

Same model, same desktops, 24 office tasks per run. Method and raw data.

Model Compared with Time Success
Claude Sonnet 5.5 Anthropic's demo loop (our re-implementation, legato.Harness.reference) 1.48x faster 48/48 vs 48/48
Qwen3.8-27B OSWorld's Qwen agent same 71/96 vs 53/96

We wrote the 24 tasks (LibreOffice, a spreadsheet into a deck). The Claude row is one run of two attempts a task. Check it on your own tasks: examples/compare_with_reference.py.

Why it's fast

Most of a computer-use agent's time goes to waiting: on the model, and on the screen.

  • It waits until the screen stops changing, not a fixed 2 s after every action.
  • Up to three actions per turn, with one screenshot after them; on a Mac, one plan per turn, with a shell and AppleScript beside the screen where they are faster.
  • Screenshots go as JPEG, and old ones are dropped in chunks so the prompt cache keeps hitting.
  • A wall-clock timeout and a token budget on every model call, so nothing hangs.

Safety and limits

  • Your own screen: risky keys and typed commands (rm, sudo, Cmd+Q...) wait for your yes, and are refused when nobody can answer (an MCP server, a script; --yes allows them). It's a list, not a sandbox: a click on Delete isn't caught. Move the mouse into a corner to stop a run. --sandbox docker or a cloud desktop keeps the agent off your screen and files.
  • What it reads: a page or document on screen can try to instruct the agent (prompt injection). In the background it works in your own Safari, signed in where you are; for sites you don't trust, use --sandbox docker.
  • Your data: screenshots and the task go to the model you chose and nowhere else. Legato has no server of its own and sends no telemetry.
  • Limits you set: timeout_s and max_steps bound a run, and result.status says how it ended (Python).
  • What it is not good at yet: tasks of many minutes across several apps, and anything that needs a drag in background mode (one app's window, Safari among browsers). It is an alpha: the API may change before 1.0.

Docs

Set up · Mac app · Coding agents (MCP) · Terminal and Python · Desktops · Models · RL rollouts · Benchmarks · FAQ · Guides · Comparisons

For coding agents: llms.txt · AGENTS.md

Apache-2.0.

Metadata

Release files for legatolabs 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for legatolabs 0.3.2
File Size Uploaded Provenance Actions
legatolabs-0.3.2.tar.gz 1.2 MB With provenance Details for legatolabs-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for legatolabs 0.3.2
File Interpreter ABI Platform Actions
legatolabs-0.3.2-py3-none-any.whl Python 3 none any Details for legatolabs-0.3.2-py3-none-any.whl

Total release size: 2.2 MB

Release files / legatolabs-0.3.2.tar.gz

Download URL legatolabs-0.3.2.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
6dadacab5803214ce1acc121e5cdd76d09e6e2635aa84ccaaf83702cc4388bbf
BLAKE2b-256 checksum
How to use checksums
14cb98ae95d4893863b1f953f6c6e400aeb6906e622db0fd56fda02cb46ce31b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / legatolabs-0.3.2-py3-none-any.whl

Download URL legatolabs-0.3.2-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd2e8ce0479b8e681adc053545cd970a38ee21c41c9db91455d842821623bc1
BLAKE2b-256 checksum
How to use checksums
cd6ee8537e9365e1a880a3b419294c12641eaec7954f80c6910d0d5b212cdb81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for legatolabs 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for legatolabs-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page