Get up and running with DroidRun quickly and effectively
pip install droidrun
droidrun setup
droidrun ping
export OPENAI_API_KEY=<YOUR API KEY> droidrun "Open the settings app and tell me the android version" --provider OpenAI --model gpt-4o
#!/usr/bin/env python3 import asyncio from droidrun import AdbTools, DroidAgent from llama_index.llms.google_genai import GoogleGenAI async def main(): # Load tools tools = AdbTools() # set up google gemini llm llm = GoogleGenAI( api_key="YOUR_GEMINI_API_KEY", # Replace with your Gemini API key model="gemini-2.5-flash", # or "gemini-2.5-pro" for enhanced reasoning ) # Create agent agent = DroidAgent( goal="Open Settings and check battery level", llm=llm, tools=tools ) # Run agent result = await agent.run() print(f"Success: {result['success']}") if result.get('output'): print(f"Output: {result['output']}") if __name__ == "__main__": asyncio.run(main())
Was this page helpful?