Parsing the Stream: A Live Trace Model for Long-Horizon Agents and Their Observers
cs.AI
Submitted: 2026-09-01
Updated: 2026-09-01
Comments: 22 pages, 4 figures. Code: https://github.com/SalesforceAIResearch/tracelab ; dataset: https://huggingface.co/datasets/Salesforce/tracelab-comprehend
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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.
Terminology
Abstract
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.
Sources
- The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management
- HiAgent: Hierarchical Working Memory Management for Solving Long-Horizon Agent Tasks with Large Language Model
- Scaling Long-Horizon LLM Agent via Context-Folding
- ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization
- ACON: Optimizing Context Compression for Long-horizon LLM Agents
- AgentFold: Long-Horizon Web Agents with Proactive Context Management
- LongSeeker: Elastic Context Orchestration for Long-Horizon Search Agents
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- LLMs Get Lost In Multi-Turn Conversation
- Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models
- Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
- MemGPT: Towards LLMs as Operating Systems
- Zep: A Temporal Knowledge Graph Architecture for Agent Memory
- The OpenHands Software Agent SDK: A Composable and Extensible Foundation for Production Agents
- Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Tasks
- LOCA-bench: Benchmarking Language Agents Under Controllable and Extreme Context Growth
- Slipstream: Trajectory-Grounded Compaction Validation for Long-Horizon Agents
- LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception
- ESAA: Event Sourcing for Autonomous Agents in LLM-Based Software Engineering
- PROJECTMEM: A Local-First, Event-Sourced Memory and Judgment Layer for AI Coding Agents
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems