{{ session('success') }}
@endif
@if (session('status'))
{{ session('status') }}
@endif
{{-- Meta Business Agent coexistence — choose who answers, never reply
twice. $_mode / $_metaOn / $modes are passed from
AiTrainingController::index (not inline) so they're always bound
even if a host serves a stale-compiled view. --}}
{{ __('Workspace') }}
AI {{ __('Training') }}
{{ __("Build smart agents that speak in your brand's voice — train them on URLs, text, Q&A pairs, and plain-text files.") }}
{{ $stats['active'] }} {{ __('active') }}
New smart agent
{{ __('Total agents') }}
{{ $stats['all'] }}{{ $stats['active'] }} {{ __('active') }}
{{ __('Knowledge entries') }}
{{ number_format($stats['sources']) }}{{ $stats['ready'] }} {{ __('indexed') }}
{{ __('Avg / agent') }}
{{ $stats['all'] > 0 ? number_format($stats['sources'] / $stats['all'], 1) : '0' }}{{ __('entries') }}
{{ __('Health') }}{{ $stats['all'] > 0 ? round(($stats['active'] / max($stats['all'], 1)) * 100) : 0 }}%
{{ $stats['all'] > 0 && $stats['active'] === $stats['all'] ? 'healthy' : ($stats['all'] === 0 ? 'empty' : 'attention') }}
{{ __('Agent') }}
{{ __('Provider') }}
{{ __('Knowledge') }}
{{ __('Tone') }}
{{ __('Updated') }}
{{ __('Actions') }}
@forelse ($assistants as $a)
@php
$accent = $accentPalette[$a->id % 4];
$status = $statusPill[$a->status] ?? $statusPill['active'];
$provKey = (string) $a->ai_provider;
$provider = ($providerThemes[$provKey] ?? $providerDefaultTheme)
+ ['label' => $providerLabels[$provKey] ?? ($provKey !== '' ? ucfirst($provKey) : 'OpenAI')];
@endphp
@empty
@endforelse
{{ $a->name }}
{{ $status['label'] }}
/{{ $a->slug }} · {{ $a->ai_model }}
{{ $provider['label'] }}
{{ ($a->training_sources_count ?? 0) > 0 ? number_format($a->training_sources_count) . ' entries' : '—' }}
{{ $a->tone ?? 'helpful' }}
{{ $a->updated_at->diffForHumans(short: true) }}
{{ $a->updated_at->format('M d, H:i') }}
{{ __('No smart agents yet') }}
{{ __('Build your first agent — the 5-step builder walks you through identity, persona, brain, safety, and the knowledge it should know.') }}
Build smart agent{{ __('Showing') }} {{ $assistants->count() }} of {{ method_exists($assistants, 'total') ? number_format($assistants->total()) : number_format($stats['all']) }}
Workspace · {{ $stats['all'] }} {{ __('agents') }}
@if (method_exists($assistants, 'links'))
{{ $assistants->links() }}
@endif