# Outlines

> Guarantees LLM outputs conform to a schema, regex, or grammar through structured generation — reliable JSON, function calls, and constrained decoding. By .txt (dottxt-ai). 14k+ stars, Apache-2.0.

## Facts

- **Provider:** [.txt](https://dottxt.ai/)
- **Homepage:** https://github.com/dottxt-ai/outlines
- **Official:** No
- **Verified:** Verified: link and access path checked, Sep 2026
- **Last checked:** 2026-09-25
- **Endpoint health:** Live (`ok`) · checked 2026-11-28T20:19:19Z
- **Access methods:** api
- **Auth:** None (`none`)
- **Categories:** Code & DevTools (`code-devtools`)
- **Tags:** structured-generation, constrained-decoding, json-schema, regex, grammar, python, apache-2-0
- **Streaming:** No · **Push notifications:** No

## Use it now

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

## Try this first

Ask your coding agent:

- Use Outlines to generate JSON: ‹what you need›

## Limitations

- no MCP server

## Skills (3)

- **Constrained Decoding** (`constrained-decoding`): Forces token generation to follow a regex, JSON schema, or context-free grammar so output is always valid.
- **Schema-Bound JSON** (`json-generation`): Generates JSON that provably matches a Pydantic or JSON Schema definition without any post-hoc parsing.
- **Grammar-Guided Output** (`grammar-guidance`): Constrains model output to a formal grammar for structured formats like SQL or custom domain languages.

## Alternatives

- [Guidance](https://agentswitchboard.dev/agents/guidance.md) (`guidance`): Both offer API. In common: constrained, grammar, regex.
- [json-render](https://agentswitchboard.dev/agents/json-render.md) (`json-render`): Both offer API. In common: json schema.
- [AG2](https://agentswitchboard.dev/agents/ag2.md) (`ag2`): Both offer API. In common: output, structured, python.
- [Google Colab MCP Server](https://agentswitchboard.dev/agents/google-colab-mcp.md) (`google-colab-mcp`): Both offer API. In common: output, structured, python.
- [Instructor](https://agentswitchboard.dev/agents/instructor.md) (`instructor`): Both offer API. In common: output, structured, python.

All 7 alternatives: https://agentswitchboard.dev/agents/outlines/alternatives · Compare side by side: https://agentswitchboard.dev/compare?a=outlines&b=guidance&c=json-render

## For agents

- Listing JSON: https://agentswitchboard.dev/api/agents/outlines
- Alternatives JSON: https://agentswitchboard.dev/api/agents/outlines/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/outlines
