PHPackages                             emberrenewed/ai-error-laravel - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. emberrenewed/ai-error-laravel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

emberrenewed/ai-error-laravel
=============================

Enterprise-grade AI-powered error analysis, monitoring and auto-fix suggestions for Laravel 13 applications. Combines Telescope-style observability with multi-provider AI (OpenAI, Gemini, Claude, Ollama).

v1.0.0(2w ago)07↓100%MITPHPPHP ^8.3CI passing

Since May 27Pushed 2w agoCompare

[ Source](https://github.com/emberrenewed/Ai-error-Laravel)[ Packagist](https://packagist.org/packages/emberrenewed/ai-error-laravel)[ Docs](https://github.com/emberrenewed/Ai-error-Laravel)[ RSS](/packages/emberrenewed-ai-error-laravel/feed)WikiDiscussions main Synced 1w ago

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

Laravel AI Error Analyzer
=========================

[](#laravel-ai-error-analyzer)

**Telescope-grade observability + multi-provider AI explanations, root-cause analysis and auto-fix suggestions for Laravel 11/12/13.**

[![Latest Version on Packagist](https://camo.githubusercontent.com/18ccff036f42692a42a521751c489004b563cfc8327bb3f68009999d714f4496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d62657272656e657765642f61692d6572726f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emberrenewed/ai-error-laravel)[![Tests](https://camo.githubusercontent.com/a0c740a8cc14384508bb653e7d5cf3d7db976a4fdf8bbb4c0ce1dd78b607566e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656d62657272656e657765642f41692d6572726f722d4c61726176656c2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/emberrenewed/Ai-error-Laravel/actions)[![License](https://camo.githubusercontent.com/ad24e4f6396dbdafc5c4b50e34349d978bee15e57571f63913918b077eb3e6af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656d62657272656e657765642f61692d6572726f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHP](https://camo.githubusercontent.com/0054e021bf96e052102f91bef6be05831d6b41fb70fd8790f6925be215ad7bc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f656d62657272656e657765642f61692d6572726f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](composer.json)

✨ Features
----------

[](#-features)

- 🤖 **Multi-provider AI** — OpenAI, Gemini, Claude, Ollama, plus custom drivers
- 🪞 **Beautiful dashboard** — TailwindCSS + Alpine.js, dark mode, glassmorphism
- 🚀 **Realtime** — `ShouldBroadcast` events for Reverb / Pusher / Soketi
- 🧠 **Smart deduplication** — fingerprint-based, identical errors share AI analysis
- 🛡️ **Security first** — gated dashboard, encrypted runtime settings, redacted secrets
- 🔔 **Notifications** — Slack, Discord, Telegram, Mail with severity gating
- 🧰 **Artisan kit** — `install`, `test`, `scan`, `clear`, `analyze`, `monitor`
- 🧪 **Pest + PHPUnit** — full test suite, GitHub Actions matrix
- 🐳 **Docker** — turnkey compose for local Ollama dev

🚀 Quick start
-------------

[](#-quick-start)

```
composer require emberrenewed/ai-error-laravel
php artisan ai-errors:install
```

```
AI_ERROR_ANALYZER_PROVIDER=openai
OPENAI_API_KEY=sk-...
AI_ERROR_ANALYZER_EMAILS=you@example.com
```

Run the queue worker that handles AI calls:

```
php artisan queue:work --queue=ai-errors
```

Visit **`/ai-errors`** in your browser. Done.

📸 Screenshots
-------------

[](#-screenshots)

> Drop screenshots into `docs/screenshots/` and link them here:

```
docs/screenshots/
├── overview.png
├── error-detail.png
├── chat.png
└── settings.png

```

🧠 What the AI returns
---------------------

[](#-what-the-ai-returns)

For every captured exception you get a structured analysis:

```
{
  "summary": "Eloquent could not find a User with id 42.",
  "root_cause": "The `firstOrFail()` call is hit when the requested user has been soft-deleted...",
  "severity": "medium",
  "suggested_fixes": ["Use `withTrashed()->find($id)`", "..."],
  "example_code": "User::withTrashed()->findOrFail($id);",
  "prevention_tips": ["Add a deleted-at index", "..."],
  "documentation_links": ["https://laravel.com/docs/eloquent#soft-deleting"],
  "security_warnings": [],
  "performance_impact": null,
  "auto_fix_patch": "--- a/app/Http/Controllers/UserController.php\n+++ b/...",
  "related_files": ["app/Http/Controllers/UserController.php"]
}
```

🏗️ Architecture
---------------

[](#️-architecture)

```
┌──────────────┐  Log::error  ┌────────────────────────┐
│   App code   │─────────────▶│ CaptureExceptionListener│
└──────────────┘              └──────────┬─────────────┘
                                         ▼
                          ┌──────────────────────────┐
                          │ ErrorAnalysisEngine      │
                          │  • build context         │
                          │  • fingerprint           │
                          │  • persist (repository)  │
                          └──────┬────────────┬──────┘
                                 ▼            ▼
                  ┌──────────────────┐  ┌──────────────────┐
                  │  AnalyzeErrorJob │  │ ErrorCaptured ⏤  │ broadcast
                  └────────┬─────────┘  └──────────────────┘
                           ▼
                  ┌─────────────────────┐
                  │   AiProviderManager │ → OpenAI / Gemini / Claude / Ollama
                  └─────────┬───────────┘
                            ▼
                 ┌────────────────────┐
                 │ AiAnalysisResult   │ → Repository → ErrorAnalyzed event → Notifications
                 └────────────────────┘

```

🧰 Artisan commands
------------------

[](#-artisan-commands)

CommandDescription`ai-errors:install`Publish config/migrations and run them`ai-errors:test`Smoke-test the configured AI provider`ai-errors:scan`Backfill from `storage/logs/laravel.log``ai-errors:analyze {id}`Re-run AI analysis on a specific log`ai-errors:clear`Purge logs older than retention`ai-errors:monitor`Tail recent errors in the terminal🛡️ Security
-----------

[](#️-security)

- Dashboard requires the `viewAiErrorAnalyzer` Gate (default: emails allow-list, local-only fallback).
- API guarded by middleware + rate limiter.
- Secrets in `ai_error_settings` are encrypted via `APP_KEY`.
- Secrets in payloads (`password`, `token`, `authorization`, ...) are redacted before storage.

Read [SECURITY.md](SECURITY.md) for disclosure policy.

🤝 Contributing
--------------

[](#-contributing)

PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Please run:

```
vendor/bin/pint
vendor/bin/phpstan analyse
vendor/bin/pest
```

📜 License
---------

[](#-license)

MIT — see [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance98

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

14d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c40cc67fbc1f8bbf272a2705e1819cd4216b22de938bf1a5e1d4b34004580e0?d=identicon)[emberrenewed](/maintainers/emberrenewed)

---

Top Contributors

[![emberrenewed](https://avatars.githubusercontent.com/u/215741707?v=4)](https://github.com/emberrenewed "emberrenewed (2 commits)")

---

Tags

aiclaudedebuggingerror-trackinggeminilaravellaravel-packageobservabilityollamaopenailaravelmonitoringaidebuggingopenaiexception handlerGeminiclaudeobservabilityollamatelescopelaravel-13auto-fixerror-analyzer

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/emberrenewed-ai-error-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M120](/packages/laravel-pulse)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)

PHPackages © 2026

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