Skip to main content
Mobilerun provides multiple monitoring capabilities:
  1. LLM Tracing - Real-time execution tracing via Arize Phoenix or Langfuse
  2. Trajectory Recording - Local screenshots and UI state for debugging

Quick Reference


LLM Tracing

Mobilerun supports two tracing providers for real-time monitoring of LLM calls, agent execution, and tool invocations:
  • Arize Phoenix (default) - Open-source observability platform
  • Langfuse - LLM engineering platform with cloud and self-hosted options
Use tracing to debug agent behavior, monitor token usage, and analyze execution flow.

Arize Phoenix Tracing

Setup

1. Install Phoenix:
2. Start Phoenix server:
The server starts at http://localhost:6006 and provides a web UI for viewing traces. 3. Enable tracing in Mobilerun: Via CLI:
Via config.yaml:
Via code:
4. View traces: Navigate to http://localhost:6006 to see:
  • LLM calls with prompts, responses, and token counts
  • Agent workflow execution (Manager, Executor, FastAgent)
  • Tool invocations and their results
  • Execution timings and errors
For more on using Phoenix, see the Arize Phoenix documentation.

Phoenix Configuration

Set environment variables to customize Phoenix:
Environment variable names are lowercase: phoenix_url and phoenix_project_name.

Langfuse Tracing

Langfuse provides LLM observability with features like session tracking, user analytics, and cost monitoring.

Setup

1. Get Langfuse credentials: 2. Configure Mobilerun: Via environment variables:
Via config.yaml:
Via code:
3. View traces: Navigate to your Langfuse dashboard to see:
  • LLM calls with prompts, completions, and token usage
  • Agent execution traces and nested workflows
  • Session-based analytics and cost tracking
  • User-level metrics (if langfuse_user_id is set)
For more on using Langfuse, see the Langfuse documentation.

Trajectory Recording

Trajectory recording saves screenshots and UI state locally for offline debugging and analysis. Unlike telemetry (sent to PostHog) and tracing (sent to Phoenix or Langfuse), trajectories stay on your machine.

Recording Levels

Note: action level generates significantly more files than step level.

Enable Recording

Via CLI:
Via config.yaml:
Via code:

Output Location

Trajectories are saved to trajectories/ in your working directory:
Each trajectory folder contains:
  • Screenshots - PNG images of the device screen at each step/action
  • State files - JSON files with:
    • UI accessibility tree (element hierarchy with IDs, text, bounds)
    • Action executed (e.g., click(5), type("hello", 3))
    • Agent reasoning and step number
    • Device state (current app package, activity)
Use these files to:
  • Debug why the agent made specific decisions
  • Replay failed executions
  • Analyze UI element detection issues
  • Build training datasets for agent improvement