AgSpec is a framework that supplies the corpus and draft-length policies that existing retrieval engines lack in coding-agent pipelines, and remains effective on benchmarks without a repository or a multi-agent pipeline, showing that its gains generalize to coding agents broadly.
Abstract
Retrieval-based speculative decoding (SD) drafts tokens by copying continuations from existing text, which suits coding agents that repeatedly reproduce code, logs, and earlier attempts. Yet existing methods fall short in agent pipelines: much of the reusable text is missing from their corpora or stored in a form that differs from what the agent emits, and their draft lengths ignore that accept length varies across agents and drifts over turns. We present AgSpec, a framework that supplies the corpus and draft-length policies that existing retrieval engines lack in coding-agent pipelines. AgSpec retrieves from session, workspace, and global corpora, retaining the ongoing session trajectory and indexing opened files in the agent's emission format. It bounds each agent's draft length with an offline-profiled cap and adapts the length online from verification feedback. On two repository-level multi-agent coding benchmarks, AgSpec outperforms five retrieval-based drafters and EAGLE-3 in most evaluated settings, raising generation throughput over autoregressive decoding up to 4.37$\times$ at batch size 1 and 4.76$\times$ at batch size 16. AgSpec also remains effective on benchmarks without a repository or a multi-agent pipeline, showing that its gains generalize to coding agents broadly.
This work investigates when this history supplies useful drafts and complements an existing drafter and supports generated trajectories as runtime memory for adaptive inference.
LLM agents execute tasks through repeated model calls over evolving histories of reasoning, actions, and tool feedback. Aggregate speculative-decoding metrics merge these distinct decisions, providing limited guidance on where draft supervision is needed. We present TraceSpec, a framework connecting trajectory evaluati...
Jihao Zhao, Shuai-Shuai Zu, Peng-Fei Li et al.· 0 citations
Recursive self-improvement requires AI systems to improve the models and infrastructure used by subsequent systems. LLM compression offers a concrete efficiency objective: retain a pretrained model's behavior within a smaller model storage budget. We study whether coding agents can carry out this step autonomously. We...
Xin Zhong, Zhi-Feng Li, Zhi-Ming Wang et al.· 0 citations
Speculative decoding accelerates memory-bound LLM decoding with a lightweight drafter, and parallel drafters extend this speedup by drafting a whole block in one forward pass, but it remains unclear whether their released systems attain the full speedup that parallel drafting permits.
Kun-Jun Li, Wen-Hao Chai, Yihao Liang et al.· 0 citations
AI coding agents such as Claude Code, Cursor, Codex, and OpenCode have matured into capable multi-step software engineers, yet nearly all of them still assume a developer is sitting at a terminal. PromptBridge removes that assumption by connecting six messaging platforms, Telegram, Discord, Slack, Microsoft Teams, GitH...
Tripti Singh, Dolly Verma, Parineeta Jha· International Journal of Inn...· 0 citations
Large Language Model (LLM) agents are increasingly deployed under structured generation, where grammar constraints enforce output format at inference time. Whereas existing compression methods target unconstrained generation, we first identify a fundamental mismatch: under structured generation, grammar constraints red...
Moonseok Choi, Jongwon Jeong, Minki Kang et al.· 0 citations
Related blog posts
MIT News · Artificial Intelligence· news.mit.eduDec 1, 2026
The method uses large vision-language models to teach smaller models how to remember key details about a robot’s surroundings, making the machines more reactive and resourceful.
Senior Research Scientist Jim Glass discusses how his MIT-IBM Computing Research Lab collaboration connects perception and language, and addresses the shortcoming of current models.
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.