Instructor for PHP
InstructorPHP is a modular AI toolkit for PHP 8.3 and later. Use a package on its own or combine packages according to your application’s needs.Choose a package
- Polyglot provides LLM inference, embeddings, streaming, and typed decision models through a shared PHP API.
- Instructor extracts validated PHP objects from LLM responses.
- Agents provides an agent loop with tools, state, and execution controls.
- AgentCtrl orchestrates coding-agent CLIs from PHP.
cognesy/instructor-struct. See the
Instructor quickstart
for the standalone setup.
First structured extraction
SetOPENAI_API_KEY in your environment, then run:
Documentation and community
- Canonical documentation: Package guides and API usage.
- Agent starting guide: A concise guide to useful Markdown pages.
- Complete Markdown catalog: All generated documentation links.
- Articles: Tutorials and implementation guidance.
- GitHub: Source, issues, discussions, and releases.