MCPcopy Index your code
hub / github.com/microsoft/UFO

github.com/microsoft/UFO @3.0.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.0.7 ↗ · + Follow
5,996 symbols 23,715 edges 520 files 5,166 documented · 86% 23 cross-repo links updated today3.0.7 · 2026-06-12★ 9,27041 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

UFO³ UFO logo : Weaving the Digital Agent Galaxy

From Single Device Agent to Multi-Device Galaxy

📖 Language / 语言: English | 中文

microsoft%2FUFO | Trendshift

arxivarxivPython VersionLicense: MITDocumentationYouTube

📚 Quick Links: 🌌 UFO³ README🖥️ UFO² README📖 Full Documentation


🎯 Choose Your Path

### Galaxy logo **UFO³ Multi-Device Agent Galaxy** **✨ NEW & RECOMMENDED** **Perfect for:** - 🔗 Cross-device collaboration workflows - 📊 Complex multi-step automation - 🎯 DAG-based task orchestration - 🌍 Heterogeneous platform integration **Key Features:** - **Constellation**: Task decomposition into executable DAGs - **Dynamic DAG editing** for adaptive workflow evolution - **Asynchronous execution** with parallel task coordination - **Unified AIP protocol** for secure agent communication **📖 [Galaxy Documentation →](./galaxy/README.md)** **📖 [Galaxy Quick Start →](https://microsoft.github.io/UFO/getting_started/quick_start_galaxy/)** ⭐ **Online Docs** ### UFO² logo **UFO² Desktop AgentOS** **STABLE & BATTLE-TESTED** **Perfect for:** - 💻 Single Windows automation - ⚡ Quick task execution - 🎓 Learning agent basics - 🛠️ Simple workflows **Key Features:** - Deep Windows OS integration - Hybrid GUI + API actions - Proven reliability - Easy setup - Can serve as Galaxy device agent **📖 [UFO² Documentation →](./ufo/README.md)**

🎬 See UFO³ Galaxy in Action

Watch how UFO³ Galaxy orchestrates complex workflows across multiple devices:

UFO³ Galaxy Demo

🎥 Click to watch: Cross-device task orchestration with UFO³ Galaxy


🌟 What's New in UFO³?

Evolution Timeline

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#E8F4F8','primaryTextColor':'#1A1A1A','primaryBorderColor':'#7CB9E8','lineColor':'#A8D5E2','secondaryColor':'#B8E6F0','tertiaryColor':'#D4F1F4','fontSize':'16px','fontFamily':'Segoe UI, Arial, sans-serif'}}}%%
graph LR
    A["<b>🎈 UFO</b>

<span style='font-size:14px'>February 2024</span>

<span style='font-size:13px; color:#666'><i>GUI Agent for Windows</i></span>"] 
    B["<b>🖥️ UFO²</b>

<span style='font-size:14px'>April 2025</span>

<span style='font-size:13px; color:#666'><i>Desktop AgentOS</i></span>"]
    C["<b>🌌 UFO³ Galaxy</b>

<span style='font-size:14px'>November 2025</span>

<span style='font-size:13px; color:#666'><i>Multi-Device Orchestration</i></span>"]

    A -->|Evolve| B
    B -->|Scale| C

    style A fill:#E8F4F8,stroke:#7CB9E8,stroke-width:2.5px,color:#1A1A1A,rx:15,ry:15
    style B fill:#C5E8F5,stroke:#5BA8D0,stroke-width:2.5px,color:#1A1A1A,rx:15,ry:15
    style C fill:#A4DBF0,stroke:#3D96BE,stroke-width:2.5px,color:#1A1A1A,rx:15,ry:15

🚀 UFO³ = Galaxy (Multi-Device Orchestration) + UFO² (Device Agent)

UFO³ introduces Galaxy, a revolutionary multi-device orchestration framework that coordinates intelligent agents across heterogeneous platforms. Built on five tightly integrated design principles:

  1. 🌟 Declarative Decomposition into Dynamic DAG - Requests decomposed into structured DAG with TaskStars and dependencies for automated scheduling and runtime rewriting

  2. 🔄 Continuous Result-Driven Graph Evolution - Living constellation that adapts to execution feedback through controlled rewrites and dynamic adjustments

  3. ⚡ Heterogeneous, Asynchronous & Safe Orchestration - Capability-based device matching with async execution, safe locking, and formally verified correctness

  4. 🔌 Unified Agent Interaction Protocol (AIP) - WebSocket-based secure coordination layer with fault tolerance and automatic reconnection

  5. 🛠️ Template-Driven MCP-Empowered Device Agents - Lightweight toolkit for rapid agent development with MCP integration for tool augmentation

Aspect UFO² UFO³ Galaxy
Architecture Single Windows Agent Multi-Device Orchestration
Task Model Sequential ReAct Loop DAG-based Constellation Workflows
Scope Single device, multi-app Multi-device, cross-platform
Coordination HostAgent + AppAgents ConstellationAgent + TaskOrchestrator
Device Support Windows Desktop Windows, Linux, Android (more coming)
Task Planning Application-level Device-level with dependencies
Execution Sequential Parallel DAG execution
Device Agent Role Standalone Can serve as Galaxy device agent
Complexity Simple to Moderate Simple to Very Complex
Learning Curve Low Moderate
Cross-Device Collaboration ❌ Not Supported ✅ Core Feature
Setup Difficulty ✅ Easy ⚠️ Moderate
Status ✅ LTS (Long-Term Support) ⚡ Active Development

🎓 Migration Path

For UFO² Users: 1. ✅ Keep using UFO² – Fully supported, actively maintained 2. 🔄 Gradual adoption – Galaxy can use UFO² as Windows device agent 3. 📈 Scale up – Move to Galaxy when you need multi-device capabilities 4. 📚 Learning resourcesMigration Guide


✨ Capabilities at a Glance

🌌 Galaxy Framework – What's Different?

#### 🌟 Constellation Planning
User Request
     ↓
ConstellationAgent
     ↓
  [Task DAG]
   /   |   \
Task1 Task2 Task3
(Win) (Linux)(Mac)
**Benefits:** - Cross-device dependency tracking - Parallel execution optimization - Cross-device dataflow management
#### 🎯 Device Assignment
Selection Criteria
  • Platform
  • Resource
  • Task requirements
  • Performance history
        ↓
  Auto-Assignment
        ↓
  Optimal Devices
**Smart Matching:** - Capability-based selection - Real-time resource monitoring - Dynamic reallocation
#### 📊 Orchestration
Task1 → Running  ✅
Task2 → Pending  ⏸️
Task3 → Running  🔄
        ↓
   Completion
        ↓
   Final Report
**Orchestration:** - Real-time status updates - Automatic error recovery - Progress tracking with feedback

🪟 UFO² Desktop AgentOS – Core Strengths

UFO² serves dual roles: standalone Windows automation and Galaxy device agent for Windows platforms.

Feature Description Documentation
Deep OS Integration Windows UIA, Win32, WinCOM native control Learn More
Hybrid Actions GUI clicks + API calls for optimal performance Learn More
Speculative Multi-Action Batch predictions → 51% fewer LLM calls Learn More
Visual + UIA Detection Hybrid control detection for robustness Learn More
Knowledge Substrate RAG with docs, demos, execution traces Learn More
Device Agent Role Can serve as Windows executor in Galaxy orchestration Learn More

As Galaxy Device Agent: - Receives tasks from ConstellationAgent via Galaxy orchestration layer - Executes Windows-specific operations using proven UFO² capabilities - Reports status and results back to TaskOrchestrator - Participates in cross-device workflows seamlessly


🚀 Quick Start Guide

Choose your path and follow the detailed setup guide:

### 🌌 Galaxy Quick Start **For cross-device orchestration**
# 1. Install
pip install -r requirements.txt

# 2. Configure ConstellationAgent
copy config\galaxy\agent.yaml.template config\galaxy\agent.yaml
# Edit and add your API keys

# 3. Configure devices
# Edit config\galaxy\devices.yaml to register your devices

# 4. Start device agents (with platform flags)
# Windows: Start server + client
# Linux: Start server + MCP servers + client  
# Mobile (Android): Start server + MCP servers + client
# See platform-specific guides for detailed setup

# 5. Launch Galaxy
python -m galaxy --interactive
**📖 Complete Guide:** - [Galaxy README](./galaxy/README.md) – Architecture & concepts - [Online Quick Start](https://microsoft.github.io/UFO/getting_started/quick_start_galaxy/) – Step-by-step tutorial - [Windows Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_ufo2/) - [Linux Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_linux/) - [Mobile Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_mobile/) – Android agent setup - [Configuration](https://microsoft.github.io/UFO/configuration/system/galaxy_devices/) – Device pool configuration
### 🪟 UFO² Quick Start **For Windows automation**
# 1. Install
pip install -r requirements.txt

# 2. Configure
copy config\ufo\agents.yaml.template config\ufo\agents.yaml
# Edit and add your API keys

# 3. Run
python -m ufo --task <task_name>
**📖 Complete Guide:** - [UFO² README](./ufo/README.md) – Full documentation - [Configuration Guide](./ufo/README.md#️-step-2-configure-the-llms) – LLM setup - [Advanced Features](https://microsoft.github.io/UFO/advanced_usage/overview/) – Multi-action, RAG

📋 Common Configuration

Both frameworks require LLM API configuration. Choose your provider:

OpenAI Configuration

For Galaxy (config/galaxy/agent.yaml):

CONSTELLATION_AGENT:
  REASONING_MODEL: false
  API_TYPE: "openai"
  API_BASE: "https://api.openai.com/v1/chat/completions"
  API_KEY: "sk-your-key-here"
  API_MODEL: "gpt-4o"

For UFO² (config/ufo/agents.yaml):

VISUAL_MODE: True
API_TYPE: "openai"
API_BASE: "https://api.openai.com/v1/chat/completions"
API_KEY: "sk-your-key-here"
API_MODEL: "gpt-4o"

Azure OpenAI Configuration

For Galaxy (config/galaxy/agent.yaml):

CONSTELLATION_AGENT:
  REASONING_MODEL: false
  API_TYPE: "aoai"
  API_BASE: "https://YOUR-RESOURCE.openai.azure.com"
  API_KEY: "your-azure-key"
  API_MODEL: "gpt-4o"
  API_DEPLOYMENT_ID: "your-deployment-id"

For UFO² (config/ufo/agents.yaml):

VISUAL_MODE: True
API_TYPE: "aoai"
API_BASE: "https://YOUR-RESOURCE.openai.azure.com"
API_KEY: "your-azure-key"
API_MODEL: "gpt-4o"
API_DEPLOYMENT_ID: "your-deployment-id"

💡 More LLM Options: See Model Configuration Guide for Qwen, Gemini, Claude, and more.


📚 Documentation Structure

### 🌌 Galaxy Documentation - **[Galaxy Framework Overview](./galaxy/README.md)** ⭐ **Start Here** – Architecture & technical concepts - **[Quick Start Tutorial](https://microsoft.github.io/UFO/getting_started/quick_start_galaxy/)** – Get running in minutes - **[Galaxy Client](https://microsoft.github.io/UFO/galaxy/client/overview/)** – Device coordination and API - **[Constellation Agent](https://microsoft.github.io/UFO/galaxy/constellation_agent/overview/)** – Task decomposition and planning - **[Task Orchestrator](https://microsoft.github.io/UFO/galaxy/constellation_orchestrator/overview/)** – Execution engine - **[Task Constellation](https://microsoft.github.io/UFO/galaxy/constellation/overview/)** – DAG structure - **[Agent Registration](https://microsoft.github.io/UFO/galaxy/agent_

Extension points exported contracts — how you extend this code

StarConfig (Interface)
(no doc)
galaxy/webui/frontend/src/components/layout/StarfieldOverlay.tsx
ShootingStarConfig (Interface)
(no doc)
galaxy/webui/frontend/src/components/layout/StarfieldOverlay.tsx
AddDeviceModalProps (Interface)
(no doc)
galaxy/webui/frontend/src/components/devices/AddDeviceModal.tsx
DeviceFormData (Interface)
(no doc)
galaxy/webui/frontend/src/components/devices/AddDeviceModal.tsx
MessageBubbleProps (Interface)
(no doc)
galaxy/webui/frontend/src/components/chat/MessageBubble.tsx

Core symbols most depended-on inside this repo

get
called by 851
ufo/module/context.py
error
called by 295
galaxy/constellation/task_star.py
get
called by 217
ufo/agents/agent/basic.py
items
called by 190
config/config_schemas.py
sleep
called by 188
ufo/automator/ui_control/inspector.py
write
called by 154
ufo/module/basic.py
add_task
called by 149
galaxy/constellation/task_constellation.py
get
called by 132
ufo/agents/processors/schemas/target.py

Shape

Method 4,258
Class 879
Function 787
Route 50
Interface 22

Languages

Python98%
TypeScript2%

Modules by API surface

ufo/automator/ui_control/controller.py100 symbols
ufo/automator/app_apis/shell/shell_client.py78 symbols
galaxy/constellation/editor/commands.py77 symbols
galaxy/core/interfaces.py75 symbols
tests/unit/test_presenters.py64 symbols
galaxy/constellation/task_constellation.py63 symbols
ufo/module/basic.py59 symbols
ufo/automator/ui_control/screenshot.py59 symbols
ufo/automator/app_apis/web/webclient.py55 symbols
galaxy/core/types.py55 symbols
ufo/agents/states/app_agent_state.py54 symbols
tests/test_constellation_manager.py52 symbols

Dependencies from manifests, versioned

@tanstack/react-query5.17.9 · 1×
@types/react18.2.43 · 1×
@types/react-dom18.2.17 · 1×
@typescript-eslint/eslint-plugin6.14.0 · 1×
@typescript-eslint/parser6.14.0 · 1×
@vitejs/plugin-react4.2.1 · 1×
autoprefixer10.4.16 · 1×
clsx2.1.0 · 1×
eslint8.55.0 · 1×
eslint-plugin-react-hooks4.6.0 · 1×
framer-motion10.16.16 · 1×

For agents

$ claude mcp add UFO \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page