Parsing the Stream: A Live Trace Model for Long-Horizon Agents and Their Observers
Long-horizon AI agents generate massive amounts of data as they work, creating a "trace" that eventually becomes too large for both the agent to process and for human observers to monitor effectively. This paper introduces a live trace model that solves this by transforming the raw, append-only stream of agent activity into a structured, typed state. By folding this stream into a compact, organized format, the system provides both the agent and the human observer with a clear, accurate, and cost-effective view of the agent's progress in real-time.
How the Model Works
The system operates as a four-layer stack. First, it records every agent action into an append-only ledger. Second, it performs an incremental "fold," which reduces this stream into a structured state that tracks tools used, files touched, and running statistics. Third, it creates versioned nodes that allow the system to correct its understanding of the past if new information arrives. Finally, it compiles this data into two specific views: one for the human observer and one for the agent. A "curator" loop continuously refreshes these views, allowing the agent to observe its own execution through the same system that monitors it.
Improving Monitoring and Performance
The researchers evaluated this model against traditional methods using both human-proxy LLM readers and agent-based tasks. For human observers, the compiled view allowed LLMs to answer monitoring questions with significantly higher accuracy (up to 0.87 compared to 0.48) while using 14 to 15 times fewer input tokens. This resulted in a 5–7 times lower cost compared to reading the raw trace. For the agent, the model proved highly effective on complex, 120-link sequential tasks. While full-context prompting often failed as the agent's history grew, the agent using the folded trace maintained a 100% success rate, matching the accuracy of other methods but with better auditability and lower costs.
Key Findings and Limitations
The study highlights that the primary advantage of this approach is its ability to maintain a deterministic, auditable record that serves both the agent and the observer from a single source of truth. The researchers identified eleven specific requirements for trace folding based on failures observed during development. However, they also noted that this model has boundaries; there are specific types of order-sensitive tasks where these aggregates do not apply and the folding process ceases to be helpful. Additionally, while the system is highly efficient, the researchers emphasize that the token and cost savings are conditional on the schema covering the information that the user or agent actually needs to access.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!