- Arize Phoenix Tracing - Real-time LLM and agent execution tracing
- Trajectory Recording - Local screenshots and UI state for debugging
Quick Reference
Arize Phoenix Tracing
Phoenix provides real-time tracing of LLM calls, agent execution, and tool invocations. Use it to debug agent behavior, monitor token usage, and analyze execution flow.Setup
1. Install Phoenix:http://localhost:6006
and provides a web UI for viewing traces.
3. Enable tracing in Droidrun:
Via CLI:
http://localhost:6006
to see:
- LLM calls with prompts, responses, and token counts
- Agent workflow execution (Manager, Executor, CodeAct)
- Tool invocations and their results
- Execution timings and errors
Configuration
Set environment variables to customize Phoenix:Environment variable names are lowercase:
phoenix_url
and phoenix_project_name
.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), trajectories stay on your machine.Recording Levels
Level | What’s Saved | When to Use |
---|---|---|
none (default) | Nothing | Production use, saves disk space |
step | Screenshot + state per agent step | General debugging, recommended for most use cases |
action | Screenshot + state per atomic action | Detailed debugging, captures every tap/swipe/type |
action
level generates significantly more files than step
level.
Enable Recording
Via CLI:Output Location
Trajectories are saved totrajectories/
in your working directory:
- 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)
- Debug why the agent made specific decisions
- Replay failed executions
- Analyze UI element detection issues
- Build training datasets for agent improvement
Related Documentation
- Configuration System - Configure tracing and telemetry settings
- Events and Workflows - Build custom monitoring integrations
- CLI Usage - Command-line flags for monitoring