Outlines
Library from .txt for structured generation that guarantees LLM output matches a JSON schema, regex or grammar.
Updated
✨ Try AgentScout's free AI image generator →Good for: building AI agents
Use cases
About Outlines
Outlines is listed in our frameworks category and is aimed at builders. Library from .txt for structured generation that guarantees LLM output matches a JSON schema, regex or grammar. Pricing, as the maker states it: Open source. Maturity: Mature. We last checked the official link on 2026-12-01.
What is Outlines?
Outlines is a Python library from .txt for structured generation. You describe a schema, a type or a grammar, and the model is steered to follow it. The README's examples include classification and extracting typed fields.
It connects to more than one model backend. The README says a separate .txt API is in early access by request, with no public price, so this listing does not invent one. The library itself is Apache-2.0. GitHub listed 16,016 stars on 20 Nov 2026.
Sources: github.com/dottxt-ai/outlines, dottxt-ai.github.io/outlines and our directory listing, checked 2026-11-20.
Who is Outlines for?
Python developers who need model output that matches a schema, type or grammar.
Outlines at a glance
- Open source: Yes (Apache-2.0)
- GitHub: dottxt-ai/outlines · 16,032 stars (as of Dec 2, 2026)
Key features
- Structured generation against schemas, types and grammars
- More than one model backend
- Apache-2.0 library; the .txt hosted API is a separate early-access offer with no public price here
- 16,016 GitHub stars on 20 Nov 2026
Outlines FAQ
What is Outlines?
Outlines is a Python library from .txt for structured generation. You describe a schema, a type or a grammar, and the model is steered to follow it. The README's examples include classification and extracting typed fields.
Who is Outlines for?
Python developers who need model output that matches a schema, type or grammar.
Is Outlines free?
Outlines's pricing, as the maker states it: Open source. Open-source tools are free to use, though you may still pay for model API usage or a hosted plan. Check the official site for current plans.
Is Outlines open source?
Yes. Outlines is released under Apache-2.0, according to its GitHub repository.
Is Outlines the same as the .txt API?
No. Outlines is the open library. The README points at a separate .txt API in early access. No public price for that API was stated.
What license is the library?
GitHub records Apache-2.0. Checked 20 Nov 2026.
What are alternatives to Outlines?
Similar tools include Marvin, Instructor, BAML, Guidance, ChatDev and Instructor Php.
Outlines ratings and reviews
Be the first to rate Outlines: tap 1 to 5 stars below. A written review is optional.
Outlines alternatives
Other frameworks tools in our directory. See all frameworks tools →
Marvin
Python library from Prefect for building AI agents and structured LLM workflows.
Instructor
Library for getting validated structured outputs from any LLM, built on Pydantic with retries and type safety.
BAML
Typed programming language for agents and LLM functions, with runtime types, typed errors and structured outputs designed to reduce agent mistakes.
Guidance
Guidance is an MIT-licensed Python library for steering language models: instead of plain prompts you write programs that mix generation with control flow (conditionals, loops, tool calls) and constrain output with regular expressions, context-free grammars or JSON schemas, which makes structured output reliable and can cut latency and cost. It runs on Transformers, llama.cpp, OpenAI and other backends (pip install guidance); the latest release is 0.3.2 from March 2026.
ChatDev
ChatDev is an Apache-2.0 multi-agent platform from OpenBMB and Tsinghua. ChatDev 2.0 (DevAll) is a zero-code system: you define agents, workflows and tasks in configuration and it orchestrates them for jobs such as data visualization, 3D generation and deep research. The original ChatDev 1.0, kept as a legacy mode, simulates a virtual software company where CEO, CTO, programmer and tester agents design, code, test and document an app through structured chats.
Instructor Php
Unified LLM API, structured data outputs with LLMs, and agent SDK - in PHP