ashrafic / laravel-ai-orbit
The Intelligent Control Tower for Laravel AI SDK.
Package info
github.com/ashrafic/laravel-ai-orbit
Language:Blade
pkg:composer/ashrafic/laravel-ai-orbit
Requires
- php: ^8.3
- illuminate/support: ^11.0|^12.0|^13.0
- laravel/ai: ^0.6
- 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 11+ 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, 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 | |
| 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 queued email/slack notifications | |
| Provider Health | Monitor success rates, latency, and error counts per AI provider | |
| 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 |
Installation
Requires PHP 8.3+, Laravel 11+, and the Laravel AI SDK installed with migrations run.
composer require ashrafic/laravel-ai-orbit
The package auto-discovers. Visit /ai-orbit in your browser.
Orbit reads directly from the SDK's
agent_conversationsandagent_conversation_messagestables. If they don't exist yet, you'll see a friendly setup banner.
Configuration
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 |
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 # Override compiled assets php artisan vendor:publish --tag=ai-orbit-assets
Published views land in resources/views/vendor/laravel-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