ashrafic / laravel-ai-orbit
The Intelligent Control Tower for Laravel AI SDK.
Requires
- php: ^8.3
- illuminate/support: ^12.0|^13.0
- laravel/ai: ^0.6|^0.7
- livewire/livewire: ^4.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
README
Laravel AI Orbit
The Intelligent Control Tower for the Laravel AI SDK
Laravel AI Orbit is a standalone observability dashboard and developer playground for the official Laravel AI SDK (laravel/ai v0.6.x). Think of it as Telescope for your AI agents — a polished, real-time window into everything your agents are doing, with powerful tools to test, compare, and optimize them.
Built for Laravel 12+ and PHP 8.3+, Orbit installs in seconds, requires zero frontend build steps, and ships with a gorgeous glassmorphism UI in both dark and light modes.
Features
| Category | Feature | Description |
|---|---|---|
| Observability | Dashboard | At-a-glance stats for conversations, runs, messages, tokens, and agent breakdowns with configurable time periods |
| Conversations | Searchable thread list with advanced filters, bookmarks, and chat-style message timeline with raw JSON inspector | |
| Runs | Observability for one-off SDK prompts and non-conversation AI operations with search, filters, and detail views | |
| Traces | Visual execution timeline with per-step latency and expandable tool call details | |
| Playground | Agent Sandbox | Interactive chat with any discovered agent. Intelligent dependency resolution auto-detects Eloquent models, container bindings, and scalars |
| Live Overrides | Override system prompt, model, provider, temperature, and max tokens on the fly | |
| Multi-turn Chat | Persistent conversation sessions with the RemembersConversations trait |
|
| Prompt Lab | Side-by-Side | Compare up to 3 provider+model combinations on the same prompt |
| Auto-Tagging | Automatically labels fastest, cheapest, most concise, and best-value responses | |
| Session History | Browse and revisit all past comparison sessions | |
| Usage & Cost | Pricing Matrix | Editable per-model pricing rules with token cost configuration |
| Analytics | Historical cost breakdowns by agent, model, and provider with interactive charts | |
| Budget Alerts | Configurable thresholds with per-alert recipient lists, provider-specific pricing, and queued email notifications | |
| Provider Health | Monitor success rates, latency (with P50/P95/P99 percentiles), and error counts per AI provider from merged conversation + run data | |
| Security | PII Detection | Built-in scanner detects emails, phones, SSNs, credit cards, and API keys in message payloads |
| Data Retention | Configurable retention policies with dry-run previews and auto-cleanup of stale conversations | |
| Access Audit | Full activity log of dashboard access attempts | |
| Dev Tools | Pest Export | Export conversations to Pest PHP test cases with one click |
| JSONL Export | Export in OpenAI fine-tuning format for model training | |
| CSV Export | Export conversation data for spreadsheet analysis | |
| Prompt Library | Save, tag, and reuse prompts with full-text search | |
| Global Search | Search across all conversations, prompts, and bookmarks | |
| Agent Health | Score agents by response quality, tool usage, and error rates |
Screenshots
Dashboard — Real-time stats, token breakdowns, and agent analytics
Playground — Discover and test all your agents in one place
Sandbox — Interactive chat with live parameter overrides and tool inspection
Prompt Lab — Compare models side-by-side on the same prompt
Installation
Requires PHP 8.3+, Laravel 12+, and the Laravel AI SDK installed with migrations run.
composer require ashrafic/laravel-ai-orbit
After installing Orbit, publish its assets, configuration, and migrations using the ai-orbit:install Artisan command. After installing Orbit, you should also run the migrate command to create the tables needed to store Orbit's data:
php artisan ai-orbit:install php artisan migrate
Visit /ai-orbit in your browser.
Orbit reads directly from the SDK's
agent_conversationsandagent_conversation_messagestables, and also captures one-off SDK runs to its ownorbit_ai_runstable. If SDK tables don't exist yet, you'll see a friendly setup banner.
Configuration
The ai-orbit:install command publishes the configuration file for you. To publish only the configuration file:
php artisan vendor:publish --tag=ai-orbit-config
| Key | Default | Description |
|---|---|---|
path |
ai-orbit |
Dashboard URI prefix |
auth_guard |
web |
Authentication guard |
middleware |
['web'] |
Route middleware stack |
domain |
null |
Custom subdomain |
back_to_app_url |
/ |
"Back to App" link target |
agent_directories |
['app/AI/Agents', 'app/Ai/Agents'] |
Scanned agent discovery paths |
registry_cache_ttl |
3600 |
Agent metadata cache duration (seconds) |
prompt-lab.max_slots |
3 |
Max models per Prompt Lab comparison |
prompt-lab.timeout_seconds |
120 |
Request timeout per comparison slot |
budget.enabled |
true |
Budget alert system toggle |
budget.notification_channels |
['mail'] |
Alert notification channels |
observability.enabled |
true |
Listen to Laravel AI SDK events for run capture and budget monitoring |
observability.store_runs |
true |
Persist one-off SDK runs to orbit_ai_runs |
observability.capture_text_payloads |
true |
Capture prompt/response text in run records |
observability.max_payload_length |
10000 |
Max characters for stored text payloads |
observability.excluded_operations |
[] |
Operation names to exclude from observability |
audit.enabled |
true |
Audit & PII scanning toggle |
audit.retention_days |
90 |
Default data retention period |
Authorization
By default, Orbit is accessible only in the local environment.
Gate (Recommended)
use Illuminate\Support\Facades\Gate; Gate::define('viewAiOrbit', function ($user) { return $user->isAdmin(); });
Middleware & Guard
// config/ai-orbit.php 'middleware' => ['web', 'auth'], 'auth_guard' => 'web',
Customization
# Override any Blade view php artisan vendor:publish --tag=ai-orbit-views # Override config php artisan vendor:publish --tag=ai-orbit-config # Publish compiled assets php artisan vendor:publish --tag=ai-orbit-assets
Published views land in resources/views/vendor/ai-orbit/.
Documentation
Full documentation is available at ashrafic.github.io/laravel-ai-orbit.
Testing
composer test # Pest test suite ./vendor/bin/pint # Code style (PSR-12) ./vendor/bin/phpstan analyse # Static analysis (level 8)
License
MIT License. See LICENSE for details.
Built with care by Ashrafic Labs



