llmesh/core

LLMesh Core - A flexible PHP SDK for interacting with multiple LLM providers

Maintainers

Package info

github.com/fyunusa/llmesh

pkg:composer/llmesh/core

Fund package maintenance!

llmesh

Statistics

Installs: 0

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-06-06 21:01 UTC

This package is auto-updated.

Last update: 2026-06-06 21:01:12 UTC


README

Latest Stable Version PHP Version Tests License

LLMesh is a flexible PHP SDK designed to help developers build AI-powered applications and autonomous agents.

Why use LLMesh?

Integrating large language models (LLMs) into applications is complicated and heavily dependent on the specific model provider you use.

LLMesh standardizes integrating artificial intelligence (AI) models across supported providers. This enables developers to focus on building great AI applications, not waste time on technical details.

For example, here’s how you can generate text with various models using LLMesh:

use LLMesh\Core\LLMesh;
use LLMesh\Core\Generators\GenerateTextOptions;
use LLMesh\OpenAI\OpenAIProvider;

$response = LLMesh::generateText(
    new OpenAIProvider($apiKey),
    GenerateTextOptions::make()->withPrompt('What is love?')
);

echo $response->getText();

Installation

Install the core library along with a provider (e.g. OpenAI):

composer require llmesh/core llmesh/openai

Decoupled Packages

The LLMesh ecosystem consists of separate, modular packages:

Features

  • generateText: Unified API for text generation with full parameter customization.
  • streamText: Real-time chunked text generation and Server-Sent Events (SSE) responses.
  • generateObject: Type-safe JSON output validated against custom schemas.
  • tools: Native function/tool calling with parameter mapping and validation.
  • agents: Autonomous multi-step orchestration loop with tool execution.
  • memory: Pluggable conversation memory stores (In-Memory, Redis, Database).
  • RAG: End-to-end ingestion pipeline (load, split, embed, store, retrieve).

Contributing

Please see the CONTRIBUTING.md guide for information on local setup, extending LLMesh with custom providers or vector stores, and the pull request checklist.

License

The MIT License (MIT). Please see LICENSE for details.