Inference systems · Research feature

VibeServe: Can AI Agents Build Bespoke LLM Serving Systems?

The study evaluates VibeServe, an AI agent system that automatically generates tailored LLM serving stacks for specific use cases.

Adapted from research by Keisuke Kamahori, Shihang Li, Simon Peter and colleagues.

arXiv preprint revision · 2026-10-12 · Attribution & reuse
In this article
Editorial illustration of optical fibers.

Editor’s introduction

The study evaluates VibeServe, an AI agent system that automatically generates tailored LLM serving stacks for specific use cases. It compares performance against established systems like vLLM and tuned SGLang across seven scenarios, including variations in model architecture, workload patterns, and hardware. In standard settings, VibeServe matches existing systems, while in five non-standard cases, it outperforms them by leveraging deployment-specific optimizations. Two of these scenarios cannot be supported by conventional, general-purpose serving stacks.

Introduction

LLM serving systems are critical software infrastructure for an economy increasingly dependent on generative AI. Open-source stacks such as vLLM, SGLang, and TensorRT-LLM provide efficient abstractions across a broad range of models and hardware. Yet their designs are shaped primarily by mainstream deployments, such as decoder-only Transformers on NVIDIA GPUs serving generic chat workloads. As a result, emerging model families (e.g., multimodal models or hybrid state-space architectures), along with new hardware accelerators and atypical workloads, often suffer from suboptimal performance or even require substantial new implementation effort. As the space of model–hardware–workload combinations continues to expand, a one-size-fits-all serving stack is becoming increasingly difficult to sustain.

Generating an end-to-end serving system, however, is a long-horizon, multi-component task that existing agentic optimization does not address. Prior systems operate on a much smaller code surface, e.g., a single GPU kernel, an isolated algorithm, or a single policy embedded in an otherwise fixed system. Designing and optimizing an end-to-end system exceeds the context window of any single agent. The standard recourse, compaction, can discard details from earlier work and weaken continuity across long tasks. Evolutionary frameworks sidestep this drift via a population of scored programs, but a scalar score cannot encode the planning state an end-to-end system needs. Multi-agent loops carry richer state across roles but do not reset agent context windows, inheriting limitations from compaction. Long-horizon coding-agent harnesses sustain state across sessions but produce incorrect systems that underperform state-of-the-art baselines.

We present VibeServe, a multi-agent system that synthesizes bespoke LLM serving runtimes from scratch. To let agents target the open-ended space of model–hardware–workload deployments, VibeServe exposes two extensible surfaces. The first is a small set of user-provided artifacts (model and reference implementation, accuracy checker, workload benchmark, and target hardware). The second is an Agent Skills library of serving-systems knowledge distilled from existing engines. New model families, hardware platforms, and optimization techniques enter as new skill entries, so coverage extends beyond the combinations hand-engineered into existing runtimes.

Why LLM serving needs bespoke systems

Modern LLM serving stacks achieve strong performance across many models and hardware platforms through various optimization techniques. However, use cases are diversifying rapidly. New model architectures, hardware accelerators, and application interfaces introduce execution structures that challenge runtime abstractions designed for the standard case. This creates persistent long-tail scenarios where a general-purpose stack may work suboptimally, miss optimizations that a bespoke system could implement, or be unable to run the workload at all. In other words, generic abstractions impose a portability tax on non-standard models, hardware, and applications.

Building bespoke systems can solve this problem. For example, knowing workload characteristics at design time can enable optimizations that a workload-agnostic runtime cannot safely assume. RAG-like applications with long shared prefixes can amortize prefill through prompt caching, while aggressive speculative decoding based on predicted outputs is possible for some applications like code editing. Similarly, tailoring for a particular model architecture can expose state and execution patterns that fall outside standard decoder-only assumptions. As an example, hybrid state-space/attention models require cache-management strategies different from those used for decoder-only Transformers. Many modern multimodal models also have complex architectures that require significant serving-system effort, such as modality-specific scheduling, memory management, and cross-component execution. Finally, knowing the target hardware can inform the right runtime design. Apple Silicon, for example, exposes a unified memory model that differs from that of CUDA-centric serving stacks.

Exploiting these opportunities is fundamentally a system-level problem. It requires coordinated decisions across GPU kernels, memory management, request scheduling, and the external interface, and optimizing one component is insufficient if the rest of the runtime still enforces the generic execution contract. A bespoke system can instead specialize entire layers to the target rather than preserving compatibility with unrelated deployments.

Outer loop

The outer loop’s search policy is modular, exposing a single per-round operation. It reads prior state, hands the inner loop a starting commit and a task, and receives the resulting commit with the performance metric. Two shared mechanisms support coordination beyond this contract. First, every accepted build is a git commit, so any policy can revert cheaply when a later round passes correctness but regresses on the headline metric. Second, each policy defines its own MCP server schema, whose tools give inner-loop agents a structured channel to return information to the policy during execution. We implement three policies (evolutionary search, the Ralph loop, and the issue-tracker policy used in our evaluation).

