#3232nd of 48 in Agent frameworks and SDKs

instructor

Python library that returns validated Pydantic objects from LLM calls

Stars
14k
License
MIT
Last commit
Sep 2026
Last release
Sep 2026
Language
Python

Missed the latest GitHub check; these facts may be older.

Overview

Instructor wraps LLM provider clients so a chat completion call takes a Pydantic model as response_model and returns a validated, typed object. Failed validations are retried with the error message sent back to the model, and partial objects can be streamed. It uses one interface across OpenAI, Anthropic, Google, Groq and Ollama, with ports in TypeScript, Ruby, Go, Elixir and Rust.

Who it is for: Python developers extracting typed JSON from LLM responses

Strengths

  • Same from_provider call works across OpenAI, Anthropic, Google, Groq and Ollama
  • Automatic retries feed Pydantic validation errors back to the model via max_retries
  • Streams partial objects with Partial[Model], including nested models
  • Installs with pip, uv or poetry; MIT license

Weaknesses

  • Scoped to structured extraction; no agent runtime, README points to PydanticAI for that
  • Retries add extra LLM calls, so cost and latency rise on failed validations
  • Non-Python ports are linked separately; feature parity is not documented in README
  • Adoption figures in README (3M+ downloads, named companies) are unsourced

What it needs

  • no GPU
  • Needs Pydantic, LLM provider API or local Ollama
  • Models: OpenAI, Anthropic, Google Gemini, Groq, Ollama

Also in Agent frameworks and SDKs

See all 48
Also in Agent frameworks and SDKs
RankProjectScore
1ppt-masterAgent skill that turns documents into natively editable PowerPoint decks Live demo ↗ (opens in a new tab)62.1k starsMIT93 out of 100
2browser-usePython library that lets an LLM agent control a web browser Live demo ↗ (opens in a new tab)118k starsMIT89 out of 100
3langchainPython framework for building LLM agents and apps from interoperable components147.8k starsMIT88 out of 100
#4tradingagentsLangGraph multi-agent framework simulating a trading firm to analyze tickers Live demo ↗ (opens in a new tab)111.2k starsApache-2.088 out of 100
#5copilotkitSDK for adding agent chat, generative UI and shared state to apps38k starsMIT87 out of 100