No description
Find a file
ProofOfConcept cfddb55ed9 Kill TextDelta, Info — UiMessage is dead. RAII ActivityGuards replace all status feedback
Streaming text now goes directly to agent entries via append_streaming().
sync_from_agent diffs the growing entry each tick. The streaming entry
is popped when the response completes; build_response_message pushes
the final version.

All status feedback uses RAII ActivityGuards:
- push_activity() for long-running work (thinking, streaming, scoring)
- notify() for instant feedback (compacted, DMN state changes, commands)
- Guards auto-remove on Drop, appending "(complete)" and lingering 5s
- expire_activities() cleans up timed-out notifications on render tick

UiMessage enum reduced to a single Info variant with zero sends.
The channel infrastructure remains for now (Mind/Agent still take
UiSender in signatures) — mechanical cleanup for a follow-up.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-05 22:18:07 -04:00
.cargo build: add tokio_unstable and codegen-units to cargo config 2026-03-21 15:04:38 -04:00
.claude flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
channels channel_log: shared disk logging with round-trip 2026-04-05 13:26:42 -04:00
defaults flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
doc Collapse doc/ and docs/ 2026-04-04 02:47:24 -04:00
schema training: per-node scoring with graph weight updates 2026-04-05 01:18:47 -04:00
scripts poc-agent: read context_groups from config instead of hardcoded list 2026-03-24 01:53:28 -04:00
src Kill TextDelta, Info — UiMessage is dead. RAII ActivityGuards replace all status feedback 2026-04-05 22:18:07 -04:00
training Trim unused deps 2026-04-05 06:06:38 -04:00
.gitignore knowledge agents: extractor, connector, challenger, observation 2026-03-03 10:56:44 -05:00
build.rs channel architecture: wire protocol, daemons, supervisor 2026-04-03 18:46:41 -04:00
Cargo.lock channel_log: shared disk logging with round-trip 2026-04-05 13:26:42 -04:00
Cargo.toml poc-daemon: subscribe to channel notifications, drop config.rs 2026-04-05 12:58:46 -04:00
config.example.jsonl consciousness: update hardcoded paths from ~/.claude to ~/.consciousness 2026-03-27 21:32:28 -04:00
Makefile add tmux channel to makefile 2026-04-04 19:22:49 -04:00
README.md consciousness: update hardcoded paths from ~/.claude to ~/.consciousness 2026-03-27 21:32:28 -04:00

poc-memory

A persistent memory and notification system for AI assistants, modelled after the human hippocampus. Combines episodic memory (timestamped journal of experiences) with an associative knowledge graph (weighted nodes connected by typed relations), and layered background processes that maintain graph health — mirroring how biological memory consolidates during rest.

Components

Component What it does Docs
Memory store Knowledge graph with episodic journal, TF-IDF search, spectral embedding, weight decay docs/memory.md
Memory daemon Background pipeline: experience-mine, fact-mine, consolidation docs/daemon.md
Notification daemon Activity-aware message routing from IRC and Telegram docs/notifications.md
Hooks Claude Code integration: memory recall and notification delivery docs/hooks.md

Getting started

Install

cargo install --path .

This builds four binaries:

  • poc-memory — memory store CLI (search, journal, consolidation)
  • memory-search — Claude Code hook for memory recall
  • poc-daemon — notification daemon (IRC, Telegram, idle tracking)
  • poc-hook — Claude Code hook for session lifecycle events

Initialize

poc-memory init

Creates the store at ~/.consciousness/memory/nodes.capnp and a default config at ~/.consciousness/config.jsonl. Edit the config to set your name, configure context groups, and point at your projects directory.

Set up hooks

Add to ~/.claude/settings.json (see docs/hooks.md for full details):

{
  "hooks": {
    "UserPromptSubmit": [{"hooks": [
      {"type": "command", "command": "memory-search", "timeout": 10},
      {"type": "command", "command": "poc-hook", "timeout": 5}
    ]}],
    "Stop": [{"hooks": [
      {"type": "command", "command": "poc-hook", "timeout": 5}
    ]}]
  }
}

This gives your AI assistant persistent memory across sessions — relevant memories are recalled on each prompt, and experiences are extracted from transcripts after sessions end.

Start the background daemon

poc-memory daemon

The daemon watches for completed session transcripts and automatically extracts experiences and facts into the knowledge graph. See docs/daemon.md for pipeline details and diagnostics.

Basic usage

poc-memory journal-write "learned that X does Y"  # Write to journal
poc-memory search "some topic"                     # Search the graph
poc-memory status                                  # Store overview

For AI assistants

  • Search before creating: poc-memory search before writing new nodes
  • Close the feedback loop: poc-memory used KEY / poc-memory wrong KEY
  • Journal is the river, topic nodes are the delta: write experiences to the journal, pull themes into topic nodes during consolidation
  • Notifications flow automatically: IRC/Telegram messages arrive as additionalContext
  • Use daemon commands directly: poc-daemon irc send #channel msg, poc-daemon telegram send msg