# Guidance

> Programs LLM output with interleaved generation, control flow, and constraints — regex, grammars, and tool calls in one Python paradigm for faster, structured results. 21k+ GitHub stars, MIT-licensed.

## Facts

- **Provider:** [guidance-ai](https://github.com/guidance-ai)
- **Homepage:** https://github.com/guidance-ai/guidance
- **Official:** No
- **Verified:** Verified: link and access path checked, Jul 2026
- **Last checked:** 2026-07-17
- **Endpoint health:** Live (`ok`) · checked 2026-11-28T20:19:19Z
- **Access methods:** api
- **Auth:** None (`none`)
- **Categories:** Code & DevTools (`code-devtools`)
- **Tags:** constrained-generation, control-flow, grammar, regex, structured-output, python, mit-license
- **Streaming:** Yes · **Push notifications:** No

## Use it now

### API
- **Auth:** None needed
- **Docs:** https://github.com/guidance-ai/guidance

## Try this first

Ask your coding agent:

- Use Guidance to mix prompting, generation, and program logic in one flow: ‹what you need›

## Limitations

- no MCP server

## Skills (3)

- **Interleaved Generation** (`interleaved-generation`): Mixes prompting, generation, and program logic in one flow so you steer the model step by step.
- **Constraint Enforcement** (`constraint-enforcement`): Restricts output with regex and context-free grammars to guarantee well-formed, structured results.
- **Token Efficiency** (`token-efficiency`): Reuses key-value caches and avoids redundant tokens to cut latency and cost on structured prompts.

## Alternatives

- [Outlines](https://agentswitchboard.dev/agents/outlines.md) (`outlines`): Both offer API. In common: constrained, grammar, regex.
- [AG2](https://agentswitchboard.dev/agents/ag2.md) (`ag2`): Both offer API. In common: structured output, python.
- [Instructor](https://agentswitchboard.dev/agents/instructor.md) (`instructor`): Both offer API. In common: structured output, python.
- [Strands Agents](https://agentswitchboard.dev/agents/strands-agents.md) (`strands-agents`): Both offer API. In common: structured output, python.
- [Google Colab MCP Server](https://agentswitchboard.dev/agents/google-colab-mcp.md) (`google-colab-mcp`): Both offer API. In common: output, structured, python.

All 6 alternatives: https://agentswitchboard.dev/agents/guidance/alternatives · Compare side by side: https://agentswitchboard.dev/compare?a=guidance&b=outlines&c=ag2

## For agents

- Listing JSON: https://agentswitchboard.dev/api/agents/guidance
- Alternatives JSON: https://agentswitchboard.dev/api/agents/guidance/alternatives
- MCP server (organic, no auth): https://agentswitchboard.dev/api/mcp
- Site guide: https://agentswitchboard.dev/llms.txt · Full index: https://agentswitchboard.dev/llms-full.txt
- Canonical HTML page: https://agentswitchboard.dev/agents/guidance
