arXiv:2603.29678cs.AI2026-03被引 1

将复杂代理日志转化为可读、可检索的三视图结构,提升分析效率。

View-oriented Conversation Compiler for Agent Trace Analysis

  • 基于中间表示构建全量、界面和自适应三视图,保留原始行号与角色信息。
  • 在AppWorld测试中任务成功率提升1.1至4.2点,反射器耗token减半至三分之二。
  • 适合需要高效分析代理行为轨迹的研究者与工程团队使用。

我们观察到代理轨迹是一个结构化文档,一次编码代理会话包含用户输入、助手文本、思维链块、工具调用、工具结果、子代理调用、压缩边界及注入指令,可能超过一万行JSONL。有效的轨迹分析需兼顾无损记录、会话级概览与按对话角色的内容检索。为此,我们提出视图导向对话编译器(VCC),将原始JSONL日志通过词法分析、解析和降维处理,生成三个视图:全量视图提供无损转录并定义行号坐标系统;界面视图重建用户感知的交互;自适应视图选取相关轨迹内容并保留角色标注与行范围指针。行号在视图降维前分配,确保所有指针可映射回全量视图。我们在AppWorld上通过改变反射器输入格式进行上下文工程实验,三种模型配置与两组测试集结果显示,VCC使任务目标通过率提升1.1至4.2点,反射器令牌消耗减少一半至三分之二,内存文件更小。结果表明,轨迹格式是上下文工程基础设施的重要组成部分。

原文摘要 · Abstract (English)

We observe that an agent trace is a structured document. A coding agent session contains user turns, assistant text, chain of thought blocks, tool calls, tool results, subagent invocations, compaction boundaries, and harness injected directives, and may exceed ten thousand JSONL lines. Effective trace analysis requires a lossless record, a session level overview, and content retrieval with conversational roles. To this end, we propose VCC, namely View oriented Conversation Compiler, which lexes, parses, and lowers a raw JSONL log into three views based on one intermediate representation. The full view provides the lossless transcript and defines the line number coordinate system. The UI view reconstructs the interaction perceived by the user. The adaptive view selects relevant trace content and preserves role annotations and line range pointers. Line numbers are assigned before view lowering, ensuring that all pointers can be resolved to the full view. We evaluate VCC in a context engineering experiment on AppWorld by varying the input format of the reflector. Experiments with three model configurations and two test splits show that VCC improves aggregate task goal pass rates by 1.1 to 4.2 points, reduces reflector token consumption by one half to two thirds, and generates smaller memory files. These results demonstrate the effectiveness of trace format as an important component of context engineering infrastructure.

代理分析日志处理上下文工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。