Research Papers 论文研究 4h ago Updated 2h ago 更新于 2小时前 55

Agentic Coding in the Wild: Characterizing GitHub Copilot Traces at Production Scale 野生环境中的智能体编程:在生产规模上表征GitHub Copilot轨迹

First production-scale characterization of AI coding agent workloads using 3.2M users, 13M sessions, 761M LLM calls, and 95T tokens from GitHub Copilot traces (June 2026) Agentic coding sessions feature sparse user-initiated turns that unfold into autonomous agent loops of LLM calls tightly coupled with tool execution, fundamentally differing from chatbot workloads KV cache hit rates average 90% within a turn but drop to 55% across turn boundaries and are drastically invalidated by model switche 首次在生产规模上对AI编程代理工作负载进行特征分析,数据涵盖3.2M用户、13M会话、761M次LLM调用和95T tokens 代理编码会话由稀疏的用户发起轮次组成,每个轮次展开为自主的代理循环(LLM调用几乎总是与工具执行耦合) KV缓存命中率在会话内平均达90%,但跨轮边界骤降至55%,模型切换或上下文压缩后大幅失效 工作负载呈现长尾分布特征,token消耗、时间跨度和工具调用次数差异显著 设计了轻量级空闲时间预测器,可捕获86-90%的总空闲时间,为资源调度优化提供依据

78
Hot 热度
82
Quality 质量
76
Impact 影响力

Analysis 深度分析

TL;DR

  • First production-scale characterization of AI coding agent workloads using 3.2M users, 13M sessions, 761M LLM calls, and 95T tokens from GitHub Copilot traces (June 2026)
  • Agentic coding sessions feature sparse user-initiated turns that unfold into autonomous agent loops of LLM calls tightly coupled with tool execution, fundamentally differing from chatbot workloads
  • KV cache hit rates average 90% within a turn but drop to 55% across turn boundaries and are drastically invalidated by model switches or context compaction
  • A lightweight idle-time predictor was designed that captures 86-90% of total idle time, enabling proactive resource orchestration decisions
  • The findings challenge assumptions underlying current LLM-serving systems and provide an empirical foundation for agent-native infrastructure

Why It Matters

This work is the first large-scale empirical study of AI coding agent workloads in production, revealing workload characteristics that differ significantly from traditional chatbot inference patterns. For AI infrastructure engineers and LLM serving system designers, these findings directly challenge existing optimization assumptions and highlight the need for agent-native serving architectures that account for autonomous agent loops, tool execution interleaving, and the unique KV cache dynamics observed in real-world coding agents.

Technical Details

  • Dataset: Sampled GitHub Copilot traces from June 2026 covering 3.2M users, 13M sessions, 761M LLM calls, and 95T tokens — the largest production-scale characterization of agentic coding workloads to date
  • Workload structure: Agentic coding sessions consist of sparse user-initiated turns, each triggering autonomous agent loops where LLM calls are almost always coupled with tool execution, creating a fundamentally different inference pattern from chatbot-style turn-taking
  • KV cache dynamics: Within-turn KV cache hit rates average 90%, but drop to 55% across turn boundaries; cache is drastically invalidated by operational events such as model switches and context compaction, revealing significant optimization opportunities
  • Idle-time prediction: The authors designed a lightweight predictor that captures 86-90% of total idle time, exploiting the gap between quick agentic turnaround times and minutes-long user idle periods at turn boundaries to enable proactive resource scaling and orchestration
  • Observed variability: Diverse workflows and user behaviors produce highly variable and long-tailed distributions in token consumption, session time spans, and tool call counts, complicating one-size-fits-all serving strategies

Industry Insight

  • LLM serving systems should move beyond chatbot-optimized architectures and invest in agent-native infrastructure that accounts for autonomous multi-step loops, tool execution interleaving, and the distinct KV cache invalidation patterns caused by context compaction and model switching
  • The high within-turn KV cache hit rate (90%) suggests significant optimization potential through intra-turn caching strategies, while the cross-turn drop to 55% indicates that session-level cache management and pre-warming across turn boundaries warrant dedicated research and engineering investment
  • The idle-time predictor's ability to capture 86-90% of idle time enables proactive, rather than reactive, resource orchestration — organizations building coding agent platforms should adopt similar predictive scaling approaches to reduce latency and improve cost efficiency during the long user idle periods between agentic turns

TL;DR

  • 首次在生产规模上对AI编程代理工作负载进行特征分析,数据涵盖3.2M用户、13M会话、761M次LLM调用和95T tokens
  • 代理编码会话由稀疏的用户发起轮次组成,每个轮次展开为自主的代理循环(LLM调用几乎总是与工具执行耦合)
  • KV缓存命中率在会话内平均达90%,但跨轮边界骤降至55%,模型切换或上下文压缩后大幅失效
  • 工作负载呈现长尾分布特征,token消耗、时间跨度和工具调用次数差异显著
  • 设计了轻量级空闲时间预测器,可捕获86-90%的总空闲时间,为资源调度优化提供依据

为什么值得看

本文为AI编程代理的基础设施设计提供了首个生产级实证数据,揭示了代理工作负载与传统聊天机器人工作负载的本质差异。研究结果对优化LLM服务系统的缓存策略、资源调度和用户交互设计具有重要指导价值。

技术解析

  • 数据规模:基于2026年6月采样的GitHub Copilot生产数据,包含3.2M用户、13M会话、761M次LLM调用和95T tokens,是迄今最大规模的代理工作负载分析
  • KV缓存特征:代理循环内的LLM调用因上下文高度重复,会话内KV缓存命中率平均达90%;但跨轮边界时降至55%,模型切换或上下文压缩事件会导致缓存大幅失效
  • 工作负载模式:代理响应时间短(秒级),但用户空闲时间长(分钟级),形成明显的"快速代理循环-长时间用户等待"交替模式
  • 空闲时间预测:设计了轻量级预测器,可捕获86-90%的总空闲时间,支持主动的资源编排决策

行业启示

  • 基础设施重构:现有LLM serving系统基于聊天机器人假设设计,需针对代理工作负载的"循环+工具调用"模式进行架构调整,特别是缓存管理和资源调度策略
  • 成本优化方向:高会话内缓存命中率表明可通过优化上下文复用显著降低推理成本;同时利用空闲时间预测器实现资源的弹性伸缩,避免过度预留
  • 产品体验设计:理解代理与用户的交互节奏差异(秒级响应vs分钟级等待),有助于设计更合理的进度反馈机制和中断恢复策略

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent Code Generation 代码生成 LLM 大模型 Research 科学研究 Programming 编程