What problem does it solve? Serving LLMs in production wastes compute when every request recomputes shared prefixes like system prompts, few-shot examples, and tool definitions, and generating valid JSON or regex-constrained output from models is unreliable without constrained decoding. ## Core Features & Use Cases - RadixAttention Prefix Caching: Automatically caches and reuses KV cache for shared prefixes across requests, delivering 5-10x speedups for agent workflows and few-shot prompting. - Structured Generation: Enforce JSON schemas, regex patterns, and EBNF grammars during decoding so outputs always match the required format. - Production Deployment: OpenAI-compatible API, tensor parallelism, FP8/AWQ/GPTQ quantization, Prometheus metrics, and Kubernetes deployment guidance. - Use Case: Build an agent that handles hundreds of user queries against the same system prompt and tool definitions; SGLang reuses the cached prefix so each subsequent request only computes the new tokens. ## Quick Start Install sglang with pip, launch a server for a Llama model on port 30000, and send a chat completion request to the OpenAI-compatible endpoint.