Creating Device Agents - Tutorial Series
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
Recommended Path: 1. ✅ Completed: Overview - Understand architecture 2. ✅ Completed: Core Components - Build server-side components 3. 📝 Placeholder: MCP Server - Create device commands 4. 📝 Placeholder: Client Setup - Setup device client 5. 📝 Placeholder: Configuration - Configure and deploy 6. 📝 Placeholder: Testing - Test and debug 7. 📝 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