Platform admin
Platform overview
The platform admin console is the operator-only surface at
/admin. It's where you manage plans, watch usage across
every workspace, retry failed jobs, and impersonate customers for
support. Only users with role = super_admin can see it —
everyone else gets a 404 (not 403) so the panel doesn't even reveal it
exists.
Becoming a super admin
The flag is the users.role column, cast to the
PlatformRole enum which has two cases:
customer (the default for every signup) and
super_admin. There's no UI to grant it — it's set by hand
via tinker or a one-shot migration on a new deployment:
php artisan tinker --execute 'User::where("email", "you@company.com")->update(["role" => "super_admin"]);'
Demoting works the same way (role = "customer"). There's no
notification — the next page load will show or hide the admin nav.
Layout
The admin sidebar lists ten sections:
- Dashboard — KPIs across all workspaces, system health summary.
- Workspaces — every workspace, their plan, owner, member count, conversation usage.
- Users — every user across the platform, their workspaces, last seen.
- Agents — every agent on the platform, with workspace + publish state.
- Conversations — every conversation. Useful for support.
- Leads — every lead.
- Plans — Stripe-synced plan CRUD. See Plans & Stripe sync.
- Subscriptions — every active subscription. Reverse-lookup workspaces by Stripe subscription ID.
- Usage — month-over-month conversation count by workspace.
- Queue Failures — failed jobs with retry / forget controls.
Header actions
The admin header (top bar of every admin page) has:
- Site Health pill — green / amber / red. Hover for the breakdown — failed jobs, Stripe config, LLM provider, vector store, mail driver, Reverb keys, cache. See Site health & failed jobs.
- Notifications dropdown — unread alerts (failed jobs, missing Stripe key, etc.).
- Global search — searches workspaces, users, agents, conversations, leads with one keystroke.
Impersonation
From the Workspaces or Users page, click Impersonate. A few things happen:
- Your admin session is preserved.
- You become the target user inside their workspace.
- A persistent
You're impersonating Xbanner appears at the top of every page until you stop. - A row is logged in
audit_logsso the action is traceable.
Click Stop impersonating in the banner to drop back to your admin session. The banner is intentionally hard to miss — there's no shortcut to dismiss it without ending the impersonation.
Search
Press / from anywhere in the admin panel. The global
search dropdown opens with sections:
- Workspaces (by name).
- Users (by email).
- Agents (by name + workspace).
- Conversations (by message text).
- Leads (by name + email).
Each result links straight to the resource. The customer surface has the same search but scoped to the current workspace.
Audit log
Every admin action — plan create/update/delete, impersonation start/stop,
workspace changes — writes to the audit_logs table for
forensic traceability. There's no UI page for browsing audit logs in
v1; query the table directly when you need to investigate.