---
title: "LLPhant"
type: "tool"
slug: "llphant-llphant"
canonical_url: "https://www.graphcanon.com/tools/llphant-llphant"
github_url: "https://github.com/LLPhant/LLPhant"
homepage_url: null
stars: 1695
forks: 167
primary_language: "PHP"
license: "MIT"
categories: ["llm-frameworks", "developer-tools"]
tags: ["gpt4", "laravel", "vector-databases", "symfony", "openai", "langchain", "php"]
updated_at: "2026-07-07T18:46:17.417872+00:00"
---

# LLPhant

> LLPhant - A PHP Generative AI Framework Inspired by Langchain

A comprehensive PHP library for generative AI applications, integrated with OpenAI GPT-4 and compatible with Symfony and Laravel. Supports multiple LLMs.

## Facts

- Repository: https://github.com/LLPhant/LLPhant
- Stars: 1,695 · Forks: 167 · Open issues: 36 · Watchers: 37
- Primary language: PHP
- License: MIT
- Last pushed: 2026-07-06T06:58:27+00:00

## Categories

- [LLM Frameworks](/categories/llm-frameworks.md)
- [Developer Tools](/categories/developer-tools.md)

## Tags

gpt4, laravel, vector-databases, symfony, openai, langchain, php

## Related tools

- [ECC](/tools/affaan-m-ecc.md) - The agent harness performance optimization system (★ 226,962)
- [AutoGPT](/tools/significant-gravitas-autogpt.md) - AutoGPT: Build, Deploy, and Run AI Agents (★ 185,417)
- [ollama](/tools/ollama-ollama.md) - Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models. (★ 175,659)
- [prompts.chat](/tools/f-prompts-chat.md) - The world's largest open-source prompt library for AI (★ 165,019)
- [transformers](/tools/huggingface-transformers.md) - 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models (★ 162,347)
- [JavaGuide](/tools/snailclimb-javaguide.md) - Snailclimb/JavaGuide: 面试 & 后端通用面试指南，覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发 (★ 156,863)
- [open-webui](/tools/open-webui-open-webui.md) - User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★ 144,575)
- [awesome-llm-apps](/tools/shubhamsaboo-awesome-llm-apps.md) - 100+ AI Agent & RAG apps you can actually run — clone, customize, ship. (★ 116,702)

## README (excerpt)

```text
# LLPhant - The PHP library for Gen AI and Vector Databases

<div align="center">
    <img src="docs/assets/llphant-logo.png" alt="LLPhant" style="border-radius: 50%; padding-bottom: 20px"/>
</div>

We designed this framework to be as simple as possible, while still providing you with the tools you need to build powerful apps.
It is compatible with Symfony and Laravel.

We are working to expand the support of different LLMs. Right now, we are supporting [OpenAI](https://openai.com/blog/openai-api), [Anthropic](https://www.anthropic.com/), [Mistral](https://mistral.ai/), [Ollama](https://ollama.ai/), [LM Studio](https://lmstudio.ai/), [Atlas Cloud](https://www.atlascloud.ai/docs) and services compatible with the OpenAI API such as [LocalAI](https://localai.io/).
Ollama that can be used to run LLM locally such as [Llama 2](https://llama.meta.com/).

We want to thank few amazing projects that we use here or inspired us:

-   the learnings from using [LangChain](https://www.langchain.com/) and [LLamaIndex](https://www.llamaindex.ai/)
-   the excellent work from the [OpenAI PHP SDK](https://github.com/openai-php/client).

We can find great external resource on LLPhant (ping us to add yours):

-   🇫🇷 [Construire un RAG en PHP avec la doc de Symfony, LLPhant et OpenAI : Tutoriel Complet](https://www.youtube.com/watch?v=zFJgRd05Noo)
-   🇫🇷 [Retour d'expérience sur la création d'un agent autonome](https://www.youtube.com/watch?v=ZnYUxTtS6IU)
-   🇬🇧 [Exploring AI riding an LLPhant](https://www.slideshare.net/slideshow/exploring-ai-riding-an-llphant-an-open-source-library-to-use-llms-and-vector-dbs-in-php/272059145)
-   🇬🇧 [Evaluating LLM and AI agents Outputs with String Comparison, Criteria & Trajectory Approaches](https://medium.com/towards-artificial-intelligence/evaluating-large-language-model-outputs-with-string-comparison-criteria-trajectory-approaches-c42d43c0cdc3)

# Get Started

> **Note**  
> **Requires** [PHP 8.1+](https://php.net/releases/)

First, install LLPhant via the [Composer](https://getcomposer.org/) package manager:

```bash
composer require theodo-group/llphant
```

In case you have not installed the GD extension, and you do not want to add it to your PHP setup,
you can use the `--ignore-platform-req=ext-gd` option

```bash
composer require theodo-group/llphant --ignore-platform-req=ext-gd
```

If you want to try the latest features of this library, you can use:

```bash
composer require theodo-group/llphant:dev-main
```

You may also want to check the requirements for [OpenAI PHP SDK](https://github.com/openai-php/client) as it is the main client.

## Documentation

Find documentation in [the docs directory](docs) or 
online at [https://llphant.readthedocs.org](https://llphant.readthedocs.org)

## Contributing

See [CONTRIBUTING](CONTRIBUTING.md) for details.

## Contributors

Thanks to our contributors:

<a href="https://github.com/theodo-group/llphant/graphs/contributors">
<img src="https://contrib.rocks/image?repo=theodo-group/llphant" />
</a>

## Sponsor

LLPhant is sponsored by :

-   [AGO](https://useago.com). Generative AI customer support solutions.
-   [Theodo](https://www.theodo.fr/) a leading digital agency building web application with Generative AI.

<div align="center">
  <a href="https://www.theodo.fr/" />
    <img alt="Theodo logo" src="https://cdn2.hubspot.net/hub/2383597/hubfs/Website/Logos/Logo_Theodo_cropped.svg" width="200"/>
  </a>
</div>
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/llphant-llphant`](/api/graphcanon/tools/llphant-llphant)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