The issue-tracker policy maintains a backlog of structured issues, using the MCP server tool interface to define and enforce the issue schema. Inner-loop agents file issues through the predefined schema. The outer-loop Orchestrator agent picks the next issue to dispatch at each round, optionally requests a revert to an earlier checkpoint, and updates a long-term memory of optimization directions (a markdown file it reads on entry and edits at the end of each round). The selected issue, including its acceptance criteria, is the contract handed to the inner loop. The long-term memory lets the Orchestrator distinguish implementation failures from evidence that a direction is unsuitable for the workload. A failed attempt may signal that the implementation needs debugging or a narrower scope, not that the technique should be discarded. When issues investigate different hypotheses, the Orchestrator can dispatch several of them to parallel Implementer instances.

Inner loop

In the inner loop, Implementer, Accuracy Judge, and Performance Evaluator agents work in sequence, revising the codebase until it passes correctness checks. This separation keeps implementation, correctness, and performance reasoning in independent contexts. A combined agent can weaken its own correctness criteria to land a hard optimization. The Judge instead inspects diffs and runtime behavior with a fresh context, and the Evaluator runs only after correctness is gated. Each agent is implemented by a coding-agent harness, such as Codex CLI, Claude Code, or DeepAgents, that can read and edit files, run commands, and return structured results.

The Implementer produces and revises the candidate serving system in the workspace. It receives the task and pass criteria from the outer loop along with pointers to the reference implementation and model weights, and consults the serving-systems skills library (§3.3).

The Accuracy Judge gates correctness in three ways. It runs the user-provided accuracy checker against the candidate server, verifies any per-round pass criteria from the outer loop (for the issue-tracker policy, the issue’s acceptance criteria), and inspects the candidate’s source and runtime behavior for reward-hacking patterns such as prompt-keyed completion caches or fast paths that bypass model inference. On failure, the Judge returns feedback and the inner loop iterates until a build passes or a retry budget is exhausted, at which point the round fails and returns to the Orchestrator.

Skills library

VibeServe provides agents with a serving-systems skills library in the Agent Skills format. The skills are derived from the source code of mature serving engines and the surrounding research literature, organized along the abstraction layers an engineer works through when building a serving engine (model architectures, serving algorithms, programming frameworks, backend libraries, hardware platforms, reference engines, and tooling). This lets an agent retrieve focused guidance for a task, such as how continuous batching changes scheduler state, how to use FlashInfer or FlashAttention without reimplementing kernels, how MLX differs from PyTorch on Apple Silicon, or where a mechanism lives in vLLM, SGLang, or TensorRT-LLM.

The library is also an extensibility surface. New model families, hardware platforms, frameworks, backend libraries, or reference engines can be added as new skill entries under the corresponding layer. Because these axes interact, algorithm skills include compatibility notes linking each technique to supported backends, hardware, and engines (e.g., which paged-KV implementations exist on which hardware). The library stops at the serving-system boundary. Custom CUDA, Triton, or CUTLASS kernel authoring is delegated to GPU-kernel skills.

Evaluation

Our central question is whether bespoke serving systems generated by VibeServe are competitive with human-engineered systems and address niche yet important use cases where general-purpose systems fall short. We evaluate this on seven scenarios spanning the three axes introduced in §1: workload pattern, model architecture, and hardware.

Agentic optimization systems use a few search paradigms, none applied to greenfield end-to-end system synthesis. Evolutionary search selects among agent-generated candidates by measured performance. Multi-agent iteration has agents hypothesize, experiment, and refine across rounds within a single context window. Autoresearch uses one long-running agent that tracks candidates across git branches. All three target a bounded code scope (e.g., a marked region) or rely on a scalar score or a single conversation that cannot encode the bottleneck information driving an end-to-end system’s next step. VibeServe is the first agentic system to design a multi-component serving system end-to-end.

VibeServe sits within a broader literature on long-horizon coding agents. Tasks that exceed a context window are typically handled by compaction, whose lossy summarization causes drift in performance and correctness. Industrial prototypes from Cursor and Anthropic build end-to-end systems by handing work between fresh agent sessions through task abstractions over shared repository state, but stop short of optimizing performance. Building on these ideas, VibeServe targets performant code by giving agents direct profiler access, folding performance analysis into every implementation change through role-based agents, and packaging platform, optimization, and profiling knowledge as skills (Appendix D).

Conclusion

We argue that LLM serving should generate a bespoke system for each deployment target rather than maintain a single general-purpose runtime. VibeServe matches vLLM and beats a tuned SGLang in standard settings, and yields concrete wins across five non-standard scenarios, two of which cannot run on any generic stack.

VibeServe relies on a user-supplied correctness checker and a non-trivial per-target compute budget (§A), was evaluated only on a single node, and leaves the maintainability of generated systems unmeasured. Looking ahead, as coding agents improve, we expect generation-time specialization to beat runtime generality in more domains where generic abstractions cost performance.

Scenario A: Standard LLM serving on H100

