#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.

Stars
21.8k
License
MIT
Last commit
May 2026
Last release
Mar 2026
Language
Jupyter Notebook
Stars, last 35 weeks+641
25 Mar 2026: 21,191 stars1 Apr 2026: 21,206 stars8 Apr 2026: 21,222 stars15 Apr 2026: 21,248 stars22 Apr 2026: 21,267 stars29 Apr 2026: 21,284 stars6 May 2026: 21,318 stars13 May 2026: 21,334 stars20 May 2026: 21,347 stars27 May 2026: 21,366 stars3 Jun 2026: 21,381 stars10 Jun 2026: 21,397 stars17 Jun 2026: 21,407 stars24 Jun 2026: 21,422 stars1 Jul 2026: 21,434 stars8 Jul 2026: 21,557 stars15 Jul 2026: 21,585 stars22 Jul 2026: 21,609 stars29 Jul 2026: 21,620 stars5 Aug 2026: 21,630 stars12 Aug 2026: 21,639 stars19 Aug 2026: 21,648 stars26 Aug 2026: 21,657 stars2 Sept 2026: 21,680 stars9 Sept 2026: 21,699 stars16 Sept 2026: 21,712 stars23 Sept 2026: 21,730 stars30 Sept 2026: 21,744 stars7 Oct 2026: 21,752 stars14 Oct 2026: 21,771 stars21 Oct 2026: 21,778 stars28 Oct 2026: 21,793 stars4 Nov 2026: 21,802 stars11 Nov 2026: 21,812 stars18 Nov 2026: 21,821 stars25 Nov 2026: 21,832 stars

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

  1. “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
Also in Agent frameworks and SDKs
RankProjectScore
#183undertheseaPython toolkit for Vietnamese NLP plus a stdlib-only multi-provider LLM agent Live demo ↗ (opens in a new tab)1.8k starsApache-2.047 out of 100
#184microsoft/agentsEntry repo for the Microsoft 365 Agents SDK in C#, JavaScript and Python1.1k starsMIT47 out of 100
#186julepPython library for durable agent flows that compile to a frozen IR6.6k starsApache-2.045 out of 100
#187agentdock/agentdockTypeScript node-based framework for agents with a Next.js reference client Live demo ↗ (opens in a new tab)1.8k starsMIT45 out of 100
#188medraxLangGraph agent that routes chest X-ray questions to medical imaging models1.3k starsApache-2.045 out of 100