skip to content
home / projects / della-exobrain

Della + ExoBrain

A persistent AI teammate I built from scratch — now an invite-only beta platform.

I conceived, architected, and built Della — a fully custom autonomous AI agent — from the ground up. No off-the-shelf framework. No wrapping an API in a loop. Over 18 completed phases (v0.9.22), she has grown from a Judgment Kernel and multi-path pipeline into a system with autonomous agency, dream-like memory consolidation, companion-style interaction, cross-device sync, and a bounded recovery spine. Her architecture was extracted into ExoBrain — a reusable, multi-persona, privacy-first platform now running as an invite-only beta at agent.theducklabs.com with OIDC authentication, a redesigned dark-glass frontend, and a Persona+Tone personality system.

Custom agent · 18 phases · Agency · Dreaming · Companion · Recovery · ExoBrain beta live case study
PythonFastAPILLMSQLiteNixOSTailscaleWebSocketsPrometheusMCP

01. The Problem: agents that demo well but don't last

Most agent demos solve one task in one session. They look impressive in a screen recording but fall apart when you need them tomorrow — different context, different device, different priority. I wanted a teammate that actually persists: knows what we were working on, notices when something changed, and helps me choose the right thing to do next.

02. Why build from scratch instead of using a framework?

LangGraph, CrewAI, AutoGPT — these are useful abstractions, but they come with assumptions baked in: planner-first routing, tool-centric design, and a "one session at a time" mental model. I needed something fundamentally different: a judgment-first architecture where the model reasons about intent and mission before it reaches for tools. The Judgment Kernel is the key — it produces one structured decision artifact per turn that captures what the user wants, whether it fits the current mission, what level of approval is needed, and what risk profile applies. Everything else — planning, execution, synthesis — is subordinate to that judgment.

03. The Judgment Kernel: structured reasoning every turn

Every user message goes through IntentJudge — a model-led classifier with heuristic fallback that identifies intent type (direct question, mission work, system operation, chitchat). The Judgment Kernel then produces a structured JSON judgment covering intent classification, mission relationship (is this in scope? needs mission update?), approval requirement (auto-approved? needs confirmation? needs explicit approval?), scope boundaries (which files, tools, and domains are relevant), and risk level. This artifact drives the entire response pipeline. If the model produces malformed JSON, a generic repair retry handler fixes it with visible validation feedback. The system never silently falls back to brittle keyword routing.

04. The multi-path action pipeline

Once judgment is complete, the system routes through the right action path: direct_answer for simple Q&A from knowledge, direct_model_answer for reasoning-heavy questions, mcp_tool_call for external tool integration (search, GitHub, etc.), or skill_runtime for procedural modules registered through the skills system. Each path has deterministic guardrails, pre-mutation snapshots, and evidence-backed synthesis on the other end. The ResponseComposer then assembles the final output — model-backed by default, with deterministic fallback if the response doesn't meet quality thresholds.

05. The Agency layer: self-authored actions and autonomous outreach

Starting in Phase 15, Della gained an Agency layer that lets her author her own actions, schedule proactive outreach, and manage delivery with bounded rescheduling. She maintains an outbox of intentions she has authored herself, complete with delivery inertia — she will try, wait, and retry before escalating. A provenance system tracks which observations led to which intentions, making autonomous behavior auditable. She can propose work, schedule communication check-ins, and reschedule proactively when circumstances change. The agency layer has its own contracts, worker, and store — separate from the reactive turn loop, so autonomous behavior is governed by its own policies.

06. Dreaming: model-led consolidation and semantic memory

One of the most interesting subsystems is the Dreaming engine. During low-activity periods, Della runs a model-led dream cycle that consolidates recent interactions into affect episodes and semantic memory. She reviews what happened, identifies patterns, extracts lessons, and updates her self-knowledge. This is not a batch cron job — it is a structured deliberation process with synthesis, reflection, and consolidation phases. The result is that Della learns from experience, not just from explicit instructions. She remembers not just what you said, but what the interaction meant.

07. The Companion layer: feedback loops and tuned interaction

Della builds daily digests through a CompanionDigestBuilder that selects noteworthy events, judges their significance, and generates companion moments — brief, context-aware interactions that feel like checking in with a teammate, not querying a database. Every moment includes 6-option feedback (thumbs up/down, too frequent, not relevant, etc.), and a feedback tuning system adjusts future behavior based on what actually lands. The companion surfacing job runs on a schedule with policy guardrails — quiet hours, cooldowns, and notification budgets prevent it from becoming intrusive.

08. Cross-device sync and session continuity

Della handles live session state across devices through server-side session APIs with rolling summaries. A cross-client sync engine handles reconnection and DOM merge during reconnects, so switching from phone to laptop mid-conversation is seamless. The SQLite operational event store records every turn — sessions, messages, missions, approvals, judgments, actions, and observations — with FTS5 search for full-text recall. A ClockContext system provides time, timezone, and day-of-week awareness in every turn. The ContextBuilder renders layered context (declared vs. observed) with per-layer budget limits.

09. Phase 19: the Recovery spine

The active phase of development is building a bounded adaptive Recovery spine. When something goes wrong — a tool call fails, a plan can't execute, an action produces unexpected results — the Recovery spine classifies the failure, walks up a deterministic escalation ladder, and can engage a model-led RecoveryPlanner if needed. It integrates with the existing pre-mutation snapshot system and learning store so successful recoveries inform future behavior. The spine is designed to make Della resilient without making her reckless: safe defaults, bounded retries, and always a path back to human escalation.

10. ExoBrain: the invite-beta platform

Della's core architecture was extracted into ExoBrain — a reusable, multi-persona, privacy-first companion platform. It now runs as an invite-only beta at agent.theducklabs.com with OIDC authentication, invitation-only onboarding, and isolated Account→User→Persona storage paths. The frontend was completely redesigned with a dark-glass interface, responsive layouts, and a new Persona+Tone personality system that replaced fixed named personas with configurable axes. ExoBrain has a complete extension architecture (adapters, skills, MCP servers, provider registries), an operator dashboard at /admin, and deployment on DigitalOcean with Caddy TLS and immutable container releases. It is not yet ready for general public use — per-tenant cryptographic isolation and production object storage remain — but it is a live, functioning invite-beta platform.

◆ Outcome

Della v4 has completed 18 phases (v0.9.22) — a persistent AI teammate with autonomous agency, dream-like memory consolidation, companion-style interaction, cross-device sync, and a bounded recovery spine. She runs on personal infrastructure with no cloud dependency for core operations. Her architecture powers ExoBrain, an invite-only beta platform at agent.theducklabs.com with OIDC auth, a redesigned frontend, and a Persona+Tone system. This is not a demo or a framework wrapper — it is a ground-up architecture for what a persistent AI teammate should be, proven through daily use.