odiseoteam / ai-conversational-agent-bundle
Vertical-agnostic core for conversational agents: capabilities, turn loop, gates, sessions, streaming and evals.
Package info
github.com/odiseoteam/ai-conversational-agent-bundle
Type:symfony-bundle
pkg:composer/odiseoteam/ai-conversational-agent-bundle
Requires
- php: ^8.2
- ext-intl: *
- ext-mbstring: *
- psr/log: ^3.0
- symfony/ai-platform: ^0.13
- symfony/config: ^7.3|^8.0
- symfony/console: ^7.3|^8.0
- symfony/dependency-injection: ^7.3|^8.0
- symfony/event-dispatcher: ^7.3|^8.0
- symfony/http-foundation: ^7.3|^8.0
- symfony/http-kernel: ^7.3|^8.0
- symfony/messenger: ^7.3|^8.0
- symfony/rate-limiter: ^7.3|^8.0
- symfony/yaml: ^7.3|^8.0
Requires (Dev)
- deptrac/deptrac: ^3.0
- doctrine/dbal: ^4.2
- doctrine/doctrine-bundle: ^2.13
- doctrine/orm: ^3.3
- doctrine/persistence: ^4.0
- friendsofphp/php-cs-fixer: ^3.68
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- shipmonk/composer-dependency-analyser: ^1.8
- symfony/ai-anthropic-platform: ^0.13
- symfony/ai-open-ai-platform: ^0.13
- symfony/http-client: ^7.3|^8.0
Suggests
- doctrine/doctrine-bundle: Registers the ORM mappings
- doctrine/orm: For the ORM session, memory and spend-ledger stores
- symfony/ai-anthropic-platform: For the Anthropic model provider adapter
- symfony/ai-open-ai-platform: For the OpenAI model provider adapter
Provides
None
Conflicts
None
Replaces
None
- dev-master / 0.4.x-dev
- v0.3.0
- v0.2.0
- v0.1.0
- dev-fixes-23-10
- dev-docs/improvements
- dev-feature/admin
- dev-feature/reply-in-chips
- dev-feature/guidance-section
- dev-feature/guide-index
- dev-feature/knowledge-threshold
- dev-feature/knowledge-base
- dev-feature/chip-notes
- dev-feature/house-rules
- dev-refactor/interface-suffix
- dev-feature/default-models-haiku-5-5
- dev-feature/add-haiku5.5-and-add-editable-capability
- dev-feature/async-memory-extraction
- dev-feature/chips-in-card
- dev-feature/openai-provider
- dev-feature/multi-provider
- dev-fix/anthropic-cache-retention
- dev-fix/eval-run-errors
- dev-feature/ai-platform-and-evals
- dev-refactor/folder-audit
- dev-feature/thinking-effort-string
- dev-chore/align-conventions
- dev-readme-improvements
- dev-feature/conversation-retention
- dev-feature/persistence
- dev-feature/agent-handoff
This package is auto-updated.
Last update: 2026-10-24 04:56:09 UTC
README
Introduction
A vertical-agnostic core for conversational agents in Symfony: the turn loop, tool execution, gates, sessions, streaming, memory, budgets and evals. Verticals (a shopping assistant, an institutional assistant) are built on top of it as capabilities.
Tip
Based on Anthropic's guide to building shopping and merchant agents, The anatomy of effective commerce agents.
Features
- ✅ Streaming - Model rounds, tool calls and UI components sent as server-sent events
- ✅ Tool validation - JSON-schema arguments, server-issued ids only and forced lookups
- ✅ Fencing - Site content, tool results and memory reach the model as data, not instructions
- ✅ Memory - Facts extracted after the turn by a cheaper model, without identifiers
- ✅ Budgets - Spend caps per session, client and day, rate limits and a cost ledger
- ✅ Rules and knowledge - House rules in the cached prompt; policies and guides searched by section
- ✅ Models - Claude or OpenAI per role through Symfony AI, or your own adapter
- ✅ Evals - JSON cases graded by code and by a judge, with trials and replays
Note
This bundle is the core of the shopping agent we're building for Sylius. Follow the devlog: Why we're building a shopping agent for Sylius
Getting Started
Install it in 4 steps ⚡
- ✅ Require the bundle
- ✅ Connect Claude or OpenAI through Symfony AI
- ✅ Import the routes and map the Doctrine entities
- ✅ Register a capability with your tools
👉 Follow the installation guide
Quick Example
composer require odiseoteam/ai-conversational-agent-bundle symfony/ai-bundle symfony/ai-anthropic-platform
A capability gives the agent its tools. Any autoconfigured service implementing
CapabilityInterface is picked up:
use Odiseo\AiConversationalAgentBundle\Capability\CapabilityInterface; use Odiseo\AiConversationalAgentBundle\Capability\ToolContext; use Odiseo\AiConversationalAgentBundle\Capability\ToolSpec; use Odiseo\AiConversationalAgentBundle\Streaming\ToolOutcome; final class OpeningHoursCapability implements CapabilityInterface { public function name(): string { return 'store.hours'; } public function tools(): array { return [new ToolSpec('get_opening_hours', "Today's opening hours.", [ 'type' => 'object', 'properties' => [], 'additionalProperties' => false, ])]; } public function promptFragments(): array { return []; } public function groundingRules(): array { return []; } public function components(): array { return []; } public function execute(string $tool, array $input, ToolContext $context): ToolOutcome { return new ToolOutcome('Open today from 9:00 to 18:00.'); } }
Then talk to it from the terminal:
bin/console agent:chat
Important
Set cache_retention: none on the Anthropic platform. The bundle places its own cache
breakpoints, and the bridge's default adds more on top that the next rounds cannot read. See
Installation.
Documentation
- 📦 Installation - The bundle, the model provider, the routes and the Doctrine entities
- 🧩 Concepts and extension points - Capabilities, gates, sessions and every port a host can replace
- 🤖 Models and providers - A model per role, prices, capabilities and your own adapter
- 📏 Rules - The organisation's house rules, their order, caps and sources
- 📚 Knowledge - Markdown files, the lexical search, other sources and the guide index
- ⚙️ Runtime changes - Settings, API keys, spend scopes and versions edited without a deploy
- 🗂️ Logging and retention - The
conversational_agentchannel andagent:prune - 🧪 Evals - Cases, graders, trials and replays with
agent:eval - 🤝 Contributing - Running the checks and the suite on a real database
Compatibility
| Bundle | PHP | Symfony | Database | Model |
|---|---|---|---|---|
0.x |
8.2 · 8.3 · 8.4 | 7.3 · 7.4 · 8.x | Any Doctrine ORM platform; CI covers SQLite, MySQL and PostgreSQL | Claude or OpenAI, through Symfony AI; or your own ModelProviderInterface |
The bundle is in 0.x: minor versions may break the API until 1.0.
Professional Support
This bundle is maintained by Odiseo. Want an agent built on it, or help with any Symfony or Sylius project?
- 🎬 Live walkthrough - A live tour of the bundle and what runs on it
- 🛠️ Symfony and Sylius development - Help building your own agent or any other project
- 🔌 Sylius plugins - Browse all our plugins
License
MIT.