Skip to main content
toolsSource-backed
Instructor logo

Instructor

Open-source Python library for structured LLM outputs using Pydantic response models, validation, retries, streaming, and provider adapters.

by 567 Labs · submitted by oktofeesh1·added 2026-06-03·13,163 source repo stars·
HarnessCLI
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://python.useinstructor.com/, https://github.com/567-labs/instructor, https://useinstructor.com/
Brand
Instructor
Brand domain
useinstructor.com
Brand asset source
brandfetch
Safety notes
Instructor validates structure and field constraints, but schema-valid LLM output can still be factually wrong, hallucinated, incomplete, biased, or unsafe for automated decisions., Automatic retries can increase model cost, latency, rate-limit pressure, and repeated exposure of prompts or failed outputs, so retries should be bounded and observable., Do not let successful parsing directly trigger irreversible writes, approvals, billing changes, or user-facing actions without domain checks, provenance, and fallback review.
Privacy notes
Prompts, source text, extracted fields, validation errors, failed outputs, retry messages, and typed response objects may contain sensitive user or business data., Provider calls send extraction inputs and retry context to the configured LLM backend unless a local model path is used., Application logs, traces, eval datasets, examples, and debugging output can retain structured records that are easier to query and exfiltrate than raw prose.
Author
567 Labs
Submitted by
oktofeesh1
Claim status
unclaimed
Last verified
2026-06-03

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

3 prerequisites to line up before setup. Have accounts and credentials ready first. Includes a review or approval gate.

0/3 ready
Account & credentials1Install & runtime1Review & approval1

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 3 risk areas. Review closely: third-party handling.

3 areas
  • SafetyGeneralInstructor validates structure and field constraints, but schema-valid LLM output can still be factually wrong, hallucinated, incomplete, biased, or unsafe for automated decisions.
  • SafetyGeneralAutomatic retries can increase model cost, latency, rate-limit pressure, and repeated exposure of prompts or failed outputs, so retries should be bounded and observable.
  • SafetyGeneralDo not let successful parsing directly trigger irreversible writes, approvals, billing changes, or user-facing actions without domain checks, provenance, and fallback review.
  • PrivacyGeneralPrompts, source text, extracted fields, validation errors, failed outputs, retry messages, and typed response objects may contain sensitive user or business data.
  • PrivacyThird-party handlingProvider calls send extraction inputs and retry context to the configured LLM backend unless a local model path is used.
  • PrivacyData retentionApplication logs, traces, eval datasets, examples, and debugging output can retain structured records that are easier to query and exfiltrate than raw prose.

Disclosure: editorial

Safety notes

  • Instructor validates structure and field constraints, but schema-valid LLM output can still be factually wrong, hallucinated, incomplete, biased, or unsafe for automated decisions.
  • Automatic retries can increase model cost, latency, rate-limit pressure, and repeated exposure of prompts or failed outputs, so retries should be bounded and observable.
  • Do not let successful parsing directly trigger irreversible writes, approvals, billing changes, or user-facing actions without domain checks, provenance, and fallback review.

Privacy notes

  • Prompts, source text, extracted fields, validation errors, failed outputs, retry messages, and typed response objects may contain sensitive user or business data.
  • Provider calls send extraction inputs and retry context to the configured LLM backend unless a local model path is used.
  • Application logs, traces, eval datasets, examples, and debugging output can retain structured records that are easier to query and exfiltrate than raw prose.

Prerequisites

  • Python LLM application or extraction pipeline that needs typed structured outputs rather than free-form text parsing.
  • Pydantic response models, validation rules, retry policy, and downstream error-handling behavior reviewed before production use.
  • Model provider credentials and provider-specific configuration for OpenAI, Anthropic, Google, Ollama, Groq, or another supported backend.

Schema details

Install type
copy
Troubleshooting
No
Source repository stats
Scope
Source repo
Stars
13,163 source repo stars
Forks
1,082
Updated
2026-06-15T06:04:20Z
Tool listing metadata
Pricing
open-source
Disclosure
editorial
Application category
DeveloperApplication
Operating system
macOS, Windows, Linux
Full copyable content
## Editorial notes

Instructor is useful when Claude-adjacent apps need structured data from LLMs without hand-rolled JSON parsing. It lets developers define Pydantic response models, call supported providers through a common interface, validate model output, retry failed validations with error context, and stream partial structured objects for extraction-heavy workflows.

## Source notes

