# Instructor for PHP > InstructorPHP is a modular AI toolkit for PHP: Polyglot provides LLM inference, embeddings, and typed decisions; Instructor extracts validated PHP objects; Agents builds tool-using agents; AgentCtrl orchestrates coding-agent CLIs. Start with the package matching your task, then fetch its Markdown documentation. The canonical human documentation is at https://docs.instructorphp.com/; the /llms/ files below are a generated Markdown mirror. For version-specific code, check the installed Composer package version and the corresponding release notes. Historical release notes and examples may describe older APIs. The full catalog and full documentation bundle are optional, large resources. Fetch individual pages first instead of loading the entire bundle into context. These files describe public content; robots.txt defines crawler access separately. ## Documentation - [Project overview](https://instructorphp.com/llms/index.md): Installation, package responsibilities, and a first structured extraction. - [Instructor quickstart](https://instructorphp.com/llms/packages/instructor/quickstart.md): Extract a typed PHP object from an LLM response. - [Instructor setup](https://instructorphp.com/llms/packages/instructor/setup.md): Configure provider credentials and structured-output requests. - [Polyglot quickstart](https://instructorphp.com/llms/packages/polyglot/quickstart.md): Call LLM providers through a shared PHP API. - [Agents introduction](https://instructorphp.com/llms/packages/agents/01-introduction.md): Build agents with tools, state, and execution controls. - [AgentCtrl getting started](https://instructorphp.com/llms/packages/agent-ctrl/2-getting-started.md): Run coding-agent CLIs from PHP. ## Common tasks - [Structured-output validation](https://instructorphp.com/llms/packages/instructor/essentials/validation.md): Validate extracted data and handle correction attempts. - [LLM inference](https://instructorphp.com/llms/packages/polyglot/essentials/inference-class.md): Configure and execute inference requests. - [Streaming](https://instructorphp.com/llms/packages/polyglot/streaming/overview.md): Consume incremental LLM output. - [Embeddings](https://instructorphp.com/llms/packages/polyglot/embeddings/overview.md): Generate vector representations for retrieval and related tasks. - [Typed decisions](https://instructorphp.com/llms/packages/polyglot/decision/overview.md): Request typed judgments with probabilities. ## Website - [Articles](https://instructorphp.com/articles): Public tutorials and implementation guidance, readable as server-rendered HTML. - [Use cases](https://instructorphp.com/use-cases): Examples of applications built with the toolkit. - [Canonical documentation index](https://docs.instructorphp.com/llms.txt): Machine-readable discovery for the separate documentation site. ## Optional - [Complete Markdown catalog](https://instructorphp.com/llms-index.txt): All generated documentation links, including cookbook examples and release notes. - [Full documentation bundle](https://instructorphp.com/llms-full.txt): Large concatenated documentation; use only when broad offline context is needed. - [Source repository](https://github.com/cognesy/instructor-php): Source code, package manifests, issues, and release history.