New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

spectra-php/laravel-spectra

Comprehensive observability for AI/LLM operations in Laravel applications
4,867 21
Install
composer require spectra-php/laravel-spectra
Latest Version:v2.2.0
PHP:^8.2
Laravel:12 · 13
Older releases:11
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  Packagist
Maintainer: ahmad.mayahi

Spectra

Build Status Spectra Stable Version License

Spectra is a comprehensive Laravel package for AI observability. It helps you track AI requests, measure usage, calculate costs across different pricing units, enforce budgets, and inspect AI operations through a unified dashboard and API. This lets you focus on shipping reliable AI features without getting buried in provider-specific operational complexity.

Hire me — I'm available for consulting and development work

Official Documentation

Official documentation can be found on spectraphp.com.

Upgrading to 2.0

Spectra 2.0 tracks streamed responses automatically, bills prompt-cache reads and writes and reasoning tokens for every provider, and updates every pricing catalog. Most apps only need to run one new migration. See the upgrade guide and the changelog.

Code of Conduct

While this project is not affiliated with Laravel, we follow the Laravel Code of Conduct. We expect all contributors to follow these guidelines.

Author

This library is created by Ahmad Mayahi with contributions from the Open Source Community.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

fomvasss/laravel-ai-tasks

AI task orchestrator for Laravel: routing, queue, audit, budget, webhooks

6,598 40
alidaaer/laravel-ai-agent

Give your Laravel app a brain, safely. Build AI Agents that can execute real act...

1,904 30
bherila/genai-laravel

Provider-agnostic GenAI client for Laravel: Gemini, AWS Bedrock, and more

11,344 0
israrminhas/filament-aimonitor

AI API cost monitoring and key management plugin for Filament v4 & v5

2,786 10
laravilt/ai

AI-powered search and chat for Laravilt. Supports OpenAI, Anthropic, Gemini, and...

1,071 0

Version History

Version Released PHP Laravel License
v2.2.0 ^8.2 ^12.0||^13.0 MIT
v2.1.0 ^8.2 ^12.0||^13.0 MIT
v2.0.1 ^8.2 ^12.0||^13.0 MIT
v2.0.0 ^8.2 ^12.0||^13.0 MIT
v1.3.0 ^8.2 ^11.0||^12.0||^13.0 MIT