- The official documentation explains structured outputs as a way to make LLM responses consistent and machine-readable, with Instructor using Pydantic models to define expected output structure.
- The validation docs describe constraint checks, required fields, type safety, automatic retry with validation feedback, and domain-specific validation patterns.
- The GitHub README describes Instructor as "Structured Outputs for LLMs" and says it is built on Pydantic for validation, type safety, and IDE support.
- The repository documents provider adapters for OpenAI, Anthropic, Google, Ollama, and Groq-style usage, plus automatic retries, streaming partial objects, nested objects, and MIT licensing.

## Duplicate check

Checked current `content/tools/`, `content/mcp/`, guides, skills, agents, open pull requests, live HeyClaude `llms-full.txt`, and repository-wide content for `Instructor`, `useinstructor`, `567-labs`, `github.com/567-labs/instructor`, `python.useinstructor.com`, `structured output`, `structured outputs`, `Pydantic`, `response_model`, `validation retry`, and `JSON schema`. Guardrails AI is already listed as a broader input/output guardrail and validator framework, while existing FastAPI, Zod, and JSON Schema entries are skills for application/API validation rather than Instructor's LLM structured-output extraction library. No dedicated Instructor tools entry, source URL duplicate, or open duplicate PR was found.

## Disclosure

Editorial listing. No paid placement or affiliate link is used.

About this resource

Editorial notes

Instructor is useful when Claude-adjacent apps need structured data from LLMs without hand-rolled JSON parsing. It lets developers define Pydantic response models, call supported providers through a common interface, validate model output, retry failed validations with error context, and stream partial structured objects for extraction-heavy workflows.

Source notes

  • The official documentation explains structured outputs as a way to make LLM responses consistent and machine-readable, with Instructor using Pydantic models to define expected output structure.
  • The validation docs describe constraint checks, required fields, type safety, automatic retry with validation feedback, and domain-specific validation patterns.
  • The GitHub README describes Instructor as "Structured Outputs for LLMs" and says it is built on Pydantic for validation, type safety, and IDE support.
  • The repository documents provider adapters for OpenAI, Anthropic, Google, Ollama, and Groq-style usage, plus automatic retries, streaming partial objects, nested objects, and MIT licensing.

Duplicate check

Checked current content/tools/, content/mcp/, guides, skills, agents, open pull requests, live HeyClaude llms-full.txt, and repository-wide content for Instructor, useinstructor, 567-labs, github.com/567-labs/instructor, python.useinstructor.com, structured output, structured outputs, Pydantic, response_model, validation retry, and JSON schema. Guardrails AI is already listed as a broader input/output guardrail and validator framework, while existing FastAPI, Zod, and JSON Schema entries are skills for application/API validation rather than Instructor's LLM structured-output extraction library. No dedicated Instructor tools entry, source URL duplicate, or open duplicate PR was found.

Disclosure

Editorial listing. No paid placement or affiliate link is used.

Source citations

Add this badge to your README

