A curated list of awesome PHP libraries and tools for integrating AI, Machine Learning, and Natural Language Processing into your PHP applications. Contributions are welcome!
- Prism ⭐ 972 - A unified interface for working with LLMs in Laravel applications.
- Neuron AI ⭐ 633 - Open source framework to create full featured AI Agents in PHP.
- Instructor PHP ⭐ 238 - Extract structured data from LLM outputs with type safety and validation.
- LLM Chain ⭐ 45 - Comprehensive PHP library for building LLM-powered applications.
- grok-php/laravel ⭐ 113 - Seamlessly integrate Grok AI into Laravel applications with an elegant, developer-friendly package. Leverage powerful AI models for chat, automation, and NLP, while maintaining Laravel's expressive simplicity.
- Laravel OpenRouter ⭐ 32 - Laravel integration for OpenRouter's unified LLM API interface.
- php-rag ⭐ 33 - Application using LLM (Llama3/GPT-4) for text generation with database-backed retrieval.
- LLPhant ⭐ 1035 - A comprehensive PHP Generative AI Framework using OpenAI GPT 4. Inspired by Langchain.
- LLM Chain Bundle ⭐ 12 - Symfony bundle for seamless integration of the LLM Chain library.
- Lugha ⭐ 25 - Lugha is a PHP Generative AI Framework to build chatbot, RAG systems and AI-powered applications
- llm-magic ⭐ 3 - LLM-agnostic AI toolkit for Laravel
- mulagent ⭐ 6 - The orchestration of multiple agents involves the use of routines and handoffs. Simplifying, a routine is a series of steps to follow to achieve a goal, and a handoff is the transition from one agent to another, like a switchboard transferring a phone call.
- Taskallama ⭐ 10 - Taskallama is a Laravel package that provides seamless integration with Ollama's LLM API. It simplifies generating AI-powered content, from professional task writing to conversational agents, with minimal effort. Whether you're building a task management system, an HR assistant for job posts, or blog content generation, Taskallama has you covered.
- EasyAI-PHP ⭐ 10 - EasyAI-PHP is an open-source initiative designed to significantly simplify the entry into artificial intelligence for PHP-developers (so basically Lang-Chain for PHP). Based on PHP 8.1+, this project integrates advanced AI models and utilities, allowing developers to incorporate complex AI functionalities with minimal coding.
- fireworksai-adapter ⭐ 0 - The adapter integrates open-source models hosted by fireworks.ai into Modelflow AI.
- transformers-php ⭐ 615 - Transformers PHP is a toolkit for PHP developers to add machine learning magic to their projects easily.
- aipi-php ⭐ 31 - Universal API client for common AI models
- Ollama PHP ⭐ 117 - PHP client for Ollama, enabling local LLM deployment and interaction.
- Resonance ⭐ 214 - High-performance PHP framework optimized for IO-intensive LLM applications.
- mcp-php ⭐ 2 - Setting Up a Model Context Protocol (MCP) Server in Laravel
- LLM-Port-Laravel ⭐ 2 - Wrapper around the most popular LLMs that allows drop-in replacement of large language models in Laravel.
- LaravelLLMContext ⭐ 0 - Artisan Command to Generate LLM Context for a Laravel Project
- fabric-pattern ⭐ 0 - Slim PHP wrapper for Daniel Miessler's fabric pattern
- Sidekick ⭐ 24 - Say hello to Sidekick! A Laravel package that provides a common syntax for using Claude, Mistral, Cohere and OpenAi APIs.
- PHP LLMs Book ⭐ 23 - Practical guide for PHP developers on integrating LLMs into projects.
- php-llms ⭐ 23 - A practical guide and toolkit for PHP developers integrating LLMs into existing projects.
- prompt-generator ⭐ 7 - Prompt generator for LLM agents with interceptors
- LLM Agents ⭐ 85 - LLM Agents is a PHP library for building and managing Language Model (LLM) based agents. It provides a framework for creating autonomous agents that can perform complex tasks, make decisions, and interact with various tools and APIs.
- cocur/slugify ⭐ 2891 - Converts a string into a slug (NLP utility).
- laravel-llm-prompt ⭐ 5 - laravel-llm-prompt manager
- EleLLM ⭐ 3 - A PHP framework that makes working with LLMs more pleasurable and accessible.
- Elasticsearch ChatGPT PHP ⭐ 26 - Use ChatGPT to search in Elasticsearch using natural language
- instructrice ⭐ 30 - Typed LLM Outputs in PHP. Supports GPT, Claude, Gemini or any OpenAI compatible provider!
- NlpTools ⭐ 756 - NlpTools is a collection of Natural Language Processing tools written in PHP. It provides a set of APIs to work with text easily.
- laravel-prompt-alchemist ⭐ 6 - Versatile LLM Tool Use (Function Calling) package for Laravel, compatible with all LLMs, enabling LLM to execute actual code functions (unlike LLMs' built-in capabilities).
- llm ⭐ 0 - Provides Laravel integrations for various LLM providers
- php-llm-json-adapter ⭐ 1 - When using LLMs from the system, you often expect to get output results in JSON: OpenAPI's GPT API has a mechanism called Function Calling, which can return JSON, but Google's Gemini does not seem to have that functionality.
- ai-team ⭐ 11 - A package allowing to create team of AI members that can work and collaborate together to achieve a common goal.
- php-llm-documents ⭐ 7 - PHP LLM Documents is a powerful PHP library that brings LLM (Large Language Model) functionality into the PHP ecosystem.
- langchain-php ⭐ 282 - Building applications with LLMs through composability in PHP
- php-ml ⭐ 304 - A PHP machine learning library.
- TensorFlow PHP ⭐ 18682 - PHP bindings for TensorFlow.
- Rubix ML ⭐ 2091 - Machine learning library for building algorithms and models.
- opencv/opencv-php ⭐ 352 - OpenCV bindings for PHP for image processing and computer vision.
- brick/math ⭐ 1907 - Handles arbitrary precision mathematics in PHP.
- redis-vector-php ⭐ 11 - Redis Vector Library (RedisVL) enables Redis as a real-time database for LLM applications, based on Predis PHP client
- php-ai/php-ds - PHP data structures extension for performance.
- ai-commit ⭐ 377 - Automagically generate conventional git commit messages with AI.
- Laragenie ⭐ 149 - An AI bot made for the command line that can read and understand any codebase from your Laravel app.
- Subvert ⭐ 824 - Generate subtitles, summaries, and chapters from videos in seconds
- vector-storage ⭐ 2 - LLM Agents Vector Storage
- Google Cloud AI ⭐ 1107 - Google Cloud AI services in PHP.
- DeepL PHP ⭐ 224 - Official PHP library for the DeepL language translation API.
- Gemini PHP ⭐ 216 - ⚡️ Gemini PHP is a community-maintained PHP API client that allows you to interact with the Gemini AI API.
- OpenAI PHP SDK ⭐ 2305 - OpenAI PHP SDK : Most downloaded, forked, contributed, huge community supported, and used PHP (Laravel , Symfony, Yii, Cake PHP or any PHP framework) SDK for OpenAI GPT-3 and DALL-E. It also supports chatGPT-like streaming. (ChatGPT AI is supported)
- OpenAI PHP ⭐ 5179 - OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
- AWS Rekognition - Amazon Rekognition API for image and video analysis.
- SearchAugmentedLLM ⭐ 8 - SearchAugmentedLLM empowers LLMs with information from the web
- neuranotes-api ⭐ 1 - A note-taking app showcasing LLM, RAG integration, scalable architecture, and intuitive UI/UX design.
- onnxruntime-php ⭐ 72 - 🔥 ONNX Runtime - the high performance scoring engine for ML models - for PHP
- PHP LLM Examples ⭐ 12 - Examples demonstrating GenAI and LLM usage in PHP.
- elasticsearch-chatgpt-php ⭐ 26 - Use ChatGPT to search in Elasticsearch using natural language
- Fun With OpenAI and Laravel - Fun With OpenAI and Laravel In this series, you'll get your feet wet with a variety of fun examples that demonstrate how to interact with OpenAI using PHP and Laravel. We'll begin by assuming that you know nothing, and then slowly work our way up one episode at a time!
- PHP-ML Tutorials - Learn how to use PHP-ML for machine learning.
- Rubix ML Docs - Comprehensive documentation for Rubix ML.
Have a PHP AI library, tool, or resource to share? Feel free to submit a PR!