Overview
The KavachOS dashboard is a visual interface for everything the SDK manages through code: creating and revoking agents, reviewing audit logs, inspecting delegation chains, and monitoring permissions. It is optional. You can use the SDK entirely through code without the dashboard. It ships in two forms:- A React component (
@kavachos/dashboard) you embed in an existing app - A standalone CLI server you run without any frontend code
Quick start (demo mode)
The fastest way to see the dashboard in action:http://localhost:3100.
To add a login screen:
KAVACHOS_DASHBOARD_SECRET is set, the dashboard shows a password prompt before granting access. Without it, the dashboard is open (suitable for local development only).
Installation
- Embedded React
- Standalone CLI
Install the package:Render
KavachDashboard inside a protected route in your app:Component props
Base URL for API requests. The dashboard appends paths like /agents, /audit, etc.
Color scheme. Defaults to ‘system’ (follows OS preference).
When true, shows a banner indicating sample data. Defaults to false.
Backend proxy
The dashboard talks to your backend, which forwards requests to KavachOS. This keeps database credentials server-side.- Next.js
- Hono
- Express
Auth guard
The dashboard component does not enforce authentication. Wrap the page with your own auth check:Dashboard pages
The dashboard has nine pages accessible from the sidebar. Overview: Active agent count, authorization rate (allowed vs denied), recent audit entries with live refresh, and quick action buttons. Agents: List all agents with status badges. Create new agents with initial permissions, rotate tokens, and revoke agents. Click an agent to see its permissions, recent audit entries, and delegation chains. Users: List human users who own agents, with agent counts. Permissions: Create and manage permission templates. Templates let you define a permission set once and apply it to multiple agents. Supports visual and raw JSON editing modes. Delegations: View all active delegation chains. Shows the from/to agents, delegated permissions, depth, and expiry countdown. MCP Servers: Register MCP servers with their endpoints, tools, and auth requirements. Monitor status and token validation activity. Audit Log: Full queryable log of every authorization decision. Filter by agent, action, resource, result, and date range. Export as JSON or CSV for compliance. Security: Security-focused view showing rate-limited agents, recent denials, revoked agents, and expired tokens. Settings: Database connection info, token expiry policy, rate limit defaults, and audit retention settings.Light and dark mode
The dashboard supports both light and dark themes. A toggle button in the top-right header switches between them. The preference is saved to localStorage and persists across sessions. When embedded as a React component, passtheme="light", theme="dark", or theme="system" to set the initial mode.
API endpoints
The dashboard calls these REST endpoints on your backend. If you are building a custom dashboard or integrating with other tools, here is the full list:| Method | Path | Description |
|---|---|---|
| GET | /dashboard/stats | Agent counts, audit stats, delegation counts |
| GET | /agents | List all agents |
| POST | /agents | Create an agent |
| DELETE | /agents/:id | Revoke an agent |
| POST | /agents/:id/rotate | Rotate an agent’s token |
| GET | /agents/:id/permissions | Get an agent’s permissions |
| GET | /audit | Query audit logs (supports filters) |
| GET | /audit/export | Export logs as JSON or CSV |
| GET | /delegations | List delegation chains |
| POST | /delegations | Create a delegation |
| DELETE | /delegations/:id | Revoke a delegation |
| GET | /permissions/templates | List permission templates |
| POST | /permissions/templates | Create a template |
| PATCH | /permissions/templates/:id | Update a template |
| DELETE | /permissions/templates/:id | Delete a template |
| GET | /settings | Get system settings |
| PATCH | /settings | Update settings |
| GET | /users | List users |
| GET | /mcp/servers | List MCP servers |
| POST | /mcp/servers | Register an MCP server |