Explore Symfony AI: Bringing Native AI Capabilities to PHP

Symfony AI v0.1.0 launches with a suite of PHP components that let developers integrate OpenAI‑style models, vector stores, autonomous agents, and chat persistence directly into Symfony apps, offering easy installation, rich demos, and a dedicated website for hands‑on experimentation.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
Explore Symfony AI: Bringing Native AI Capabilities to PHP

Release overview

Symfony AI v0.1.0 was released on 24 December 2025. The release adds native AI support to the PHP ecosystem and provides a set of reusable components:

Platform – abstraction for more than 25 inference providers (e.g., OpenAI, Groq).

Store – vector‑store abstraction covering 20+ back‑ends for Retrieval‑Augmented Generation (RAG).

Agent – framework for autonomous agents with tool integration.

Chat – persistent chat context handling.

AI Bundle – Symfony bundle that wires the components into a Symfony application and adds profiler panels.

Installation

Add the library to any Symfony project with Composer: composer require ai After the command completes the AI components are available for use.

Quick start example

$platform = PlatformFactory::create(...);
$agent = new Agent($platform, '');
$messages = new MessageBag(
    Message::forSystem('You are a pirate and you write funny.'),
    Message::ofUser('What is the Symfony framework?')
);
$response = $agent->call($messages, ['temperature' => 1.0]);
echo $response->getContent();

This code creates a platform instance, builds an autonomous agent, sends a system prompt and a user query, and prints the AI’s response.

Demo projects

Several reference implementations are hosted at https://github.com/symfony/ai-demo:

Youtube Transcript Bot – transcribes YouTube videos and enables Q&A, demonstrating speech‑to‑text and RAG.

Recipe Bot – generates precise cooking recipes using structured output.

Wikipedia Research Bot – tool‑enabled agent that searches and reads Wikipedia in real time.

Symfony Blog Bot – RAG system built on the official Symfony blog content.

Audio Bot + Subagent – combines speech recognition, text‑to‑speech, and sub‑agents for end‑to‑end voice interaction.

Video Bot – leverages GPT‑vision to analyse live video streams from a camera.

Smart Image Cropping – AI‑assisted image cropping that focuses on key elements.

Turbo Stream Bot – demonstrates streaming responses and Markdown rendering with Symfony UX Turbo and Server‑Sent Events.

These demos illustrate multi‑modal input handling (text, audio, video, images), tool integration, streaming output, and seamless integration with the Symfony ecosystem.

Community and next steps

The source code, documentation, supported models, platforms, storage back‑ends, and built‑in tools (e.g., similarity search) are available on the official site https://ai.symfony.com. Developers can fork the demo repository, run the examples locally, and contribute improvements. Community discussion takes place on the Slack channel #ai‑initiative.

machine learningAIRAGPHPOpenAISymfony
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.