Skip to content

The most comprehensive curated list of Machine Learning, Artificial Intelligence, NLP, LLM, and Data Science libraries for PHP

License

Notifications You must be signed in to change notification settings

apphp/awesome-php-ml

Awesome PHP Machine Learning & AI

Awesome GitHub stars Last commit License Link Check

The most comprehensive curated list of Machine Learning, Artificial Intelligence, NLP, LLM and Data Science libraries for PHP.

Inspired by awesome-php and the broader Awesome ecosystem.

Goal: make it easy to build intelligent systems with PHP — from classic ML to modern LLM-based workflows.

What is this?

  • Curated list of PHP libraries and tools for Machine Learning, AI, NLP, LLMs and Data Science.
  • Focused on code-first resources: packages, SDKs, frameworks, and building blocks.
  • Aimed at PHP developers who want to add intelligent features to existing apps or build new AI-powered systems.

How to use this list

Recommended core stack (🌟)

These are opinionated defaults you can reach for when you just want something that works in production.

Legend

Not all projects are tagged yet – we’re gradually adding markers as the ecosystem evolves. Treat them as rough guidance, not strict rules.

  • 🌟 – widely used / production-ready projects
  • 🧪 – experimental or research-oriented projects
  • ⚠️ – projects with limited maintenance, older APIs, or niche usage; review before using in new projects.

Contents


Machine Learning

Core PHP libraries for supervised/unsupervised learning, classification, regression, and clustering.


Deep Learning & Neural Networks

PHP libraries for neural networks, deep learning architectures, and advanced learners built on tensors.

  • 🌟 RubixML/RubixMLGitHub stars High-level ML framework with pipelines and datasets

Natural Language Processing

Text processing, tokenization, language detection, sentiment analysis and other NLP tasks in PHP.


Computer Vision, Image & Video Processing

Image manipulation, preprocessing, and computer vision workloads from PHP.


Math, Statistics & Linear Algebra

Numerical computing, matrix operations, statistics, and related math foundations for ML and data science in PHP.


LLMs & AI APIs

Clients, SDKs, and frameworks for calling hosted LLMs and other AI providers from PHP.

  • adrienbrault/instructrice — Typed LLM outputs in PHP with flexible schema support (OpenAI, Claude, Gemini, etc.) and type-safe handling of structured responses
  • ArdaGnsrn/ollama-php – A PHP client library for the Ollama LLM server, enabling completions, chat, model management, and embeddings via Ollama’s API
  • cognesy/instructor-php – Structured-output helper for LLM responses
  • FunkyOz/mulagent – Multi-agent orchestration framework for LLM applications
  • ⚠️ HosonoDE/EasyAI-PHP – High-level AI integration library for PHP that simplifies using LLMs
  • 🌟 google-gemini-php/clientGitHub stars Google Gemini API client
  • 🌟 kambo-1st/langchain-php GitHub stars A PHP port of the LangChain framework for building composable LLM-powered applications
  • 🌟 llm-agents-php/agents - GitHub stars LM Agents is a PHP library for building and managing Language Model (LLM) based agents
  • llm-agents-php/prompt-generator - Prompt generator for LLM agents with interceptors
  • ModelFlow-AI (GitHub org) – Collection of PHP packages for unified access to AI models, embeddings, and chat (OpenAI, Mistral, Ollama)
  • mzarnecki/php-rag – PHP RAG toolkit for connecting vector search and LLMs in retrieval-augmented workflows
  • 🌟 openai-php/clientGitHub stars Official OpenAI PHP client
  • orhanerday/open-ai – Popular OpenAI API wrapper
  • sarfraznawaz2005/ai-team — Package to build and run collaborative teams of AI members with role/task assignments
  • skito/aipi-php – Universal API client for common AI models in PHP, offering a unified interface to interact with multiple LLM providers
  • takaaki-mizuno/php-llm-json-adapter — Adapter to normalize and return LLM responses as structured JSON using JSON Schema, with support for multiple providers (OpenAI, Gemini, Bedrock, Ollama)
  • thojou/php-llm-documents — PHP library for LLM-based document processing (splitting, embeddings, vector store, search) inspired by LangChain/DocTran

Tokenizers & Prompt Utilities


Embeddings & Vector Search

Libraries for generating embeddings and performing vector similarity search from PHP applications.


Data Processing

ETL, data pipelines, serialization, and transformation utilities for preparing data for ML and analytics in PHP.


Interop & Model Serving

Bridging PHP with native libraries, external services, and runtimes for deploying and serving ML and LLM models.


Tools & Utilities

Supporting tools, debugging helpers, logging, and HTTP/CLI utilities commonly used in ML and AI workflows.


Laravel & Framework Integrations


Symfony & Framework Integrations

  • openai-php/symfony – OpenAI PHP for Symfony integration
  • 🌟 symfony/aiGitHub stars Symfony AI: built-in AI components and bundles for Symfony apps

Resources

General

ML / AI Platforms

  • ONNX Runtime
  • tensorflow/tfjs — JavaScript machine learning platform for training and running models in the browser or Node.js (TensorFlow.js)

Learning Resources


License

This list is licensed under the MIT License – see LICENSE for details.

Contributing

Contributions are welcome!
Please see CONTRIBUTING.md for details, including criteria for adding new projects (maintenance, documentation, tests, etc).

About

The most comprehensive curated list of Machine Learning, Artificial Intelligence, NLP, LLM, and Data Science libraries for PHP

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published