Decoupled Symfony packages for model inference, agents, vector storage, and MCP integration across providers such as OpenAI, Anthropic, and Gemini.
Overview
Symfony AI groups PHP libraries and Symfony bundles that add artificial intelligence features to applications. Lower-level components cover unified access to cloud and local model platforms, vector store abstraction, and an agent framework with tools and processors. Bundles wire Platform, Store, Agent, and MCP capabilities into Symfony projects.
The Platform component handles chat completion, token streaming, speech synthesis and transcription, multimodal prompts, structured output mapped to PHP types, and token usage metadata while hiding provider differences. The Agent layer runs tool-calling loops, subagents, human approval gates, memory, and RAG pipelines that index documents then retrieve context at query time.
Mate is a command-line MCP server that exposes profiler data, logs, and container services from a running Symfony app to external coding assistants. The MCP bundle connects Symfony apps to the official MCP PHP SDK as servers or clients.
Examples, a demo Symfony web app, and cookbook recipes illustrate platform setup, agents, stores, and MCP endpoints for common patterns.
Key features
- Multi-provider AI platform abstraction
- Streaming and multimodal inference
- Agents with tool calling
- Vector store and RAG indexing
- Symfony AI and MCP bundles
- Mate MCP server for debugging
- Structured output to PHP objects
- Token usage metadata
Use cases
- Symfony chatbots with memory
- RAG over project documentation
- MCP tools for AI assistants
- Voice and transcript features
- Multi-agent orchestration in PHP