Back to the portfolio

Personal AI infrastructure

Sanctum

A personal AI system built to remember, run scheduled work, and keep its operator in control. Go at the core, a web console at the surface.

Focus
Agent runtime · Durable memory · Operator experience
Current state
Active development
Built with
GoNext.jsTypeScriptSQLiteSSE

The problem

My development work was spread across chat tabs, terminal sessions, scripts, and notes. Each session needed its context rebuilt, and work stopped when the conversation ended. Sanctum gives JJ, my personal AI assistant, a persistent home: one system that can remember project decisions, run scheduled work, and show me exactly what happened.

What I built

  • Built a Go agent runtime that assembles context, calls model providers, coordinates tools, and records each turn.
  • Used an append-only SQLite ledger for conversation history, searchable memory, note revisions, and usage records that survive a restart.
  • Added scheduled jobs and bounded child sessions so ongoing work has its own history, costs, and connection to the parent conversation.
  • Developed a Next.js operator console for streamed conversations, session search, notes, schedules, provider settings, and spend controls.
  • Made supervision part of the runtime: passkey authentication, tool approvals, scoped autonomy, budget limits, and a kill switch.
  • Built a review path for proposed tools and an avatar that communicates the assistant’s activity, keeping system state visible in the web interface.
  • Connected the runtime and dashboard through generated API contracts and resumable event streams, with clear boundaries between the system’s parts.

The engineering behind it

The central decision is to treat the event ledger as the system’s memory, not just a debug log. A restart should preserve what the assistant did, why a tool ran, and what it cost. Clear contracts keep that durable core separate from the web interface and model providers. The same design makes the operator experience more concrete: inspect an action, review a proposal, limit spending, or stop the loop.

Five parts, clear boundaries

01Runtime · Go
The agent loop, tool execution, scheduler, and supervision live in one owned process. The browser communicates with it over a documented API.
02Dashboard · Next.js
The operator’s window into conversations, approvals, background work, and costs. It consumes generated contracts rather than reaching into runtime internals.
03Memory · SQLite
An append-only ledger is the source of truth. Search, session views, and usage summaries are built from that history so they can be reconstructed.
04Avatar · Live state
A visual layer translates the runtime’s activity into an observable presence, with a static fallback and accessible status text.
05Model adapters
Provider-specific behavior sits behind a common interface, keeping model access separate from the agent’s core loop.

Where it is today

The Go runtime and Next.js dashboard are implemented, with integration and release verification recorded in the repository. I’m continuing to develop the system and its deployment path for personal use. Sanctum is a single-operator project; this portfolio does not offer a public hosted service or demo.

Planned / Rust

Next up: AI systems in Rust

I’m planning separate AI systems in Rust, building on the questions I’m exploring with Sanctum: how agents remember, use tools, and stay understandable to the person running them.

Keep exploringForge