What is Droidrun?
Droidrun uses a multi-agent architecture where specialized agents work together to complete tasks. Instead of one agent doing everything, different agents handle planning, execution, and computation.Execution Modes
Reasoning Mode (reasoning=True
)
Manager creates plans, Executor takes actions. Best for complex multi-step tasks.
Direct Mode (reasoning=False
)
CodeActAgent executes immediately without planning overhead. Best for simple tasks.
Core Agents
DroidAgent (Orchestrator)
Main coordinator that routes between agents based on mode. Location:droidrun/agent/droid/droid_agent.py
ManagerAgent (Planner)
Creates strategic plans and breaks tasks into subgoals. Reasoning mode only. Location:droidrun/agent/manager/manager_agent.py
Workflow: prepare_context()
→ get_response()
→ process_response()
→ finalize()
ExecutorAgent (Actor)
Executes atomic actions for each subgoal. Reasoning mode only. Location:droidrun/agent/executor/executor_agent.py
Workflow: prepare_context()
→ get_response()
→ process_response()
→ execute()
→ finalize()
CodeActAgent (Direct Executor)
Generates Python code using atomic actions. Direct mode only. Location:droidrun/agent/codeact/codeact_agent.py
Available Actions:
ScripterAgent (Off-Device)
Executes Python for API calls, file operations, and computations. Triggered by Manager when needed. Location:droidrun/agent/scripter/
Configuration
Configure different LLMs per agent:When to Use Each Mode
Use Reasoning Mode for:- Multi-step tasks (booking flights, configuring settings)
- Tasks requiring planning and adaptation
- Complex workflows across multiple apps
- Simple actions (screenshots, sending messages)
- Fast execution without planning overhead
- Well-defined single-step tasks
Shared State
All agents shareDroidAgentState
for coordination:
- Action history and outcomes
- Error tracking and recovery
- Memory and context
- Scripter results
- Current plan and progress
Quick Reference
Agent | Role | Best For | Mode | Config Key |
---|---|---|---|---|
DroidAgent | Orchestrator | Entry point | Both | agent.* |
ManagerAgent | Planner | Strategy, recovery | Reasoning | agent.manager.* |
ExecutorAgent | Actor | Action execution | Reasoning | agent.executor.* |
CodeActAgent | Direct | Simple tasks | Direct | agent.codeact.* |
ScripterAgent | Python Executor | APIs, files, data | Reasoning | agent.scripter.* |