Skip to main content
Reference for core types and data structures used in the mobile-use SDK.

AgentProfile

Represents a profile for the mobile-use agent with LLM configuration.

Constructor

str
required
Name of the profile
LLMConfig
LLM configuration for the agent
str
Path to a file containing LLM configuration (JSONC format)
llm_config and from_file are mutually exclusive - use only one.

Examples


TaskRequest

Represents a mobile automation task request.

Attributes

str
Natural language description of the task goal
str | None
Name of the agent profile to use
str | None
Name of the task for logging
str | None
Description of the expected output format
type[TOutput] | None
Pydantic model class for typed output
int
Maximum number of steps the agent can take
bool
Whether to record execution traces
Path
Directory to save trace data
Path | None
Path to save LLM outputs
Path | None
Path to save agent thoughts

Usage

TaskRequest objects are typically created via TaskRequestBuilder:

PlatformTaskRequest

Task request for execution via the Minitap Platform.
With PlatformTaskRequest, you only reference a task by name. The SDK automatically fetches the task configuration (goal, max_steps, output format) and LLM profile from the platform, then executes the task and streams observability data back.
It also automatically upload animated GIF traces at the end of the task to cloud storage for easy viewing. See Observability & Tracing for details.

Constructor

Attributes

str
Name of the task configured on the Minitap Platform.Must exactly match a task name from platform.mobile-use.ai/tasks.
str | None
Name of the LLM profile to use for this task.If not specified, uses the Minitap-managed default profile.
str | None
API key for authentication with the Minitap Platform.If not provided, uses the MINITAP_API_KEY environment variable.
bool
default:true
When enabled, an animated GIF of the task execution is saved locally. In case of PlatformTaskRequest, the GIF is also uploaded to Minitap cloud storage for viewing in the platform.
Path
Directory to save local trace files (steps and GIF run trajectory). Defaults to system temp directory.
Path | None
Path to save the final LLM output locally.
Path | None
Path to save agent thoughts/reasoning locally.
int
Maximum number of steps (overridden by platform configuration).
PlatformTaskRequest does not support locked_app_package as a parameter. The app lock must be configured on the platform task itself at platform.mobile-use.ai/tasks.

Usage


AgentConfig

Configuration for the agent.
Created via AgentConfigBuilder:

DevicePlatform

Enum for device platforms.

Usage


ServerConfig

Configuration for agent servers.

Attributes

str
ADB server host
int
ADB server port

Usage


LLMConfig

Configuration for LLM models used by different agent components.

Structure

Components

planner

Creates high-level plans from goals

orchestrator

Coordinates execution steps

cortex

Visual understanding and decision-making

executor

Performs specific actions

hopper

Extracts relevant information from large data batches

outputter

Extracts structured output

LLM

Basic LLM configuration.
str
required
Provider name: openai, google, xai, openrouter
str
required
Model identifier (e.g., gpt-5, gemini-2.5-flash)

LLMWithFallback

LLM configuration with a fallback model.
If the primary model fails, the fallback is used automatically.

TaskRequestCommon

Common configuration shared across tasks.
Created via TaskDefaults builder:

Next Steps

Agent SDK

Core Agent class reference

Exceptions

Error handling reference