Skip to main content
Agent profiles allow you to customize the behavior and capabilities of the automation agent by configuring which LLM models power different components.

What are Agent Profiles?

An agent profile defines the LLM configuration for the various sub-agents that power mobile-use:
  • Planner - Creates high-level plans from goals
  • Orchestrator - Coordinates execution steps
  • Contextor - Gathers device context and enforces app lock constraints (optional, conditionally invokes LLM)
  • Cortex - High-level reasoning and decision-making (requires vision capabilities)
  • Executor - Performs specific actions
  • Utils - Helper agents (outputter, hopper, video analyzer)

Platform Profiles

Using the platform? Create and manage profiles on platform.mobile-use.ai/llm-profiles, then reference them by name in your tasks.

Creating Platform Profiles

  1. Go to LLM Profiles on the platform
  2. Click Create Profile
  3. Configure each agent component with your preferred models
  4. All OpenRouter models are available (no API key management needed)
  5. Reference the profile by name in your code:
Platform profiles can be updated anytime without changing code - perfect for A/B testing different models!

Local Profiles

For local development, profiles are defined in config files or code:

From Configuration File

The recommended approach for local production:
llm-config.defaults.jsonc:

Programmatic Configuration

For dynamic configuration:
You cannot specify both llm_config and from_file - they are mutually exclusive.

Using Profiles

Setting a Default Profile

Configure an agent with a default profile:

Multiple Profiles

Register multiple profiles and switch between them:

Profile Use Cases

Fast Profile - Quick tasks, simple UI navigation
Accurate Profile - Complex analysis, detailed extraction

Component Roles

Gathers device context and enforces app lock constraints.
  • Always collects current device state (UI hierarchy, focused app, screen dimensions, date/time)
  • When app lock is enabled: validates user remains in specified app
  • Decides if app deviations are intentional (e.g., OAuth flows)
  • Relaunches the app when necessary
  • Model Type: Non-vision (text-only)
  • Invokes LLM: Only when app lock is active AND app mismatch detected
  • Recommendation: Use fast, decision-focused models (e.g., gpt-5-nano, meta-llama/llama-3.1-8b-instruct)
  • Context window: Standard (does not need extended context)
The Contextor is optional and only needed if you plan to use the app lock feature. When disabled or when there’s no app lock, it functions as a simple data-gathering node without LLM inference.
The cortex handles high-level reasoning and decision-making.
  • Makes strategic decisions about task execution
  • Coordinates between planner and executor
  • Handles complex reasoning tasks
  • Analyzes both UI hierarchy and screenshots for complete device understanding
  • IMPORTANT: Requires a vision-capable model (e.g., gpt-4o, gpt-5)
  • Context window: Needs at least 128k tokens and image input support
Creates high-level plans from natural language goals.
  • Breaks down goals into subgoals
  • Estimates complexity
  • Recommendation: Use fast, capable text models (e.g., gpt-5-nano)
Coordinates execution and decides when to replicate.
  • Manages task flow
  • Handles errors and retries
  • Recommendation: Use fast models (e.g., gpt-5-nano)
Translates decisions into device actions.
  • Generates device commands using native platform APIs
  • Handles action formatting
  • Recommendation: Use fast, instruction-following models
Digs through large batches of data to extract the most relevant information for reaching the goal.
  • Processes extensive historical context and screen data
  • Extracts relevant information without modifying it
  • Context window: Needs at least 256k tokens (handles huge data batches)
  • Recommendation: Use models with large context (e.g., gpt-4.1)
Extracts structured output from final results.
  • Formats data into Pydantic models
  • Ensures type safety
  • Recommendation: Use capable text models
Analyzes video content captured from screen recordings.
  • Describes visual events and actions
  • Extracts information based on custom prompts
  • Identifies UI elements, screens, and workflows
  • IMPORTANT: Requires a video-capable Gemini model
  • Supported models: gemini-3-flash-preview (recommended), gemini-3-pro-preview, gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-flash
  • Provider: Must be google
The Video Analyzer is optional and only needed when using video recording tools via with_video_recording_tools(). See the Video Transcription example for usage details.

Supported Providers

Configure API keys in your .env file:
.env

Fallback Configuration

The cortex supports fallback models for reliability:
If the primary model fails or is unavailable, the fallback is used automatically.

Best Practices

Optimize the Cortex

Invest in the best vision-capable model for cortex - it has the biggest impact

Use Fast Models for Planner

Planner and orchestrator don’t need the most powerful models

Large Context for Hopper

Ensure hopper has at least 256k context window

Test Profile Performance

Benchmark different profile configurations for your use cases

Example: Task-Specific Profiles

Next Steps

Builders

Learn about builder patterns

Examples

See profiles in action