{"adoption": {"forks": 192, "observed_at": "2026-08-28T04:05:43.269968+00:00", "stars": 1843}, "canonical_url": "https://ross.abutalabs.com/products/xgrammar", "card": {"archived": false, "artifact_type": "library", "description": "Fast, Flexible and Portable Structured Generation", "domain": ["large-language-models", "machine-learning", "developer-tools"], "enriched": true, "function": ["llm-inference", "parser", "serialization", "sdk"], "health_score": 99, "homepage": "https://xgrammar.mlc.ai/docs", "language": "C++", "license": "Apache-2.0", "license_family": "permissive", "maturity": "active", "member_repos": ["mlc-ai/xgrammar"], "name": "mlc-ai/xgrammar", "platform": ["python", "cpp", "cross-platform", "wasm"], "pushed_at": "2026-08-20T20:56:09+00:00", "repo": "mlc-ai/xgrammar", "stars": 1843, "tags": ["constrained-decoding", "structured-output", "json-schema", "grammar", "ebnf", "tool-calling", "llm-engine-integration", "gpu", "javascript"], "topics": ["large-language-models", "structured-generation"], "urls": [], "use_cases": ["force an LLM to output valid JSON matching a schema", "constrain model outputs to a regex or context-free grammar", "reliable tool calling and function calling for LLMs", "add structured output support to a custom LLM inference engine", "guarantee 100% syntactically correct model generations", "generate structured outputs with low latency overhead"], "what_it_is": "XGrammar is an open-source library for efficient, flexible, and portable structured generation in LLM inference via constrained decoding. It guarantees structurally correct outputs (JSON, regex, context-free grammars) with near-zero overhead and integrates into engines like vLLM, SGLang, and TensorRT-LLM.", "when_to_avoid": ["you only need unconstrained free-form text generation", "you want a full LLM serving stack rather than a structured generation library", "your use case is simple prompt-based formatting without hard guarantees"], "when_to_choose": ["you need guaranteed-valid structured output from an LLM", "you want near-zero overhead constrained decoding at scale", "you need portability across platforms, languages, and inference engines", "you support general grammars beyond simple JSON schemas"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/xgrammar", "repo": "mlc-ai/xgrammar", "role": "main", "score": 88}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:05:43.269968+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T03:17:58.092087+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2406a2e6c7f1485bc1adef0286ff9da1b01624c67d35b67bf267f2b8b0c5396d", "fetched_at": "2026-08-28T04:05:43.269968+00:00", "kind": "readme", "missing": false, "url": "https://github.com/mlc-ai/xgrammar"}, {"content_hash": "999a463d25902a9f70dab070ca339f0996a6f331158cb49bf4e73d2643612234", "fetched_at": "2026-08-29T10:56:55.446521+00:00", "kind": "homepage", "missing": false, "url": "https://xgrammar.mlc.ai/docs"}, {"content_hash": "7e00539616a3bba73d28961ab2c86a9f1ae571adf450e679e97a4d6b97902d31", "fetched_at": "2026-08-29T10:56:55.448966+00:00", "kind": "site_page", "missing": false, "url": "https://xgrammar.mlc.ai/docs/latest"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 98, "longevity": 56, "rhythm": 94}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 796, "days_push": 13, "days_rel": 43, "gap_med": 16.0, "n_releases_24m": 33}, "score": 88, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}