llmesh/laravel

First-class Laravel integration for LLMesh — the flexible PHP LLM SDK

Maintainers

Package info

github.com/fyunusa/llmesh-laravel

pkg:composer/llmesh/laravel

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-06-06 20:51 UTC

This package is auto-updated.

Last update: 2026-06-06 20:55:22 UTC


README

Latest Stable Version PHP Version Framework Version License

A first-class Laravel adapter package to integrate LLMesh Core seamlessly into your Laravel applications.

Installation

Install via Composer:

composer require llmesh/laravel

Configuration

Publish the config file:

php artisan vendor:publish --tag="llmesh-config"

Configure your environment keys in .env:

LLMESH_PROVIDER=openai
OPENAI_API_KEY=your-api-key

Quick Start

You can use the LLMesh facade directly in your controllers or services:

use LLMesh\Laravel\Facades\LLMesh;
use LLMesh\Core\Generators\GenerateTextOptions;

// Text Generation using the default configured provider
$response = LLMesh::generateText(
    GenerateTextOptions::make()->withPrompt('Tell me a programming joke.')
);

echo $response->getText();

Queueable Agent Jobs

The package provides a built-in RunAgentJob queueable job to delegate autonomous agent execution into the background:

use LLMesh\Laravel\Jobs\RunAgentJob;
use LLMesh\Core\Agents\Agent;

$agent = Agent::make($provider, 'You are a server reviewer.');

// Dispatch background agent execution
RunAgentJob::dispatch('user-session-123', $agent, 'Analyze the main server configuration.');