Skip to main content

Legato

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

PyPI CI License

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; offers a first task

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

Or add the MCP server to Cursor in one click (it needs uv, and uses the desktop legato setup saved): Add to Cursor

One agent, four ways in

The CLI, Python and delegated MCP tasks share the model saved by legato setup. A coding agent can also drive the desktop directly with its own model. The Mac app lets you choose its model in Settings.

How What for
Mac app Hold Fn, say the task Your own apps, no code (docs)
Terminal legato run "On Wikipedia, look up the Eiffel Tower and tell me how tall it is" 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 (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 CLI, Python and MCP 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, Remove-Item, Cmd+Q, Alt+F4...) 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 · Benchmarks · FAQ · Guides · Comparisons

For coding agents: llms.txt · AGENTS.md

Apache-2.0.

Metadata

Release files for legatolabs 0.3.5

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.5
File Size Uploaded Provenance Actions
legatolabs-0.3.5.tar.gz 1.2 MB With provenance Details for legatolabs-0.3.5.tar.gz

Built distribution (wheel)

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

Total release size: 2.3 MB

Release files / legatolabs-0.3.5.tar.gz

Download URL legatolabs-0.3.5.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f9248564ede9db5f89ddfc3ac357efa8775e2bbcad9f923eb93905c5e1e9ab62
BLAKE2b-256 checksum
How to use checksums
831e7338453218c45374e29f028074ec5be5cad8c1cbf10161129e9e109847a9
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 30, 2026.

Transparency log

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

Download URL legatolabs-0.3.5-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
88b4753b8bbac58f6ffe71da8b885c484b103bd722ab1eefe40502b922ac4f35
BLAKE2b-256 checksum
How to use checksums
a34b477c958a9d6a6dab311e3b458eead1e2fd417ea51f2cb71cef8fdfcf4051
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 30, 2026.

Transparency log

Security for legatolabs 0.3.5

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.5.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 30, 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