Symfony Quickstart
packages/symfony now gives Symfony applications a real first-party starting point:
- one public
instructorconfig root - core runtime bindings for Inference, Embeddings, StructuredOutput, HTTP, and events
- AgentCtrl builder and runtime adapters for
cli,http, andmessenger
1. Install The Package
2. Register The Bundle
Add the bundle toconfig/bundles.php if your application does not register it automatically:
3. Add Minimal Core Config
Createconfig/packages/instructor.yaml:
Cognesy\Config\Contracts\CanProvideConfigCognesy\Http\Contracts\CanSendHttpRequestsCognesy\Polyglot\Inference\InferenceCognesy\Polyglot\Embeddings\EmbeddingsCognesy\Instructor\StructuredOutput
4. Inject The Core Runtime Services
5. Optionally Enable AgentCtrl
If you also want Symfony-managed code-agent execution, extend the same config file:Cognesy\Instructor\Symfony\AgentCtrl\SymfonyAgentCtrlCognesy\Instructor\Symfony\AgentCtrl\SymfonyAgentCtrlRuntimesCognesy\Instructor\Symfony\Delivery\Messenger\ExecuteAgentCtrlPromptMessageCognesy\Instructor\Symfony\Delivery\Messenger\ExecuteNativeAgentPromptMessage
6. Optionally Enable Persisted Native-Agent Sessions
If you want resumable native-agent sessions across CLI, HTTP, or Messenger worker boots, enable the file-backed adapter:Cognesy\Agents\Session\Contracts\CanStoreSessions if they need a custom backend later.
7. Current Boundaries
Already supported:- bundle registration under
Cognesy\Instructor\Symfony\ - core runtime config translation and service wiring
- Symfony-aware HTTP transport selection
- package-owned event bus with optional Symfony event bridging
- AgentCtrl builder and runtime adapters
- native-agent session store selection with built-in memory and file adapters
- package-owned testing patterns built around public container override seams
- telemetry exporter selection, projector composition, and lifecycle hooks
- logging presets
- split-package publication bootstrap and Packagist registration
packages/symfony/docs/runtime-surfaces.md.
For the detailed config surface, see packages/symfony/docs/configuration.md.
For the telemetry-specific runtime and exporter guidance, see packages/symfony/docs/telemetry.md.
For the package testing model and public helper boundary, see packages/symfony/docs/testing.md.
For app-shape observability and delivery guidance, see packages/symfony/docs/operations.md.
For migration from older scattered Symfony glue, see packages/symfony/docs/migration.md.