Architecture. Llama-3.1-8B-Instruct is a dense decoder-only Transformer with grouped-query attention (32 query heads sharing 8 key/value heads), RoPE positional encodings, SwiGLU MLPs, and a 128k-token context window. This configuration is the design center of every modern serving stack: dense decoder-only inference on data-center GPUs is precisely what vLLM, SGLang, and TensorRT-LLM are tuned for, and the standard optimization stack is by now well-known — paged KV cache, continuous batching, CUDA graphs, FlashAttention/FlashInfer kernels, and operator fusion.

Workload and metric. An open-loop synthetic load generator drives the system at four request rates (8, 32, 64, 128 req/s). Request arrivals follow a Poisson process (exponential inter-arrival times), and requests are launched independently of completion. Each rate is run for 60 seconds with seed 42. Prompts are sampled uniformly from a predefined prompt pool, and output length is capped at max_tokens=128. Most requests emit exactly 128 chunks, and generation uses temperature 0. We report token-generation throughput, mean TTFT, and mean TPOT relative to vLLM. Greedy decoding outputs are checked against the Hugging Face Transformers reference.

Scenario C: Code editing with predicted outputs

Architecture and workload. Qwen3-32B is a dense decoder-only Transformer (with Q/K-norm and grouped-query attention) served on an NVIDIA H100. The workload is code editing under OpenAI’s predicted-outputs interface: each request carries both an instruction and a string of predicted output tokens representing the most likely answer. This prediction is naturally available for code editing tasks, since the pre-edit file is typically a near-prediction of the post-edit file, and prior work and deployed systems show that the overlap is large in practice. We report single-batch latency on CodeEditorBench.

Why generic systems cannot exploit this. Standard systems like vLLM or SGLang support speculative decoding, but do not support the predicted-outputs interface. Predicted outputs are a different request type. The engine needs a per-request token stream, a verifier loop that consumes from that stream until divergence, and well-defined fallback semantics. Adding this to vLLM means non-trivial changes to the scheduler, sequence-group state, and sampler. A bespoke system can build the request lifecycle directly around the predicted-outputs API.

Scenario D: Prompt caching for a hybrid architecture

Architecture. Olmo-Hybrid-7B interleaves Gated DeltaNet layers with standard self-attention layers. Gated DeltaNet is a linear-attention/SSM-style layer, and its per-sequence state is a fixed-size matrix that is updated recurrently as tokens arrive, in contrast to attention’s KV cache, which grows linearly with sequence length. The two layer types therefore carry different kinds of state, and the cache layout, eviction policy, and sharing semantics differ between them.

Workload and metric. A RAG-like workload in which every request shares a 32k-token system prefix, appends a 128-token request-specific suffix, and produces 128 output tokens. We report token-generation throughput at concurrency 20 on an NVIDIA L4 (24 GB), where memory pressure rules out keeping uncompressed per-request state copies.

Optimization opportunity. Prefix sharing across requests is a standard technique, but a hybrid model needs two cache mechanisms in parallel: KV blocks for attention layers and a snapshot of the recurrent state at the prefix boundary for each DeltaNet layer. Knowing the workload at design time, the agent can specialize the system to this case and avoid the overhead of supporting prompt caching for generic workloads.

Scenario E: Streaming ASR with sliding-window encoder attention

Architecture. Moonshine Streaming medium is an encoder-decoder ASR model designed for low-latency streaming. The encoder uses sliding-window attention over audio frames, so previously encoded frames remain valid as new audio arrives; only the new tail needs to be encoded. The decoder is a small autoregressive Transformer that emits text tokens conditioned on encoder outputs. In contrast, Whisper, the standard ASR baseline, encodes a full clip in a single pass and is not designed for incremental encoding.

Optimization opportunity. Sliding-window attention permits encoder-output caching: each chunk encodes only the new tail and reuses the previous encoder outputs to feed the decoder. The system needs (i) a per-stream encoder cache aligned with the sliding window, (ii) eviction synchronized with the window’s stride, and (iii) a scheduler that batches per-chunk encoder work alongside per-token decoder work across many concurrent streams.

Why generic systems cannot exploit this. vLLM can support the Moonshine Streaming model via a plugin, but it cannot support encoder prompt caching without significant modifications to its code, which leads to redundant computation for streaming applications. In contrast, the bespoke system can optimize around Moonshine’s specific sliding-window attention and expose the encoder layer to per-stream cache management.

Scenario G: Local image generation with a unified vision-language model

Architecture. Show-o2 is a unified vision-language model whose forward pass interleaves autoregressive (AR) text-token generation (a Qwen2.5-1.5B body) with diffusion-style image-token refinement (a 10-block diffusion head with SigLIP-based image conditioning). Each generation step is partly an AR decode (text body, with prefix-KV cache) and partly a denoising step (head, with classifier-free guidance over conditional and unconditional branches). The control flow does not match either a pure decoder-only LLM or a pure diffusion image model.

Why generic systems cannot exploit this. There is no generic serving stack for Show-o2: vLLM does not implement diffusion paths, vLLM-Omni does not include this model, and the reference is a research-grade PyTorch implementation. The AR/diffusion interleaving and the body/head/sampler co-design needed for the wins above do not generalize across models, so adding Show-o2 to a generic stack would be model-specific work that competes for engineering attention with every other model the stack supports. A bespoke system can wire the loop around exactly this control flow.