Download the PHP package mubseoul/laravel-llm-observability without Composer

On this page you can find all versions of the php package mubseoul/laravel-llm-observability. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-llm-observability

Laravel LLM Observability

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A Laravel-native observability and cost tracking toolkit for LLM calls (OpenAI, Claude, Ollama, and more). Track every LLM request in your Laravel application with detailed metrics, enforce quotas, monitor costs, and gain insights through a beautiful Filament dashboard.

Features

Comprehensive Tracking

💰 Cost Management

🚦 Quota Enforcement

📊 Filament Dashboard

🔔 Alerts & Webhooks

Performance

🔒 Privacy & Security

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Run the migrations:

(Optional) If using Filament dashboard, install Filament:

Configuration

The config file config/llm-observability.php provides extensive customization options:

Recording Settings

Pricing Configuration

Update pricing as providers change their rates:

Prices are in USD per 1M tokens.

Quota Defaults

Usage

Basic Recording

With User Context

With Metadata

Manual Recording (without callback)

Enforcing Quotas (Middleware)

Add the middleware to your routes:

When a quota is exceeded, the middleware returns a 429 response:

Programmatic Quota Checking

Managing Quotas

Creating Alert Rules

Artisan Commands

Prune Old Logs

Recalculate Aggregates

View Pricing Table

Dashboard

The Filament dashboard provides a comprehensive UI for monitoring and managing LLM usage.

Access the dashboard at: /llm-observability (configurable)

Dashboard Features:

Configure dashboard settings in config/llm-observability.php:

Scheduled Tasks

The package automatically registers these scheduled tasks:

No manual scheduler configuration needed.

Integration Examples

OpenAI PHP SDK

Laravel HTTP Client

Custom Provider

Testing

Run with coverage:

Run static analysis:

Format code:

Security Considerations

Privacy

Recommendations

  1. Review stored data: Understand what metadata is captured
  2. Enable sampling: Use sampling in high-volume environments
  3. Set retention limits: Configure retention.requests_days to auto-prune old data
  4. Secure webhooks: Use HTTPS and validate webhook signatures
  5. Audit access: Restrict dashboard access with appropriate middleware

Roadmap

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.

Credits

License

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


All versions of laravel-llm-observability with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
illuminate/queue Version ^10.0|^11.0
illuminate/notifications Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mubseoul/laravel-llm-observability contains the following files

Loading the files please wait ...