Back to AI Research

AI Research

Parsing the Stream: A Live Trace Model for Long-Hor... | AI Research

Key Takeaways

  • 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, crea...
  • A long-horizon agent's trace outgrows both of its consumers: the human observer monitoring the run, and the agent itself, whose bounded context the trace must be folded back into.
  • We present a live trace model, an append-only event ledger folded incrementally into typed run state and compiled into per-consumer views, and evaluate it for both consumers against deterministic ground truth.
  • Because the questions were co-designed with the view schema, we treat the token and cost reduction, conditional on schema coverage, as the transferable result.
  • The fold's remaining value over cheaper alternatives is deterministic auditability and serving the observer from the same state.
Paper AbstractExpand

A long-horizon agent's trace outgrows both of its consumers: the human observer monitoring the run, and the agent itself, whose bounded context the trace must be folded back into. We present a live trace model, an append-only event ledger folded incrementally into typed run state and compiled into per-consumer views, and evaluate it for both consumers against deterministic ground truth. For the observer side, evaluated with an LLM reader as proxy, the compiled view answers monitoring questions using approximately 14x and 15x fewer input tokens (by reader) and at 5-7x lower cost than a budget-capped single-call reading of the raw trace, with higher accuracy (0.85-0.87 versus 0.48). Because the questions were co-designed with the view schema, we treat the token and cost reduction, conditional on schema coverage, as the transferable result. For the agent, on 120-link sequential-dependency tasks, mechanisms that maintain the task's running statistic in per-step state succeed where full-context prompting fails (30/30 versus 8/30 under a clean protocol, n=30, labeled descriptive owing to benchmark-system co-development); a prompt-level scratchpad matches the fold's accuracy at lower cost, and a two-arm decomposition attributes the fold's accuracy to its deterministic aggregate and its cost advantage to its compactness. The fold's remaining value over cheaper alternatives is deterministic auditability and serving the observer from the same state. We derive eleven candidate requirements for trace folding from observed failures and delimit them with an order-sensitive task family on which the fold ceases to help. Code, benchmarks, a regenerable synthetic corpus, and all workbench traces are released.

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)

No comments yet

Be the first to share your thoughts!