Web Dashboard
Your command center for AI agents! ๐ฎ The Vizra ADK comes with a beautiful web dashboard that lets you monitor, test, and manage your agentsโall from your browser. No terminal required!
๐ฏ What's the Web Dashboard?
The web dashboard is a Livewire-powered interface that ships with the Vizra ADK package. It provides real-time monitoring, interactive testing, and management capabilities for your agentsโall through your browser! ๐
๐ Real-time Monitoring
Live agent stats, system health, and activity tracking
๐ฌ Interactive Testing
Chat with your agents directly from the browser
๐งช Evaluation Runner
Run and visualize evaluation results with ease
๐ Quick Commands
Copy-ready artisan commands for rapid development
๐ Accessing the Dashboard
By default, the web dashboard is accessible at the /vizra
route of your Laravel application:
php artisan vizra:dashboard # View dashboard URL
php artisan vizra:dashboard --open # Open in browser automatically
The dashboard URL will be displayed after running the installation command:
php artisan vizra:install
# Output:
# โ
Vizra SDK installation complete!
#
# ๐ฏ Dashboard: http://your-app.test/vizra
๐งฉ Dashboard Components
๐ Main Dashboard
The main dashboard (Dashboard::class
) provides an overview of your Vizra ADK installation:
-
โข
Package Information: Current version and configuration status
-
โข
Agent Registry: Live display of all registered agents
-
โข
Quick Commands: Copy-ready artisan commands for common tasks
-
โข
System Status: Health indicators and configuration checks
๐ฌ Chat Interface
The chat interface (ChatInterface::class
) allows interactive testing of your agents:
// Accessible at /vizra/chat
Route::get('/chat', ChatInterface::class)->name('chat');
Features include:
- โ Real-time streaming responses
- โ Session management
- โ Message history
- โ Agent selection dropdown
๐งช Evaluation Runner
The evaluation runner (EvalRunner::class
) provides a visual interface for running and monitoring evaluations:
// Accessible at /vizra/eval
Route::get('/eval', EvalRunner::class)->name('eval-runner');
โ๏ธ Configuration
The web dashboard can be configured in your config/vizra.php
file:
'routes' => [
'web' => [
'enabled' => env('VIZRA_WEB_ENABLED', true),
'prefix' => 'vizra',
'middleware' => ['web'],
],
],
๐ซ Disabling the Dashboard
To disable the web dashboard in production:
# Disable web dashboard
VIZRA_WEB_ENABLED=false
๐ Custom Route Prefix
To change the dashboard URL prefix:
'routes' => [
'web' => [
'prefix' => 'ai-dashboard', // Now accessible at /ai-dashboard
],
],
๐ Adding Authentication
To protect the dashboard with authentication:
'routes' => [
'web' => [
'middleware' => ['web', 'auth'], // Requires authentication
],
],
๐บ๏ธ Dashboard Routes
The web dashboard registers the following routes:
Route | Component | Description |
---|---|---|
/vizra |
Dashboard::class |
Main dashboard overview |
/vizra/chat |
ChatInterface::class |
Interactive agent testing |
/vizra/eval |
EvalRunner::class |
Evaluation runner interface |
๐ง Technical Implementation
The dashboard is built using Laravel Livewire 3.0 for reactive components:
๐ฆ Service Provider Registration
The dashboard components are automatically registered in the AgentServiceProvider
:
// Livewire component registration
Livewire::component('vizra::dashboard', Dashboard::class);
Livewire::component('vizra::chat-interface', ChatInterface::class);
Livewire::component('vizra::eval-runner', EvalRunner::class);
// Route loading
if (config('vizra.routes.web.enabled', true)) {
Route::middleware(config('vizra.routes.web.middleware', ['web']))
->prefix(config('vizra.routes.web.prefix', 'vizra'))
->group(__DIR__.'/../../routes/web.php');
}
๐จ Assets and Styling
The dashboard uses modern web technologies:
-
โข
Tailwind CSS: For responsive styling
-
โข
Alpine.js: For client-side interactivity
-
โข
Livewire: For server-side reactivity
๐ Extending the Dashboard
You can extend the dashboard by creating custom Livewire components:
<?php
namespace App\Livewire;
use Livewire\Component;
use Vizra\VizraADK\Services\AnalyticsService;
class CustomAgentMetrics extends Component
{
public $metrics = [];
public function mount()
{
$analytics = app(AnalyticsService::class);
$this->metrics = $analytics->getMetrics();
}
public function render()
{
return view('livewire.custom-agent-metrics');
}
}
Then register your custom route:
use App\Livewire\CustomAgentMetrics;
Route::get('/vizra/metrics', CustomAgentMetrics::class)
->name('vizra.metrics');
๐ป Dashboard Command
The vizra:dashboard
command provides quick access:
class DashboardCommand extends Command
{
protected $signature = 'vizra:dashboard {--open : Open in browser}';
public function handle()
{
$url = url(config('vizra.routes.web.prefix', 'vizra'));
$this->info("๐ฏ Vizra Dashboard: {$url}");
if ($this->option('open')) {
$this->openInBrowser($url);
}
}
}
๐ Security Considerations
Important Security Notes
- โข Always protect the dashboard with authentication in production
- โข Consider IP whitelisting for sensitive environments
-
โข
Disable the dashboard entirely if not needed (
VIZRA_WEB_ENABLED=false
) - โข Use HTTPS in production environments
๐ Ready to Explore?
Now that you understand the web dashboard, dive deeper into: