Creating Device Agents - Tutorial Series
November 7, 2025 ยท View on GitHub
This tutorial series teaches you how to create new device agents for UFOยณ, using LinuxAgent as a reference implementation.
๐ Tutorial Structure
Part 0: Overview
Introduction to device agents and architecture overview
- Understanding device agents vs third-party agents
- Server-client architecture
- LinuxAgent as reference implementation
- Tutorial roadmap
Time: 15 minutes | Difficulty: โญ
Part 1: Core Components
Building server-side components
- Agent Class implementation
- Processor and strategy orchestration
- State Manager and FSM
- Processing Strategies (LLM, Action)
- Prompter for LLM interaction
Time: 45 minutes | Difficulty: โญโญโญ
Part 2: MCP Server Development
Creating platform-specific MCP servers (Placeholder - Under Development)
- MCP server architecture
- Defining MCP tools
- Command execution logic
- Error handling and validation
Time: 30 minutes | Difficulty: โญโญ
Part 3: Client Setup
Setting up the device client (Placeholder - Under Development)
- Client initialization and configuration
- MCP server manager integration
- WebSocket connection setup
- Platform detection
Time: 20 minutes | Difficulty: โญโญ
Part 4: Configuration & Deployment
Configuring and deploying your agent (Placeholder - Under Development)
third_party.yamlconfigurationdevices.yamldevice registration- Prompt template creation
- Deployment steps
- Galaxy integration
Time: 25 minutes | Difficulty: โญโญ
Part 5: Testing & Debugging
Testing and debugging your implementation (Placeholder - Under Development)
- Unit testing strategies
- Integration testing
- Debugging techniques
- Common issues and solutions
Time: 30 minutes | Difficulty: โญโญโญ
Part 6: Complete Example: MobileAgent
Hands-on walkthrough creating MobileAgent (Placeholder - Under Development)
- Step-by-step implementation
- Android/iOS platform specifics
- UI Automator integration
- Complete working example
Time: 60 minutes | Difficulty: โญโญโญโญ
Quick Navigation
| I Want To... | Go To |
|---|---|
| Understand device agent architecture | Overview |
| Study LinuxAgent implementation | Overview |
| Create Agent Class | Core Components - Step 1 |
| Build Processor | Core Components - Step 2 |
| Implement State Machine | Core Components - Step 3 |
| Write Processing Strategies | Core Components - Step 4 |
| Create Prompter | Core Components - Step 5 |
| Build MCP Server | MCP Server (placeholder) |
| Setup Client | Client Setup (placeholder) |
| Configure & Deploy | Configuration (placeholder) |
| Test & Debug | Testing (placeholder) |
| Complete Example | MobileAgent Example (placeholder) |
Prerequisites
Before starting, ensure you have:
- โ Python 3.10+
- โ UFOยณ repository cloned
- โ Basic understanding of async programming
- โ Familiarity with Agent Architecture
Learning Path
graph LR
A[Overview<br/>โ
Complete] --> B[Core Components<br/>โ
Complete]
B --> C[MCP Server<br/>๐ Placeholder]
C --> D[Client Setup<br/>๐ Placeholder]
D --> E[Configuration<br/>๐ Placeholder]
E --> F[Testing<br/>๐ Placeholder]
F --> G[Complete Example<br/>๐ Placeholder]
style A fill:#c8e6c9
style B fill:#c8e6c9
style C fill:#fff3e0
style D fill:#fff3e0
style E fill:#fff3e0
style F fill:#fff3e0
style G fill:#fff3e0
Recommended Path:
- โ Completed: Overview - Understand architecture
- โ Completed: Core Components - Build server-side components
- ๐ Placeholder: MCP Server - Create device commands
- ๐ Placeholder: Client Setup - Setup device client
- ๐ Placeholder: Configuration - Configure and deploy
- ๐ Placeholder: Testing - Test and debug
- ๐ Placeholder: Complete Example - Full MobileAgent implementation
Additional Resources
- Agent Architecture Overview - Three-layer architecture
- Agent Types - Platform-specific implementations
- Linux Quick Start - Deploy LinuxAgent
- Creating Third-Party Agents - Related tutorial
- MCP Overview - Model Context Protocol
- Server Overview - Server architecture
- Client Overview - Client architecture
Getting Help
If you encounter issues:
- ๐ Review the FAQ
- ๐ Check troubleshooting guides
- ๐ฌ Ask in GitHub Discussions
- ๐ Report bugs on GitHub Issues
Contributing
Found an issue or want to improve these tutorials?
- ๐ Submit a PR with improvements
- ๐ก Suggest new topics
- ๐ Report errors or unclear sections
Ready to start? โ Begin with Overview