Skip to content

Control Centre

The BKR Control Centre (bkr-cc) is a Next.js web application that gives the BKR Capital team visibility into the Mansa system — what the agents processed, what decisions they made, what sessions ran, and what files are currently loaded.

Layer Technology
Framework Next.js (App Router)
Data layer Prisma ORM
Styling Tailwind CSS
Notifications Sonner (toast)
Deployment Docker + GitHub Actions

The main dashboard provides an at-a-glance view of deal-flow activity:

  • Daily volume chart — emails processed per day over a configurable date range
  • Submission trends — relevant leads vs. noise over time
  • Needs Attention panel — companies grouped by outstanding action items, filterable by date range
  • Recent Submissions list — the 20 most recent processed emails, paginated

All date range controls use day-level granularity with hover tooltips.

A full-detail view for each email the agent processed:

  • Two-column layout: email metadata on the left, agent notes and extracted data on the right
  • Notes rendered as Markdown
  • Follow Up button — opens the original email in Outlook with one click
  • Deep links from Email ID to the source message in the shared mailbox

Lists every agent run session, not just scheduled deployments. Each session record shows:

  • Session ID and start/end time
  • Agent mode (daily, weekly, compaction)
  • Number of emails processed
  • Any errors or partial completions

The Files page is where operators manage the configuration files that agents read at runtime:

  • Upload new skills, rubric files, and context files
  • Prefix-based folder organization (e.g. skills/, rubric/, context/, email-processor/)
  • Pretty display names derived from file paths
  • Rename modal — rename both the filename and the folder prefix in one step
  • Delete — remove a file with a confirmation prompt
  • Sonner toast notifications for every atomic mutation (upload, rename, delete)
  • Collapsible side nav with a prominent toggle
  • On-brand SEO metadata, favicons, Open Graph, and Twitter cards

The Control Centre reads from the Postgres analytics database that the BKR Agent writes to during every run. Prisma provides the ORM layer with type-safe queries.

[placeholder — Prisma schema diagram: sessions, submissions, emails tables]

The Control Centre is containerised and deployed via GitHub Actions on push to main. The Docker image is hardened (non-root user, minimal base image).

[placeholder — deployment target, domain, environment variable list]

The Control Centre does not write to the agent’s Postgres database. It is strictly read-only for session and submission data. The only writes the Control Centre makes are to the file store (upload, rename, delete), which agents then read at the start of their next run.

File Management as the Primary Configuration Surface

Section titled “File Management as the Primary Configuration Surface”

Rather than exposing agent configuration through a custom form UI, the Control Centre treats files as first-class objects. Operators upload Markdown or JSON files the same way they’d manage files in any cloud storage UI — this keeps the surface area simple and the configuration human-readable.

Choosing Prisma over raw SQL queries gives the dashboard type-safe access to the analytics schema and makes it straightforward to add new dashboard views as the data model evolves.