Researchers have proposed turning collections of messy AI-agent execution logs into compact finite-state machines. The method groups recurring behavior across runs so operators can inspect a shared structure instead of reviewing each long trace independently.

Each state represents a recurring stage in agent behavior, while transitions capture how runs move toward another action or a failure. The resulting graph can support next-step prediction and warn when a trace begins to resemble patterns that previously ended badly.

Across 12 public datasets, the authors report machines containing between 7 and 43 states. They say the graphs replayed held-out traces with at least 0.997 fitness, a measure of how closely the summarized structure can reproduce observed behavior. The study compares information from successful and failed runs rather than learning only from completed tasks.

A compact graph can make audits easier, but it does not explain why an agent chose an action or guarantee that a new failure will follow an old route. State definitions and prediction quality may also change with the model, tools and task distribution. The work is a preprint, so its usefulness for real-time monitoring in production still requires independent testing.