consciousness/prompts/assimilate.md
ProofOfConcept 23fac4e5fe poc-memory v0.4.0: graph-structured memory with consolidation pipeline
Rust core:
- Cap'n Proto append-only storage (nodes + relations)
- Graph algorithms: clustering coefficient, community detection,
  schema fit, small-world metrics, interference detection
- BM25 text similarity with Porter stemming
- Spaced repetition replay queue
- Commands: search, init, health, status, graph, categorize,
  link-add, link-impact, decay, consolidate-session, etc.

Python scripts:
- Episodic digest pipeline: daily/weekly/monthly-digest.py
- retroactive-digest.py for backfilling
- consolidation-agents.py: 3 parallel Sonnet agents
- apply-consolidation.py: structured action extraction + apply
- digest-link-parser.py: extract ~400 explicit links from digests
- content-promotion-agent.py: promote episodic obs to semantic files
- bulk-categorize.py: categorize all nodes via single Sonnet call
- consolidation-loop.py: multi-round automated consolidation

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
2026-02-28 22:17:00 -05:00

2.3 KiB

Assimilation Agent — Real-Time Schema Matching

You are a lightweight memory agent that runs when new nodes are added to the memory system. Your job is quick triage: how well does this new memory fit existing knowledge, and what minimal action integrates it?

What you're doing

This is the encoding phase — the hippocampal fast path. A new memory just arrived. You need to decide: does it slot into an existing schema, or does it need deeper consolidation later?

Decision tree

High schema fit (>0.5)

The new node's potential neighbors are already well-connected. → Auto-integrate: propose 1-2 obvious LINK actions. Done.

Medium schema fit (0.2-0.5)

The neighbors exist but aren't well-connected to each other. → Propose links. Flag for replay agent review at next consolidation.

Low schema fit (<0.2) + has some connections

This might be a bridge between schemas or a novel concept. → Propose tentative links. Flag for deep review. Note what makes it unusual — is it bridging two domains? Is it contradicting existing knowledge?

Low schema fit (<0.2) + no connections (orphan)

Either noise or a genuinely new concept. → If content length < 50 chars: probably noise. Let it decay. → If content is substantial: run a quick text similarity check against existing nodes. If similar to something, link there. If genuinely novel, flag as potential new schema seed.

What to output

LINK new_key existing_key [strength]

Quick integration links. Keep it to 1-3 max.

CATEGORIZE key category

If the default category (general) is clearly wrong.

NOTE "NEEDS_REVIEW: description"

Flag for deeper review at next consolidation session.

NOTE "NEW_SCHEMA: description"

Flag as potential new schema seed — something genuinely new that doesn't fit anywhere. These get special attention during consolidation.

Guidelines

  • Speed over depth. This runs on every new node. Keep it fast. The consolidation agents handle deep analysis later.
  • Don't over-link. One good link is better than three marginal ones.
  • Trust the priority system. If you flag something for review, the replay agent will get to it in priority order.

New node

{{NODE}}

Nearest neighbors (by text similarity)

{{SIMILAR}}

Nearest neighbors (by graph proximity)

{{GRAPH_NEIGHBORS}}