PHPackages                             creativecrafts/laravel-ai-agent-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. creativecrafts/laravel-ai-agent-kit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

creativecrafts/laravel-ai-agent-kit
===================================

Laravel AI Agent Kit is a Laravel package that delivers a structured agent-workflow toolkit on the official Laravel AI SDK: pipelines, queued jobs, multi-agent orchestration, safe tooling, resilience, and redacted domain events for operational visibility.

v1.0.0(yesterday)12↑2900%MITPHPPHP ^8.3|^8.4|^8.5CI passing

Since Jul 1Pushed yesterdayCompare

[ Source](https://github.com/CreativeCrafts/laravel-ai-agent-kit)[ Packagist](https://packagist.org/packages/creativecrafts/laravel-ai-agent-kit)[ Docs](https://github.com/creativecrafts/laravel-ai-agent-kit)[ GitHub Sponsors]()[ RSS](/packages/creativecrafts-laravel-ai-agent-kit/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (16)Versions (2)Used By (0)

Laravel AI Agent Kit
====================

[](#laravel-ai-agent-kit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/089fdead363fdf118221d4551d0cf2af54cc5227c0735ba93df6b5e3031dc19d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63726561746976656372616674732f6c61726176656c2d61692d6167656e742d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creativecrafts/laravel-ai-agent-kit)[![GitHub CI](https://camo.githubusercontent.com/1a9e4b86789abe37fc402956902f1474a4d10588569896d3c4f0f3e45b227511/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63726561746976656372616674732f6c61726176656c2d61692d6167656e742d6b69742f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d6369267374796c653d666c61742d737175617265)](https://github.com/creativecrafts/laravel-ai-agent-kit/actions/workflows/ci.yml)[![Total Downloads](https://camo.githubusercontent.com/e66c10dcda05530aaaac8d1d49a3d512da2736e7eb25cf2faaecfa1c3a17c51f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63726561746976656372616674732f6c61726176656c2d61692d6167656e742d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creativecrafts/laravel-ai-agent-kit)

Laravel AI Agent Kit is a Laravel package for building AI-powered application workflows on top of the official Laravel AI SDK. It gives your app package-owned blueprints, agents, provider profiles, tools, memory, queues, vector retrieval, and redacted telemetry without exposing provider SDK details as your public workflow API.

Use it when you want Laravel-native AI workflows that are explicit, testable, and safe by default.

Installation
------------

[](#installation)

Install the package with Composer:

```
composer require creativecrafts/laravel-ai-agent-kit
```

Publish the Laravel AI SDK configuration and migrations:

```
php artisan vendor:publish --provider="Laravel\\Ai\\AiServiceProvider"
```

Publish this package's configuration and migrations:

```
php artisan vendor:publish --tag="ai-agent-kit-config"
php artisan vendor:publish --tag="ai-agent-kit-migrations"
php artisan migrate
```

Optionally publish views:

```
php artisan vendor:publish --tag="ai-agent-kit-views"
```

Minimal configuration
---------------------

[](#minimal-configuration)

After publishing `config/ai-agent-kit.php`, configure at least one enabled provider profile. The default local/test setup can use the bundled `null` provider profile. Production apps should configure real Laravel AI provider credentials through Laravel AI and map package provider profiles to the capabilities your workflows need.

At minimum, make sure:

- `providers` contains at least one enabled provider profile with the capabilities your workflows need. The bundled `null` profile has empty capabilities and is not sufficient for blueprint evaluation on its own — merge a preset from `examples/provider-profile-presets.php` or configure real profiles (see [Providers](docs/providers.md)).
- `default_provider` references an enabled provider profile.
- `failover_order` includes the default provider profile.
- `memory.default_driver` is intentional. The default `in_memory` driver is process-local and non-persistent.
- tool execution remains default-deny until you register and authorize tools deliberately.

See [Configuration](docs/configuration.md) and [Providers](docs/providers.md) for the full setup path.

Quick start: evaluate text
--------------------------

[](#quick-start-evaluate-text)

Prefer dependency injection in controllers, jobs, commands, and application services:

```
use CreativeCrafts\LaravelAiAgentKit\Blueprints\TextToStructuredEvaluation;
use CreativeCrafts\LaravelAiAgentKit\Blueprints\TextToStructuredEvaluationRequest;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

final class EvaluateSupportReplyController
{
    public function __invoke(Request $request, TextToStructuredEvaluation $evaluation): JsonResponse
    {
        $result = $evaluation->evaluate(
            new TextToStructuredEvaluationRequest(
                subject: 'support reply',
                text: $request->string('text')->toString(),
                enabledDimensions: ['clarity', 'accuracy', 'completeness'],
                promptVersion: '1.0.0',
            ),
        );

        return response()->json($result->toArray());
    }
}
```

For route-level experiments or concise examples, the `AgentKit` facade exposes the same application-facing workflow shortcuts:

```
use CreativeCrafts\LaravelAiAgentKit\Blueprints\TextToStructuredEvaluationRequest;
use CreativeCrafts\LaravelAiAgentKit\Facades\AgentKit;

$result = AgentKit::evaluateText(
    new TextToStructuredEvaluationRequest(
        subject: 'support reply',
        text: 'We can refund the unused portion of your subscription within five business days.',
        enabledDimensions: ['clarity', 'accuracy', 'completeness'],
        promptVersion: '1.0.0',
    ),
);
```

Quick start: evaluate audio
---------------------------

[](#quick-start-evaluate-audio)

Use the audio blueprint when the workflow should transcribe audio and evaluate the transcript through one package-owned result shape:

```
use CreativeCrafts\LaravelAiAgentKit\Blueprints\AudioToTextToEvaluationRequest;
use CreativeCrafts\LaravelAiAgentKit\Facades\AgentKit;

$result = AgentKit::evaluateAudio(
    new AudioToTextToEvaluationRequest(
        subject: 'support call',
        audioReference: 's3://bucket/audio/support-call.wav',
        audioMimeType: 'audio/wav',
        enabledDimensions: ['clarity', 'accuracy'],
        transcriptionPromptVersion: '1.0.0',
        evaluationPromptVersion: '1.0.0',
    ),
);
```

See [Blueprints](docs/blueprints.md) for request fields, result fields, prompt requirements, and structured-output behavior.

Quick start: evaluate audio with image
--------------------------------------

[](#quick-start-evaluate-audio-with-image)

Use the audio-image blueprint when structured evaluation needs both a transcript and an image attachment:

```
use CreativeCrafts\LaravelAiAgentKit\Blueprints\AudioImageStructuredEvaluationRequest;
use CreativeCrafts\LaravelAiAgentKit\Blueprints\EvaluationImageInput;
use CreativeCrafts\LaravelAiAgentKit\Core\Modality\TranscriptionAudioSource;
use CreativeCrafts\LaravelAiAgentKit\Facades\AgentKit;

$result = AgentKit::evaluateAudioImage(
    new AudioImageStructuredEvaluationRequest(
        runId: 'eval-001',
        audio: TranscriptionAudioSource::fromBase64(base64_encode($audioBytes), 'audio/wav'),
        image: EvaluationImageInput::fromUrl('https://example.com/screenshot.png'),
        evaluationPrompt: 'Evaluate the transcript against the image.',
        schema: YourEvaluationSchema::class,
    ),
);
```

See [Blueprints](docs/blueprints.md#audio-image-structured-evaluation) for capability requirements and pipeline composition.

Quick start: register and orchestrate agents
--------------------------------------------

[](#quick-start-register-and-orchestrate-agents)

Register first-class agents explicitly through the package registry:

```
use App\Agents\CancellationAgent;
use App\Agents\CustomerSupportAgent;
use CreativeCrafts\LaravelAiAgentKit\Contracts\Agents\AgentRegistry;
use Illuminate\Support\ServiceProvider;

final class AppServiceProvider extends ServiceProvider
{
    public function boot(AgentRegistry $agents): void
    {
        $agents->registerMany([
            CustomerSupportAgent::class,
            CancellationAgent::class,
        ]);
    }
}
```

Then start an orchestrated workflow:

```
use CreativeCrafts\LaravelAiAgentKit\Core\Orchestration\OrchestrationRequest;
use CreativeCrafts\LaravelAiAgentKit\Facades\AgentKit;

$result = AgentKit::orchestrate(
    new OrchestrationRequest(
        entryAgent: 'support.agent',
        task: 'Handle a support refund workflow',
        input: ['subscription_id' => 'sub-123'],
    ),
);
```

See [Agents and orchestration](docs/agents-and-orchestration.md) for agent definitions, delegation, handoffs, provider-profile assignment, and trace semantics.

Core concepts
-------------

[](#core-concepts)

ConceptWhat it gives youGuideProvider profilesCapability-based provider selection and failover[Providers](docs/providers.md)BlueprintsReady-made workflows such as text and audio evaluation[Blueprints](docs/blueprints.md)AgentsPackage-owned multi-agent workflow participants[Agents and orchestration](docs/agents-and-orchestration.md)PromptsVersioned templates and explicit variables[Prompts](docs/prompts.md)ToolsExplicit registration, schema validation, and authorization[Tools](docs/tools.md)MemoryConversation continuation with in-memory, database, or Redis drivers[Memory](docs/memory.md)Pipelines and queuesStructured sync or queued execution with `RunContext`[Pipelines and queues](docs/pipelines-and-queues.md)Vectors and retrievalApplication-owned vector stores plus provider Files/Stores boundaries[Vectors and retrieval](docs/vectors-and-retrieval.md)Streaming and modalitiesStreaming text, transcription, embeddings, images, reranking, and audio generation[Streaming and modalities](docs/streaming-and-modalities.md)Errors and telemetryTyped failure categories and redacted package events[Errors and telemetry](docs/errors-and-telemetry.md)TestingPackage fakes and deterministic app tests[Testing](docs/testing.md)ProductionOperational defaults and deployment checks[Production](docs/production.md)Security and privacy defaults
-----------------------------

[](#security-and-privacy-defaults)

- Tool execution is default-deny unless tools are explicitly registered and authorized.
- Telemetry is redacted by default and emits metadata-oriented package events.
- Conversation persistence is explicit: use `in_memory` for local/test use, `database` for encrypted durable storage, or `redis` for shared ephemeral memory.
- Provider SDK details stay behind package-owned contracts and DTOs.
- Queued workflows, vector stores, and persistent memory require production-specific configuration.

Documentation
-------------

[](#documentation)

Start with [Getting started](docs/getting-started.md), then move to the focused guide for the subsystem you need. Maintainer and contributor process documents live behind [CONTRIBUTING.md](CONTRIBUTING.md).

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE.md](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b5e5ba42a2029e0f2fa45bd8d874c98599af2d2a1e77bff012ea07eeb0b65bc?d=identicon)[rockblings](/maintainers/rockblings)

---

Top Contributors

[![rockblings](https://avatars.githubusercontent.com/u/5190259?v=4)](https://github.com/rockblings "rockblings (401 commits)")[![cursoragent](https://avatars.githubusercontent.com/u/199161495?v=4)](https://github.com/cursoragent "cursoragent (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelaiai-agentcreativeCraftslaravel-ai-agent-kit

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/creativecrafts-laravel-ai-agent-kit/health.svg)

```
[![Health](https://phpackages.com/badges/creativecrafts-laravel-ai-agent-kit/health.svg)](https://phpackages.com/packages/creativecrafts-laravel-ai-agent-kit)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.3k](/packages/spatie-laravel-permission)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M183](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M158](/packages/spatie-laravel-health)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58128.1k](/packages/laracraft-tech-laravel-useful-additions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
