Agentic Memory
The agentic-memory skill provides TypeDB-backed ontological memory with schema-driven retrieval. It manages operator profiles, long-term memory claims, session episodes, and semantic search across the knowledge graph.
Core Capabilities
- Operator identity — Create and manage operator profiles with 10 personal context domains (identity, role, projects, team, tools, communication style, goals, preferences, expertise, decision log)
- Long-term memory — Consolidate facts as typed
nbmem-memory-claim-noteentities with confidence scores and provenance - Session episodes — Record what happened in a session (skill used, entities touched, summary)
- Three-stage retrieval — Plan (understand schema) → Execute (compose TypeQL queries) → Organize (structure with provenance)
- Semantic search — Query across Qdrant vector collections (papers, notes, opportunities, benchmarks)
- Entity aliasing — Merge/unmerge duplicate entities
Data Model
| Entity | Purpose |
|---|---|
nbmem-operator-role |
Role bearing for the operator (links person to system) |
nbmem-memory-claim-note |
A persisted fact with fact-type, confidence, provenance |
nbmem-episode |
Session record (skill, summary, timestamp) |
nbmem-entity-alias |
Merge relation for duplicate entities |
Memory Claim Fact Types
knowledge— factual information learneddecision— choices made and rationalegoal— objectives and targetspreference— how the operator likes to workschema-gap— detected modeling gaps
Two-Tier Architecture
- Short-term —
MEMORY.mdfiles (Claude Code’s built-in memory, fast, session-scoped) - Long-term — TypeDB
nbmem-memory-claim-noteentities (persistent, queryable, cross-session)
The consolidate command promotes short-term observations into long-term typed memory.
Key Commands
# Operator management
uv run python agentic_memory.py create-operator --name "..." --email "..."
uv run python agentic_memory.py get-context --operator-id <id>
uv run python agentic_memory.py update-context-domain --operator-id <id> --domain goals --content "..."
# Memory claims
uv run python agentic_memory.py consolidate --content "..." --subject <entity-id> --alh-fact-type knowledge --confidence 0.9
uv run python agentic_memory.py recall --subject <entity-id>
uv run python agentic_memory.py list-claims --fact-type knowledge --limit 20
# Episodes
uv run python agentic_memory.py create-episode --skill tech-recon --summary "..."
uv run python agentic_memory.py list-episodes --limit 10
# Schema introspection
uv run python agentic_memory.py describe-schema
uv run python agentic_memory.py query "match $x isa nbmem-memory-claim-note; fetch { ... };"
# Semantic search
uv run python agentic_memory.py search --query "..." --collection alhazen_papers
# Entity management
uv run python agentic_memory.py merge-entities --canonical <id> --alias <id>
When to Use
- At session start:
get-contextto load operator identity - After significant work:
consolidatekey findings - At session end:
create-episodeto record what happened - When searching across domains:
searchfor semantic similarity - When debugging schema:
describe-schemafor TypeDB introspection