apphp/awesome-php-ml

Awesome list of Machine Learning, Artificial Intelligence, NLP, LLM and Data Science libraries for PHP.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 56

Watchers: 2

Forks: 3

Open Issues: 0

pkg:composer/apphp/awesome-php-ml

0.1 2026-01-12 21:58 UTC

This package is auto-updated.

Last update: 2026-01-12 22:00:15 UTC


README

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

Example "recipes"

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.

  • ankane/onnxruntime-php – Run ONNX models from PHP
  • 🌟 deepl-phpGitHub stars Official PHP client library for the DeepL API, enabling high-quality language translation via DeepL’s AI/ML service
  • distantmagic/resonance – Asynchronous PHP framework with built-in support for serving and integrating machine learning and LLM models
  • FFI – Native C/C++ bindings for ML inference
  • 🧪 garyblankenship/mcp-php – PHP example of a Model Context Protocol (MCP) server for connecting LLMs with application logic
  • 🌟 googleapis/google-cloud-phpGitHub stars Official PHP client library for Google Cloud APIs (including ML/AI services like Vision, Translate, AutoML, Vertex AI, etc.)
  • grpc/grpc-php – gRPC client for model services
  • 🌟 neuron-core/neuron-aiGitHub stars PHP agentic AI framework for building and orchestrating LLMs, RAG etc
  • nlpcloud/nlpcloud-php — PHP client for the NLP Cloud API (access NLP/ML services like NER, sentiment analysis, summarization, text generation, embeddings, translation, and more)

Tools & Utilities

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

Laravel & Framework Integrations

LLM & AI clients

Data & DTO tools

Search & vector search

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 - Cross-platform, high performance ML inferencing and training accelerator
  • 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).