droidrun 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {droidrun-0.3.1 → droidrun-0.3.2}/.gitignore +1 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/PKG-INFO +17 -28
- {droidrun-0.3.1 → droidrun-0.3.2}/README.md +15 -27
- droidrun-0.3.2/docs/.generated-files.txt +5 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/docs.json +36 -10
- droidrun-0.3.2/docs/v3/concepts/agent.mdx +122 -0
- droidrun-0.3.2/docs/v3/concepts/android-tools.mdx +103 -0
- droidrun-0.3.2/docs/v3/concepts/models.mdx +29 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v3/concepts/portal-app.mdx +12 -17
- droidrun-0.3.2/docs/v3/guides/cli.mdx +171 -0
- droidrun-0.3.2/docs/v3/guides/gemini.mdx +90 -0
- droidrun-0.3.2/docs/v3/guides/ollama.mdx +108 -0
- droidrun-0.3.2/docs/v3/guides/openailike.mdx +104 -0
- droidrun-0.3.2/docs/v3/guides/overview.mdx +58 -0
- droidrun-0.3.2/docs/v3/guides/telemetry.mdx +36 -0
- droidrun-0.3.2/docs/v3/images/portal_apk.png +0 -0
- droidrun-0.3.2/docs/v3/overview.mdx +35 -0
- droidrun-0.3.2/docs/v3/quickstart.mdx +94 -0
- droidrun-0.3.2/docs/v3/sdk/adb-tools.mdx +330 -0
- droidrun-0.3.2/docs/v3/sdk/adb-utils.mdx +399 -0
- droidrun-0.3.2/docs/v3/sdk/base-tools.mdx +160 -0
- droidrun-0.3.2/docs/v3/sdk/droid-agent.mdx +66 -0
- droidrun-0.3.2/docs/v3/sdk/ios-tools.mdx +276 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/__init__.py +1 -10
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/adb/device.py +101 -71
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/adb/manager.py +3 -3
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/codeact/codeact_agent.py +2 -1
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/personas/__init__.py +0 -2
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/droid/droid_agent.py +50 -7
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/droid/events.py +4 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/llm_picker.py +1 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/cli/main.py +126 -70
- droidrun-0.3.2/droidrun/portal.py +139 -0
- droidrun-0.3.2/droidrun/telemetry/__init__.py +4 -0
- droidrun-0.3.2/droidrun/telemetry/events.py +27 -0
- droidrun-0.3.2/droidrun/telemetry/tracker.py +83 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/tools/adb.py +82 -218
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/tools/ios.py +6 -3
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/tools/tools.py +41 -6
- droidrun-0.3.2/gen-docs-sdk-ref.sh +19 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/pyproject.toml +78 -1
- droidrun-0.3.1/docs/conf.py +0 -25
- droidrun-0.3.1/docs/introduction.mdx +0 -97
- droidrun-0.3.1/docs/v1/quickstart.mdx +0 -293
- droidrun-0.3.1/docs/v3/concepts/agent.mdx +0 -227
- droidrun-0.3.1/docs/v3/concepts/android-control.mdx +0 -233
- droidrun-0.3.1/docs/v3/concepts/ios-control.mdx +0 -192
- droidrun-0.3.1/docs/v3/concepts/planning.mdx +0 -140
- droidrun-0.3.1/docs/v3/concepts/tracing.mdx +0 -160
- droidrun-0.3.1/docs/v3/overview.mdx +0 -122
- droidrun-0.3.1/docs/v3/quickstart.mdx +0 -356
- droidrun-0.3.1/droidrun/agent/context/personas/extractor.py +0 -52
- {droidrun-0.3.1 → droidrun-0.3.2}/.github/workflows/publish.yml +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/CHANGELOG.md +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/CONTRIBUTING.md +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/LICENSE +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/MANIFEST.in +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/favicon.png +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/logo/dark.svg +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/logo/light.svg +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v1/concepts/agent.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v1/concepts/android-control.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v1/concepts/portal-app.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v1/overview.mdx +0 -0
- {droidrun-0.3.1/docs → droidrun-0.3.2/docs/v1}/quickstart.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/concepts/agent.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/concepts/android-control.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/concepts/planning.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/concepts/portal-app.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/concepts/tracing.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/overview.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/docs/v2/quickstart.mdx +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/__main__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/adb/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/adb/wrapper.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/codeact/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/codeact/events.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/codeact/prompts.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/common/default.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/common/events.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/agent_persona.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/context_injection_manager.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/episodic_memory.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/personas/app_starter.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/personas/default.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/personas/ui_expert.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/reflection.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/context/task_manager.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/droid/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/oneflows/reflector.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/planner/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/planner/events.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/planner/planner_agent.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/planner/prompts.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/async_utils.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/chat_utils.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/executer.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/agent/utils/trajectory.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/cli/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/cli/logs.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/droidrun/tools/__init__.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/setup.py +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/static/droidrun-dark.png +0 -0
- {droidrun-0.3.1 → droidrun-0.3.2}/static/droidrun.png +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: droidrun
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: A framework for controlling Android devices through LLM agents
|
5
5
|
Project-URL: Homepage, https://github.com/droidrun/droidrun
|
6
6
|
Project-URL: Bug Tracker, https://github.com/droidrun/droidrun/issues
|
@@ -40,6 +40,7 @@ Requires-Dist: llama-index-llms-openai
|
|
40
40
|
Requires-Dist: llama-index-llms-openai-like
|
41
41
|
Requires-Dist: openai>=1.0.0
|
42
42
|
Requires-Dist: pillow>=10.0.0
|
43
|
+
Requires-Dist: posthog==6.0.2
|
43
44
|
Requires-Dist: pydantic>=2.0.0
|
44
45
|
Requires-Dist: python-dotenv>=1.0.0
|
45
46
|
Requires-Dist: rich>=13.0.0
|
@@ -67,6 +68,8 @@ Description-Content-Type: text/markdown
|
|
67
68
|
|
68
69
|
DroidRun is a powerful framework for controlling Android and iOS devices through LLM agents. It allows you to automate device interactions using natural language commands. [Checkout our benchmark results](https://droidrun.ai/benchmark)
|
69
70
|
|
71
|
+
## Why Droidrun?
|
72
|
+
|
70
73
|
- 🤖 Control Android and iOS devices with natural language commands
|
71
74
|
- 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
|
72
75
|
- 🧠 Planning capabilities for complex multi-step tasks
|
@@ -82,22 +85,24 @@ pip install droidrun
|
|
82
85
|
```
|
83
86
|
|
84
87
|
## 🚀 Quickstart
|
85
|
-
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
88
|
+
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
86
89
|
|
90
|
+
[](https://www.youtube.com/watch?v=4WT7FXJah2I)
|
87
91
|
|
88
92
|
## 🎬 Demo Videos
|
89
93
|
|
90
|
-
1. **
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
94
|
+
1. **Group Chat Summarization**: Let DroidRun summarize an escalated group chat for you.
|
95
|
+
|
96
|
+
[](https://www.youtube.com/watch?v=ofEnSUHHxX8)
|
97
|
+
|
98
|
+
2. **Travel Search Assistant**: Wittness DroidRun looking for the cheapest stay and share it with a colleague on telegram.
|
99
|
+
|
100
|
+
[](https://www.youtube.com/watch?v=QgtRaLS3NBM)
|
101
|
+
|
102
|
+
3. **Automate TikTok Shopping**: See how DroidRun looks for a stanley cup on TikTok Shop and send the product details via email.
|
103
|
+
|
104
|
+
[](https://www.youtube.com/watch?v=ol3bivBAmn4)
|
95
105
|
|
96
|
-
2. **Social Media Automation**: See DroidRun open X (Twitter) and post "Hello World".
|
97
|
-
|
98
|
-
Prompt: "Open up X and post Hello World."
|
99
|
-
|
100
|
-
[](https://www.youtube.com/watch?v=i4-sDQhzt_M)
|
101
106
|
|
102
107
|
## 💡 Example Use Cases
|
103
108
|
|
@@ -107,22 +112,6 @@ Read on how to get droidrun up and running within seconds in [our docs](https://
|
|
107
112
|
- Remote assistance for less technical users
|
108
113
|
- Exploring mobile UI with natural language commands
|
109
114
|
|
110
|
-
## 🗺️ Roadmap
|
111
|
-
|
112
|
-
### 🤖 Agent:
|
113
|
-
- **Improve memory**: Enhance context retention for complex multi-step tasks
|
114
|
-
- **Expand planning capabilities**: Add support for more complex reasoning strategies
|
115
|
-
- **Add Integrations**: Support more LLM providers and agent frameworks (LangChain, Agno etc.)
|
116
|
-
|
117
|
-
### ⚙️ Automations:
|
118
|
-
- **Create Automation Scripts**: Generate reusable scripts from agent actions that can be scheduled or shared
|
119
|
-
|
120
|
-
### ☁️ Cloud:
|
121
|
-
- **Hosted version**: Remote device control via web interface without local setup
|
122
|
-
- **Add-Ons**: Marketplace for extensions serving specific use cases
|
123
|
-
- **Proxy Hours**: Cloud compute time with tiered pricing for running automations
|
124
|
-
- **Droidrun AppStore**: Simple installation of Apps on your hosted devices
|
125
|
-
|
126
115
|
## 👥 Contributing
|
127
116
|
|
128
117
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
@@ -14,6 +14,8 @@
|
|
14
14
|
|
15
15
|
DroidRun is a powerful framework for controlling Android and iOS devices through LLM agents. It allows you to automate device interactions using natural language commands. [Checkout our benchmark results](https://droidrun.ai/benchmark)
|
16
16
|
|
17
|
+
## Why Droidrun?
|
18
|
+
|
17
19
|
- 🤖 Control Android and iOS devices with natural language commands
|
18
20
|
- 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
|
19
21
|
- 🧠 Planning capabilities for complex multi-step tasks
|
@@ -29,22 +31,24 @@ pip install droidrun
|
|
29
31
|
```
|
30
32
|
|
31
33
|
## 🚀 Quickstart
|
32
|
-
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
34
|
+
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
33
35
|
|
36
|
+
[](https://www.youtube.com/watch?v=4WT7FXJah2I)
|
34
37
|
|
35
38
|
## 🎬 Demo Videos
|
36
39
|
|
37
|
-
1. **
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
1. **Group Chat Summarization**: Let DroidRun summarize an escalated group chat for you.
|
41
|
+
|
42
|
+
[](https://www.youtube.com/watch?v=ofEnSUHHxX8)
|
43
|
+
|
44
|
+
2. **Travel Search Assistant**: Wittness DroidRun looking for the cheapest stay and share it with a colleague on telegram.
|
45
|
+
|
46
|
+
[](https://www.youtube.com/watch?v=QgtRaLS3NBM)
|
47
|
+
|
48
|
+
3. **Automate TikTok Shopping**: See how DroidRun looks for a stanley cup on TikTok Shop and send the product details via email.
|
49
|
+
|
50
|
+
[](https://www.youtube.com/watch?v=ol3bivBAmn4)
|
42
51
|
|
43
|
-
2. **Social Media Automation**: See DroidRun open X (Twitter) and post "Hello World".
|
44
|
-
|
45
|
-
Prompt: "Open up X and post Hello World."
|
46
|
-
|
47
|
-
[](https://www.youtube.com/watch?v=i4-sDQhzt_M)
|
48
52
|
|
49
53
|
## 💡 Example Use Cases
|
50
54
|
|
@@ -54,22 +58,6 @@ Read on how to get droidrun up and running within seconds in [our docs](https://
|
|
54
58
|
- Remote assistance for less technical users
|
55
59
|
- Exploring mobile UI with natural language commands
|
56
60
|
|
57
|
-
## 🗺️ Roadmap
|
58
|
-
|
59
|
-
### 🤖 Agent:
|
60
|
-
- **Improve memory**: Enhance context retention for complex multi-step tasks
|
61
|
-
- **Expand planning capabilities**: Add support for more complex reasoning strategies
|
62
|
-
- **Add Integrations**: Support more LLM providers and agent frameworks (LangChain, Agno etc.)
|
63
|
-
|
64
|
-
### ⚙️ Automations:
|
65
|
-
- **Create Automation Scripts**: Generate reusable scripts from agent actions that can be scheduled or shared
|
66
|
-
|
67
|
-
### ☁️ Cloud:
|
68
|
-
- **Hosted version**: Remote device control via web interface without local setup
|
69
|
-
- **Add-Ons**: Marketplace for extensions serving specific use cases
|
70
|
-
- **Proxy Hours**: Cloud compute time with tiered pricing for running automations
|
71
|
-
- **Droidrun AppStore**: Simple installation of Apps on your hosted devices
|
72
|
-
|
73
61
|
## 👥 Contributing
|
74
62
|
|
75
63
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
@@ -0,0 +1,5 @@
|
|
1
|
+
md5 1075080038db59977da1586c48d421fb v3/sdk/droid-agent.mdx
|
2
|
+
md5 cbccf5efa2fd001f990078cbb05a8d98 v3/sdk/base-tools.mdx
|
3
|
+
md5 58f64ddcf2c976b6804894c5c4798a6f v3/sdk/adb-tools.mdx
|
4
|
+
md5 3e8a7d303e264b8a8f22b16f45fbde1a v3/sdk/ios-tools.mdx
|
5
|
+
md5 fa5a80e8c823f705fce0ea914b85ea41 v3/sdk/adb-utils.mdx
|
@@ -11,24 +11,43 @@
|
|
11
11
|
"navigation": {
|
12
12
|
"versions": [
|
13
13
|
{
|
14
|
-
"version": "0.3.
|
14
|
+
"version": "0.3.2",
|
15
15
|
"groups": [
|
16
16
|
{
|
17
|
-
"group": "
|
17
|
+
"group": "Introduction",
|
18
18
|
"pages": [
|
19
19
|
"v3/overview",
|
20
20
|
"v3/quickstart"
|
21
21
|
]
|
22
22
|
},
|
23
|
+
{
|
24
|
+
"group": "Guides",
|
25
|
+
"pages": [
|
26
|
+
"v3/guides/overview",
|
27
|
+
"v3/guides/cli",
|
28
|
+
"v3/guides/gemini",
|
29
|
+
"v3/guides/openailike",
|
30
|
+
"v3/guides/ollama",
|
31
|
+
"v3/guides/telemetry"
|
32
|
+
]
|
33
|
+
},
|
23
34
|
{
|
24
35
|
"group": "Core Concepts",
|
25
36
|
"pages": [
|
26
37
|
"v3/concepts/agent",
|
27
|
-
"v3/concepts/
|
28
|
-
"v3/concepts/android-
|
29
|
-
"v3/concepts/
|
30
|
-
|
31
|
-
|
38
|
+
"v3/concepts/models",
|
39
|
+
"v3/concepts/android-tools",
|
40
|
+
"v3/concepts/portal-app"
|
41
|
+
]
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"group": "SDK Reference",
|
45
|
+
"pages": [
|
46
|
+
"v3/sdk/droid-agent",
|
47
|
+
"v3/sdk/adb-tools",
|
48
|
+
"v3/sdk/ios-tools",
|
49
|
+
"v3/sdk/base-tools",
|
50
|
+
"v3/sdk/adb-utils"
|
32
51
|
]
|
33
52
|
}
|
34
53
|
]
|
@@ -94,14 +113,21 @@
|
|
94
113
|
],
|
95
114
|
"primary": {
|
96
115
|
"type": "button",
|
97
|
-
"label": "
|
98
|
-
"href": "https://
|
116
|
+
"label": "Join Discord",
|
117
|
+
"href": "https://discord.gg/gdekvkJFvn"
|
99
118
|
}
|
100
119
|
},
|
101
120
|
"footer": {
|
102
121
|
"socials": {
|
103
122
|
"github": "https://github.com/droidrun/droidrun",
|
104
|
-
"x": "https://x.com/droid_run"
|
123
|
+
"x": "https://x.com/droid_run",
|
124
|
+
"discord": "https://discord.gg/gdekvkJFvn",
|
125
|
+
"website": "https://droidrun.ai"
|
126
|
+
}
|
127
|
+
},
|
128
|
+
"errors": {
|
129
|
+
"404": {
|
130
|
+
"redirect": false
|
105
131
|
}
|
106
132
|
}
|
107
133
|
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
---
|
2
|
+
title: 'Agent & Execution Modes'
|
3
|
+
description: 'Understanding the DroidAgent system in DroidRun'
|
4
|
+
---
|
5
|
+
|
6
|
+
|
7
|
+
## Configuration
|
8
|
+
|
9
|
+
```python
|
10
|
+
# The parameters for the DroidAgent
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
goal: str, # The goal for the agent to reach
|
14
|
+
llm: LLM, # Language model to use
|
15
|
+
tools: Tools, # Loaded tools
|
16
|
+
personas: List[AgentPersona] = [DEFAULT], # Experimental: custom system prompt for agent
|
17
|
+
max_steps: int = 15, # Maximum steps the agent takes
|
18
|
+
timeout: int = 1000, # Global Timeout
|
19
|
+
vision: bool = False, # Whether the agent shall also utilize screenshots
|
20
|
+
reasoning: bool = False, # Enable reasoning
|
21
|
+
reflection: bool = False, # Enable reflection
|
22
|
+
enable_tracing: bool = False, # Enable tracing (this requires arize phoenix)
|
23
|
+
debug: bool = False, # Enable additional debug logs
|
24
|
+
save_trajectories: bool = False, # Save the Trajectory data of the run (GIF + logs)
|
25
|
+
*args,
|
26
|
+
**kwargs
|
27
|
+
)
|
28
|
+
```
|
29
|
+
|
30
|
+
## Execution Modes
|
31
|
+
|
32
|
+
The agent operates in three distinct modes, each optimized for different complexity levels and use cases.
|
33
|
+
|
34
|
+
### Direct Execution
|
35
|
+
<div style={{display: 'flex', gap: '8px', marginBottom: '16px'}}>
|
36
|
+
<span style={{background: 'rgba(107, 114, 128, 0.2)', color: '#6b7280', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>REASONING: LOW</span>
|
37
|
+
<span style={{background: 'rgba(13, 147, 115, 0.2)', color: '#0D9373', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>SPEED: HIGH</span>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
```python
|
41
|
+
# Simple tasks
|
42
|
+
agent = DroidAgent(
|
43
|
+
goal="Take a screenshot of the current screen",
|
44
|
+
llm=llm,
|
45
|
+
tools=tools,
|
46
|
+
reasoning=False
|
47
|
+
)
|
48
|
+
```
|
49
|
+
**Flow:** Goal → Direct Execution → Result
|
50
|
+
|
51
|
+
**Best Practices:**
|
52
|
+
- Use for single-action tasks (1-15 steps)
|
53
|
+
- Keep goals specific and atomic
|
54
|
+
- Faster execution with no planning overhead
|
55
|
+
|
56
|
+
### Planning Mode
|
57
|
+
<div style={{display: 'flex', gap: '8px', marginBottom: '16px'}}>
|
58
|
+
<span style={{background: 'rgba(217, 119, 6, 0.2)', color: '#d97706', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>REASONING: MEDIUM</span>
|
59
|
+
<span style={{background: 'rgba(217, 119, 6, 0.2)', color: '#d97706', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>SPEED: MEDIUM</span>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
```python
|
63
|
+
# Multi-step tasks requiring navigation and decision-making
|
64
|
+
agent = DroidAgent(
|
65
|
+
goal="Set up a new alarm for 7 AM with custom ringtone and label 'Work'",
|
66
|
+
llm=llm,
|
67
|
+
tools=tools,
|
68
|
+
reasoning=True
|
69
|
+
)
|
70
|
+
```
|
71
|
+
**Flow:** Goal → Planning → Step-by-step Execution → Result
|
72
|
+
|
73
|
+
**Best Practices:**
|
74
|
+
- Use for multi-step tasks (15-50 steps)
|
75
|
+
- Ideal for navigation between apps/screens
|
76
|
+
- Good for tasks requiring step-by-step breakdown
|
77
|
+
|
78
|
+
|
79
|
+
### Reflection Mode
|
80
|
+
<div style={{display: 'flex', gap: '8px', marginBottom: '16px'}}>
|
81
|
+
<span style={{background: 'rgba(13, 147, 115, 0.2)', color: '#0D9373', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>REASONING: HIGH</span>
|
82
|
+
<span style={{background: 'rgba(107, 114, 128, 0.2)', color: '#6b7280', padding: '4px 8px', borderRadius: '8px', fontSize: '12px', fontWeight: 'bold'}}>SPEED: LOW</span>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
```python
|
86
|
+
# Complex, multi-app workflows requiring verification and adaptive planning
|
87
|
+
agent = DroidAgent(
|
88
|
+
goal="Find the cheapest hotel in Manhattan for next weekend, compare prices across multiple booking apps, and share the best option with my team on Slack",
|
89
|
+
llm=llm,
|
90
|
+
tools=tools,
|
91
|
+
reasoning=True,
|
92
|
+
reflection=True
|
93
|
+
)
|
94
|
+
```
|
95
|
+
**Flow:** Goal → Planning → Execution → Reflection → Re-planning (if needed) → Result
|
96
|
+
|
97
|
+
**Best Practice:**
|
98
|
+
- Use for complex workflows (50+ steps)
|
99
|
+
- Essential for quality control and verification
|
100
|
+
- Best when context preservation is critical
|
101
|
+
|
102
|
+
## Vision capabilities
|
103
|
+
<Warning>Vision capabilities are deactivated for the DeepSeek provider and require an LLM model with vision capabilities (e.g., GPT-4o, Gemini-2.5-Flash etc.).</Warning>
|
104
|
+
|
105
|
+
By default, DroidAgent operates entirely without vision by leveraging Android's Accessibility API to extract the UI hierarchy as XML. This approach is efficient and works well for most automation tasks.
|
106
|
+
|
107
|
+
However, enabling vision capabilities allows the agent to take screenshots and visually analyze the device screen, which can be beneficial in specific scenarios:
|
108
|
+
```python
|
109
|
+
# To enable vision capabilities, set `vision=True` in your agent configuration.
|
110
|
+
agent = DroidAgent(
|
111
|
+
goal="Open up TikTok and describe the content of the video you are seeing",
|
112
|
+
llm=llm,
|
113
|
+
tools=tools,
|
114
|
+
vision=True
|
115
|
+
)
|
116
|
+
```
|
117
|
+
|
118
|
+
|
119
|
+
- **Content-heavy applications**: When apps contain complex visual elements, images, or layouts that aren't fully captured by the XML hierarchy
|
120
|
+
- **Visual verification**: For tasks requiring confirmation of visual elements or layouts
|
121
|
+
- **Enhanced context understanding**: When UI structure alone doesn't provide sufficient information for decision-making
|
122
|
+
|
@@ -0,0 +1,103 @@
|
|
1
|
+
---
|
2
|
+
title: 'Android Control'
|
3
|
+
description: 'Learn how to control Android devices in DroidRun using the comprehensive tools API.
|
4
|
+
Tools provide the bridge between your AI agents and Android devices, enabling UI interaction, app management, and state analysis. Use tools directly or through DroidAgent for automated Android testing and control.'
|
5
|
+
---
|
6
|
+
|
7
|
+
```python
|
8
|
+
from droidrun import DroidAgent, AdbTools
|
9
|
+
|
10
|
+
# Load tools for a device
|
11
|
+
tools = AdbTools(serial="device_serial")
|
12
|
+
|
13
|
+
# Create agent with tools
|
14
|
+
agent = DroidAgent(
|
15
|
+
goal="Your task",
|
16
|
+
llm=llm,
|
17
|
+
tools=tools
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
21
|
+
## UI Interaction Tools
|
22
|
+
|
23
|
+
**`tap_by_index(index: int) -> str`**
|
24
|
+
Tap on a UI element by its index from cached elements. Must call `get_state()` first.
|
25
|
+
|
26
|
+
**`swipe(start_x: int, start_y: int, end_x: int, end_y: int, duration_ms: int = 300) -> bool`**
|
27
|
+
Perform swipe gesture. For long press, use same start/end coordinates with longer duration.
|
28
|
+
|
29
|
+
**`input_text(text: str) -> str`**
|
30
|
+
Input text into focused element. Supports special characters and non-ASCII text.
|
31
|
+
|
32
|
+
**`press_key(keycode: int) -> str`**
|
33
|
+
Press Android keys using keycodes. Common: HOME (3), BACK (4), ENTER (66), DELETE (67).
|
34
|
+
|
35
|
+
**`back() -> str`**
|
36
|
+
Convenience method to press the Android back button.
|
37
|
+
|
38
|
+
```python
|
39
|
+
# UI interaction examples
|
40
|
+
await tools.get_state() # Cache elements first
|
41
|
+
await tools.tap_by_index(2) # Tap element
|
42
|
+
await tools.swipe(500, 200, 500, 800, 400) # Swipe down
|
43
|
+
await tools.input_text("Hello, World!")
|
44
|
+
await tools.press_key(66) # Enter key
|
45
|
+
await tools.back()
|
46
|
+
```
|
47
|
+
|
48
|
+
## App Management Tools
|
49
|
+
|
50
|
+
**`start_app(package: str, activity: str = "") -> str`**
|
51
|
+
Start application by package name and optional activity.
|
52
|
+
|
53
|
+
**`list_packages(include_system_apps: bool = False) -> List[str]`**
|
54
|
+
List installed packages. Optionally include system apps.
|
55
|
+
|
56
|
+
**`install_app(apk_path: str, reinstall: bool = False, grant_permissions: bool = True) -> str`**
|
57
|
+
Install APK file with optional reinstall and permission granting.
|
58
|
+
|
59
|
+
```python
|
60
|
+
# App management examples
|
61
|
+
await tools.start_app("com.android.settings")
|
62
|
+
packages = await tools.list_packages()
|
63
|
+
all_packages = await tools.list_packages(include_system_apps=True)
|
64
|
+
await tools.install_app("/path/to/app.apk", reinstall=True)
|
65
|
+
```
|
66
|
+
|
67
|
+
## State Analysis Tools
|
68
|
+
|
69
|
+
**`get_state(serial: Optional[str] = None) -> Dict[str, Any]`**
|
70
|
+
Get comprehensive device state including accessibility tree and phone state. Caches UI elements.
|
71
|
+
|
72
|
+
**`take_screenshot() -> Tuple[str, bytes]`**
|
73
|
+
Capture device screen and return format and image data. Stores screenshots for GIF creation.
|
74
|
+
|
75
|
+
```python
|
76
|
+
# State analysis examples
|
77
|
+
state = await tools.get_state()
|
78
|
+
a11y_tree = state["a11y_tree"]
|
79
|
+
phone_state = state["phone_state"]
|
80
|
+
|
81
|
+
format, image_data = await tools.take_screenshot()
|
82
|
+
```
|
83
|
+
|
84
|
+
## Quick Reference
|
85
|
+
|
86
|
+
| Function | Purpose | Returns |
|
87
|
+
|----------|---------|---------|
|
88
|
+
| `tap_by_index(index)` | Tap UI element by index | Status message |
|
89
|
+
| `swipe(x1, y1, x2, y2, duration)` | Swipe gesture | Success boolean |
|
90
|
+
| `input_text(text)` | Type text | Status message |
|
91
|
+
| `press_key(keycode)` | Press Android key | Status message |
|
92
|
+
| `back()` | Press back button | Status message |
|
93
|
+
| `start_app(package, activity)` | Launch application | Status message |
|
94
|
+
| `list_packages(include_system)` | List installed apps | Package list |
|
95
|
+
| `install_app(path, reinstall, permissions)` | Install APK | Status message |
|
96
|
+
| `get_state(serial)` | Get device state | State dictionary |
|
97
|
+
| `take_screenshot()` | Capture screen | Format and image data |
|
98
|
+
| `remember(info)` | Store information | Confirmation message |
|
99
|
+
| `get_memory()` | Retrieve stored info | Memory list |
|
100
|
+
| `complete(success, reason)` | Finish task | None |
|
101
|
+
|
102
|
+
## Dive Deeper
|
103
|
+
You can find the SDK Reference for AdbTools [here](../sdk/adb-tools)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
title: 'Supported Models'
|
3
|
+
description: 'DroidRun is **LLM agnostic**, which means you can use every LLM provider there is.
|
4
|
+
|
5
|
+
Under the hood, DroidRun leverages [LlamaIndex LLM providers](https://docs.llamaindex.ai/en/stable/api_reference/llms/) to provide seamless integration with all major language model providers. This means you can easily switch between different providers or use multiple providers simultaneously depending on your needs.
|
6
|
+
'
|
7
|
+
---
|
8
|
+
|
9
|
+
## Install LLM Provider
|
10
|
+
```bash
|
11
|
+
# Install the package for your preffered LLM Provider
|
12
|
+
pip install llama-index-llms-[PROVIDER]
|
13
|
+
```
|
14
|
+
|
15
|
+
## Supported Providers
|
16
|
+
|
17
|
+
DroidRun supports all major LLM providers through LlamaIndex, including but not limited to:
|
18
|
+
|
19
|
+
- **OpenAI** (GPT-4o, GPT-o3, etc.)
|
20
|
+
- **Anthropic** (Claude models)
|
21
|
+
- **GoogleGenAI** (Gemini)
|
22
|
+
- **Azure OpenAI Service**
|
23
|
+
- **AWS Bedrock**
|
24
|
+
- **Cohere**
|
25
|
+
- **Hugging Face**
|
26
|
+
- **Local models** (Ollama, vLLM, etc.)
|
27
|
+
- And many more...
|
28
|
+
|
29
|
+
This flexibility allows you to choose the best model for your specific use case, budget, and performance requirements while maintaining the same DroidRun interface across all providers.
|
@@ -1,11 +1,14 @@
|
|
1
1
|
---
|
2
|
-
title: '
|
3
|
-
description: '
|
2
|
+
title: 'Android Portal APK'
|
3
|
+
description: 'The DroidRun Portal App is a critical component of the DroidRun framework that runs directly on your Android device. It acts as a bridge between the DroidRun framework running on your computer and the Android operating system.'
|
4
4
|
---
|
5
5
|
|
6
|
-
|
6
|
+
<img src="../images/portal_apk.png" alt="DroidRun Portal App" width="300" />
|
7
7
|
|
8
|
-
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## What is the DroidRun Portal App?
|
9
12
|
|
10
13
|
The DroidRun Portal App is an Android application that:
|
11
14
|
|
@@ -14,9 +17,9 @@ The DroidRun Portal App is an Android application that:
|
|
14
17
|
3. Executes commands sent from the DroidRun framework
|
15
18
|
4. Provides visual feedback about identified UI elements
|
16
19
|
|
17
|
-
##
|
20
|
+
## How It Works
|
18
21
|
|
19
|
-
The Portal App utilizes Android's Accessibility Services to:
|
22
|
+
The Portal App utilizes [Android's Accessibility Services](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService) to:
|
20
23
|
|
21
24
|
- Monitor UI changes on your device
|
22
25
|
- Identify interactive elements (buttons, text fields, etc.)
|
@@ -37,7 +40,7 @@ These visual indicators help you understand:
|
|
37
40
|
- What information is being sent to the LLM agent
|
38
41
|
|
39
42
|
|
40
|
-
##
|
43
|
+
## Privacy and Security
|
41
44
|
|
42
45
|
The DroidRun Portal App:
|
43
46
|
|
@@ -46,14 +49,6 @@ The DroidRun Portal App:
|
|
46
49
|
- Only activates when being used by the DroidRun framework
|
47
50
|
- Can be easily disabled through Android settings when not in use
|
48
51
|
|
49
|
-
##
|
50
|
-
|
51
|
-
The DroidRun Portal App is available from the [DroidRun Portal repository](https://github.com/droidrun/droidrun-portal). For installation instructions, see the [Quickstart](/quickstart) guide.
|
52
|
-
|
53
|
-
## 🔧 Troubleshooting
|
54
|
-
|
55
|
-
### Common Issues
|
52
|
+
## Installation
|
56
53
|
|
57
|
-
|
58
|
-
- **Highlighting Not Visible**: Check if visual debugging is enabled in the app settings
|
59
|
-
- **Communication Errors**: Make sure ADB is properly configured and your device is connected
|
54
|
+
The DroidRun Portal App is available from the [DroidRun Portal repository](https://github.com/droidrun/droidrun-portal). For installation instructions, see the [Quickstart](/v3/quickstart) guide.
|