droidrun 0.2.0__tar.gz → 0.3.0__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.0/.gitignore +22 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/CONTRIBUTING.md +24 -1
- droidrun-0.3.0/PKG-INFO +149 -0
- droidrun-0.3.0/README.md +97 -0
- droidrun-0.3.0/codeact.html +155 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/docs.json +29 -1
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/introduction.mdx +23 -27
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/concepts/agent.mdx +0 -2
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/concepts/planning.mdx +0 -2
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/concepts/tracing.mdx +1 -1
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/overview.mdx +2 -2
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/quickstart.mdx +3 -3
- droidrun-0.3.0/docs/v3/concepts/agent.mdx +227 -0
- droidrun-0.3.0/docs/v3/concepts/android-control.mdx +233 -0
- droidrun-0.3.0/docs/v3/concepts/ios-control.mdx +192 -0
- droidrun-0.3.0/docs/v3/concepts/planning.mdx +140 -0
- droidrun-0.3.0/docs/v3/concepts/portal-app.mdx +59 -0
- droidrun-0.3.0/docs/v3/concepts/tracing.mdx +160 -0
- droidrun-0.3.0/docs/v3/overview.mdx +122 -0
- droidrun-0.3.0/docs/v3/quickstart.mdx +356 -0
- droidrun-0.3.0/draw_workflow.py +40 -0
- droidrun-0.3.0/droidagent.html +155 -0
- droidrun-0.3.0/droidrun/__init__.py +31 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/__main__.py +1 -1
- droidrun-0.3.0/droidrun/adb/__init__.py +13 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/adb/device.py +1 -1
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/adb/manager.py +2 -2
- droidrun-0.3.0/droidrun/agent/__init__.py +6 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/codeact/__init__.py +2 -4
- droidrun-0.3.0/droidrun/agent/codeact/codeact_agent.py +420 -0
- droidrun-0.3.0/droidrun/agent/codeact/events.py +28 -0
- droidrun-0.3.0/droidrun/agent/codeact/prompts.py +26 -0
- droidrun-0.3.0/droidrun/agent/common/default.py +5 -0
- droidrun-0.3.0/droidrun/agent/common/events.py +4 -0
- droidrun-0.3.0/droidrun/agent/context/__init__.py +23 -0
- droidrun-0.3.0/droidrun/agent/context/agent_persona.py +15 -0
- droidrun-0.3.0/droidrun/agent/context/context_injection_manager.py +66 -0
- droidrun-0.3.0/droidrun/agent/context/episodic_memory.py +15 -0
- droidrun-0.3.0/droidrun/agent/context/personas/__init__.py +11 -0
- droidrun-0.3.0/droidrun/agent/context/personas/app_starter.py +44 -0
- droidrun-0.3.0/droidrun/agent/context/personas/default.py +95 -0
- droidrun-0.3.0/droidrun/agent/context/personas/extractor.py +52 -0
- droidrun-0.3.0/droidrun/agent/context/personas/ui_expert.py +107 -0
- droidrun-0.3.0/droidrun/agent/context/reflection.py +20 -0
- droidrun-0.3.0/droidrun/agent/context/task_manager.py +124 -0
- droidrun-0.3.0/droidrun/agent/context/todo.txt +4 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/droid/__init__.py +2 -2
- droidrun-0.3.0/droidrun/agent/droid/droid_agent.py +357 -0
- droidrun-0.3.0/droidrun/agent/droid/events.py +28 -0
- droidrun-0.3.0/droidrun/agent/oneflows/reflector.py +265 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/planner/__init__.py +2 -4
- droidrun-0.3.0/droidrun/agent/planner/events.py +16 -0
- droidrun-0.3.0/droidrun/agent/planner/planner_agent.py +268 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/planner/prompts.py +33 -53
- droidrun-0.3.0/droidrun/agent/utils/__init__.py +3 -0
- droidrun-0.3.0/droidrun/agent/utils/async_utils.py +17 -0
- droidrun-0.3.0/droidrun/agent/utils/chat_utils.py +312 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/utils/executer.py +49 -14
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/agent/utils/llm_picker.py +14 -10
- droidrun-0.3.0/droidrun/agent/utils/trajectory.py +184 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/cli/__init__.py +1 -1
- droidrun-0.3.0/droidrun/cli/logs.py +283 -0
- droidrun-0.3.0/droidrun/cli/main.py +474 -0
- droidrun-0.3.0/droidrun/run.py +105 -0
- droidrun-0.3.0/droidrun/tools/__init__.py +9 -0
- droidrun-0.2.0/droidrun/tools/actions.py → droidrun-0.3.0/droidrun/tools/adb.py +279 -238
- droidrun-0.3.0/droidrun/tools/ios.py +594 -0
- droidrun-0.3.0/droidrun/tools/tools.py +99 -0
- droidrun-0.3.0/lib/bindings/utils.js +189 -0
- droidrun-0.3.0/lib/tom-select/tom-select.complete.min.js +356 -0
- droidrun-0.3.0/lib/tom-select/tom-select.css +334 -0
- droidrun-0.3.0/lib/vis-9.1.2/vis-network.css +1 -0
- droidrun-0.3.0/lib/vis-9.1.2/vis-network.min.js +27 -0
- droidrun-0.3.0/planner.html +155 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/pyproject.toml +6 -3
- droidrun-0.2.0/.gitignore +0 -5
- droidrun-0.2.0/PKG-INFO +0 -373
- droidrun-0.2.0/README.md +0 -323
- droidrun-0.2.0/droidrun/__init__.py +0 -26
- droidrun-0.2.0/droidrun/adb/__init__.py +0 -13
- droidrun-0.2.0/droidrun/agent/codeact/codeact_agent.py +0 -334
- droidrun-0.2.0/droidrun/agent/codeact/events.py +0 -36
- droidrun-0.2.0/droidrun/agent/codeact/prompts.py +0 -78
- droidrun-0.2.0/droidrun/agent/droid/droid_agent.py +0 -418
- droidrun-0.2.0/droidrun/agent/planner/events.py +0 -20
- droidrun-0.2.0/droidrun/agent/planner/task_manager.py +0 -355
- droidrun-0.2.0/droidrun/agent/planner/workflow.py +0 -371
- droidrun-0.2.0/droidrun/agent/utils/async_utils.py +0 -56
- droidrun-0.2.0/droidrun/agent/utils/chat_utils.py +0 -92
- droidrun-0.2.0/droidrun/cli/main.py +0 -580
- droidrun-0.2.0/droidrun/tools/__init__.py +0 -14
- droidrun-0.2.0/droidrun/tools/device.py +0 -29
- droidrun-0.2.0/droidrun/tools/loader.py +0 -60
- {droidrun-0.2.0 → droidrun-0.3.0}/CHANGELOG.md +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/LICENSE +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/MANIFEST.in +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/conf.py +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/favicon.png +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/logo/dark.svg +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/logo/light.svg +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/quickstart.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v1/concepts/agent.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v1/concepts/android-control.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v1/concepts/portal-app.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v1/overview.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v1/quickstart.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/concepts/android-control.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/docs/v2/concepts/portal-app.mdx +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/droidrun/adb/wrapper.py +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/setup.py +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/static/droidrun-dark.png +0 -0
- {droidrun-0.2.0 → droidrun-0.3.0}/static/droidrun.png +0 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
dist/
|
2
|
+
# Python bytecode files
|
3
|
+
__pycache__/
|
4
|
+
*.py[cod]
|
5
|
+
*$py.class
|
6
|
+
trajectories/
|
7
|
+
*.class
|
8
|
+
|
9
|
+
test.py
|
10
|
+
test.ipynb
|
11
|
+
*.log
|
12
|
+
|
13
|
+
messages_log.json
|
14
|
+
|
15
|
+
.idea
|
16
|
+
.vscode
|
17
|
+
.vscode-test
|
18
|
+
.vscode-test-*
|
19
|
+
.idea/*
|
20
|
+
.vscode/*
|
21
|
+
patch_apis.py
|
22
|
+
.*
|
@@ -64,6 +64,29 @@ Thank you for your interest in contributing to DroidRun! This document provides
|
|
64
64
|
- Check our [Documentation](https://docs.droidrun.ai)
|
65
65
|
- Report bugs and request features through [GitHub Issues](https://github.com/droidrun/droidrun/issues)
|
66
66
|
|
67
|
+
## Security Checks
|
68
|
+
|
69
|
+
To ensure the security of the codebase, we have integrated security checks using `bandit` and `safety`. These tools help identify potential security issues in the code and dependencies.
|
70
|
+
|
71
|
+
### Running Security Checks
|
72
|
+
|
73
|
+
Before submitting any code, please run the following security checks:
|
74
|
+
|
75
|
+
1. **Bandit**: A tool to find common security issues in Python code.
|
76
|
+
```bash
|
77
|
+
bandit -r droidrun
|
78
|
+
```
|
79
|
+
|
80
|
+
2. **Safety**: A tool to check your installed dependencies for known security vulnerabilities.
|
81
|
+
```bash
|
82
|
+
safety check
|
83
|
+
```
|
84
|
+
|
85
|
+
You can also run both checks using the provided script:
|
86
|
+
```bash
|
87
|
+
python -m droidrun.tools.security_check
|
88
|
+
```
|
89
|
+
|
67
90
|
## Pull Request Process
|
68
91
|
|
69
92
|
1. Update documentation for any modified functionality
|
@@ -92,4 +115,4 @@ English is the preferred language for all contributions, including:
|
|
92
115
|
- Commit messages
|
93
116
|
- Pull requests
|
94
117
|
- Issue reports
|
95
|
-
- Community discussions
|
118
|
+
- Community discussions
|
droidrun-0.3.0/PKG-INFO
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: droidrun
|
3
|
+
Version: 0.3.0
|
4
|
+
Summary: A framework for controlling Android devices through LLM agents
|
5
|
+
Project-URL: Homepage, https://github.com/droidrun/droidrun
|
6
|
+
Project-URL: Bug Tracker, https://github.com/droidrun/droidrun/issues
|
7
|
+
Project-URL: Documentation, https://docs.droidrun.ai/
|
8
|
+
Author-email: Niels Schmidt <niels.schmidt@droidrun.ai>
|
9
|
+
License: MIT
|
10
|
+
License-File: LICENSE
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
12
|
+
Classifier: Intended Audience :: Developers
|
13
|
+
Classifier: Intended Audience :: Information Technology
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
19
|
+
Classifier: Topic :: Communications :: Chat
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
24
|
+
Classifier: Topic :: Software Development :: Testing
|
25
|
+
Classifier: Topic :: Software Development :: Testing :: Acceptance
|
26
|
+
Classifier: Topic :: System :: Emulators
|
27
|
+
Classifier: Topic :: Utilities
|
28
|
+
Requires-Python: >=3.10
|
29
|
+
Requires-Dist: aiofiles>=23.0.0
|
30
|
+
Requires-Dist: anthropic>=0.7.0
|
31
|
+
Requires-Dist: arize-phoenix
|
32
|
+
Requires-Dist: click>=8.1.0
|
33
|
+
Requires-Dist: llama-index
|
34
|
+
Requires-Dist: llama-index-callbacks-arize-phoenix
|
35
|
+
Requires-Dist: llama-index-llms-anthropic
|
36
|
+
Requires-Dist: llama-index-llms-deepseek
|
37
|
+
Requires-Dist: llama-index-llms-gemini
|
38
|
+
Requires-Dist: llama-index-llms-ollama
|
39
|
+
Requires-Dist: llama-index-llms-openai
|
40
|
+
Requires-Dist: openai>=1.0.0
|
41
|
+
Requires-Dist: pillow>=10.0.0
|
42
|
+
Requires-Dist: pydantic>=2.0.0
|
43
|
+
Requires-Dist: python-dotenv>=1.0.0
|
44
|
+
Requires-Dist: rich>=13.0.0
|
45
|
+
Provides-Extra: dev
|
46
|
+
Requires-Dist: bandit>=1.7.0; extra == 'dev'
|
47
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
48
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
49
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
50
|
+
Requires-Dist: safety>=2.0.0; extra == 'dev'
|
51
|
+
Description-Content-Type: text/markdown
|
52
|
+
|
53
|
+
<picture>
|
54
|
+
<source media="(prefers-color-scheme: dark)" srcset="./static/droidrun-dark.png">
|
55
|
+
<source media="(prefers-color-scheme: light)" srcset="./static/droidrun.png">
|
56
|
+
<img src="./static/droidrun.png" width="full">
|
57
|
+
</picture>
|
58
|
+
|
59
|
+
[](https://github.com/droidrun/droidrun/stargazers)
|
60
|
+
[](https://discord.gg/ZZbKEZZkwK)
|
61
|
+
[](https://docs.droidrun.ai)
|
62
|
+
[](https://droidrun.ai/benchmark)
|
63
|
+
[](https://x.com/droid_run)
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
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)
|
68
|
+
|
69
|
+
- 🤖 Control Android and iOS devices with natural language commands
|
70
|
+
- 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
|
71
|
+
- 🧠 Planning capabilities for complex multi-step tasks
|
72
|
+
- 💻 Easy to use CLI with enhanced debugging features
|
73
|
+
- 🐍 Extendable Python API for custom automations
|
74
|
+
- 📸 Screenshot analysis for visual understanding of the device
|
75
|
+
- Execution tracing with Arize Phoenix
|
76
|
+
|
77
|
+
## 📦 Installation
|
78
|
+
|
79
|
+
```bash
|
80
|
+
pip install droidrun
|
81
|
+
```
|
82
|
+
|
83
|
+
## 🚀 Quickstart
|
84
|
+
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
85
|
+
|
86
|
+
|
87
|
+
## 🎬 Demo Videos
|
88
|
+
|
89
|
+
1. **Shopping Assistant**: Watch how DroidRun searches Amazon for headphones and sends the top 3 products to a colleague on WhatsApp.
|
90
|
+
|
91
|
+
Prompt: "Go to Amazon, search for headphones and write the top 3 products to my colleague on WhatsApp."
|
92
|
+
|
93
|
+
[](https://www.youtube.com/watch?v=VQK3JcifgwU)
|
94
|
+
|
95
|
+
2. **Social Media Automation**: See DroidRun open X (Twitter) and post "Hello World".
|
96
|
+
|
97
|
+
Prompt: "Open up X and post Hello World."
|
98
|
+
|
99
|
+
[](https://www.youtube.com/watch?v=i4-sDQhzt_M)
|
100
|
+
|
101
|
+
## 💡 Example Use Cases
|
102
|
+
|
103
|
+
- Automated UI testing of mobile applications
|
104
|
+
- Creating guided workflows for non-technical users
|
105
|
+
- Automating repetitive tasks on mobile devices
|
106
|
+
- Remote assistance for less technical users
|
107
|
+
- Exploring mobile UI with natural language commands
|
108
|
+
|
109
|
+
## 🗺️ Roadmap
|
110
|
+
|
111
|
+
### 🤖 Agent:
|
112
|
+
- **Improve memory**: Enhance context retention for complex multi-step tasks
|
113
|
+
- **Expand planning capabilities**: Add support for more complex reasoning strategies
|
114
|
+
- **Add Integrations**: Support more LLM providers and agent frameworks (LangChain, Agno etc.)
|
115
|
+
|
116
|
+
### ⚙️ Automations:
|
117
|
+
- **Create Automation Scripts**: Generate reusable scripts from agent actions that can be scheduled or shared
|
118
|
+
|
119
|
+
### ☁️ Cloud:
|
120
|
+
- **Hosted version**: Remote device control via web interface without local setup
|
121
|
+
- **Add-Ons**: Marketplace for extensions serving specific use cases
|
122
|
+
- **Proxy Hours**: Cloud compute time with tiered pricing for running automations
|
123
|
+
- **Droidrun AppStore**: Simple installation of Apps on your hosted devices
|
124
|
+
|
125
|
+
## 👥 Contributing
|
126
|
+
|
127
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
128
|
+
|
129
|
+
## 📄 License
|
130
|
+
|
131
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
132
|
+
|
133
|
+
## Security Checks
|
134
|
+
|
135
|
+
To ensure the security of the codebase, we have integrated security checks using `bandit` and `safety`. These tools help identify potential security issues in the code and dependencies.
|
136
|
+
|
137
|
+
### Running Security Checks
|
138
|
+
|
139
|
+
Before submitting any code, please run the following security checks:
|
140
|
+
|
141
|
+
1. **Bandit**: A tool to find common security issues in Python code.
|
142
|
+
```bash
|
143
|
+
bandit -r droidrun
|
144
|
+
```
|
145
|
+
|
146
|
+
2. **Safety**: A tool to check your installed dependencies for known security vulnerabilities.
|
147
|
+
```bash
|
148
|
+
safety scan
|
149
|
+
```
|
droidrun-0.3.0/README.md
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
<picture>
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="./static/droidrun-dark.png">
|
3
|
+
<source media="(prefers-color-scheme: light)" srcset="./static/droidrun.png">
|
4
|
+
<img src="./static/droidrun.png" width="full">
|
5
|
+
</picture>
|
6
|
+
|
7
|
+
[](https://github.com/droidrun/droidrun/stargazers)
|
8
|
+
[](https://discord.gg/ZZbKEZZkwK)
|
9
|
+
[](https://docs.droidrun.ai)
|
10
|
+
[](https://droidrun.ai/benchmark)
|
11
|
+
[](https://x.com/droid_run)
|
12
|
+
|
13
|
+
|
14
|
+
|
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
|
+
|
17
|
+
- 🤖 Control Android and iOS devices with natural language commands
|
18
|
+
- 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
|
19
|
+
- 🧠 Planning capabilities for complex multi-step tasks
|
20
|
+
- 💻 Easy to use CLI with enhanced debugging features
|
21
|
+
- 🐍 Extendable Python API for custom automations
|
22
|
+
- 📸 Screenshot analysis for visual understanding of the device
|
23
|
+
- Execution tracing with Arize Phoenix
|
24
|
+
|
25
|
+
## 📦 Installation
|
26
|
+
|
27
|
+
```bash
|
28
|
+
pip install droidrun
|
29
|
+
```
|
30
|
+
|
31
|
+
## 🚀 Quickstart
|
32
|
+
Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
|
33
|
+
|
34
|
+
|
35
|
+
## 🎬 Demo Videos
|
36
|
+
|
37
|
+
1. **Shopping Assistant**: Watch how DroidRun searches Amazon for headphones and sends the top 3 products to a colleague on WhatsApp.
|
38
|
+
|
39
|
+
Prompt: "Go to Amazon, search for headphones and write the top 3 products to my colleague on WhatsApp."
|
40
|
+
|
41
|
+
[](https://www.youtube.com/watch?v=VQK3JcifgwU)
|
42
|
+
|
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
|
+
|
49
|
+
## 💡 Example Use Cases
|
50
|
+
|
51
|
+
- Automated UI testing of mobile applications
|
52
|
+
- Creating guided workflows for non-technical users
|
53
|
+
- Automating repetitive tasks on mobile devices
|
54
|
+
- Remote assistance for less technical users
|
55
|
+
- Exploring mobile UI with natural language commands
|
56
|
+
|
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
|
+
## 👥 Contributing
|
74
|
+
|
75
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
76
|
+
|
77
|
+
## 📄 License
|
78
|
+
|
79
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
80
|
+
|
81
|
+
## Security Checks
|
82
|
+
|
83
|
+
To ensure the security of the codebase, we have integrated security checks using `bandit` and `safety`. These tools help identify potential security issues in the code and dependencies.
|
84
|
+
|
85
|
+
### Running Security Checks
|
86
|
+
|
87
|
+
Before submitting any code, please run the following security checks:
|
88
|
+
|
89
|
+
1. **Bandit**: A tool to find common security issues in Python code.
|
90
|
+
```bash
|
91
|
+
bandit -r droidrun
|
92
|
+
```
|
93
|
+
|
94
|
+
2. **Safety**: A tool to check your installed dependencies for known security vulnerabilities.
|
95
|
+
```bash
|
96
|
+
safety scan
|
97
|
+
```
|
@@ -0,0 +1,155 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta charset="utf-8">
|
4
|
+
|
5
|
+
<script src="lib/bindings/utils.js"></script>
|
6
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
8
|
+
|
9
|
+
|
10
|
+
<center>
|
11
|
+
<h1></h1>
|
12
|
+
</center>
|
13
|
+
|
14
|
+
<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
|
15
|
+
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
|
16
|
+
<link
|
17
|
+
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
|
18
|
+
rel="stylesheet"
|
19
|
+
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
|
20
|
+
crossorigin="anonymous"
|
21
|
+
/>
|
22
|
+
<script
|
23
|
+
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
|
24
|
+
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
|
25
|
+
crossorigin="anonymous"
|
26
|
+
></script>
|
27
|
+
|
28
|
+
|
29
|
+
<center>
|
30
|
+
<h1></h1>
|
31
|
+
</center>
|
32
|
+
<style type="text/css">
|
33
|
+
|
34
|
+
#mynetwork {
|
35
|
+
width: 100%;
|
36
|
+
height: 750px;
|
37
|
+
background-color: #ffffff;
|
38
|
+
border: 1px solid lightgray;
|
39
|
+
position: relative;
|
40
|
+
float: left;
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
</style>
|
49
|
+
</head>
|
50
|
+
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<div class="card" style="width: 100%">
|
54
|
+
|
55
|
+
|
56
|
+
<div id="mynetwork" class="card-body"></div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
<script type="text/javascript">
|
63
|
+
|
64
|
+
// initialize global variables.
|
65
|
+
var edges;
|
66
|
+
var nodes;
|
67
|
+
var allNodes;
|
68
|
+
var allEdges;
|
69
|
+
var nodeColors;
|
70
|
+
var originalNodes;
|
71
|
+
var network;
|
72
|
+
var container;
|
73
|
+
var options, data;
|
74
|
+
var filter = {
|
75
|
+
item : '',
|
76
|
+
property : '',
|
77
|
+
value : []
|
78
|
+
};
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
// This method is responsible for drawing the graph, returns the drawn network
|
85
|
+
function drawGraph() {
|
86
|
+
var container = document.getElementById('mynetwork');
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
// parsing and collecting nodes and edges from the python
|
91
|
+
nodes = new vis.DataSet([{"color": "#ADD8E6", "id": "_done", "label": "_done", "shape": "box"}, {"color": "#FFA07A", "id": "StopEvent", "label": "StopEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "execute_code", "label": "execute_code", "shape": "box"}, {"color": "#90EE90", "id": "TaskExecutionEvent", "label": "TaskExecutionEvent", "shape": "ellipse"}, {"color": "#90EE90", "id": "TaskExecutionResultEvent", "label": "TaskExecutionResultEvent", "shape": "ellipse"}, {"color": "#90EE90", "id": "TaskEndEvent", "label": "TaskEndEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "finalize", "label": "finalize", "shape": "box"}, {"color": "#ADD8E6", "id": "handle_execution_result", "label": "handle_execution_result", "shape": "box"}, {"color": "#90EE90", "id": "TaskInputEvent", "label": "TaskInputEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "handle_llm_input", "label": "handle_llm_input", "shape": "box"}, {"color": "#90EE90", "id": "TaskThinkingEvent", "label": "TaskThinkingEvent", "shape": "ellipse"}, {"color": "#ADD8E6", "id": "handle_llm_output", "label": "handle_llm_output", "shape": "box"}, {"color": "#ADD8E6", "id": "prepare_chat", "label": "prepare_chat", "shape": "box"}, {"color": "#E27AFF", "id": "StartEvent", "label": "StartEvent", "shape": "ellipse"}]);
|
92
|
+
edges = new vis.DataSet([{"arrows": "to", "from": "StopEvent", "to": "_done"}, {"arrows": "to", "from": "execute_code", "to": "TaskExecutionResultEvent"}, {"arrows": "to", "from": "execute_code", "to": "TaskEndEvent"}, {"arrows": "to", "from": "TaskExecutionEvent", "to": "execute_code"}, {"arrows": "to", "from": "finalize", "to": "StopEvent"}, {"arrows": "to", "from": "TaskEndEvent", "to": "finalize"}, {"arrows": "to", "from": "handle_execution_result", "to": "TaskInputEvent"}, {"arrows": "to", "from": "TaskExecutionResultEvent", "to": "handle_execution_result"}, {"arrows": "to", "from": "handle_llm_input", "to": "TaskThinkingEvent"}, {"arrows": "to", "from": "handle_llm_input", "to": "TaskEndEvent"}, {"arrows": "to", "from": "TaskInputEvent", "to": "handle_llm_input"}, {"arrows": "to", "from": "handle_llm_output", "to": "TaskExecutionEvent"}, {"arrows": "to", "from": "handle_llm_output", "to": "TaskInputEvent"}, {"arrows": "to", "from": "TaskThinkingEvent", "to": "handle_llm_output"}, {"arrows": "to", "from": "prepare_chat", "to": "TaskInputEvent"}, {"arrows": "to", "from": "StartEvent", "to": "prepare_chat"}]);
|
93
|
+
|
94
|
+
nodeColors = {};
|
95
|
+
allNodes = nodes.get({ returnType: "Object" });
|
96
|
+
for (nodeId in allNodes) {
|
97
|
+
nodeColors[nodeId] = allNodes[nodeId].color;
|
98
|
+
}
|
99
|
+
allEdges = edges.get({ returnType: "Object" });
|
100
|
+
// adding nodes and edges to the graph
|
101
|
+
data = {nodes: nodes, edges: edges};
|
102
|
+
|
103
|
+
var options = {
|
104
|
+
"configure": {
|
105
|
+
"enabled": false
|
106
|
+
},
|
107
|
+
"edges": {
|
108
|
+
"color": {
|
109
|
+
"inherit": true
|
110
|
+
},
|
111
|
+
"smooth": {
|
112
|
+
"enabled": true,
|
113
|
+
"type": "dynamic"
|
114
|
+
}
|
115
|
+
},
|
116
|
+
"interaction": {
|
117
|
+
"dragNodes": true,
|
118
|
+
"hideEdgesOnDrag": false,
|
119
|
+
"hideNodesOnDrag": false
|
120
|
+
},
|
121
|
+
"physics": {
|
122
|
+
"enabled": true,
|
123
|
+
"stabilization": {
|
124
|
+
"enabled": true,
|
125
|
+
"fit": true,
|
126
|
+
"iterations": 1000,
|
127
|
+
"onlyDynamicEdges": false,
|
128
|
+
"updateInterval": 50
|
129
|
+
}
|
130
|
+
}
|
131
|
+
};
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
network = new vis.Network(container, data, options);
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
return network;
|
150
|
+
|
151
|
+
}
|
152
|
+
drawGraph();
|
153
|
+
</script>
|
154
|
+
</body>
|
155
|
+
</html>
|
@@ -10,6 +10,29 @@
|
|
10
10
|
"favicon": "/favicon.png",
|
11
11
|
"navigation": {
|
12
12
|
"versions": [
|
13
|
+
{
|
14
|
+
"version": "0.3.0",
|
15
|
+
"groups": [
|
16
|
+
{
|
17
|
+
"group": "Getting Started",
|
18
|
+
"pages": [
|
19
|
+
"v3/overview",
|
20
|
+
"v3/quickstart"
|
21
|
+
]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"group": "Core Concepts",
|
25
|
+
"pages": [
|
26
|
+
"v3/concepts/agent",
|
27
|
+
"v3/concepts/planning",
|
28
|
+
"v3/concepts/android-control",
|
29
|
+
"v3/concepts/ios-control",
|
30
|
+
"v3/concepts/portal-app",
|
31
|
+
"v3/concepts/tracing"
|
32
|
+
]
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
13
36
|
{
|
14
37
|
"version": "0.2.0",
|
15
38
|
"groups": [
|
@@ -63,6 +86,10 @@
|
|
63
86
|
{
|
64
87
|
"label": "GitHub",
|
65
88
|
"href": "https://github.com/droidrun/droidrun"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"label": "Benchmark",
|
92
|
+
"href": "https://droidrun.ai/benchmark"
|
66
93
|
}
|
67
94
|
],
|
68
95
|
"primary": {
|
@@ -73,7 +100,8 @@
|
|
73
100
|
},
|
74
101
|
"footer": {
|
75
102
|
"socials": {
|
76
|
-
"github": "https://github.com/droidrun/droidrun"
|
103
|
+
"github": "https://github.com/droidrun/droidrun",
|
104
|
+
"x": "https://x.com/droid_run"
|
77
105
|
}
|
78
106
|
}
|
79
107
|
}
|
@@ -5,7 +5,7 @@ description: 'Welcome to DroidRun - Control Android devices with LLM agents'
|
|
5
5
|
|
6
6
|
# Welcome to DroidRun
|
7
7
|
|
8
|
-
DroidRun is a powerful framework that enables you to control Android devices through LLM agents. It provides a simple and intuitive way to automate Android device interactions using natural language commands.
|
8
|
+
DroidRun is a powerful framework that enables you to control Android devices through LLM agents. It provides a simple and intuitive way to automate Android and iOS device interactions using natural language commands.
|
9
9
|
|
10
10
|
## Features
|
11
11
|
|
@@ -31,42 +31,32 @@ DroidRun is a powerful framework that enables you to control Android devices thr
|
|
31
31
|
droidrun "Open the settings app"
|
32
32
|
|
33
33
|
# With specific provider
|
34
|
-
droidrun "Open calculator app" --provider
|
35
|
-
|
36
|
-
# With vision capabilities
|
37
|
-
droidrun "Open Calculator and take a screenshot" --vision
|
34
|
+
droidrun "Open calculator app" --provider Gemini --model models/gemini-2.5-pro
|
38
35
|
```
|
39
36
|
|
40
37
|
Or with Python:
|
41
38
|
|
42
39
|
```python
|
43
40
|
import asyncio
|
44
|
-
import
|
45
|
-
from droidrun.agent.react_agent import ReActAgent
|
46
|
-
from droidrun.agent.llm_reasoning import LLMReasoner
|
41
|
+
from droidrun import DroidAgent, load_llm, AdbTools
|
47
42
|
|
48
43
|
async def main():
|
49
|
-
#
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
temperature=0.2,
|
55
|
-
vision=True # Enable vision capabilities
|
56
|
-
)
|
44
|
+
# initialize agent tools (ios/adb/web)
|
45
|
+
tools = AdbTools(serial=device)
|
46
|
+
|
47
|
+
# initialize llm adapter
|
48
|
+
llm = load_llm(provider_name="Gemini", model="models/gemini-2.5-pro")
|
57
49
|
|
58
|
-
# Create
|
59
|
-
agent =
|
60
|
-
|
61
|
-
|
62
|
-
|
50
|
+
# Create the DroidAgent
|
51
|
+
agent = DroidAgent(
|
52
|
+
goal=command,
|
53
|
+
llm=llm,
|
54
|
+
tools=tools,
|
63
55
|
)
|
56
|
+
|
57
|
+
result = await agent.run()
|
64
58
|
|
65
|
-
steps
|
66
|
-
|
67
|
-
# Get token usage statistics
|
68
|
-
stats = llm.get_token_usage_stats()
|
69
|
-
print(f"Total tokens used: {stats['total_tokens']}")
|
59
|
+
print(f"Success: {result['success']} in {result['steps']} steps -> {result['reason']}")
|
70
60
|
|
71
61
|
if __name__ == "__main__":
|
72
62
|
asyncio.run(main())
|
@@ -74,9 +64,15 @@ if __name__ == "__main__":
|
|
74
64
|
|
75
65
|
## Prerequisites
|
76
66
|
|
67
|
+
- API key for at least one LLM provider (OpenAI, Anthropic, or Google Gemini)
|
68
|
+
|
69
|
+
**for Android**
|
77
70
|
- Android device connected via USB or ADB over TCP/IP
|
78
71
|
- ADB (Android Debug Bridge) installed
|
79
|
-
-
|
72
|
+
- Droidrun Portal installed on device
|
73
|
+
|
74
|
+
**for iOS**
|
75
|
+
- Run the [Droidrun Portal iOS service]()
|
80
76
|
|
81
77
|
## Getting Started
|
82
78
|
|
@@ -145,7 +145,6 @@ agent = DroidAgent(
|
|
145
145
|
reasoning=True, # Enable planning
|
146
146
|
max_steps=15, # Maximum planning steps
|
147
147
|
timeout=1000, # Overall timeout
|
148
|
-
max_retries=3, # Retry attempts
|
149
148
|
enable_tracing=True, # Execution tracing
|
150
149
|
debug=False # Debug mode
|
151
150
|
)
|
@@ -223,7 +222,6 @@ print(f"Task history: {result['task_history']}")
|
|
223
222
|
- Consider device performance
|
224
223
|
|
225
224
|
4. **Handle Errors Properly**
|
226
|
-
- Configure max_retries for robustness
|
227
225
|
- Check task_history for debugging
|
228
226
|
|
229
227
|
5. **Memory Usage**
|
@@ -85,7 +85,6 @@ agent = DroidAgent(
|
|
85
85
|
tools_instance=tools,
|
86
86
|
reasoning=True, # Enable planning
|
87
87
|
max_steps=15, # Maximum planning iterations
|
88
|
-
max_retries=3, # Retry attempts for failed tasks
|
89
88
|
timeout=1000 # Overall timeout in seconds
|
90
89
|
)
|
91
90
|
```
|
@@ -134,7 +133,6 @@ Planning is most effective for:
|
|
134
133
|
- Consider device and network performance
|
135
134
|
|
136
135
|
3. **Error Handling**
|
137
|
-
- Set reasonable max_retries
|
138
136
|
- Check task_history for debugging failed tasks
|
139
137
|
|
140
138
|
4. **Memory Usage**
|
@@ -50,7 +50,7 @@ from droidrun.tools import load_tools
|
|
50
50
|
|
51
51
|
async def main():
|
52
52
|
tool_list, tools_instance = await load_tools()
|
53
|
-
llm = load_llm(provider_name="Gemini", model="models/gemini-2.5-pro
|
53
|
+
llm = load_llm(provider_name="Gemini", model="models/gemini-2.5-pro")
|
54
54
|
|
55
55
|
# Enable tracing
|
56
56
|
agent = DroidAgent(
|
@@ -37,7 +37,7 @@ DroidRun is a powerful framework that enables you to control Android devices thr
|
|
37
37
|
droidrun "Open the settings app"
|
38
38
|
|
39
39
|
# With specific provider and model
|
40
|
-
droidrun "Open calculator app" --provider Gemini --model models/gemini-2.5-pro
|
40
|
+
droidrun "Open calculator app" --provider Gemini --model models/gemini-2.5-pro
|
41
41
|
|
42
42
|
# With vision and planning capabilities
|
43
43
|
droidrun "Open Calculator and take a screenshot" --vision --reasoning
|
@@ -56,7 +56,7 @@ async def main():
|
|
56
56
|
tool_list, tools_instance = await load_tools()
|
57
57
|
llm = load_llm(
|
58
58
|
provider_name="Gemini", # OpenAI, ollama, Anthropic, Gemini, DeepSeek
|
59
|
-
model="models/gemini-2.5-pro
|
59
|
+
model="models/gemini-2.5-pro",
|
60
60
|
temperature=0.2
|
61
61
|
)
|
62
62
|
|