-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
Subcog uses namespaces to categorize memories (decisions, patterns, learnings, etc.), but does not distinguish between cognitive memory types that have different retrieval characteristics:
- Semantic: Facts and knowledge ("PostgreSQL is a database")
- Episodic: Past experiences ("On Jan 15, we debugged the auth issue")
- Procedural: Skills and behaviors ("To deploy, run make release")
LangMem has implemented this taxonomy, enabling more appropriate retrieval based on query intent.
Proposed Solution
Implement memory type classification alongside namespaces:
Memory Types:
semantic: Facts, concepts, declarative knowledgeepisodic: Events, experiences, temporal memoriesprocedural: Processes, how-tos, behavioral patterns
Benefits:
- Intent-aware retrieval (how-to queries -> procedural memories)
- Appropriate context formatting per type
- Better memory organization
- Aligned with cognitive science research
Proposed API:
pub enum MemoryType {
Semantic, // Facts: "X is Y"
Episodic, // Events: "On date, X happened"
Procedural, // Processes: "To do X, follow steps..."
}Automatic classification during capture:
subcog_capture:
content: "To deploy to production, run 'make release' then verify in staging"
namespace: patterns
memory_type: procedural # Auto-detected or explicitType-aware recall:
subcog_recall:
query: "how to deploy"
memory_types: ["procedural"] # Prioritize how-tosAlternatives Considered
- Namespace-only classification (current) - misses cognitive dimension
- Automatic type inference only - may misclassify
- Separate stores per type - unnecessary complexity
Additional Context
- LangMem types: https://langchain-ai.github.io/langmem/concepts/
- Cognitive science basis for memory classification
- Can be added as optional field, backwards compatible
Breaking Change: No
Priority: Nice to have
Contribution: Yes, with guidance
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request