Laravel Integration

AI Integration for Laravel & PHP

Integrate NeoAI and Amy AI into your Laravel application with native service providers, facades, and Artisan commands. No version migration required.

Terminal
$ composer require eforge/neoai-laravel

$ php artisan neoai:install
✓ NeoAI service provider registered
✓ Config published to config/neoai.php
✓ Migrations ready

$ php artisan neoai:agent chat
NeoAI agent ready. Type to chat.
Products

How NeoAI & Amy AI Integrate with Laravel

Both products provide native Laravel packages designed to feel like part of the framework.

N

NeoAI — AI Agents

Add AI agents that chat with customers, book appointments, update CRMs, query databases, and execute business actions. NeoAI agents work through your existing Laravel routes, queued jobs, and event system.

✓ Service provider & facade ✓ Artisan commands for agent management ✓ Queue integration via Laravel Jobs ✓ Event-based tool execution ✓ Webhook controllers included
A

Amy AI — Business Intelligence

Connect Amy AI to your Eloquent models and get conversational BI. Ask questions in natural language and receive KPIs, charts, and dashboards generated from your real data — all within your Laravel app.

✓ Eloquent model introspection ✓ Natural language to SQL translation ✓ Dashboard generation from queries ✓ Multi-database support ✓ Blade component for embedded chat
Methods

Integration Methods for Laravel

Choose the approach that fits your project architecture.

Composer Package

Install via composer require eforge/neoai-laravel. Auto-discovered service provider, config files, and migration stubs.

REST API

Call Eforge AI services via HTTP from any Laravel controller. Guzzle HTTP client wrapper with retry logic and streaming support.

MCP Server

Let your AI agents discover and use Laravel tools dynamically via Model Context Protocol servers.

Code

Examples

Real code examples for integrating Eforge AI into your Laravel application.

Using the NeoAI Facade

app/Http/Controllers/ChatController.php
use NeoAI\Laravel\Facades\NeoAI;

public function chat(Request $request)
{
  $response = NeoAI::agent('customer-support')
    ->message($request->input('message'))
    ->context('user', auth()->user())
    ->tools(['crm', 'calendar'])
    ->send();

  return response()->json($response);
}

Amy AI with Eloquent Models

app/Http/Controllers/BiController.php
use AmyAI\Laravel\Facades\AmyAI;

public function query(Request $request)
{
  $result = AmyAI::ask($request->input('question'))
    ->models([Order::class, Customer::class])
    ->format('chart')
    ->execute();

  return view('bi.dashboard', $result);
}
Compatibility

Works with your version of Laravel

Eforge AI packages support Laravel 8 through 12 and PHP 8.1+. No version upgrade required. We test on every supported Laravel release.

Laravel 8, 9, 10, 11, 12
PHP 8.1, 8.2, 8.3, 8.4
Compatible with Laravel Sail / Docker
Compatible with Laravel Vapor / serverless
Compatible with Livewire / Inertia.js
Works with existing auth, middleware, and policies
📦
composer require eforge/neoai-laravel
php artisan neoai:install
🔑
Set API key in .env
AI is ready in your app

Add AI to your Laravel app today

Tell us about your Laravel project. We'll show you the best integration path for NeoAI or Amy AI.

Start a project See all integrations