Native Agents
NativeCognesy\Agents runtime integration is a different Laravel surface from AgentCtrl.
Use this distinction:
AgentCtrlruns external CLI code agents such as Claude Code, Codex, and OpenCode- native
Cognesy\Agentsis the in-process agent runtime shipped bycognesy/agents
config('instructor.agents') for the native runtime so it no longer collides with AgentCtrl defaults.
Current Laravel Surface
packages/laravel now ships the native runtime as a first-class Laravel surface.
- native agent registries for definitions, tools, capabilities, and schemas
DefinitionLoopFactoryandSessionRuntime- in-memory or database-backed session storage
- Laravel broadcasting transport and helper builders for agent event envelopes
- telemetry projection through the shared Laravel event bus
- Laravel-native testing helpers for native-agent runtime surfaces
Registering Contributions
Laravel can populate the native registries from config and explicit container tags. Config-driven contributions:Persistence
For database-backed sessions:memory store, native sessions stay process-local and ephemeral.
Runtime Bindings
The Laravel container now provides the native runtime graph directly:Cognesy\Agents\Template\Contracts\CanManageAgentDefinitionsCognesy\Agents\Tool\Contracts\CanManageToolsCognesy\Agents\Capability\CanManageAgentCapabilitiesCognesy\Agents\Capability\StructuredOutput\CanManageSchemasCognesy\Agents\Session\Contracts\CanStoreSessionsCognesy\Agents\Session\Contracts\CanManageAgentSessionsCognesy\Agents\Template\Contracts\CanInstantiateAgentLoop
Broadcasting
Laravel can now provide native-agent event envelopes through the container. The first-party helper isCognesy\Instructor\Laravel\Agents\Broadcasting\LaravelAgentBroadcasting.
It can create:
- an
AgentEventBroadcasterwith Laravel-configured defaults - an
AgentBroadcastObserverfor event-listener style integration - a
UseAgentBroadcastingcapability for native agents
Telemetry and Logging
Native agent events now participate in the same Laravel observability story as the rest of the package:- telemetry projectors attach to the shared Laravel event bus when
instructor.telemetry.enabledis true - logging presets include native-agent and
AgentCtrltemplates - production logging excludes the noisiest streaming delta events by default
Testing Helpers
Laravel now shipsCognesy\Instructor\Laravel\Testing\NativeAgentTesting for native-agent tests.
It can:
- register a
FakeAgentDrivercapability - swap native agent sessions to in-memory storage
- replace broadcasting with a recording transport
- replace telemetry export with a recording exporter
What Uses agent_ctrl
config('instructor.agent_ctrl') is only for the AgentCtrl facade and external CLI agent processes.
If your application previously published an older config file, AgentCtrl still falls back to the legacy config('instructor.agents') path. New installs and docs use agent_ctrl so native and external agent concepts stay separate.