droidrun 0.2.0__tar.gz → 0.3.1__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.
Files changed (102) hide show
  1. droidrun-0.3.1/.github/workflows/publish.yml +76 -0
  2. droidrun-0.3.1/.gitignore +23 -0
  3. {droidrun-0.2.0 → droidrun-0.3.1}/CONTRIBUTING.md +24 -1
  4. droidrun-0.3.1/PKG-INFO +150 -0
  5. droidrun-0.3.1/README.md +97 -0
  6. {droidrun-0.2.0 → droidrun-0.3.1}/docs/docs.json +29 -1
  7. {droidrun-0.2.0 → droidrun-0.3.1}/docs/introduction.mdx +23 -27
  8. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/concepts/agent.mdx +0 -2
  9. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/concepts/planning.mdx +0 -2
  10. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/concepts/tracing.mdx +1 -1
  11. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/overview.mdx +2 -2
  12. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/quickstart.mdx +3 -3
  13. droidrun-0.3.1/docs/v3/concepts/agent.mdx +227 -0
  14. droidrun-0.3.1/docs/v3/concepts/android-control.mdx +233 -0
  15. droidrun-0.3.1/docs/v3/concepts/ios-control.mdx +192 -0
  16. droidrun-0.3.1/docs/v3/concepts/planning.mdx +140 -0
  17. droidrun-0.3.1/docs/v3/concepts/portal-app.mdx +59 -0
  18. droidrun-0.3.1/docs/v3/concepts/tracing.mdx +160 -0
  19. droidrun-0.3.1/docs/v3/overview.mdx +122 -0
  20. droidrun-0.3.1/docs/v3/quickstart.mdx +356 -0
  21. droidrun-0.3.1/droidrun/__init__.py +31 -0
  22. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/__main__.py +1 -1
  23. droidrun-0.3.1/droidrun/adb/__init__.py +13 -0
  24. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/adb/device.py +1 -1
  25. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/adb/manager.py +2 -2
  26. droidrun-0.3.1/droidrun/agent/__init__.py +6 -0
  27. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/codeact/__init__.py +2 -4
  28. droidrun-0.3.1/droidrun/agent/codeact/codeact_agent.py +429 -0
  29. droidrun-0.3.1/droidrun/agent/codeact/events.py +28 -0
  30. droidrun-0.3.1/droidrun/agent/codeact/prompts.py +26 -0
  31. droidrun-0.3.1/droidrun/agent/common/default.py +5 -0
  32. droidrun-0.3.1/droidrun/agent/common/events.py +4 -0
  33. droidrun-0.3.1/droidrun/agent/context/__init__.py +23 -0
  34. droidrun-0.3.1/droidrun/agent/context/agent_persona.py +15 -0
  35. droidrun-0.3.1/droidrun/agent/context/context_injection_manager.py +66 -0
  36. droidrun-0.3.1/droidrun/agent/context/episodic_memory.py +15 -0
  37. droidrun-0.3.1/droidrun/agent/context/personas/__init__.py +11 -0
  38. droidrun-0.3.1/droidrun/agent/context/personas/app_starter.py +44 -0
  39. droidrun-0.3.1/droidrun/agent/context/personas/default.py +95 -0
  40. droidrun-0.3.1/droidrun/agent/context/personas/extractor.py +52 -0
  41. droidrun-0.3.1/droidrun/agent/context/personas/ui_expert.py +107 -0
  42. droidrun-0.3.1/droidrun/agent/context/reflection.py +20 -0
  43. droidrun-0.3.1/droidrun/agent/context/task_manager.py +124 -0
  44. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/droid/__init__.py +2 -2
  45. droidrun-0.3.1/droidrun/agent/droid/droid_agent.py +362 -0
  46. droidrun-0.3.1/droidrun/agent/droid/events.py +28 -0
  47. droidrun-0.3.1/droidrun/agent/oneflows/reflector.py +265 -0
  48. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/planner/__init__.py +2 -4
  49. droidrun-0.3.1/droidrun/agent/planner/events.py +16 -0
  50. droidrun-0.3.1/droidrun/agent/planner/planner_agent.py +288 -0
  51. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/planner/prompts.py +33 -53
  52. droidrun-0.3.1/droidrun/agent/utils/__init__.py +3 -0
  53. droidrun-0.3.1/droidrun/agent/utils/async_utils.py +17 -0
  54. droidrun-0.3.1/droidrun/agent/utils/chat_utils.py +309 -0
  55. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/utils/executer.py +49 -14
  56. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/agent/utils/llm_picker.py +14 -10
  57. droidrun-0.3.1/droidrun/agent/utils/trajectory.py +184 -0
  58. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/cli/__init__.py +1 -1
  59. droidrun-0.3.1/droidrun/cli/logs.py +283 -0
  60. droidrun-0.3.1/droidrun/cli/main.py +503 -0
  61. droidrun-0.3.1/droidrun/tools/__init__.py +9 -0
  62. droidrun-0.2.0/droidrun/tools/actions.py → droidrun-0.3.1/droidrun/tools/adb.py +381 -412
  63. droidrun-0.3.1/droidrun/tools/ios.py +596 -0
  64. droidrun-0.3.1/droidrun/tools/tools.py +95 -0
  65. {droidrun-0.2.0 → droidrun-0.3.1}/pyproject.toml +7 -4
  66. droidrun-0.2.0/.gitignore +0 -5
  67. droidrun-0.2.0/PKG-INFO +0 -373
  68. droidrun-0.2.0/README.md +0 -323
  69. droidrun-0.2.0/droidrun/__init__.py +0 -26
  70. droidrun-0.2.0/droidrun/adb/__init__.py +0 -13
  71. droidrun-0.2.0/droidrun/agent/codeact/codeact_agent.py +0 -334
  72. droidrun-0.2.0/droidrun/agent/codeact/events.py +0 -36
  73. droidrun-0.2.0/droidrun/agent/codeact/prompts.py +0 -78
  74. droidrun-0.2.0/droidrun/agent/droid/droid_agent.py +0 -418
  75. droidrun-0.2.0/droidrun/agent/planner/events.py +0 -20
  76. droidrun-0.2.0/droidrun/agent/planner/task_manager.py +0 -355
  77. droidrun-0.2.0/droidrun/agent/planner/workflow.py +0 -371
  78. droidrun-0.2.0/droidrun/agent/utils/async_utils.py +0 -56
  79. droidrun-0.2.0/droidrun/agent/utils/chat_utils.py +0 -92
  80. droidrun-0.2.0/droidrun/cli/main.py +0 -580
  81. droidrun-0.2.0/droidrun/tools/__init__.py +0 -14
  82. droidrun-0.2.0/droidrun/tools/device.py +0 -29
  83. droidrun-0.2.0/droidrun/tools/loader.py +0 -60
  84. {droidrun-0.2.0 → droidrun-0.3.1}/CHANGELOG.md +0 -0
  85. {droidrun-0.2.0 → droidrun-0.3.1}/LICENSE +0 -0
  86. {droidrun-0.2.0 → droidrun-0.3.1}/MANIFEST.in +0 -0
  87. {droidrun-0.2.0 → droidrun-0.3.1}/docs/conf.py +0 -0
  88. {droidrun-0.2.0 → droidrun-0.3.1}/docs/favicon.png +0 -0
  89. {droidrun-0.2.0 → droidrun-0.3.1}/docs/logo/dark.svg +0 -0
  90. {droidrun-0.2.0 → droidrun-0.3.1}/docs/logo/light.svg +0 -0
  91. {droidrun-0.2.0 → droidrun-0.3.1}/docs/quickstart.mdx +0 -0
  92. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v1/concepts/agent.mdx +0 -0
  93. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v1/concepts/android-control.mdx +0 -0
  94. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v1/concepts/portal-app.mdx +0 -0
  95. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v1/overview.mdx +0 -0
  96. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v1/quickstart.mdx +0 -0
  97. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/concepts/android-control.mdx +0 -0
  98. {droidrun-0.2.0 → droidrun-0.3.1}/docs/v2/concepts/portal-app.mdx +0 -0
  99. {droidrun-0.2.0 → droidrun-0.3.1}/droidrun/adb/wrapper.py +0 -0
  100. {droidrun-0.2.0 → droidrun-0.3.1}/setup.py +0 -0
  101. {droidrun-0.2.0 → droidrun-0.3.1}/static/droidrun-dark.png +0 -0
  102. {droidrun-0.2.0 → droidrun-0.3.1}/static/droidrun.png +0 -0
