Docs
PHP: Neuron AI & Symfony AI

PHP: Neuron AI & Symfony AI

Recommended libraries and frameworks for integrating AI into PHP applications.


The PHP ecosystem has two main options depending on the project context:

Neuron AISymfony AI
Best forAgents with tools, multi-provider, any modern PHPNative integration in existing Symfony projects
FrameworkAgnostic (Laravel, Symfony, vanilla PHP)Symfony 7.2+
AgentsYes, with tools and memoryActively in development
StreamingYesYes
Structured outputYesYes

Neuron AI

Open-source PHP library for building agents with multi-provider support. Its design is pragmatic and framework-agnostic: works with Laravel, Symfony, or any modern PHP project.

Covers the following cases well:

  • Agents with tool use and automatic tool call loop
  • Multi-provider support (OpenAI, Anthropic, Google, Ollama)
  • Structured output via schemas
  • Streaming with SSE support
  • Conversation memory management

Official docs: docs.neuron-ai.dev


Symfony AI

Official Symfony component for integrating AI, introduced in Symfony 7.2. Follows framework conventions: autoconfiguration, dependency injection, YAML/PHP configuration.

Covers the following cases well:

  • Native integration with Symfonyโ€™s DI container
  • Tool definition via PHP attributes
  • Structured output with PHP classes
  • Streaming via StreamedResponse
  • Conversation memory with configurable storage

Official docs: symfony.com/doc/current/ai.html

Symfony AI is in beta

The symfony/ai component was introduced in Symfony 7.2 and its API may change between minor versions. Review the CHANGELOG before upgrading in production projects.

When to use each

Use Symfony AI if you already have a Symfony project and want native integration with the ecosystem. Use Neuron AI if you have a Laravel or generic PHP project, or if you need more mature agent features.