Instructor
MIT Pydantic structured outputs for any LLM; free library
Python / Data · OSS/MIT · 14k
Reviewed 2026-09-04 · last push 2026-10-20 · repo checked 2026-10-21
What's Good
MIT. Pydantic models → typed LLM outputs with auto-retry on validation failure. 15+ providers (OpenAI, Anthropic, Gemini, Ollama, …). Streaming/partials. Ports in TS/Go/Ruby/etc. Millions of monthly downloads.
The Catch
Library not an agent framework (pair with your orchestrator). Provider token costs remain. Vs native structured-output APIs: Instructor shines on validation/retry DX across providers, not on replacing tool-calling agents.
Verdict
MIT structured LLM outputs. Free forever; you pay model APIs.
Embed
Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.
Markdown
[](https://stackgems.com/gems/instructor)
HTML
<a href="https://stackgems.com/gems/instructor"><img src="https://stackgems.com/badge/instructor.svg" alt="Instructor reviewed on Stack Gems" height="20"></a>