PHPackages                             lenorix/laravel-ai-jobs - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. lenorix/laravel-ai-jobs

ActiveLibrary[Queues &amp; Workers](/categories/queues)

lenorix/laravel-ai-jobs
=======================

Queue AI to process in background

v0.3.17(11mo ago)0265[5 PRs](https://github.com/lenorix/laravel-ai-jobs/pulls)UnlicensePHPPHP ^8.3||^8.4CI passing

Since May 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/lenorix/laravel-ai-jobs)[ Packagist](https://packagist.org/packages/lenorix/laravel-ai-jobs)[ Docs](https://github.com/lenorix/laravel-ai-jobs)[ GitHub Sponsors](https://github.com/lenorix)[ RSS](/packages/lenorix-laravel-ai-jobs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (14)Versions (30)Used By (0)

Laravel AI Jobs
===============

[](#laravel-ai-jobs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ae3567e18819780a9ab511fbafe6c295c86d3c8edb5e4906fec21d25890cb931/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656e6f7269782f6c61726176656c2d61692d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenorix/laravel-ai-jobs)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e033c06553bd48162cf4a3705d46e2be68034e28bcc1b95ccb3067ed7d911298/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c656e6f7269782f6c61726176656c2d61692d6a6f62732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/lenorix/laravel-ai-jobs/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c06d58533ff64dbd16336b45bf7d9c4810ef01ce1ab1aedaffb486b8fc038ecf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c656e6f7269782f6c61726176656c2d61692d6a6f62732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/lenorix/laravel-ai-jobs/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/81202ca2555262b3dc2bcfeeac39b52db4196608f066cf5b834d5283b3261f6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c656e6f7269782f6c61726176656c2d61692d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenorix/laravel-ai-jobs)

Queue AI to process in background.

Support us
----------

[](#support-us)

Support [this work in GitHub](https://github.com/lenorix/laravel-job-status) or [get in contact](https://lenorix.com/).

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

[](#installation)

You can install the package via composer:

```
composer require lenorix/laravel-ai-jobs
```

This uses `lenorix/laravel-job-status` package, so you need to use its migrations.

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="job-status-migrations"
php artisan migrate
```

Usage
-----

[](#usage)

After create your `maltekuhr/laravel-gpt` class extending `GPTChat` create a job and extend `Lenorix\LaravelAiJobs\GptChatJob` class.

```
class MyGptJob extends GptChatJob implements ShouldQueue
{
    protected function getGptChatInstance(): GPTChat
    {
        return MyChatGPTChat::make(); // This helps the job to get an instance of your GPTChat.
    }
}
```

And now queue it instead of use `send` method, and save the tracker ID:

```
$trackerId = MyGptJob::dispatchWithTrack($myGptChat)
    ->getJob()
    ->tracker()
    ->id;
```

When the tracker `isSuccessful` method returns true, get ready an instance of your `GPTChat` and use `GptChatFuture` to update that with the result.

```
GptChatFuture::find($trackerId)
    ->getResultIn($myGptChat);
```

Now you can use that as usually, using `latestMessage` method.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jesus Hernandez](https://github.com/jhg)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance73

Regular maintenance activity

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.5% 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

Every ~1 days

Total

24

Last Release

355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/487ac224aa3cc183acf32af3eed52e49ca14a903e9ee676418195170b6beb920?d=identicon)[lenorix](/maintainers/lenorix)

---

Top Contributors

[![jhg](https://avatars.githubusercontent.com/u/1288711?v=4)](https://github.com/jhg "jhg (43 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravellenorixlaravel-ai-jobs

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lenorix-laravel-ai-jobs/health.svg)

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

###  Alternatives

[lorisleiva/laravel-actions

Laravel components that take care of one specific task

2.8k7.5M115](/packages/lorisleiva-laravel-actions)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[harris21/laravel-fuse

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

3786.5k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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