Skip to main content
This guide covers local development where you configure LLMs via config files and have full control over the execution environment.
Make sure you’ve completed the Installation steps before proceeding.

Configure LLM Settings

1. Create LLM Config File

Create a llm-config.override.jsonc file to configure your LLM models. This file will override the default configuration.
llm-config.override.jsonc

2. Configure Environment Variables

Create a .env file in your project root with necessary API keys:
.env
Never commit your .env file to version control. Add it to your .gitignore.

Creating Your First Automation

Let’s write a simple script that opens a calculator app and performs a basic calculation.
For more examples, check out the mobile-use SDK examples directory on GitHub.
calculator_demo.py

Run the script

1

Initialize the Agent

The agent connects to your device and starts required servers.
2

Execute the Task

The agent interprets your goal, navigates the UI, and performs the calculation.
3

Clean Up

Resources are properly released.

Getting Structured Output

Mobile-use SDK can return structured data using Pydantic models:
structured_output.py
Using Pydantic models ensures type-safe, validated output from your automation tasks.

Understanding the Code

Agent Profile

The AgentProfile defines which LLM models power different components of the agent.

Agent Configuration

The Builders.AgentConfig provides a fluent API to configure your agent.

Running Tasks

Tasks are executed asynchronously and can return structured output.

Why run locally?

  • Full control over LLM providers, including the Minitap API
  • Local, BrowserStack, or Minitap cloud-device access
  • Support for custom, offline, or air-gapped infrastructure
  • No dependency on the removed hosted task/profile product

Next Steps

Core Concepts

Understand the architecture and components

Examples

Explore more practical examples

SDK Reference

Detailed SDK documentation

Troubleshooting

Common issues and solutions