Welcome to Instructor cookbooks. The goal of this section is to provide a set of tutorials and examples to help you get started.Instructor comes with a CLI tool that allows you to view and interact with the tutorials and examples and allows you to find the code snippets you may need to get solution to your problem.
Examples are only available with Instructor project cloned locally.
We did not want to include them in the Composer package to keep it lightweight.
Step 1: Clone Instructor project from Github
To get access to the tutorials and examples, you need to clone the Instructor project from Github:
Create a .env file in the root directory of your copy of Instructor project and set your LLM API key(s).
You can use the .env-dist file as a template.
Step 3: Check the available tutorials
You can check the available tutorials and examples by running the following command in terminal:
$ ./bin/instructor-hub list
Available CLI Commands
List Cookbooks
Run ./bin/instructor-hub list you can see all the available tutorials and examples.
$ ./bin/instructor-hub list
Reading a Cookbook
To read a tutorial, you can run ./bin/instructor-hub show {id} to see the full tutorial in the terminal.
$ ./bin/instructor-hub show {id}
Currently, there is no way to page through the tutorial - feel free to contribute :)
Running a Cookbook
To run a tutorial, you run ./bin/instructor-hub run {id} in terminal - it will execute the code and show the output. You need to have your OPENAI_API_KEY set in your environment (.env file in root directory of your copy of instructor-php repo).
$ ./bin/instructor-hub run {id}
Running all Cookbooks
This is mostly for testing if cookbooks are executed properly, but you can run ./bin/instructor-hub all {id} to run all the tutorials and examples in the terminal, starting from the one you specify.
$ ./bin/instructor-hub all {id}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Instructor for PHP","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"favicon":"https://mintcdn.com/cognesy-093fe941/3T-YSxVhjZOEjFx-/favicon.svg?fit=max\u0026auto=format\u0026n=3T-YSxVhjZOEjFx-\u0026q=85\u0026s=e5cc62c58a8a55e09ba8af630b8a8948","logo":{"light":"https://mintcdn.com/cognesy-093fe941/3T-YSxVhjZOEjFx-/images/logo/light.svg?fit=max\u0026auto=format\u0026n=3T-YSxVhjZOEjFx-\u0026q=85\u0026s=7a87fcf25ee7a908dd940c675b04259b","dark":"https://mintcdn.com/cognesy-093fe941/3T-YSxVhjZOEjFx-/images/logo/dark.svg?fit=max\u0026auto=format\u0026n=3T-YSxVhjZOEjFx-\u0026q=85\u0026s=40d05dbabfd3951fab0a7f0e0e22361c"},"navbar":{"links":[{"label":"Issues","href":"https://github.com/cognesy/instructor-php/issues"}],"primary":{"type":"button","label":"Github","href":"https://github.com/cognesy/instructor-php"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cognesy-093fe941","hasAudioNarration":false,"actualSubdomain":"cognesy-093fe941","customDomains":["docs.instructorphp.com"],"gitSource":{"type":"github","owner":"cognesy","repo":"instructor-php","deployBranch":"docs-mintlify","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae8d5a1b15cdf343bdf8632","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"Cookbook","count":346},{"language":"default","tag":"Packages","count":206},{"language":"default","tag":"Main","count":141},{"language":"default","tag":"Release Notes","count":131},{"language":"default","tag":"Polyglot","count":68},{"language":"default","tag":"Cheatsheets","count":46},{"language":"default","tag":"Instructor","count":42},{"language":"default","tag":"Agents","count":26},{"language":"default","tag":"A04_APISupport","count":25},{"language":"default","tag":"B04_LLMApiSupport","count":24}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"stylesheets/nav.css","content":".md-nav__item--section.md-nav__item--nested>label.md-nav__link[for]{color:var(--md-default-fg-color)!important;font-weight:700;font-size:0.85rem;text-transform:uppercase;letter-spacing:0.025em}.md-nav--lifted>.md-nav__list>.md-nav__item--active>.md-nav__link{color:var(--md-default-fg-color)!important;font-weight:700;font-size:0.85rem;text-transform:uppercase;letter-spacing:0.025em}.md-nav__item--pruned.md-nav__item--nested>a.md-nav__link{font-weight:600;color:var(--md-default-fg-color--light);font-size:0.85rem}.md-nav__item--nested>.md-nav__link::before{content:\"\";position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:60%;background:var(--md-primary-fg-color);border-radius:2px;opacity:0.7}.md-nav__item--nested>.md-nav__link{position:relative;padding-left:0.8rem}.md-nav__item--nested .md-nav__item>.md-nav__link{padding-left:1.2rem;font-size:0.75rem}.md-nav__item--section.md-nav__item--nested+.md-nav__item--section.md-nav__item--nested{margin-top:2rem}.md-nav__item--nested>.md-nav__link:hover{color:var(--md-accent-fg-color)}.md-nav__item--nested>.md-nav__link:hover::before{opacity:1;background:var(--md-accent-fg-color)}"}]}
{"page":{"pagePath":"cookbook/introduction","slug":"/cookbook/introduction","pageMetadata":{"title":null,"description":null,"href":"/cookbook/introduction"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Welcome to Instructor cookbooks. The goal of this section is to provide a set of tutorials and examples to help you get started.`}),`\n`,_jsx(_components.p,{children:`Instructor comes with a CLI tool that allows you to view and interact with the tutorials and examples and allows you to find the code snippets you may need to get solution to your problem.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Examples are only available with Instructor project cloned locally.\nWe did not want to include them in the Composer package to keep it lightweight.`})}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-clone-instructor-project-from-github`,children:`Step 1: Clone Instructor project from Github`}),`\n`,_jsx(_components.p,{children:`To get access to the tutorials and examples, you need to clone the Instructor project from Github:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` git`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://github.com/cognesy/instructor-php.git`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`step-2-create-env-file`,children:[`Step 2: Create `,_jsx(_components.code,{children:`.env`}),` file`]}),`\n`,_jsxs(_components.p,{children:[`Create a `,_jsx(_components.code,{children:`.env`}),` file in the root directory of your copy of Instructor project and set your LLM API key(s).\nYou can use the `,_jsx(_components.code,{children:`.env-dist`}),` file as a template.`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-check-the-available-tutorials`,children:`Step 3: Check the available tutorials`}),`\n`,_jsx(_components.p,{children:`You can check the available tutorials and examples by running the following command in terminal:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./bin/instructor-hub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`available-cli-commands`,children:`Available CLI Commands`}),`\n`,_jsx(Heading,{level:`3`,id:`list-cookbooks`,children:`List Cookbooks`}),`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`./bin/instructor-hub list`}),` you can see all the available tutorials and examples.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./bin/instructor-hub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`reading-a-cookbook`,children:`Reading a Cookbook`}),`\n`,_jsxs(_components.p,{children:[`To read a tutorial, you can run `,_jsx(_components.code,{children:`./bin/instructor-hub show {id}`}),` to see the full tutorial in the terminal.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./bin/instructor-hub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` show`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {id}`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Currently, there is no way to page through the tutorial - feel free to contribute :)`}),`\n`,_jsx(Heading,{level:`3`,id:`running-a-cookbook`,children:`Running a Cookbook`}),`\n`,_jsxs(_components.p,{children:[`To run a tutorial, you run `,_jsx(_components.code,{children:`./bin/instructor-hub run {id}`}),` in terminal - it will execute the code and show the output. You need to have your OPENAI_API_KEY set in your environment (.env file in root directory of your copy of instructor-php repo).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./bin/instructor-hub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {id}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`running-all-cookbooks`,children:`Running all Cookbooks`}),`\n`,_jsxs(_components.p,{children:[`This is mostly for testing if cookbooks are executed properly, but you can run `,_jsx(_components.code,{children:`./bin/instructor-hub all {id}`}),` to run all the tutorials and examples in the terminal, starting from the one you specify.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./bin/instructor-hub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` all`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {id}`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":null,"description":null,"href":"/cookbook/introduction"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[{"title":"Step 1: Clone Instructor project from Github","slug":"step-1-clone-instructor-project-from-github","depth":3,"children":[]},{"title":"Step 2: Create .env file","slug":"step-2-create-env-file","depth":3,"children":[]},{"title":"Step 3: Check the available tutorials","slug":"step-3-check-the-available-tutorials","depth":3,"children":[]}]},{"title":"Available CLI Commands","slug":"available-cli-commands","depth":2,"children":[{"title":"List Cookbooks","slug":"list-cookbooks","depth":3,"children":[]},{"title":"Reading a Cookbook","slug":"reading-a-cookbook","depth":3,"children":[]},{"title":"Running a Cookbook","slug":"running-a-cookbook","depth":3,"children":[]},{"title":"Running all Cookbooks","slug":"running-all-cookbooks","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cognesy-093fe941","siteName":"Instructor for PHP","title":"Introduction - Instructor for PHP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T14:37:09.158Z","originalFileLocation":"cookbook/introduction.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Instructor for PHP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Introduction - Instructor for PHP\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Instructor for PHP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.instructorphp.com/cookbook/introduction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cognesy-093fe941.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Introduction\u0026amp;theme=2d28a8cae5a2856aa603b5a8\u0026amp;signature=9d894c121d0ba5e1b8047cd9da21ac7bc7b2d212acb33cbe4519ca300e470de6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Introduction - Instructor for PHP\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cognesy-093fe941.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Introduction\u0026amp;theme=2d28a8cae5a2856aa603b5a8\u0026amp;signature=9d894c121d0ba5e1b8047cd9da21ac7bc7b2d212acb33cbe4519ca300e470de6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cognesy-093fe941/MbtHygfsTY8WtVax/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Instructor for PHP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.instructorphp.com/cookbook/introduction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cookbook/introduction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Instructor for PHP\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Instructor for PHP\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/cookbook/introduction.md","siteName":"Instructor for PHP","nav":{"global":null,"tabs":[{"tab":"Main","groups":[{"group":"Main","pages":[{"title":null,"href":""},{"title":null,"href":"/features"},{"title":null,"href":"/getting-started"},{"title":null,"href":"/use-cases"},{"title":null,"href":"/why-instructor"}]},{"group":"Release Notes","pages":[{"title":null,"href":"/release-notes/versions"},{"title":null,"href":"/release-notes/v2.14.2"},{"title":null,"href":"/release-notes/v2.14.1"},{"title":null,"href":"/release-notes/v2.14.0"},{"title":null,"href":"/release-notes/v2.13.0"},{"title":null,"href":"/release-notes/v2.12.0"},{"title":null,"href":"/release-notes/v2.11.0"},{"title":null,"href":"/release-notes/v2.10.1"},{"title":null,"href":"/release-notes/v2.10.0"},{"title":null,"href":"/release-notes/v2.9.5"},{"title":null,"href":"/release-notes/v2.9.4"},{"title":null,"href":"/release-notes/v2.9.3"},{"title":null,"href":"/release-notes/v2.9.2"},{"title":null,"href":"/release-notes/v2.9.1"},{"title":null,"href":"/release-notes/v2.9.0"},{"title":null,"href":"/release-notes/v2.8.5"},{"title":null,"href":"/release-notes/v2.8.4"},{"title":null,"href":"/release-notes/v2.8.3"},{"title":null,"href":"/release-notes/v2.8.2"},{"title":null,"href":"/release-notes/v2.8.1"},{"title":null,"href":"/release-notes/v2.8.0"},{"title":null,"href":"/release-notes/v2.7.1"},{"title":null,"href":"/release-notes/v2.7.0"},{"title":null,"href":"/release-notes/v2.6.2"},{"title":null,"href":"/release-notes/v2.6.1"},{"title":null,"href":"/release-notes/v2.6.0"},{"title":null,"href":"/release-notes/v2.5.2"},{"title":null,"href":"/release-notes/v2.5.1"},{"title":null,"href":"/release-notes/v2.5.0"},{"title":null,"href":"/release-notes/v2.4.1"},{"title":null,"href":"/release-notes/v2.4.0"},{"title":null,"href":"/release-notes/v2.3.1"},{"title":null,"href":"/release-notes/v2.3.0"},{"title":null,"href":"/release-notes/v2.2.0"},{"title":null,"href":"/release-notes/v2.1.0"},{"title":null,"href":"/release-notes/v2.0.0"},{"title":null,"href":"/release-notes/v1.22.0"},{"title":null,"href":"/release-notes/v1.21.0"},{"title":null,"href":"/release-notes/v1.20.0"},{"title":null,"href":"/release-notes/v1.19.0"},{"title":null,"href":"/release-notes/v1.18.4"},{"title":null,"href":"/release-notes/v1.18.3"},{"title":null,"href":"/release-notes/v1.18.2"},{"title":null,"href":"/release-notes/v1.18.1"},{"title":null,"href":"/release-notes/v1.18.0"},{"title":null,"href":"/release-notes/v1.17.0"},{"title":null,"href":"/release-notes/v1.16.0"},{"title":null,"href":"/release-notes/v1.15.0"},{"title":null,"href":"/release-notes/v1.14.0"},{"title":null,"href":"/release-notes/v1.13.0"},{"title":null,"href":"/release-notes/v1.12.0"},{"title":null,"href":"/release-notes/v1.11.0"},{"title":null,"href":"/release-notes/v1.10.3"},{"title":null,"href":"/release-notes/v1.10.2"},{"title":null,"href":"/release-notes/v1.10.1"},{"title":null,"href":"/release-notes/v1.10.0"},{"title":null,"href":"/release-notes/v1.9.1"},{"title":null,"href":"/release-notes/v1.9.0"},{"title":null,"href":"/release-notes/v1.8.1"},{"title":null,"href":"/release-notes/v1.8.0"},{"title":null,"href":"/release-notes/v1.7.0"},{"title":null,"href":"/release-notes/v1.6.0"},{"title":null,"href":"/release-notes/v1.5.0"},{"title":null,"href":"/release-notes/v1.4.2"},{"title":null,"href":"/release-notes/v1.4.1"},{"title":null,"href":"/release-notes/v1.4.0"},{"title":null,"href":"/release-notes/v1.3.0"},{"title":null,"href":"/release-notes/v1.2.0"},{"title":null,"href":"/release-notes/v1.1.0"},{"title":null,"href":"/release-notes/v1.0.0"},{"title":null,"href":"/release-notes/v1.0.0-RC22"},{"title":null,"href":"/release-notes/v1.0.0-RC21"},{"title":null,"href":"/release-notes/v1.0.0-RC20"},{"title":null,"href":"/release-notes/v1.0.0-RC19"},{"title":null,"href":"/release-notes/v1.0.0-RC18"},{"title":null,"href":"/release-notes/v1.0.0-RC17"},{"title":null,"href":"/release-notes/v1.0.0-RC16"},{"title":null,"href":"/release-notes/v1.0.0-RC15"},{"title":null,"href":"/release-notes/v1.0.0-RC14"},{"title":null,"href":"/release-notes/v1.0.0-RC13"},{"title":null,"href":"/release-notes/v1.0.0-RC12"},{"title":null,"href":"/release-notes/v1.0.0-RC11"},{"title":null,"href":"/release-notes/v1.0.0-RC10"},{"title":null,"href":"/release-notes/v1.0.0-RC9"},{"title":null,"href":"/release-notes/v1.0.0-RC8"},{"title":null,"href":"/release-notes/v1.0.0-RC7"},{"title":null,"href":"/release-notes/v1.0.0-RC6"},{"title":null,"href":"/release-notes/v1.0.0-rc5"},{"title":null,"href":"/release-notes/v1.0.0-rc4"},{"title":null,"href":"/release-notes/v1.0.0-rc3"},{"title":null,"href":"/release-notes/v1.0.0-rc2"},{"title":null,"href":"/release-notes/v1.0.0-rc1"},{"title":null,"href":"/release-notes/v0.17.12"},{"title":null,"href":"/release-notes/v0.17.11"},{"title":null,"href":"/release-notes/v0.17.10"},{"title":null,"href":"/release-notes/v0.17.9"},{"title":null,"href":"/release-notes/v0.17.8"},{"title":null,"href":"/release-notes/v0.17.7"},{"title":null,"href":"/release-notes/v0.17.6"},{"title":null,"href":"/release-notes/v0.17.5"},{"title":null,"href":"/release-notes/v0.17.4"},{"title":null,"href":"/release-notes/v0.17.3"},{"title":null,"href":"/release-notes/v0.17.1"},{"title":null,"href":"/release-notes/v0.17.0"},{"title":null,"href":"/release-notes/v0.16.0"},{"title":null,"href":"/release-notes/v0.15.2"},{"title":null,"href":"/release-notes/v0.15.1"},{"title":null,"href":"/release-notes/v0.15.0"},{"title":null,"href":"/release-notes/v0.14.7"},{"title":null,"href":"/release-notes/v0.14.6"},{"title":null,"href":"/release-notes/v0.14.5"},{"title":null,"href":"/release-notes/v0.14.4"},{"title":null,"href":"/release-notes/v0.14.3"},{"title":null,"href":"/release-notes/v0.14.2"},{"title":null,"href":"/release-notes/v0.14.1"},{"title":null,"href":"/release-notes/v0.14.0"},{"title":null,"href":"/release-notes/v0.13.0"},{"title":null,"href":"/release-notes/v0.12.13"},{"title":null,"href":"/release-notes/v0.12.12"},{"title":null,"href":"/release-notes/v0.12.11"},{"title":null,"href":"/release-notes/v0.12.10"},{"title":null,"href":"/release-notes/v0.12.9"},{"title":null,"href":"/release-notes/v0.12.8"},{"title":null,"href":"/release-notes/v0.12.7"},{"title":null,"href":"/release-notes/v0.12.6"},{"title":null,"href":"/release-notes/v0.12.5"},{"title":null,"href":"/release-notes/v0.12.4"},{"title":null,"href":"/release-notes/v0.12.3"},{"title":null,"href":"/release-notes/v0.12.2"},{"title":null,"href":"/release-notes/v0.12.0"},{"title":null,"href":"/release-notes/v0.8.0"}]}]},{"tab":"Packages","groups":[{"group":"Packages","pages":[{"title":null,"href":"/packages"}]},{"group":"Instructor","pages":[{"title":null,"href":"/packages/instructor/introduction"},{"title":null,"href":"/packages/instructor/quickstart"},{"title":null,"href":"/packages/instructor/setup"},{"title":null,"href":"/packages/instructor/testing-doubles"},{"title":null,"href":"/packages/instructor/upgrade"},{"title":null,"href":"/packages/instructor/cli_tools"},{"group":"Concepts","pages":[{"title":null,"href":"/packages/instructor/concepts/overview"},{"title":null,"href":"/packages/instructor/concepts/why"}]},{"group":"Essentials","pages":[{"title":null,"href":"/packages/instructor/essentials/usage"},{"title":null,"href":"/packages/instructor/essentials/data_model"},{"title":null,"href":"/packages/instructor/essentials/validation"},{"title":null,"href":"/packages/instructor/essentials/modes"},{"title":null,"href":"/packages/instructor/essentials/scalars"},{"title":null,"href":"/packages/instructor/essentials/demonstrations"},{"title":null,"href":"/packages/instructor/essentials/customize_prompts"},{"title":null,"href":"/packages/instructor/essentials/configuration"}]},{"group":"Advanced","pages":[{"title":null,"href":"/packages/instructor/advanced/partials"},{"title":null,"href":"/packages/instructor/advanced/sequences"},{"title":null,"href":"/packages/instructor/advanced/structures"},{"title":null,"href":"/packages/instructor/advanced/function_calls"},{"title":null,"href":"/packages/instructor/advanced/manual_schemas"},{"title":null,"href":"/packages/instructor/advanced/json_extraction"},{"title":null,"href":"/packages/instructor/advanced/output_formats"},{"title":null,"href":"/packages/instructor/advanced/prompts"},{"title":null,"href":"/packages/instructor/advanced/model_options"},{"title":null,"href":"/packages/instructor/advanced/structure-to-structure"}]},{"group":"Techniques","pages":[{"title":null,"href":"/packages/instructor/techniques/prompting"},{"title":null,"href":"/packages/instructor/techniques/classification"},{"title":null,"href":"/packages/instructor/techniques/search"}]},{"group":"Internals","pages":[{"title":null,"href":"/packages/instructor/internals/instructor"},{"title":null,"href":"/packages/instructor/internals/lifecycle"},{"title":null,"href":"/packages/instructor/internals/configuration_path"},{"title":null,"href":"/packages/instructor/internals/config_files"},{"title":null,"href":"/packages/instructor/internals/settings_class"},{"title":null,"href":"/packages/instructor/internals/environment"},{"title":null,"href":"/packages/instructor/internals/events"},{"title":null,"href":"/packages/instructor/internals/response_models"},{"title":null,"href":"/packages/instructor/internals/debugging"}]},{"group":"Misc","pages":[{"title":null,"href":"/packages/instructor/misc/help"},{"title":null,"href":"/packages/instructor/misc/llm_providers"},{"title":null,"href":"/packages/instructor/misc/philosophy"},{"title":null,"href":"/packages/instructor/misc/contributing"}]}]},{"group":"Polyglot","pages":[{"title":null,"href":"/packages/polyglot/overview"},{"title":null,"href":"/packages/polyglot/quickstart"},{"title":null,"href":"/packages/polyglot/setup"},{"title":null,"href":"/packages/polyglot/testing-doubles"},{"title":null,"href":"/packages/polyglot/upgrade"},{"group":"Essentials","pages":[{"title":null,"href":"/packages/polyglot/essentials/overview"},{"title":null,"href":"/packages/polyglot/essentials/inference-class"},{"title":null,"href":"/packages/polyglot/essentials/creating-requests"},{"title":null,"href":"/packages/polyglot/essentials/reasoning"},{"title":null,"href":"/packages/polyglot/essentials/request-options"},{"title":null,"href":"/packages/polyglot/essentials/response-handling"}]},{"group":"Modes","pages":[{"title":null,"href":"/packages/polyglot/modes/overview"},{"title":null,"href":"/packages/polyglot/modes/tools"},{"title":null,"href":"/packages/polyglot/modes/json-schema"},{"title":null,"href":"/packages/polyglot/modes/json"},{"title":null,"href":"/packages/polyglot/modes/md-json"},{"title":null,"href":"/packages/polyglot/modes/text"}]},{"group":"Streaming","pages":[{"title":null,"href":"/packages/polyglot/streaming/overview"},{"title":null,"href":"/packages/polyglot/streaming/misc"}]},{"group":"Batch Inference","pages":[{"title":null,"href":"/packages/polyglot/batch-inference/overview"},{"title":null,"href":"/packages/polyglot/batch-inference/submit-and-resume"},{"title":null,"href":"/packages/polyglot/batch-inference/status-and-cancellation"},{"title":null,"href":"/packages/polyglot/batch-inference/results"},{"title":null,"href":"/packages/polyglot/batch-inference/list-jobs"},{"title":null,"href":"/packages/polyglot/batch-inference/providers"},{"title":null,"href":"/packages/polyglot/batch-inference/errors-and-testing"},{"title":null,"href":"/packages/polyglot/batch-inference/internals-and-removal"}]},{"group":"Embeddings","pages":[{"title":null,"href":"/packages/polyglot/embeddings/overview"},{"title":null,"href":"/packages/polyglot/embeddings/work-with-embeddings"},{"title":null,"href":"/packages/polyglot/embeddings/optimization"}]},{"group":"Decision","pages":[{"title":null,"href":"/packages/polyglot/decision/overview"},{"title":null,"href":"/packages/polyglot/decision/questions"},{"title":null,"href":"/packages/polyglot/decision/responses"},{"title":null,"href":"/packages/polyglot/decision/runtime"},{"title":null,"href":"/packages/polyglot/decision/classifier-dev"},{"title":null,"href":"/packages/polyglot/decision/clef"},{"title":null,"href":"/packages/polyglot/decision/fastino"},{"title":null,"href":"/packages/polyglot/decision/jeff"},{"title":null,"href":"/packages/polyglot/decision/laya"},{"title":null,"href":"/packages/polyglot/decision/perplexity"},{"title":null,"href":"/packages/polyglot/decision/respan"},{"title":null,"href":"/packages/polyglot/decision/evaluation"},{"title":null,"href":"/packages/polyglot/decision/errors-testing"}]},{"group":"Advanced","pages":[{"title":null,"href":"/packages/polyglot/advanced/custom-config"},{"title":null,"href":"/packages/polyglot/advanced/custom-http-client"},{"title":null,"href":"/packages/polyglot/advanced/context-caching"},{"title":null,"href":"/packages/polyglot/advanced/connection-mgmt"},{"title":null,"href":"/packages/polyglot/advanced/json-schema"},{"title":null,"href":"/packages/polyglot/advanced/extending"}]},{"group":"Internals","pages":[{"title":null,"href":"/packages/polyglot/internals/overview"},{"title":null,"href":"/packages/polyglot/internals/lifecycle"},{"title":null,"href":"/packages/polyglot/internals/configuration"},{"title":null,"href":"/packages/polyglot/internals/model-catalog"},{"title":null,"href":"/packages/polyglot/internals/providers"},{"title":null,"href":"/packages/polyglot/internals/adapters"},{"title":null,"href":"/packages/polyglot/internals/http-client"},{"title":null,"href":"/packages/polyglot/internals/request-response"},{"title":null,"href":"/packages/polyglot/internals/events"},{"title":null,"href":"/packages/polyglot/internals/public-api"}]},{"group":"Troubleshooting","pages":[{"title":null,"href":"/packages/polyglot/troubleshooting/overview"},{"title":null,"href":"/packages/polyglot/troubleshooting/debugging"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-connection"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-authentication"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-configuration"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-rate-limits"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-streaming"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-model-specific"},{"title":null,"href":"/packages/polyglot/troubleshooting/issues-provider-specific"}]}]},{"group":"Agents","pages":[{"title":null,"href":"/packages/agents/01-introduction"},{"title":null,"href":"/packages/agents/02-basic-agent"},{"title":null,"href":"/packages/agents/03-basic-concepts"},{"title":null,"href":"/packages/agents/04-controlling-the-loop"},{"title":null,"href":"/packages/agents/05-tools"},{"title":null,"href":"/packages/agents/06-building-tools"},{"title":null,"href":"/packages/agents/07-context-and-compilers"},{"title":null,"href":"/packages/agents/08-hooks"},{"title":null,"href":"/packages/agents/09-stop-conditions"},{"title":null,"href":"/packages/agents/10-testing"},{"title":null,"href":"/packages/agents/11-state-internals"},{"title":null,"href":"/packages/agents/12-tool-calling-internals"},{"title":null,"href":"/packages/agents/13-agent-builder"},{"title":null,"href":"/packages/agents/14-agent-templates"},{"title":null,"href":"/packages/agents/15-subagents"},{"title":null,"href":"/packages/agents/16-session-runtime"},{"title":null,"href":"/packages/agents/17-building-tools-advanced"},{"title":null,"href":"/packages/agents/18-observing-agent-execution"},{"title":null,"href":"/packages/agents/19-skills"},{"title":null,"href":"/packages/agents/20-self-knowledge"},{"title":null,"href":"/packages/agents/21-evals"},{"title":null,"href":"/packages/agents/22-eval-assertions"},{"title":null,"href":"/packages/agents/23-eval-judges"},{"title":null,"href":"/packages/agents/24-eval-traces-and-artifacts"},{"title":null,"href":"/packages/agents/25-running-evals"},{"title":null,"href":"/packages/agents/testing-doubles"}]},{"group":"Agent-ctrl","pages":[{"title":null,"href":"/packages/agent-ctrl/1-overview"},{"title":null,"href":"/packages/agent-ctrl/2-getting-started"},{"title":null,"href":"/packages/agent-ctrl/testing-doubles"},{"title":null,"href":"/packages/agent-ctrl/3-streaming"},{"title":null,"href":"/packages/agent-ctrl/4-session-management"},{"title":null,"href":"/packages/agent-ctrl/5-agent-options"},{"title":null,"href":"/packages/agent-ctrl/6-response-object"},{"title":null,"href":"/packages/agent-ctrl/7-troubleshooting"},{"title":null,"href":"/packages/agent-ctrl/8-claude-code-bridge"},{"title":null,"href":"/packages/agent-ctrl/9-codex-bridge"},{"title":null,"href":"/packages/agent-ctrl/10-opencode-bridge"},{"title":null,"href":"/packages/agent-ctrl/11-pi-bridge"},{"title":null,"href":"/packages/agent-ctrl/12-gemini-bridge"}]},{"group":"Telemetry","pages":[{"title":null,"href":"/packages/telemetry/01-introduction"},{"title":null,"href":"/packages/telemetry/02-basic-setup"},{"title":null,"href":"/packages/telemetry/03-runtime-wiring"},{"title":null,"href":"/packages/telemetry/04-troubleshooting"},{"title":null,"href":"/packages/telemetry/05-langfuse"},{"title":null,"href":"/packages/telemetry/06-logfire"}]},{"group":"Sandbox","pages":[{"title":null,"href":"/packages/sandbox/1-overview"},{"title":null,"href":"/packages/sandbox/2-getting-started"},{"title":null,"href":"/packages/sandbox/3-execution-policy"},{"title":null,"href":"/packages/sandbox/4-drivers"},{"title":null,"href":"/packages/sandbox/5-streaming-and-results"},{"title":null,"href":"/packages/sandbox/6-testing"},{"title":null,"href":"/packages/sandbox/7-troubleshooting"}]},{"group":"HTTP Client","pages":[{"title":null,"href":"/packages/http/1-overview"},{"title":null,"href":"/packages/http/2-getting-started"},{"title":null,"href":"/packages/http/testing-doubles"},{"title":null,"href":"/packages/http/3-making-requests"},{"title":null,"href":"/packages/http/4-handling-responses"},{"title":null,"href":"/packages/http/5-streaming-responses"},{"title":null,"href":"/packages/http/6-pooling"},{"title":null,"href":"/packages/http/10-middleware"},{"title":null,"href":"/packages/http/7-changing-client"},{"title":null,"href":"/packages/http/8-changing-client-config"},{"title":null,"href":"/packages/http/9-1-custom-clients"}]},{"group":"Laravel","pages":[{"title":null,"href":"/packages/laravel/index"},{"title":null,"href":"/packages/laravel/installation"},{"title":null,"href":"/packages/laravel/configuration"},{"title":null,"href":"/packages/laravel/facades"},{"title":null,"href":"/packages/laravel/native-agents"},{"title":null,"href":"/packages/laravel/response-models"},{"title":null,"href":"/packages/laravel/agents"},{"title":null,"href":"/packages/laravel/events"},{"title":null,"href":"/packages/laravel/commands"},{"title":null,"href":"/packages/laravel/testing"},{"title":null,"href":"/packages/laravel/advanced"},{"title":null,"href":"/packages/laravel/troubleshooting"}]},{"group":"Retrieval","pages":[{"title":null,"href":"/packages/retrieval/overview"}]},{"group":"Symfony","pages":[{"title":null,"href":"/packages/symfony/overview"},{"title":null,"href":"/packages/symfony/quickstart"},{"title":null,"href":"/packages/symfony/runtime-surfaces"},{"title":null,"href":"/packages/symfony/configuration"},{"title":null,"href":"/packages/symfony/sessions"},{"title":null,"href":"/packages/symfony/testing"},{"title":null,"href":"/packages/symfony/telemetry"},{"title":null,"href":"/packages/symfony/logging"},{"title":null,"href":"/packages/symfony/delivery"},{"title":null,"href":"/packages/symfony/operations"},{"title":null,"href":"/packages/symfony/migration"}]},{"group":"Xprompt","pages":[{"title":null,"href":"/packages/xprompt/01-introduction"},{"title":null,"href":"/packages/xprompt/02-getting-started"},{"title":null,"href":"/packages/xprompt/03-composition"},{"title":null,"href":"/packages/xprompt/04-templates"},{"title":null,"href":"/packages/xprompt/05-structured-data"},{"title":null,"href":"/packages/xprompt/06-variants-and-registry"},{"title":null,"href":"/packages/xprompt/07-configuration"}]}]},{"tab":"Cookbook","groups":[{"group":"A01_Basics","pages":[{"title":null,"href":"/cookbook/examples/A01_Basics/basic_use"},{"title":null,"href":"/cookbook/examples/A01_Basics/constructor_parameters"},{"title":null,"href":"/cookbook/examples/A01_Basics/getters_and_setters"},{"title":null,"href":"/cookbook/examples/A01_Basics/public_vs_private"},{"title":null,"href":"/cookbook/examples/A01_Basics/basic_use_mixin"},{"title":null,"href":"/cookbook/examples/A01_Basics/fluent_api"},{"title":null,"href":"/cookbook/examples/A01_Basics/maybe"},{"title":null,"href":"/cookbook/examples/A01_Basics/messages_api"},{"title":null,"href":"/cookbook/examples/A01_Basics/mixed_type_property"},{"title":null,"href":"/cookbook/examples/A01_Basics/modes"},{"title":null,"href":"/cookbook/examples/A01_Basics/optional_fields"},{"title":null,"href":"/cookbook/examples/A01_Basics/self_correction"},{"title":null,"href":"/cookbook/examples/A01_Basics/attributes"},{"title":null,"href":"/cookbook/examples/A01_Basics/using_config"},{"title":null,"href":"/cookbook/examples/A01_Basics/validation"},{"title":null,"href":"/cookbook/examples/A01_Basics/custom_validation"},{"title":null,"href":"/cookbook/examples/A01_Basics/validation_multifield"},{"title":null,"href":"/cookbook/examples/A01_Basics/validation_with_llm"}]},{"group":"A02_Advanced","pages":[{"title":null,"href":"/cookbook/examples/A02_Advanced/config_providers"},{"title":null,"href":"/cookbook/examples/A02_Advanced/context_cache_structured"},{"title":null,"href":"/cookbook/examples/A02_Advanced/context_cache_structured_oai"},{"title":null,"href":"/cookbook/examples/A02_Advanced/context_cache_structured_oai_responses"},{"title":null,"href":"/cookbook/examples/A02_Advanced/custom_config"},{"title":null,"href":"/cookbook/examples/A02_Advanced/custom_http_client"},{"title":null,"href":"/cookbook/examples/A02_Advanced/custom_http_client_laravel"},{"title":null,"href":"/cookbook/examples/A02_Advanced/custom_prompts"},{"title":null,"href":"/cookbook/examples/A02_Advanced/custom_llm_with_dsn"},{"title":null,"href":"/cookbook/examples/A02_Advanced/function_calls"},{"title":null,"href":"/cookbook/examples/A02_Advanced/manual_schemas"},{"title":null,"href":"/cookbook/examples/A02_Advanced/partials"},{"title":null,"href":"/cookbook/examples/A02_Advanced/demonstrations"},{"title":null,"href":"/cookbook/examples/A02_Advanced/scalars"},{"title":null,"href":"/cookbook/examples/A02_Advanced/sequences"},{"title":null,"href":"/cookbook/examples/A02_Advanced/streaming"},{"title":null,"href":"/cookbook/examples/A02_Advanced/structures"}]},{"group":"A03_Troubleshooting","pages":[{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/cost_calculation"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/debugging"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/structured_output_eventlog_readback"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/logging_laravel"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/logging_monolog"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/logging_psr"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/logging_symfony"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/observability_telemetry_mechanisms"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/on_event"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/settings"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/structured_telemetry_langfuse"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/structured_telemetry_logfire"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/token_usage_events"},{"title":null,"href":"/cookbook/examples/A03_Troubleshooting/wiretap"}]},{"group":"A04_APISupport","pages":[{"title":null,"href":"/cookbook/examples/A04_APISupport/a21"},{"title":null,"href":"/cookbook/examples/A04_APISupport/anthropic"},{"title":null,"href":"/cookbook/examples/A04_APISupport/azure_openai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/cerebras"},{"title":null,"href":"/cookbook/examples/A04_APISupport/cohere"},{"title":null,"href":"/cookbook/examples/A04_APISupport/deepseek"},{"title":null,"href":"/cookbook/examples/A04_APISupport/fireworks"},{"title":null,"href":"/cookbook/examples/A04_APISupport/google_gemini"},{"title":null,"href":"/cookbook/examples/A04_APISupport/google_gemini_oai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/groq"},{"title":null,"href":"/cookbook/examples/A04_APISupport/huggingface"},{"title":null,"href":"/cookbook/examples/A04_APISupport/inception"},{"title":null,"href":"/cookbook/examples/A04_APISupport/meta"},{"title":null,"href":"/cookbook/examples/A04_APISupport/minimaxi"},{"title":null,"href":"/cookbook/examples/A04_APISupport/mistralai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/moonshotai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/ollama"},{"title":null,"href":"/cookbook/examples/A04_APISupport/openai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/openai-responses"},{"title":null,"href":"/cookbook/examples/A04_APISupport/openrouter"},{"title":null,"href":"/cookbook/examples/A04_APISupport/perplexity"},{"title":null,"href":"/cookbook/examples/A04_APISupport/qwen"},{"title":null,"href":"/cookbook/examples/A04_APISupport/sambanova"},{"title":null,"href":"/cookbook/examples/A04_APISupport/togetherai"},{"title":null,"href":"/cookbook/examples/A04_APISupport/xai"}]},{"group":"A05_Extras","pages":[{"title":null,"href":"/cookbook/examples/A05_Extras/complex_extraction"},{"title":null,"href":"/cookbook/examples/A05_Extras/complex_extraction_claude"},{"title":null,"href":"/cookbook/examples/A05_Extras/complex_extraction_cohere"},{"title":null,"href":"/cookbook/examples/A05_Extras/complex_extraction_gemini"},{"title":null,"href":"/cookbook/examples/A05_Extras/cost_calculation_structured"},{"title":null,"href":"/cookbook/examples/A05_Extras/custom_extractor"},{"title":null,"href":"/cookbook/examples/A05_Extras/structured_input"},{"title":null,"href":"/cookbook/examples/A05_Extras/image_car_damage"},{"title":null,"href":"/cookbook/examples/A05_Extras/image_to_data"},{"title":null,"href":"/cookbook/examples/A05_Extras/image_to_data_anthropic"},{"title":null,"href":"/cookbook/examples/A05_Extras/image_to_data_gemini"},{"title":null,"href":"/cookbook/examples/A05_Extras/json_schema"},{"title":null,"href":"/cookbook/examples/A05_Extras/streaming_structured_openai_responses"},{"title":null,"href":"/cookbook/examples/A05_Extras/output_format_array"},{"title":null,"href":"/cookbook/examples/A05_Extras/output_format_instance_of"},{"title":null,"href":"/cookbook/examples/A05_Extras/output_format_streaming"},{"title":null,"href":"/cookbook/examples/A05_Extras/pure_array_processing"},{"title":null,"href":"/cookbook/examples/A05_Extras/schema"},{"title":null,"href":"/cookbook/examples/A05_Extras/schema_dynamic"},{"title":null,"href":"/cookbook/examples/A05_Extras/structured_output_validation_loop"},{"title":null,"href":"/cookbook/examples/A05_Extras/transcription_to_tasks"},{"title":null,"href":"/cookbook/examples/A05_Extras/translate_ui_fields"},{"title":null,"href":"/cookbook/examples/A05_Extras/web_to_objects"}]},{"group":"B01_LLM","pages":[{"title":null,"href":"/cookbook/examples/B01_LLM/inference"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_json"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_json_schema"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_md_json"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_tools"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_with_schema_helper"},{"title":null,"href":"/cookbook/examples/B01_LLM/llm_with_tools_helper"}]},{"group":"B02_LLMAdvanced","pages":[{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/llm_config_providers"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/context_cache_llm"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/context_cache_llm_oai"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/llm_custom_config"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/custom_llm_driver"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/custom_llm_via_dsn"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/http_client"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/openai_compatible_reasoning_content"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/parallel_calls"},{"title":null,"href":"/cookbook/examples/B02_LLMAdvanced/reasoning_content"}]},{"group":"B03_LLMTroubleshooting","pages":[{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/inference_eventlog_readback"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/http_debug"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_logging_laravel_embeddings"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_logging_laravel_inference"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_logging_monolog"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_logging_symfony"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_telemetry_langfuse"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_telemetry_logfire"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_telemetry_streaming_langfuse"},{"title":null,"href":"/cookbook/examples/B03_LLMTroubleshooting/llm_telemetry_streaming_logfire"}]},{"group":"B04_LLMApiSupport","pages":[{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_a21"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_anthropic"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_azure_openai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_cerebras"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_cohere"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_deepseek"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_fireworks"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_google_gemini"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_google_gemini_oai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_groq"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_inception"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_meta"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_minimaxi"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_mistralai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_moonshotai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_ollama"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_openai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_openai-responses"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_openrouter"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_perplexity"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_qwen"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_sambanova"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_togetherai"},{"title":null,"href":"/cookbook/examples/B04_LLMApiSupport/llm_xai"}]},{"group":"B05_LLMExtras","pages":[{"title":null,"href":"/cookbook/examples/B05_LLMExtras/chat_with_many_participants"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/chat_with_summary"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/cost_calculation_inference"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/image_data"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/metrics_streaming"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/model_catalog"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/streaming_inference_openai_responses"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/prompt_templates"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/summary_with_llm"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/tool_use"},{"title":null,"href":"/cookbook/examples/B05_LLMExtras/tool_use_react"}]},{"group":"B06_Decisions","pages":[{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_primitives"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_runtime"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_dynamic_choices"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_model_metadata"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_model_pricing"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_provider_evaluation"},{"title":null,"href":"/cookbook/examples/B06_Decisions/decision_structured_state"}]},{"group":"B07_Embeddings","pages":[{"title":null,"href":"/cookbook/examples/B07_Embeddings/custom_embeddings_config"},{"title":null,"href":"/cookbook/examples/B07_Embeddings/embed_utils"},{"title":null,"href":"/cookbook/examples/B07_Embeddings/embeddings"},{"title":null,"href":"/cookbook/examples/B07_Embeddings/embedding_model_metadata"},{"title":null,"href":"/cookbook/examples/B07_Embeddings/embedding_model_pricing"}]},{"group":"B08_Retrieval","pages":[{"title":null,"href":"/cookbook/examples/B08_Retrieval/retrieval_index_and_ask"},{"title":null,"href":"/cookbook/examples/B08_Retrieval/retrieval"},{"title":null,"href":"/cookbook/examples/B08_Retrieval/support_reply_with_sources"}]},{"group":"B09_BatchInference","pages":[{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_lifecycle"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_cancel"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_list_jobs"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_live"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_partial_results"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_provider_options"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_resume"},{"title":null,"href":"/cookbook/examples/B09_BatchInference/batch_inference_unsupported"}]},{"group":"C01_Http","pages":[{"title":null,"href":"/cookbook/examples/C01_Http/http_client_basics"},{"title":null,"href":"/cookbook/examples/C01_Http/http_client_streaming_basics"},{"title":null,"href":"/cookbook/examples/C01_Http/http_middleware_hooks"},{"title":null,"href":"/cookbook/examples/C01_Http/http_middleware_stream"},{"title":null,"href":"/cookbook/examples/C01_Http/http_middleware_sync"},{"title":null,"href":"/cookbook/examples/C01_Http/http_client_pool_basics"},{"title":null,"href":"/cookbook/examples/C01_Http/http_client_stream_capture"}]},{"group":"D01_Agents","pages":[{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_execute"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_iterate"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_bash_tool"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_custom_tool"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_hooks"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_context_compiler"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_stop_conditions"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_events"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_loop_multi_execution"},{"title":null,"href":"/cookbook/examples/D01_Agents/agent_describe"}]},{"group":"D02_AgentBuilder","pages":[{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_basic"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_file_system"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_structured_output"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_hooks"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_self_critique"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_search"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_subagents"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_retrospective"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_planning_subagent"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_skills"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_derived_prompt"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_self_knowledge"},{"title":null,"href":"/cookbook/examples/D02_AgentBuilder/agent_self_description"}]},{"group":"D03_AgentTemplates","pages":[{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/template_from_definition"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/template_from_markdown"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/template_from_yaml"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/template_with_tools_and_capabilities"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/template_override_seed_state"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/coding_agent_creates_example"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/agent_definition_tools"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/composer_capability_discovery"},{"title":null,"href":"/cookbook/examples/D03_AgentTemplates/agent_definition_round_trip"}]},{"group":"D04_AgentSessions","pages":[{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_create_and_persist"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_runtime_execute_action"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_runtime_read_apis"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_send_message_action"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_fork_action"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_conflict_handling"},{"title":null,"href":"/cookbook/examples/D04_AgentSessions/session_runtime_hooks"}]},{"group":"D05_AgentTroubleshooting","pages":[{"title":null,"href":"/cookbook/examples/D05_AgentTroubleshooting/agent_eventlog_readback"},{"title":null,"href":"/cookbook/examples/D05_AgentTroubleshooting/agent_subagent_telemetry_langfuse"},{"title":null,"href":"/cookbook/examples/D05_AgentTroubleshooting/agent_subagent_telemetry_logfire"},{"title":null,"href":"/cookbook/examples/D05_AgentTroubleshooting/agent_telemetry_langfuse"},{"title":null,"href":"/cookbook/examples/D05_AgentTroubleshooting/agent_telemetry_logfire"}]},{"group":"D06_AgentEvals","pages":[{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_overview"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_cases"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_assertions"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_judge"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_targets"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_reporters"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/running_agent_evals"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_test_suites"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_judging_agent"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_judging_agent_live"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_repeated_judging"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_discovery_and_cli"},{"title":null,"href":"/cookbook/examples/D06_AgentEvals/agent_eval_trace_policies"}]},{"group":"D10_AgentCtrl","pages":[{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_events"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_streaming"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_switching"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/claude_code_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/claude_code_search"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/codex_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/codex_streaming"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_eventlog_readback"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/gemini_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/gemini_streaming"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/opencode_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/opencode_streaming"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/pi_basic"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/pi_streaming"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_telemetry_langfuse"},{"title":null,"href":"/cookbook/examples/D10_AgentCtrl/agent_ctrl_telemetry_logfire"}]},{"group":"D11_TellHarness","pages":[{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_stateless_run"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_observable_run"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_durable_conversation"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_transient_experiment"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_context_lifecycle"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_branch_workflow"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_branch_configuration"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_controlled_run"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_agent_capabilities"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_deterministic_testing"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_reasoning_configuration"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_external_protocol"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_modular_host"},{"title":null,"href":"/cookbook/examples/D11_TellHarness/tell_harness_persistent_shell_jobs"}]},{"group":"D20_Sandbox","pages":[{"title":null,"href":"/cookbook/examples/D20_Sandbox/sandbox_host_ls"},{"title":null,"href":"/cookbook/examples/D20_Sandbox/sandbox_run_php_script"},{"title":null,"href":"/cookbook/examples/D20_Sandbox/sandbox_streaming_output"},{"title":null,"href":"/cookbook/examples/D20_Sandbox/sandbox_timeout_guard"}]},{"group":"D21_SandboxAPIs","pages":[{"title":null,"href":"/cookbook/examples/D21_SandboxAPIs/sandbox_api_bubblewrap_echo"},{"title":null,"href":"/cookbook/examples/D21_SandboxAPIs/sandbox_api_docker_echo"},{"title":null,"href":"/cookbook/examples/D21_SandboxAPIs/sandbox_api_firejail_echo"},{"title":null,"href":"/cookbook/examples/D21_SandboxAPIs/sandbox_api_host_echo"},{"title":null,"href":"/cookbook/examples/D21_SandboxAPIs/sandbox_api_podman_echo"}]},{"group":"Z01_ZeroShot","pages":[{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/assign_role"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/auto_refine"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/clarify_ambiguity"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/define_style"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/emotional_stimuli"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/follow_up_questions"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/repeat_query"},{"title":null,"href":"/cookbook/examples/Z01_ZeroShot/simulate_perspective"}]},{"group":"Z02_FewShot","pages":[{"title":null,"href":"/cookbook/examples/Z02_FewShot/consistency_based_examples"},{"title":null,"href":"/cookbook/examples/Z02_FewShot/example_ordering"},{"title":null,"href":"/cookbook/examples/Z02_FewShot/in_context_examples"},{"title":null,"href":"/cookbook/examples/Z02_FewShot/select_effective_samples"}]},{"group":"Z03_ThoughtGen","pages":[{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/analogical_prompting"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/automate_selection"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/complex_examples"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/examine_context"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/higher_level_context"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/incorrect_examples"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/majority_voting"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/prompt_variations"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/structure_reasoning"},{"title":null,"href":"/cookbook/examples/Z03_ThoughtGen/uncertain_examples"}]},{"group":"Z04_Ensembling","pages":[{"title":null,"href":"/cookbook/examples/Z04_Ensembling/combine_reasoning_chains"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/combine_responses"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/combine_specialized_llms"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/consistent_examples"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/distinct_examples"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/ensemble_test_prompts"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/multiple_candidates"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/task_specific_evals"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/translation_paraphrasing"},{"title":null,"href":"/cookbook/examples/Z04_Ensembling/verify_majority_voting"}]},{"group":"Z05_SelfCriticism","pages":[{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/break_down_reasoning"},{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/determine_uncertainty"},{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/improve_with_feedback"},{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/reconstruct_prompt"},{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/self_verify"},{"title":null,"href":"/cookbook/examples/Z05_SelfCriticism/verify_independently"}]},{"group":"Z06_Decomposition","pages":[{"title":null,"href":"/cookbook/examples/Z06_Decomposition/break_down_complexity"},{"title":null,"href":"/cookbook/examples/Z06_Decomposition/ditch_vanilla_cot"},{"title":null,"href":"/cookbook/examples/Z06_Decomposition/generate_code"},{"title":null,"href":"/cookbook/examples/Z06_Decomposition/generate_in_parallel"},{"title":null,"href":"/cookbook/examples/Z06_Decomposition/solve_simpler_subtasks"},{"title":null,"href":"/cookbook/examples/Z06_Decomposition/task_specific_systems"}]},{"group":"Z07_Misc","pages":[{"title":null,"href":"/cookbook/examples/Z07_Misc/arbitrary_properties"},{"title":null,"href":"/cookbook/examples/Z07_Misc/arbitrary_properties_consistent"},{"title":null,"href":"/cookbook/examples/Z07_Misc/chain_of_summaries"},{"title":null,"href":"/cookbook/examples/Z07_Misc/chain_of_thought"},{"title":null,"href":"/cookbook/examples/Z07_Misc/classification"},{"title":null,"href":"/cookbook/examples/Z07_Misc/classification_multiclass"},{"title":null,"href":"/cookbook/examples/Z07_Misc/entity_relationships"},{"title":null,"href":"/cookbook/examples/Z07_Misc/handling_errors"},{"title":null,"href":"/cookbook/examples/Z07_Misc/limiting_lists"},{"title":null,"href":"/cookbook/examples/Z07_Misc/reflection_prompting"},{"title":null,"href":"/cookbook/examples/Z07_Misc/restate_instructions"},{"title":null,"href":"/cookbook/examples/Z07_Misc/rewrite_instructions"},{"title":null,"href":"/cookbook/examples/Z07_Misc/search_query_expansion"},{"title":null,"href":"/cookbook/examples/Z07_Misc/summary_with_keywords"},{"title":null,"href":"/cookbook/examples/Z07_Misc/component_reuse"},{"title":null,"href":"/cookbook/examples/Z07_Misc/component_reuse_cot"}]}]},{"tab":"Cheatsheets","groups":[{"group":"Cheatsheets","pages":[{"title":null,"href":"/cheatsheets/instructor"},{"title":null,"href":"/cheatsheets/polyglot"},{"title":null,"href":"/cheatsheets/agents"},{"title":null,"href":"/cheatsheets/agent-ctrl"},{"title":null,"href":"/cheatsheets/telemetry"},{"title":null,"href":"/cheatsheets/sandbox"},{"title":null,"href":"/cheatsheets/http-client"},{"title":null,"href":"/cheatsheets/laravel"},{"title":null,"href":"/cheatsheets/config"},{"title":null,"href":"/cheatsheets/contracts"},{"title":null,"href":"/cheatsheets/dynamic"},{"title":null,"href":"/cheatsheets/events"},{"title":null,"href":"/cheatsheets/logging"},{"title":null,"href":"/cheatsheets/messages"},{"title":null,"href":"/cheatsheets/metrics"},{"title":null,"href":"/cheatsheets/pipeline"},{"title":null,"href":"/cheatsheets/schema"},{"title":null,"href":"/cheatsheets/setup"},{"title":null,"href":"/cheatsheets/stream"},{"title":null,"href":"/cheatsheets/symfony"},{"title":null,"href":"/cheatsheets/templates"},{"title":null,"href":"/cheatsheets/utils"},{"title":null,"href":"/cheatsheets/xprompt"}]}]}]},"basePath":"","title":"Introduction - Instructor for PHP","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}