How It Works

Updated at 2026-09-21 · 623d849

Agents change. Your intelligence compounds. This page is the mental model — watch each mechanism run, then read what it's doing.

One intelligence, every agent

Your agents come and go — new models, new CLIs, new sessions. Digital Me is the part that stays. Every agent you run connects to the same brain: one wiki of knowledge, one set of tastes, one task board, one trace history.

Claude Code
OpenClaw
Codex
Hermes
One intelligence
Digital Me
Knowledge
Taste
Decisions
Workflows

The hub is not a metaphor: it's brain-host, a small always-on service running on your machine (127.0.0.1:18791, installed by digital-me setup). Two cores make it a brain — the retriever (memory_search, memory_get: hybrid full-text + embedding search over your wiki and tastes, one hit per entry) and brain-orchestrator (operations: tasks, learning_capture, traces_*, the scheduler that fires your workflows). Both ship in this repo. Each spoke is a thin runtime adapter that wires one CLI — Claude Code, Codex, Hermes, or openclaw — to those tools over one bearer-gated HTTP wire.

The lifecycle, in every agent

Every agent turn runs the same deterministic lifecycle: apply (matching knowledge and taste inject into the prompt before the model sees it) → work (the agent does the task with your context already loaded) → capture (anything reusable flows back as a learning). Watch it play out across four different agents — same brain, four very different surfaces:

Claude Code~/motus/billing
$ claude “refactor the billing retry logic”
[Digital Me] Applying “architecture_design_principles”...
✓ taste attached · 2 knowledge assets in context
● Editing src/billing/retry.ts
- setTimeout(retryCharge, 1000)
+ // architecture_design_principles: retries are
+ // idempotent + jittered — never naive timers
+ queue.retry(charge, {backoff: 'expo', key: chargeId })
✓ 2 files changed · tests pass
Learning captured → “architecture_design_principles”+ retry paths carry idempotency keys

No re-briefing, no cold starts: the architecture exists so that a lesson paid for once in any agent is owned by every agent.

The closed loop

Capture alone isn't knowledge — raw learnings are noisy. The loop closes overnight:

  • Apply — runtime adapters prepend matching wiki entries to the prompt.
  • Work — the agent acts; everything is tracked (tasks, traces_record).
  • Capture — noteworthy outcomes land in the inbox via learning_capture.
  • Distill — the nightly dream-cycle compiles raw captures into clean, deduplicated wiki entries (plain markdown, reviewable in git).
  • Recall — memory_search indexes the wiki; the next turn's apply step retrieves it.

Cut any node and the loop stops — that's the architectural test for every package in the repo.

The package map

Each package has one job, categorized by where it runs and who triggers it:

Where it runsWho triggers itPackage role
inside brain-hosta tool call from an agentplugins/ — brain-orchestrator (the operations core)
on the host, always-on or scheduledlaunchd/systemd, the scheduler tick, or youservices/ — brain-host (the hub), dashboard, dream-cycle, digest
inside an agent CLI processyou starting your CLIruntimes/ — claude-code, codex, hermes, openclaw (optional)
in a CLI process, forwarding to brain-hostthe runtime adaptertransport/ — brain-mcp-proxy (stdio↔HTTP)
on the host, transientlyyou typing digital-me <cmd>cli/ — installer/orchestrator
imported by other packagesother packagesshared/ — env contracts, the brain-path rule, schemas

Your data stays yours

This repo contains no personal data. Your wiki, tastes, inbox, and config live in a separate local directory (~/digital-me/, ideally a private git repo), loaded at runtime through the documented environment contract. The brain's own state — brain.db, the retrieval index, the bearer token, your provider key — sits beside them in ~/digital-me/.data/, git-ignored, on your machine only. Knowledge is plain markdown files — no opaque vector store, nothing you can't read, diff, or delete.