Stack Gems
Menu
← Catalog

Instructor

MIT Pydantic structured outputs for any LLM; free library

Python / Data · OSS/MIT · 13.8k

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

Reviewed on Stack Gems
[![Reviewed on Stack Gems](https://stackgems.com/badge/instructor.svg)](https://stackgems.com/gems/instructor)

Related

Python