#185185th of 242 in Agent frameworks and SDKs
guidance
Python library for constrained generation and control flow with LLMs
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts guidance on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.guidance is on your watch list. Its new releases and problems show there.
- Stars
- 21.8k
- License
- MIT
- Last commit
- May 2026
- Last release
- Mar 2026
- Language
- Jupyter Notebook
21,191 on 25 Mar 202621,832 on 25 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Guidance is a Python library that constrains language model output with regex, select lists, JSON schemas (including Pydantic models) and context-free grammars. It interleaves Python control flow with generation and works with backends such as Transformers, llama.cpp and OpenAI. When a grammar fixes upcoming tokens, it inserts them without a model forward pass.
Who it is for: Python developers who need structured, grammar-constrained LLM output
Strengths
- Regex, select, JSON schema and CFG constraints guarantee output syntax
- Token fast-forwarding skips forward passes when the grammar fixes the next tokens
- Mock model and grammar.match() allow offline grammar debugging without API calls
- @guidance functions compose into larger grammars; model objects are immutable
Weaknesses
- Full CFG support depends on the backend; README does not list which qualify
- Not a full agent framework: no orchestration, memory or deployment tooling
- README gives no hardware requirements or benchmarks
- Jupyter widget gives the richer view; command line output is plain text
What it needs
- GPU optional
- Needs Python, pip, Transformers, llama.cpp or OpenAI backend
- Models: Transformers, llama.cpp, OpenAI
What changed
- 0.3.0 ↗ (opens in a new tab)Breaking
“Removed old-style @guidance-based tool calls (in favor of more generic OpenAI-style tools)”
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in Agent frameworks and SDKs
See all 242| Rank | Project | Score |
|---|---|---|
| #183 | undertheseaPython toolkit for Vietnamese NLP plus a stdlib-only multi-provider LLM agent | 47 out of 100 |
| #184 | microsoft/agentsEntry repo for the Microsoft 365 Agents SDK in C#, JavaScript and Python | 47 out of 100 |
| #186 | julepPython library for durable agent flows that compile to a frozen IR | 45 out of 100 |
| #187 | agentdock/agentdockTypeScript node-based framework for agents with a Next.js reference client | 45 out of 100 |
| #188 | medraxLangGraph agent that routes chest X-ray questions to medical imaging models | 45 out of 100 |