How microsoft/windowsagentarena works
Main Components
a. Docker Container Infrastructure:
• The project uses Docker extensively. Look at the Dockerfiles in src/win-arena-container and the build scripts in the scripts folder. There’s a base image (WinArena-Base) and a full image (WinArena).
b. Windows Virtual Machine (Golden Image):
• The “vm” directory contains everything for preparing a Windows 11 VM “golden image” – including setup scripts, unattend-files, and configuration files. This VM simulates a real Windows OS for running benchmark tasks.
c. Client/Agent Module:
• Under src/win-arena-container/client you have the evaluation framework, a desktop environment, various evaluation examples, and the implementation of AI agents (e.g., the Navi agent within the mm_agents subdirectory). This module handles running agents by interfacing with the Windows desktop environment.
d. External Integration & Services:
• API keys and external services (OpenAI or Azure OpenAI) are configured via config.json. They provide the LLM backends (for instance, GPT-4 variants) that the agents use.
e. Deployment & Orchestration Scripts:
• The scripts folder (including scripts/run-local.sh, scripts/run_azure.py, experiments.json, and Azure files) orchestrates both local deployment and cloud deployment on Azure ML Compute. This includes VM provisioning, image uploading to Azure Blob storage, and compute orchestration.
Establish Relationships and Interactions
• The Docker engine runs a container (built from the WinArena image) that encapsulates the agent environment.
• Within the container, a Windows VM is booted from the golden image (prepared through automated scripts in the vm folder). This VM runs a Windows OS with a Python server for receiving and executing agent commands.
• The client module (inside the container) sends commands to control the desktop environment within the VM. The agents (for example, the Navi agent) interact with various modules (like screen evaluators, accessibility controllers, and screen parsers in the mm_agents folder) to perform tasks.
• External APIs (OpenAI/Azure OpenAI) are contacted by specific agent modules to process language/vision tasks, and configuration files (such as config.json and experiments.json) determine the behavior of these integrations.
• For cloud execution, Azure ML orchestrates multiple compute instances. Each instance uses the startup script (compute-instance-startup.sh) and the pre-uploaded golden image from Azure Blob storage. Execution logs and agent outputs are collected back for result visualization.
Architectural Patterns and Design Principles
• Containerization: The entire environment is encapsulated in container images ensuring reproducibility.
• Modularity: Clear separation exists between environment setup (Docker and VM images), client/agent logic (desktop evaluation and mm_agents), and deployment orchestration (local scripts and Azure ML integration).
• Extensibility: The design supports “Bring Your Own Agent” (BYOA) where new agent implementations can be added under the mm_agents directory.
Relevant Technologies and Tools
• Docker – for container image building and deployment.
• QEMU/KVM – for local virtualizing a Windows 11 environment.
• Azure ML and Azure Blob Storage – for scalable cloud deployment and storage of the golden image.
• Python – the core language used in the client, agent components, and deployment scripts.
• External APIs (OpenAI/Azure OpenAI) – for LLM and vision processing capabilities.