instructor-laravel maintained by cognesy
Description
Laravel integration for Instructor PHP - Structured LLM outputs made simple
Author
Last update
2026/03/30 13:40
(dev-main)
License
Downloads
50
Tags
laravel - ai - machine-learning - openai - gpt - llm - claude - anthropic - structured-output - instructor
Last update
2026/03/30 13:40
License
Require
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/logging ^1.22
- illuminate/database ^10.0|^11.0|^12.0
- cognesy/agents ^2.3
- cognesy/instructor-config ^2.3
- cognesy/instructor-events ^2.3
- cognesy/instructor-http-client ^2.3
- cognesy/instructor-http-pool ^2.3
- cognesy/instructor-messages ^2.3
- cognesy/instructor-polyglot ^2.3
- cognesy/instructor-struct ^2.3
- cognesy/instructor-telemetry ^2.3
- cognesy/instructor-utils ^2.3
Last update
2026/03/30 13:40
License
Require
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/agents ^2.3
- cognesy/instructor-config ^2.3
- cognesy/instructor-events ^2.3
- cognesy/instructor-http-client ^2.3
- cognesy/instructor-http-pool ^2.3
- cognesy/instructor-messages ^2.3
- cognesy/instructor-polyglot ^2.3
- cognesy/instructor-struct ^2.3
- cognesy/instructor-telemetry ^2.3
- cognesy/instructor-utils ^2.3
- cognesy/logging ^1.22
- illuminate/database ^10.0|^11.0|^12.0
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/03/30 11:17
License
Require
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/agents ^2.3
- cognesy/instructor-config ^2.3
- cognesy/instructor-events ^2.3
- cognesy/instructor-http-client ^2.3
- cognesy/instructor-http-pool ^2.3
- cognesy/instructor-messages ^2.3
- cognesy/instructor-polyglot ^2.3
- cognesy/instructor-struct ^2.3
- cognesy/instructor-telemetry ^2.3
- cognesy/instructor-utils ^2.3
- cognesy/logging ^1.22
- illuminate/database ^10.0|^11.0|^12.0
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/03/19 00:35
License
Require
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/instructor-config ^2.2
- cognesy/instructor-events ^2.2
- cognesy/instructor-http-client ^2.2
- cognesy/instructor-http-pool ^2.2
- cognesy/instructor-messages ^2.2
- cognesy/instructor-polyglot ^2.2
- cognesy/instructor-struct ^2.2
- cognesy/instructor-utils ^2.2
- cognesy/logging ^1.22
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/03/16 20:27
License
Require
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/instructor-config ^2.1
- cognesy/instructor-events ^2.1
- cognesy/instructor-http-client ^2.1
- cognesy/instructor-http-pool ^2.1
- cognesy/instructor-messages ^2.1
- cognesy/instructor-polyglot ^2.1
- cognesy/instructor-struct ^2.1
- cognesy/instructor-utils ^2.1
- cognesy/logging ^1.22
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/03/13 20:49
License
Require
- php ^8.3
- cognesy/agent-ctrl ^1.22
- cognesy/instructor-config ^2.0
- cognesy/instructor-events ^2.0
- cognesy/instructor-http-client ^2.0
- cognesy/instructor-http-pool ^2.0
- cognesy/instructor-messages ^2.0
- cognesy/instructor-polyglot ^2.0
- cognesy/instructor-struct ^2.0
- cognesy/instructor-utils ^2.0
- cognesy/logging ^1.22
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/01/18 09:55
License
Require
- php ^8.3
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/01/18 09:55
License
Require
- php ^8.3
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/01/18 09:55
License
Require
- php ^8.3
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/01/18 09:55
License
Require
- php ^8.3
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2026/01/17 15:27
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/30 08:45
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Last update
2025/12/29 07:42
License
Require
- php ^8.2
- cognesy/instructor-php ^1.13
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/http ^10.0|^11.0|^12.0
Laravel Package
Laravel integration for InstructorPHP.
It provides:
- Laravel service provider and config
- Facades for
StructuredOutput,Inference,Embeddings, andAgentCtrl - Laravel-specific HTTP client and HTTP pool drivers
- a Laravel-bound
CanSendHttpRequeststransport implementation - native
Cognesy\Agentscontainer bindings, registry loading, and session runtime - database-backed native agent sessions, broadcasting helpers, telemetry wiring, and logging presets
- testing fakes for facade-based tests and Laravel-native helper utilities for native agents
- Artisan commands for install, smoke-test, and response-model scaffolding
The package now treats native Cognesy\\Agents runtime configuration and AgentCtrl
code-agent execution as separate Laravel surfaces:
agentsis reserved for native agent runtime integrationagent_ctrlconfigures CLI code agents exposed through theAgentCtrlfacadetelemetryis the first-class config namespace for Laravel telemetry wiring
Example
<?php
use App\ResponseModels\PersonData;
use Cognesy\Instructor\Laravel\Facades\StructuredOutput;
$person = StructuredOutput::with(
messages: 'John Smith is 30 years old',
responseModel: PersonData::class,
)->get();
Documentation
packages/laravel/docs/index.mdpackages/laravel/CHEATSHEET.md