# computer-use

> Gives your agent live eyes and hands on the desktop — screenshot, OCR, mouse, keyboard, windows and app launching via a local REST/MCP server. Works on Windows and Linux X11 with a built-in focus guard that refuses keystrokes aimed at the wrong window.

computer-use is a free AI agent skill on Agensi by Obscrum, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Obscrum](https://www.agensi.io/creators/obscrum)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/computer-use
- Tags: automation, ai-agents, python, linux, windows

## About this skill

Automating desktop tasks often fails because agents click blindly or keystrokes land in the wrong window. This skill provides a hardware-level interface for local machine control with a strict focus-validation loop to ensure actions only occur where intended.

### What it does
- **Visual perception** captures full screenshots or high-speed frames for real-time visual verification.
- **Text recognition** extracts strings from the screen or specific regions using OCR.
- **Precise input** executes mouse clicks, scrolls, and keyboard sequences including hotkeys.
- **Window management** tracks active windows by PID and handle, allowing for explicit focus and safe closing.
- **Guarded execution** prevents input leakage by validating the active window handle before typing or clicking.

### How it works
1. **Perceive** the current state by requesting a frame or OCR data to identify UI elements.
2. **Target** a specific window by listing active processes to acquire the correct window handle (HWND).
3. **Act** by sending a command with the target handle to ensure the focus has not shifted.
4. **Verify** the result by taking a follow-up screenshot to confirm the UI changed as expected.

### Frameworks & tools
The skill interfaces with a local Python-based REST server or MCP server. It supports Windows and Linux (X11) environments, utilizing native windowing APIs for window tracking and input injection.

### Why this beats prompting it yourself
Writing raw scripts for UI automation lacks a feedback loop, leading to broken flows when a window pop-up appears or focus changes. This skill implements a mandatory perception-action-verification cycle and hardware-level guards that prevent the agent from accidentally typing sensitive data into the wrong application.

### Use cases
- Automating data entry between a legacy desktop application and a web browser.
- Performing end-to-end UI testing for desktop software without writing brittle scripts.
- Orchestrating cross-app workflows like opening a file, editing it, and uploading it.

### Known limitations
Does not support macOS or Linux Wayland sessions. OCR performance on Linux is slower than Windows, and certain system-level hotkeys like Alt+F4 or Ctrl+Alt+Del are blocked for safety.

## Requires

- Python 3.10+
- Git
- Screen-control server

Linux needs an X11 session (no Wayland) and gets xdotool, wmctrl and ImageMagick from ./install-linux.sh. The server comes from github.com/Xeakaes/computer-use-for-all-agents.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the computer-use skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does the 'guarded execution' feature prevent the AI from clicking the wrong window?

This skill prevents 'input leakage' by using a focus-validation loop that verifies the specific Window Handle (HWND) or PID before executing any clicks or keystrokes, ensuring the agent doesn't interact with the wrong app if a popup appears.

### Which operating systems and AI frameworks are compatible with this skill?

The skill is compatible with Windows and Linux (X11) environments and can be integrated into any AI agent framework that supports REST or MCP (Model Context Protocol) interfaces.

### What exactly is included in the purchase of this skill?

You will receive the core skill logic, the local REST/MCP server implementation files, and a setup guide to interface the skill with your existing AI agent or LLM.

### Can this skill interact with legacy applications that don't have a public API?

Yes, the skill includes built-in visual perception and OCR capabilities that allow the agent to 'see' and read text from UI elements, making it ideal for automating legacy software without accessible APIs.

### Are there any specific desktop environments or commands that are not supported?

While the skill can perform most desktop tasks, it currently does not support macOS or Linux Wayland, and certain system-level hotkeys are restricted to prevent accidental system shutdowns or lockouts.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
