Looking to hire Laravel developers? Try LaraJobs

laravel maintained by llmesh

Description
First-class Laravel integration for LLMesh — the flexible PHP LLM SDK
Author
LLMesh Contributors
Last update
2026/06/07 08:19 (dev-main)
License
Links
Downloads
1
Tags

Comments
comments powered by Disqus

LLMesh Laravel Adapter

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.');