Skip to main content

What is Shared State?

MobileAgentState is a Pydantic model that serves as the central coordination mechanism for Mobilerun’s multi-agent workflow. It’s a shared data structure that all agents (Manager, Executor, FastAgent) can read from and write to. Shared state enables:
  • Cross-agent communication: Agents share information about actions, results, and errors
  • Progress tracking: Step counts, action history, visited apps/screens
  • Memory management: Agent memory, custom variables, user session data
  • Error coordination: Error flags, escalation thresholds, error descriptions
Key insight: Shared state replaces complex message passing. Instead of sending data back and forth, agents update a single shared object.

Core State Fields