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: 63

Watchers: 3

Forks: 5

Open Issues: 0

pkg:composer/apphp/awesome-php-ml

0.2.0 2026-02-01 20:43 UTC

This package is auto-updated.

Last update: 2026-02-01 21:12:40 UTC


README

Awesome GitHub stars Resources 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
  • Clarifai/clarifai-php-grpc – Official Clarifai gRPC PHP client for accessing Clarifai’s AI APIs (vision and text recognition)
  • cognesy/instructor-php – Structured-output helper for LLM responses
  • deepseek-php/deepseek-php-client – PHP client library for integrating with the DeepSeek AI API, providing a fluent API for model queries, streaming results, and support for multiple HTTP clients and models
  • elastic/elasticsearch-chatgpt-php – Experimental PHP library that uses ChatGPT to translate natural language into Elasticsearch DSL queries and perform semantic search over your indices
  • FunkyOz/mulagent – Multi-agent orchestration framework for LLM applications
  • 🌟 google-gemini-php/clientGitHub stars Gemini PHP is a community-maintained PHP API client that allows you to interact with the Gemini AI API
  • ⚠️ HosonoDE/EasyAI-PHP – High-level AI integration library for PHP that simplifies using LLMs
  • 🌟 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-aiGitHub stars Popular OpenAI PHP SDK
  • sarfraznawaz2005/ai-team — Package to build and run collaborative teams of AI members with role/task assignments
  • SearchAugmentedLLM – PHP search-augmented LLM tool that performs web search, extracts, chunks and ranks content to provide context for LLM responses (ideal for RAG applications)
  • skito/aipi-php – Universal API client for common AI models in PHP, offering a unified interface to interact with multiple LLM providers
  • softcreatr/php-mistral-ai-sdk – PHP SDK for the Mistral AI API, providing an easy wrapper to call Mistral’s LLM and AI endpoints (chat, embeddings, fine-tuning etc.)
  • 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
  • utopia-php/agents – Simple, lightweight PHP library for AI agent orchestration with multi-provider support (OpenAI, Anthropic, Deepseek, Perplexity, XAI)

Speech & Text-to-Speech

  • b7s/fluentvox – Fluent PHP API for state-of-the-art text-to-speech and voice cloning (Resemble AI’s Chatterbox), with CLI, GPU acceleration, and multilingual support
  • b7s/whisper-php – PHP wrapper/client for Whisper speech-to-text (ASR), enabling audio transcription via Whisper models

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-phpGitHub stars 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
  • 🧪 HossamBalaha/Deep-Learning-Classification-System-using-PHP-and-Keras – Example system showing how to integrate a Keras deep learning classifier with a PHP backend
  • 🌟 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

  • artisan-build/llm — Laravel integration for multiple LLM providers (OpenAI, Azure, OpenRouter, etc.), simplifying usage of large language models in Laravel apps
  • BorahLabs/LLM-Port-Laravel – Laravel package for interchangeable LLM providers, allowing drop-in replacements of large language models
  • Capevace/llm-magic – Laravel-centric LLM toolkit with support for AI features like chat and structured data extraction
  • coding-wisely/taskallama – Laravel package for seamless integration with the Ollama LLM API for AI-powered content generation, task assistance, conversation and embeddings
  • grok-php/laravel – Laravel package for integrating Grok AI models
  • moe-mizrak/laravel-openrouter – Laravel package to integrate OpenRouter LLM API
  • 🌟 neuron-core/neuron-laravelGitHub stars Laravel integration for Neuron Core to build and orchestrate AI/LLM workflows
  • atlas-php/atlas – Laravel AI application framework for structuring agents, tools, prompts, and pipelines on top of Prism PHP
  • 🌟 openai-php/laravelGitHub stars Laravel OpenAI integration
  • PapaRascal2020/sidekick – Laravel package offering a unified syntax for working with multiple AI provider APIs (OpenAI, Claude, Cohere, Mistral)
  • shawnveltman/laravel-openai – Laravel wrapper for OpenAI
  • rahasistiyakofficial/laravel-ai-integration — This is a comprehensive, enterprise-ready package that provides seamless integration with multiple AI providers through a unified, elegant API

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
  • symfony/ai-store – Symfony AI component providing a vector store abstraction for semantic search and RAG workflows

Resources

General

Courses & Tutorials

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).

↑ Back to top