<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/M0SAPzHO7" -->

---
title: LLPhant: Build AI and RAG Apps in PHP | daily.dev
description: LLPhant is a framework-agnostic PHP library for building generative AI and RAG applications, working with OpenAI, Anthropic, Mistral, Ollama, LM Studio,...
canonical: https://daily.dev/posts/m0sapzho7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: LLPhant: Build AI and RAG Apps in PHP | daily.dev
og:description: LLPhant is a framework-agnostic PHP library for building generative AI and RAG applications, working with OpenAI, Anthropic, Mistral, Ollama, LM Studio,...
og:url: https://daily.dev/posts/m0sapzho7
og:image: https://api.daily.dev/og/posts/M0SAPzHO7.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LLPhant: Build AI and RAG Apps in PHP

**[PHP Dev](https://daily.dev/sources/phpdev)** · [@damienseguy](https://daily.dev/damienseguy) · 62 upvotes · 2 comments

## Summary

LLPhant is a framework-agnostic PHP library for building generative AI and RAG applications, working with OpenAI, Anthropic, Mistral, Ollama, LM Studio, Gemini, and other providers. It offers streaming chat, tool calls, embeddings, vector store adapters (PostgreSQL, Redis, Elasticsearch, Qdrant, Chroma, MongoDB, and more), document splitting and retrieval helpers, prompt-injection guardrails, and typed output classification via JevClassifier. It requires PHP 8.1+ and is installed via Composer, with the GD extension as a default but overridable dependency.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://phpnews.net/llphant-php-ai>

## Community discussion

Top comments from developers on daily.dev.

**@pipesoft** · 4 upvotes

> Nice
>
> ![GIF](https://static.klipy.com/ii/feea28532d9709f5128558f418c779d0/10/36/4rZGmVf9.gif)

**@sayujraghavan** · 1 upvotes

> ![GIF](https://static.klipy.com/ii/d7aec6f6f171607374b2065c836f92f4/22/51/dzhuZCsZ.gif)

## Similar posts on daily.dev

- [Building AI Agents with Laravel: No Python Required](https://daily.dev/posts/building-ai-agents-with-laravel-no-python-required-5lpqru3o0) · Laravel · 7 upvotes · 0 comments
- [Build Your Own Private, Self-Hosted AI Applications with Ollama & Laravel](https://daily.dev/posts/build-your-own-private-self-hosted-ai-applications-with-ollama-laravel-wwjzhlkid) · Tighten · 1 upvotes · 0 comments
- [The Nueron AI Framework for PHP and Laravel](https://daily.dev/posts/the-nueron-ai-framework-for-php-and-laravel-uq2zktene) · Laravel News · 35 upvotes · 3 comments

---

Tags: [#openai](https://daily.dev/tags/openai), [#php](https://daily.dev/tags/php), [#rag](https://daily.dev/tags/rag), [#vector-search](https://daily.dev/tags/vector-search)

[View this post on daily.dev](https://daily.dev/posts/m0sapzho7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/m0sapzho7","headline":"LLPhant: Build AI and RAG Apps in PHP","text":"Shared: LLPhant: Build AI and RAG Apps in PHP","url":"https://daily.dev/posts/m0sapzho7","datePublished":"2026-10-07T10:16:48.155Z","dateModified":"2026-10-07T10:17:57.061Z","author":{"@type":"Person","name":"Damien seguy","url":"https://daily.dev/damienseguy","image":"https://media.daily.dev/image/upload/s--nPbjKqol--/f_auto,q_auto/v1698422671/avatars/avatar_G85JhYcDxAg024Omc8Rlp","description":"PHP developer passionate about deep language knowledge, testing, static analysis, and sustainable it","worksFor":{"@type":"Organization","name":"Exakat","logo":"https://media.daily.dev/image/upload/s--ibtl6fze--/f_auto/v1749051132/companies/exakat"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":44950}},"image":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":62},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/9iEAsJGZn"},"comment":[{"@type":"Comment","text":"Nice","datePublished":"2026-10-13T02:26:21.964Z","url":"https://daily.dev/posts/M0SAPzHO7#c-HsnDLW3Q8","author":{"@type":"Person","name":"Juan Felipe Velasquez Alvarez","url":"https://daily.dev/pipesoft","image":"https://media.daily.dev/image/upload/s--PbZORXAj--/f_auto/v1757214438/avatars/avatar_mQctWDEB2?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"","datePublished":"2026-10-28T11:20:28.230Z","url":"https://daily.dev/posts/M0SAPzHO7#c-783CA9sFR","author":{"@type":"Person","name":"Sayuj Raghavan","url":"https://daily.dev/sayujraghavan","image":"https://avatars.githubusercontent.com/u/50607908?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/phpdev","name":"PHP Dev"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PHP Dev","item":"https://daily.dev/squads/phpdev"},{"@type":"ListItem","position":3,"name":"LLPhant: Build AI and RAG Apps in PHP"}]}
```

