#2424th of 242 in Agent frameworks and SDKs
instructor
Python library that returns Pydantic-validated structured output from LLM calls
Watch puts instructor on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.instructor is on your watch list. Its new releases and problems show there.
- Stars
- 14.2k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- Python
12,479 on 25 Mar 202614,155 on 25 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Instructor wraps LLM provider clients so a chat completion call takes a Pydantic `response_model` and returns a validated, typed object. Failed validations are retried with the error message fed back to the model, and partial objects can be streamed. One `from_provider` interface covers OpenAI, Anthropic, Google, Groq and Ollama, with ports in TypeScript, Ruby, Go, Elixir and Rust.
Who it is for: Python developers who need typed JSON extraction from LLMs
Strengths
- Same `response_model` call across OpenAI, Anthropic, Google, Groq and Ollama
- Automatic retries on Pydantic validation failure via `max_retries`
- Streams partial objects with `Partial[Model]`
- Installs with pip, uv or poetry; no server to run
Weaknesses
- Extraction only; README points to PydanticAI for agents, tools and evals
- No built-in observability or tracing
- Retries add extra LLM calls, raising cost and latency on failures
- Other language ports are listed as separate implementations with their own docs
What it needs
- no GPU
- Needs Pydantic, LLM provider API or local Ollama
- Models: OpenAI, Anthropic, Google, Groq, Ollama
What changed
“Cached responses use new keys and isolated per-client namespaces. Existing cache entries will miss. Set the same explicit cache_namespace only when clients are intended to share results; keep account…”
“Async validation policy: Fail closed for @async_field_validator and @async_model_validator response models instead of silently skipping policy checks. The proposed automatic execution in #2588 is def…”
- v1.16.0 ↗ (opens in a new tab)Security fix
“LLM validator isolation: Send validation rules and candidate values as structured JSON data under a fixed trusted instruction to reduce prompt-injection risk, and raise ValueError for rejected values…”
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in Agent frameworks and SDKs
See all 242| Rank | Project | Score |
|---|---|---|
| #22 | adk-pythonCode-first Python framework for building and deploying multi-agent apps | 87 out of 100 |
| #23 | parlantPython framework for customer-facing agents that follow policies | 87 out of 100 |
| #25 | sandcastleTypeScript library that runs coding agents in isolated sandboxes on git branches | 87 out of 100 |
| #26 | agent-nativeTypeScript framework for agents that share actions and state with an app UI | 87 out of 100 |
| #27 | ag-uiEvent-based protocol connecting agent backends to user-facing apps | 86 out of 100 |