Dashboard
The AgentShield operations console. Sections, role-aware access, approvals, agent lifecycle, policies, alerts, evidence, and how the console protects sessions.
The dashboard is a Next.js operations console for humans. It talks only to the control plane, through its own server routes, so the browser never holds a bearer token and the console never holds agent keys.
npm run dev --workspace @agentshield/dashboard # http://127.0.0.1:3000In Compose and Kubernetes it runs as the dashboard service on port 3000.
Sections
| Section | What you can do | Roles |
|---|---|---|
| Overview | Active agents, waiting approvals, open incidents, tool reliability for the last hour, event mix. Events stream live and fall back to polling every five seconds | All |
| Approvals | Review pending requests with tool, operation, resource, redacted arguments, policy reason, and expiry. Approve (with confirmation) or reject. Recent decisions below | owner, admin, approver |
| Agents | Register a public key, rotate it, suspend, resume, revoke (with confirmation) | List: all. Register: owner, admin, operator. Lifecycle: owner, admin |
| Policies | Read the current document, edit as JSON, save a new version, or create an organization or agent policy. Lists are checked before sending; the control plane checks again | Read: all. Edit: owner, admin |
| Chaos | Run a catalog scenario against the gateway and read recent results | owner, admin |
| Audit | Latest audit links and head export | owner, admin, auditor |
| Alerts | Flagged content with rule, agent, call, JSON path, and excerpt. Acknowledge or resolve. Open the evidence bundle after its hash is checked | Read: owner, admin, auditor. Change: owner, admin |
| Members | Add people, change roles, disable or enable. With mail, invitations show as pending with a resend button; without mail, the temporary password is shown once | owner, admin |
| Account | Name, role, session expiry; change password (signs out other sessions) | All |
The console reads the caller's role from GET /api/v1/sessions/current and shows only what that role may use. lib/permissions.ts mirrors the control plane's role decorators and is tested for every role. The control plane still enforces every rule; hiding is a usability feature, not the control.
Approving a request
- Open Approvals. Each pending row shows exactly what will run: tool, operation, resource, and the redacted arguments, plus the policy reason and expiry.
- Choose Approve and confirm, or Reject.
- The agent's next execute call with the approval id runs the call once. Integrations configured with
approval_timeoutpick it up automatically.
You cannot approve a request after it expires, and a user whose id equals the agent id cannot approve it.
Session security
| Control | Detail |
|---|---|
| Cookie | agentshield_session, HttpOnly, SameSite=Strict, expires with the session; Secure when NODE_ENV=production |
| Sign-out | DELETE /api/session ends the session on the control plane, then clears the cookie, so a copied cookie stops working |
| Proxy scope | /api/control/v1/... forwards only to /api/v1/.... Paths outside v1, or with segments that are not plain identifiers, return 404 |
| CSRF | POST, PUT, PATCH, and DELETE must carry an Origin equal to the console's, or Sec-Fetch-Site: same-origin when no Origin is sent; otherwise 403 before the control plane is called |
| Origin | Taken from Host. Behind a proxy that rewrites Host, set DASHBOARD_ORIGIN |
| Streams | Event streams pass through without buffering |
Invitations
An invitation email links to /invite#token=…. The token is in the URL fragment, which browsers never send to servers, and the page removes it from the address bar as soon as it reads it. The page shows who the invitation is for and lets them choose a password once.
A member who signed in with a temporary password sees only a password form until they replace it.
Server routes
| Route | Purpose |
|---|---|
POST /api/session, DELETE /api/session | Sign in and out |
/api/control/v1/... | Authenticated proxy to the control plane |
POST /api/invitation/lookup, POST /api/invitation/accept | Public invitation calls, same origin check |
GET /api/health | The console's own status |
Implementation references
Was this page helpful?