Show that Instructor is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/tools/instructor.svg)](https://heyclau.de/entry/tools/instructor)

How it compares

Instructor side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

1 trust signal differ across this comparison (Submitter).

Field

Open-source Python library for structured LLM outputs using Pydantic response models, validation, retries, streaming, and provider adapters.

Open dossier

Lightweight, modular open-source Python framework for building agentic AI pipelines from atomic, composable components (agents, tools, context providers), built on Instructor and Pydantic.

Open dossier

Open-source Python framework for adding input and output guards, validators, structured generation, and policy checks to LLM applications.

Open dossier

Open-source Python library from dottxt for structured LLM generation, guaranteeing outputs that match a JSON schema, Pydantic model, regex, grammar, or multiple-choice set during generation across many model backends.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
SubmitterDiffersoktofeesh1davion-knightoktofeesh1davion-knight
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
BrandInstructor logoInstructorAtomic Agents logoAtomic AgentsGuardrails AI logoGuardrails AIOutlines logoOutlines
Categorytoolstoolstoolstools
SourceSource-backedSource-backedSource-backedSource-backed
Author567 LabsEigenwiseGuardrails AIdottxt-ai
Added2026-06-032026-07-092026-06-032026-07-09
Platforms
Harness
Source repo13.2k repo stars
Safety notesInstructor validates structure and field constraints, but schema-valid LLM output can still be factually wrong, hallucinated, incomplete, biased, or unsafe for automated decisions. Automatic retries can increase model cost, latency, rate-limit pressure, and repeated exposure of prompts or failed outputs, so retries should be bounded and observable. Do not let successful parsing directly trigger irreversible writes, approvals, billing changes, or user-facing actions without domain checks, provenance, and fallback review.Atomic Agents components can include tools that run code, call external APIs, query databases, or read and write files; review each tool's side effects before adding it to a pipeline. Input and output schemas make component contracts explicit and reduce parsing errors, but they do not prove a model response is correct or safe for a downstream action. Tool descriptions, schemas, context-provider content, and prior outputs become model-facing context, so treat them as untrusted input that can influence agent behavior. Add human review, timeouts, and rollback policies before agents take account, billing, data, or infrastructure actions. Keep production permissions narrower than example or notebook pipelines, and scope model-provider and tool credentials to the minimum needed.Guardrails can block, raise exceptions, re-ask the model, or otherwise alter application flow, so failure handling should be tested before production use. Validators are policy controls, not proof of safety; high-risk domains still need human review, logging, escalation paths, and adversarial testing. Guardrails Server exposes validation through a network service, so production deployments need normal API hardening, authentication, rate limits, and secret handling.Outlines constrains the structure of a model's output, but it does not verify that the content is correct, complete, or safe; a schema-valid response can still be wrong for a downstream action. Generation runs through the model backend you configure, so it uses that backend's credentials and compute; local backends run models on your machine and hosted backends send prompts to the provider. Complex grammars or schemas can affect latency and cost, so test constraints before relying on them in production. Treat prompt template inputs and generated outputs as untrusted, and validate any values used to take account, billing, data, or infrastructure actions. Keep production usage and permissions narrower than notebook or example code.
Privacy notesPrompts, source text, extracted fields, validation errors, failed outputs, retry messages, and typed response objects may contain sensitive user or business data. Provider calls send extraction inputs and retry context to the configured LLM backend unless a local model path is used. Application logs, traces, eval datasets, examples, and debugging output can retain structured records that are easier to query and exfiltrate than raw prose.Atomic Agents runs send prompts, schema instructions, inputs, tool arguments, tool results, and context-provider content to the configured model provider through Instructor. Tools and context providers can pass local files, database records, API responses, or proprietary data into the model and pipeline if they are made available to a component. Any observability, logging, or storage destinations you add can retain prompts, outputs, and metadata outside the application runtime. Apply normal retention and access-control policies to run logs, chained-agent outputs, and any persisted context.Validation can inspect prompts, retrieved context, model outputs, structured fields, user messages, and other application payloads. Some validators or configured LLM calls can send validation payloads to external model providers or APIs; review each validator before using production data. Logs, traces, failed validations, and server request data may contain sensitive content and should follow the same retention rules as the parent LLM application.Prompts and any data placed into prompt templates are sent to the configured model backend, which may be a local model or a hosted API. Hosted backends process prompts and outputs under their own data-handling terms, while local backends keep inference on your machine. Generated outputs, schemas, and templates can contain personal or proprietary data, so apply normal retention and access-control policies. Logs, traces, or caches produced by your backend or application can retain prompts and outputs outside the library itself.
Prerequisites
  • Python LLM application or extraction pipeline that needs typed structured outputs rather than free-form text parsing.
  • Pydantic response models, validation rules, retry policy, and downstream error-handling behavior reviewed before production use.
  • Model provider credentials and provider-specific configuration for OpenAI, Anthropic, Google, Ollama, Groq, or another supported backend.
  • Python 3.12+ project and a dependency manager to install `atomic-agents` from PyPI, plus the matching Instructor provider extra (for example `instructor[anthropic]`).
  • Model-provider credentials or local model configuration for the provider the agents use.
  • Clear input and output schemas for each agent, and defined tool and context-provider boundaries before chaining components.
  • A plan for how agents, tools, and context providers connect to databases, APIs, files, or other systems.
  • Python application or service that sends prompts to, or receives responses from, an LLM.
  • A reviewed policy for which inputs, outputs, topics, formats, and risk categories should be blocked, transformed, or escalated.
  • Model provider credentials and installation approval for any Guardrails Hub validators used by the application.
  • Python 3.10+ project and a dependency manager to install `outlines` from PyPI.
  • A model backend to run generation against, such as Transformers, llama.cpp, or vLLM locally, or a hosted API like OpenAI or Ollama.
  • Backend credentials or local model files and enough compute for the chosen backend.
  • The target output shape defined as a JSON schema, Pydantic model, regex, grammar, or choice set.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.