@@ -0,0 +1,76 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution 📦
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ with:
13
+ persist-credentials: false
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.x"
18
+ - name: Install pypa/build
19
+ run: >-
20
+ python3 -m
21
+ pip install
22
+ build
23
+ --user
24
+ - name: Build a binary wheel and a source tarball
25
+ run: python3 -m build
26
+ - name: Store the distribution packages
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: python-package-distributions
30
+ path: dist/
31
+
32
+ publish-to-pypi:
33
+ name: >-
34
+ Publish Python 🐍 distribution 📦 to PyPI
35
+ if: startsWith(github.ref, 'refs/tags/')
36
+ needs:
37
+ - build
38
+ runs-on: ubuntu-latest
39
+ environment:
40
+ name: pypi
41
+ url: https://pypi.org/p/droidrun
42
+ permissions:
43
+ id-token: write
44
+
45
+ steps:
46
+ - name: Download all the dists
47
+ uses: actions/download-artifact@v4
48
+ with:
49
+ name: python-package-distributions
50
+ path: dist/
51
+ - name: Publish distribution 📦 to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
53
+
54
+ publish-to-testpypi:
55
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
56
+ needs:
57
+ - build
58
+ runs-on: ubuntu-latest
59
+
60
+ environment:
61
+ name: testpypi
62
+ url: https://test.pypi.org/p/droidrun
63
+
64
+ permissions:
65
+ id-token: write
66
+
67
+ steps:
68
+ - name: Download all the dists
69
+ uses: actions/download-artifact@v4
70
+ with:
71
+ name: python-package-distributions
72
+ path: dist/
73
+ - name: Publish distribution 📦 to TestPyPI
74
+ uses: pypa/gh-action-pypi-publish@release/v1
75
+ with:
76
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,23 @@
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
+ .git
23
+ .arize-phoenix
@@ -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
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: droidrun
3
+ Version: 0.3.1
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-google-genai
38
+ Requires-Dist: llama-index-llms-ollama
39
+ Requires-Dist: llama-index-llms-openai
40
+ Requires-Dist: llama-index-llms-openai-like
41
+ Requires-Dist: openai>=1.0.0
42
+ Requires-Dist: pillow>=10.0.0
43
+ Requires-Dist: pydantic>=2.0.0
44
+ Requires-Dist: python-dotenv>=1.0.0
45
+ Requires-Dist: rich>=13.0.0
46
+ Provides-Extra: dev
47
+ Requires-Dist: bandit>=1.7.0; extra == 'dev'
48
+ Requires-Dist: black>=23.0.0; extra == 'dev'
49
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
50
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
51
+ Requires-Dist: safety>=2.0.0; extra == 'dev'
52
+ Description-Content-Type: text/markdown
53
+
54
+ <picture>
55
+ <source media="(prefers-color-scheme: dark)" srcset="./static/droidrun-dark.png">
56
+ <source media="(prefers-color-scheme: light)" srcset="./static/droidrun.png">
57
+ <img src="./static/droidrun.png" width="full">
58
+ </picture>
59
+
60
+ [![GitHub stars](https://img.shields.io/github/stars/droidrun/droidrun?style=social)](https://github.com/droidrun/droidrun/stargazers)
61
+ [![Discord](https://img.shields.io/discord/1360219330318696488?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/ZZbKEZZkwK)
62
+ [![Documentation](https://img.shields.io/badge/Documentation-📕-blue)](https://docs.droidrun.ai)
63
+ [![Benchmark](https://img.shields.io/badge/Benchmark-🏅-teal)](https://droidrun.ai/benchmark)
64
+ [![Twitter Follow](https://img.shields.io/twitter/follow/droid_run?style=social)](https://x.com/droid_run)
65
+
66
+
67
+
68
+ 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
+ - 🤖 Control Android and iOS devices with natural language commands
71
+ - 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
72
+ - 🧠 Planning capabilities for complex multi-step tasks
73
+ - 💻 Easy to use CLI with enhanced debugging features
74
+ - 🐍 Extendable Python API for custom automations
75
+ - 📸 Screenshot analysis for visual understanding of the device
76
+ - 🫆 Execution tracing with Arize Phoenix
77
+
78
+ ## 📦 Installation
79
+
80
+ ```bash
81
+ pip install droidrun
82
+ ```
83
+
84
+ ## 🚀 Quickstart
85
+ Read on how to get droidrun up and running within seconds in [our docs](https://docs.droidrun.ai/v3/quickstart)!
86
+
87
+
88
+ ## 🎬 Demo Videos
89
+
90
+ 1. **Shopping Assistant**: Watch how DroidRun searches Amazon for headphones and sends the top 3 products to a colleague on WhatsApp.
91
+
92
+ Prompt: "Go to Amazon, search for headphones and write the top 3 products to my colleague on WhatsApp."
93
+
94
+ [![Shopping Assistant Demo](https://img.youtube.com/vi/VQK3JcifgwU/0.jpg)](https://www.youtube.com/watch?v=VQK3JcifgwU)
95
+
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
+ [![Social Media Automation Demo](https://img.youtube.com/vi/i4-sDQhzt_M/0.jpg)](https://www.youtube.com/watch?v=i4-sDQhzt_M)
101
+
102
+ ## 💡 Example Use Cases
103
+
104
+ - Automated UI testing of mobile applications
105
+ - Creating guided workflows for non-technical users
106
+ - Automating repetitive tasks on mobile devices
107
+ - Remote assistance for less technical users
108
+ - Exploring mobile UI with natural language commands
109
+
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
+ ## 👥 Contributing
127
+
128
+ Contributions are welcome! Please feel free to submit a Pull Request.
129
+
130
+ ## 📄 License
131
+
132
+ This project is licensed under the MIT License - see the LICENSE file for details.
133
+
134
+ ## Security Checks
135
+
136
+ 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.
137
+
138
+ ### Running Security Checks
139
+
140
+ Before submitting any code, please run the following security checks:
141
+
142
+ 1. **Bandit**: A tool to find common security issues in Python code.
143
+ ```bash
144
+ bandit -r droidrun
145
+ ```
146
+
147
+ 2. **Safety**: A tool to check your installed dependencies for known security vulnerabilities.
148
+ ```bash
149
+ safety scan
150
+ ```
@@ -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
+ [![GitHub stars](https://img.shields.io/github/stars/droidrun/droidrun?style=social)](https://github.com/droidrun/droidrun/stargazers)
8
+ [![Discord](https://img.shields.io/discord/1360219330318696488?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/ZZbKEZZkwK)
9
+ [![Documentation](https://img.shields.io/badge/Documentation-📕-blue)](https://docs.droidrun.ai)
10
+ [![Benchmark](https://img.shields.io/badge/Benchmark-🏅-teal)](https://droidrun.ai/benchmark)
11
+ [![Twitter Follow](https://img.shields.io/twitter/follow/droid_run?style=social)](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
+ [![Shopping Assistant Demo](https://img.youtube.com/vi/VQK3JcifgwU/0.jpg)](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
+ [![Social Media Automation Demo](https://img.youtube.com/vi/i4-sDQhzt_M/0.jpg)](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
+ ```
@@ -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 gemini --model gemini-2.0-flash
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 os
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
- # Create an LLM instance
50
- llm = LLMReasoner(
51
- llm_provider="gemini", # "openai", "anthropic", or "gemini"
52
- model_name="gemini-2.0-flash",
53
- api_key=os.environ.get("GEMINI_API_KEY"),
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 and run the agent
59
- agent = ReActAgent(
60
- task="Open the Settings app",
61
- llm=llm,
62
- vision=True # Enable screenshot analysis
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 = await agent.run()
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
- - API key for at least one LLM provider (OpenAI, Anthropic, or Google Gemini)
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-preview-05-06")
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-preview-05-06
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-preview-05-06",
59
+ model="models/gemini-2.5-pro",
60
60
  temperature=0.2
61
61
  )
62
62
 
@@ -169,7 +169,7 @@ Test with these commands:
169
169
  droidrun "Open the settings app"
170
170
 
171
171
  # Using specific provider and model
172
- droidrun "Open calculator" --provider Gemini --model models/gemini-2.5-pro-preview-05-06
172
+ droidrun "Open calculator" --provider Gemini --model models/gemini-2.5-pro
173
173
 
174
174
  # With vision and planning
175
175
  droidrun "Take a screenshot and describe what's on the screen" --vision --reasoning
@@ -218,7 +218,7 @@ async def main():
218
218
  tool_list, tools_instance = await load_tools()
219
219
  llm = load_llm(
220
220
  provider_name="Gemini", # Case sensitive: OpenAI, Ollama, Anthropic, Gemini, DeepSeek
221
- model="models/gemini-2.5-pro-preview-05-06",
221
+ model="models/gemini-2.5-pro",
222
222
  temperature=0.2
223
223
  )
224
224
 
@@ -260,7 +260,7 @@ async def main():
260
260
 
261
261
  # Create LlamaIndex LLM directly
262
262
  llm = Gemini(
263
- model="models/gemini-2.5-pro-preview-05-06",
263
+ model="models/gemini-2.5-pro",
264
264
  temperature=0.2,
265
265
  additional_kwargs={"safety_settings": {"hate": "block_none"}}
266
266
  )