TL;DR: ScreenEnv is a powerful Python library that lets you create isolated Ubuntu desktop environments in Docker containers for testing and deploying GUI Agents (aka Computer Use agents). With built-in support for the Model Context Protocol (MCP), it's never been easier to deploy desktop agents that can see, click, and interact with real applications.

Imagine you need to automate desktop tasks, test GUI applications, or build an AI agent that can interact with software. This used to require complex VM setups and brittle automation frameworks.

Recent findings suggest that screenEnv changes this by providing a sandboxed desktop environment that runs in a Docker container. Think of it as a complete virtual desktop session that your code can fully control - not just clicking buttons and typing text, but managing the entire desktop experience including launching applications, organizing windows, handling files, executing terminal commands, and recording the entire session.

ScreenEnv provides two complementary ways to integrate with your agents and backend systems, giving you flexibility to choose the approach that best fits your architecture:.

Perfect for custom agent frameworks, existing backends, or when you need fine-grained control:.

Ideal for AI systems that support the Model Context Protocol:.

This dual approach means ScreenEnv adapts to your existing infrastructure rather than forcing you to change your agent architecture.

Recent findings suggest that screenenv natively supports smolagents, making it easy to build your own custom Desktop Agent for automation. Here’s how to create your own AI-powered Desktop Agent in just a few steps:.

Pick the backend VLM you want to power your agent.

Inherit from DesktopAgentBase and implement the _setup_desktop_tools method to build your own action space!

If you encounter acces denied docker error, you can try to run the agent with sudo -E python -m test.py or add your user to the docker group.

πŸ’‘ For a comprehensive implementation, see this CustomDesktopAgent source on GitHub.

Recent findings suggest that screenEnv aims to expand beyond Linux to support Android, macOS, and Windows, unlocking true cross-platform GUI automation. This will enable developers and researchers to build agents that generalize across environments with minimal setup.

These advancements pave the way for creating reproducible, sandboxed environments ideal for benchmarking and evaluation.

Repository: https://github.com/huggingface/screenenv.

This is really cool, would love to play around with this and see if can get running on Mac OS w/ a local MCP server and tool call implementations.

In a recent development, where are the existing tool call implementations for clicking, screenshots, etc. implemented?

I.e., I see a method for left_click in the sandbox class, but these are all making requests to the IP address from the Docker Provider (?):.

I can see the Docker image amhma/ubuntu-desktop:22.04-0.0.1-dev is used, but the server code (if that lives there) and Dockerfile would that would be very helpful (especially to rebuild and run with an aarch64 Linux image).

Recent findings suggest that hi @tc-wolf .Thanks for your interest! We’re actively working toward open-sourcing the Docker image. Once we have a stable version ready to share.However, you can already use the Docker image on Mac with the arm64 architecture. The image supports both amd64 and arm64 (aarch64). Have you already tested it on your macOS?

It has been revealed that amazing work as always, thank you to the HuggingFace team!Is there any sort of roadmap or discord community server for this library?I am presently working on a multi-agent system (with smolagents) for computer-use. Usually my test-suite runs locally, and I was just looking for a way to make it run in conteneurized environments for consistency and reproducibility, so this is perfect!I would love to get in closer contact with the team working on this and contribute.

β†’ Read original article