Download the PHP package oi-lab/oi-laravel-ai without Composer

On this page you can find all versions of the php package oi-lab/oi-laravel-ai. 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 oi-laravel-ai

OI Laravel AI Add-on

Latest Version on Packagist Total Downloads Tests

The AI backend for your Laravel application. It maintains a provider/model catalog with pricing, records the token usage of every agent call, reports cost per project / agent / model, and centralizes your agents' system prompts.

Features

Requirements

Installation

The package auto-discovers and registers itself via Laravel's service provider mechanism.

Assisted installation (recommended)

Run the interactive installer and answer the prompts — it publishes the config, captures the host models / setting store / registry into your .env, runs the migrations, and seeds the catalog. Every step is confirmed, so it is safe to re-run:

Manual installation

The ai_requests table has nullable foreign keys to your projects and agent_runs tables (UUID keys). Make sure those tables exist before migrating, or adjust the published migration to match your schema.

Configuration

config/oi-laravel-ai.php:

Key Description
models.project Host Project model the AiRequest.project_id FK resolves to.
models.agent_run Host AgentRun model the AiRequest.agent_run_id FK resolves to.
setting_store Class implementing SettingStore, used to persist default models and prompt overrides. Leave null to auto-detect: the oi-lab/oi-laravel-settings adapter is wired automatically when that package is installed.
context_binding Container binding resolving the "current team" used to scope settings.
registry.path Writable, host-owned registry copy used by the seeder and ai:update-registry. Falls back to the bundled assets/registry.json when null.
registry.url Canonical raw URL ai:update-registry fetches a fresh registry from.

All keys read from environment variables (OI_AI_PROJECT_MODEL, OI_AI_SETTING_STORE, OI_AI_REGISTRY_PATH, OI_AI_REGISTRY_URL, …).

Usage

Catalog

Seed the catalog (and, when a SettingStore is bound, the default models + prompts) from your DatabaseSeeder:

Usage tracking

Tracking is automatic. Once the package is installed, every agent prompt dispatched through laravel/ai is recorded:

Cost reporting

Prompt registry

The app_name global is injected automatically. Use AiPromptVariableRegistry::keys(), label(), and variablesFor() to build a settings UI.

Commands

Customizing host models

The package never hardcodes your domain models. Override the bindings in config so AiRequest belongs to your own Project / AgentRun:

Settings (default models, prompt overrides) are persisted through the SettingStore contract. Install the recommended oi-lab/oi-laravel-settings (listed under suggest) and its adapter is wired automatically. To use your own storage, implement OiLab\OiLaravelAi\Contracts\SettingStore and point setting_store at it.

Testing

AI Assistant Skills

This package ships a skill that teaches AI coding assistants (Claude Code, JetBrains AI) how to use it. The recommended way to install it is the unified oi:skills command from oi-lab/oi-laravel-development:

A deprecated package-local fallback is available for projects that don't use oi-lab/oi-laravel-development:

See docs/advanced/skills.md for details.

Documentation

The docs/ folder is importable into any app using oi-lab/oi-laravel-documentation:

License

The MIT License (MIT). See LICENSE.

Credits

Olivier Lacombe - Creator and maintainer

Olivier is a Product & Technology Director based in Montpellier, France, with over 20 years of experience innovating in UX/UI and emerging technologies. He specializes in guiding enterprises toward cutting-edge digital solutions, combining user-centered design with continuous optimization and artificial intelligence integration.

Projects & Resources:

Support

For support, please open an issue on the GitHub repository.


All versions of oi-laravel-ai with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/ai Version ^0.8|^0.9|^0.10
laravel/prompts Version ^0.3.6
spatie/laravel-data Version ^4.23
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 oi-lab/oi-laravel-ai contains the following files

Loading the files please wait ...