View-oriented Conversation Compiler for Agent Trace Analysis
AI 摘要
提出了VCC编译器,将Agent JSONL日志编译成结构化视图,提升Agent trace分析效果,并降低token消耗。
主要贡献
- 提出了View-oriented Conversation Compiler (VCC)
- 展示了VCC在提高上下文学习任务pass rates和降低token消耗方面的优势
- 强调了消息格式在上下文学习中的重要性
方法论
设计并实现了VCC编译器,通过词法分析、语法分析、IR转换等步骤,将原始JSONL日志转换为多种结构化视图,并在AppWorld上进行了实验。
原文摘要
Agent traces carry increasing analytical value in the era of context learning and harness-driven agentic cognition, yet most prior work treats conversation format as a trivial engineering detail. Modern agent conversations contain deeply structured content, including nested tool calls and results, chain-of-thought reasoning blocks, sub-agent invocations, context-window compaction boundaries, and harness-injected system directives, whose complexity far exceeds that of simple user-assistant exchanges. Feeding such traces to a reflector or other analytical mechanism in plain text, JSON, YAML, or via grep can materially degrade analysis quality. This paper presents VCC (View-oriented Conversation Compiler), a compiler (lex, parse, IR, lower, emit) that transforms raw agent JSONL logs into a family of structured views: a full view (lossless transcript serving as the canonical line-number coordinate system), a user-interface view (reconstructing the interaction as the user actually perceived it), and an adaptive view (a structure-preserving projection governed by a relevance predicate). In a context-learning experiment on AppWorld, replacing only the reflector's input format, from raw JSONL to VCC-compiled views, leads to higher pass rates across all three model configurations tested, while cutting reflector token consumption by half to two-thirds and producing more concise learned memory. These results suggest that message format functions as infrastructure for context learning, not as an incidental implementation choice.