ArchitectureCommand Center

Command Center

The Command Center is the operator interface, deployed as the ui service. Next.js 14 with Radix UI and shadcn/ui. It provides chat, real-time streaming, and inline tool approval.

Real-Time Streaming

SSE streams tokens, thinking content, and tool events from the Engine. The UI updates in real time as the agent responds.

Collapsible thinking blocks show model reasoning. Users can expand or collapse to see the agent's reasoning trace.

Tool Approval UI

When a mutating tool requires approval, the UI shows an inline approval/deny control. A bulk approval bar appears when multiple tools are pending. Users approve or deny each tool before execution.

Backend-for-Frontend

The UI communicates with the Engine in two ways. Chat streaming (SSE) connects directly from the browser to the Engine via NEXT_PUBLIC_API_URL/agent/*. All other requests (conversations, auth, team, integrations) go through server-side API routes (BFF) under src/app/api/*, which forward cookies and Authorization headers to the Engine.

Auth State

Zustand manages auth state client-side. Automatic refresh token rotation. Session persists across page reloads via HttpOnly cookies.

Features

  • Conversation management: Create, list, switch conversations.
  • Integrations admin: Configure LLM providers, Jenkins, and other integrations.
  • Team admin: RBAC, team management (Team plan).