cognesy / instructor-laravel
Laravel integration for Instructor PHP - Structured LLM outputs made simple
v2.10.0
2026-09-13 07:12 UTC
Requires
- php: ^8.3
- cognesy/agent-ctrl: ^2.8
- cognesy/agents: ^2.10
- cognesy/instructor-config: ^2.10
- cognesy/instructor-contracts: ^2.10
- cognesy/instructor-events: ^2.10
- cognesy/instructor-http-client: ^2.10
- cognesy/instructor-http-pool: ^2.10
- cognesy/instructor-messages: ^2.10
- cognesy/instructor-polyglot: ^2.10
- cognesy/instructor-struct: ^2.10
- cognesy/instructor-telemetry: ^2.10
- cognesy/instructor-utils: ^2.10
- cognesy/logging: ^2.3
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/contracts: ^10.0|^11.0|^12.0
- illuminate/database: ^10.0|^11.0|^12.0
- illuminate/http: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.0|^3.0
- phpstan/phpstan: ^1.10
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v2.10.0
- v2.9.5
- v2.9.4
- v2.9.3
- v2.9.2
- v2.9.1
- v2.9.0
- v2.8.5
- v2.8.4
- v2.8.3
- v2.8.2
- v2.8.1
- v2.8.0
- v2.7.1
- v2.7.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.1
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.0
- v1.22.0
- v1.21.0
- v1.20.0
- v1.19.0
- v1.18.4
- v1.18.3
- v1.18.2
- v1.18.1
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.0
- v1.14.0
This package is auto-updated.
Last update: 2026-09-13 07:16:55 UTC
README
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