Blog
  • Login

  • Login
  • Register
  • Blog

  • Articles
  • fr
  • de

Symfony AI will change everything!

on July 15, 2025

Symfony AI is here and it's a game-changer. On July 11, 2025, Fabien Potencier announced a major new initiative: Symfony AI – a suite of official components to bring artificial intelligence into your PHP applications, natively and powerfully.

This initiative consolidates and evolves the work done under the php-llm organization into a dedicated monorepo: symfony/ai. It aims to provide developers with a modern, unified way to interact with LLMs, build agents, and implement Retrieval-Augmented Generation (RAG) workflows directly within Symfony.

🧩 Core Components of Symfony AI

Symfony AI includes several powerful tools:

  • Platform Component A unified abstraction to query OpenAI, Mistral, Anthropic, Google, Azure, and more – write your code once, switch providers anytime.

  • Agent Component Design intelligent agents capable of reasoning, calling tools, storing memory, and managing dialogues. Ideal for complex workflows and autonomous chatbots.

  • Store Component Perfect for implementing RAG patterns. Store and retrieve embeddings using vector stores to augment LLM responses with your own domain knowledge.

  • AI Bundle The glue that integrates all components with Symfony’s ecosystem: services, configuration, and debug tools.

  • MCP SDK & MCP Bundle These let your Symfony app act as a server or client of the Model Context Protocol (MCP), enabling tool calling and structured communication with agents like Claude or GPT.

⚙️ Real-world Use Case: Email Assistant with Composio

In my demo, I used Symfony AI with the Composio Dev platform to build an AI-powered email reader.

By combining:

  • Composio’s toolchain (Gmail, Calendar, etc.),
  • Symfony MCP integration,
  • Claude 3.7 via the Agent component,
  • And Flow (my own orchestrator),

…I was able to create a command-line AI agent that fetches and summarizes my latest Gmail messages using a simple prompt: "Fetch my last email".

The agent handled the full chain:

  • Identified the tool via MCP
  • Called the Gmail API
  • Parsed the email content
  • Returned a structured, summarized response.

🧪 From Demo to Production

I showcased how to:

  • Install Symfony AI in a project via composer
  • Configure your .env with the required API keys (OpenAI, Claude, etc.)
  • Run the provided demo (including blog RAG indexing)
  • Extend it with your own agents using custom tool integrations

I also used make + nix-shell to run everything locally using PHP 8.3, and demonstrated how to migrate a project from php-llm to Symfony AI with almost no effort.

🧠 Orchestrate with Flow

In the second part of the video, I integrated Symfony AI into Flow, my orchestrator framework, to chain tasks like:

  • Fetching email
  • Piping content to Claude
  • Formatting or forwarding results

This modularity allows you to reuse tools and agents across workflows – all in PHP.

🙌 Get Involved

Symfony AI is still in its early days, and you can help shape it. ➡️ Contribute on GitHub: https://github.com/symfony/ai ➡️ Explore open issues, suggest features, or test the demo app.

Want to go further? You can also contribute to my open-source project that integrates Symfony AI + Composio + Flow : https://flow.darkwood.com

  • Sitemap - Hello - Blog - Apps - Photos - Contact - - - - - Legal mentions - Darkwood 2025, all rights reserved