cognesy / instructor-symfony
Batteries-included Symfony integration for Instructor PHP
Requires
- 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-logging: ^2.3
- cognesy/instructor-polyglot: ^2.3
- cognesy/instructor-struct: ^2.3
- cognesy/instructor-telemetry: ^2.3
- cognesy/instructor-utils: ^2.3
- symfony/config: ^6.4|^7.0|^8.0
- symfony/dependency-injection: ^6.4|^7.0|^8.0
- symfony/event-dispatcher: ^6.4|^7.0|^8.0
- symfony/framework-bundle: ^6.4|^7.0|^8.0
- symfony/http-client: ^6.4|^7.0|^8.0
- symfony/http-kernel: ^6.4|^7.0|^8.0
- symfony/messenger: ^6.4|^7.0|^8.0
- symfony/yaml: ^6.4|^7.0|^8.0
Requires (Dev)
- pestphp/pest: ^2.34
- phpstan/phpstan: ^1.11
README
Batteries-included Symfony integration for InstructorPHP.
It is intended to become the first-party framework package for Symfony applications using:
- Instructor primitives
- Polyglot inference and embeddings
- native
Cognesy\Agents AgentCtrl- shared events, logging, and telemetry wiring
- testing helpers and Symfony-native bundle integration
The package is being introduced in phases.
The current baseline already includes the bundle surface, config translation, initial container bindings for core runtime services, the first AgentCtrl container/runtime adapters, native-agent registry/session wiring, and the initial Messenger delivery seam.
The current baseline also includes an explicit session-persistence seam under instructor.sessions, with built-in in-memory and file-backed storage paths for native agents.
Telemetry is now package-owned too: explicit exporter selection, projector composition, shared event-bus bridge wiring, and lifecycle cleanup for HTTP, console, and Messenger worker contexts all live under instructor.telemetry.
Later tasks will expand broader testing and the migration path.
Planned Surface
- bundle entrypoint under
Cognesy\Instructor\Symfony\ - one public
instructorconfig root with explicit subtrees - framework-owned integration for core runtime services, agents, observability, and testing
Current Container Entry Points
The package now registers the initial core contracts and developer-facing services:
Cognesy\Config\Contracts\CanProvideConfigCognesy\Http\Contracts\CanSendHttpRequestsCognesy\Instructor\Symfony\AgentCtrl\SymfonyAgentCtrlCognesy\Instructor\Symfony\AgentCtrl\SymfonyAgentCtrlRuntimesCognesy\Polyglot\Inference\Contracts\CanCreateInferenceCognesy\Polyglot\Embeddings\Contracts\CanCreateEmbeddingsCognesy\Instructor\Contracts\CanCreateStructuredOutputCognesy\Instructor\Symfony\Delivery\Messenger\ExecuteAgentCtrlPromptMessageHandlerCognesy\Instructor\Symfony\Delivery\Messenger\ExecuteNativeAgentPromptMessageHandlerCognesy\Polyglot\Inference\InferenceCognesy\Polyglot\Embeddings\EmbeddingsCognesy\Instructor\StructuredOutput
The AgentCtrl runtime layer now includes context-aware cli, http, and messenger adapters plus typed continuation and handoff references.
The package also exposes explicit Messenger message and handler seams for queued AgentCtrl prompts, queued native-agent prompts, and opt-in runtime observation forwarding.
Native agent tools, capabilities, AgentDefinition services, and SchemaRegistration services now autoconfigure into the package-owned registries, while manual AgentRegistryTags::* tags remain available for explicit overrides.
Ownership boundaries:
packages/symfonyowns Symfony bundle registration, config normalization, service wiring, and framework defaultspackages/eventscontinues to own reusable event-dispatch primitives such as the raw Symfony bridgepackages/loggingcontinues to own reusable logging primitives, while the Symfony-facing logging bundle path is planned to migrate behindpackages/symfony
Documentation
packages/symfony/docs/overview.mdpackages/symfony/docs/configuration.mdpackages/symfony/docs/runtime-surfaces.mdpackages/symfony/docs/sessions.mdpackages/symfony/docs/testing.mdpackages/symfony/docs/telemetry.mdpackages/symfony/docs/quickstart.mdpackages/symfony/docs/logging.mdpackages/symfony/docs/delivery.mdpackages/symfony/docs/operations.mdpackages/symfony/docs/migration.mdpackages/symfony/CHEATSHEET.md
Distribution Readiness
The split-workflow matrix is now generated with packages/symfony included.
Remaining bootstrap steps outside this package task:
- Create the split repository
cognesy/instructor-symfony. - Let the split workflow populate the repository, or bootstrap it manually if publication is needed immediately.
- Verify the split repo
mainbranch contains at leastcomposer.json,src/, andREADME.md. - Submit the split repository to Packagist.
- Verify Packagist metadata and package resolution endpoints after submission.