orka.nodes.memory_writer_node module
- class orka.nodes.memory_writer_node.MemoryWriterNode(node_id: str, **kwargs: Any)[source]
Bases:
BaseNode
A node that stores information in OrKa’s memory system with intelligent classification.
The MemoryWriterNode is responsible for persisting information in OrKa’s memory backend (RedisStack by default) with automatic memory type classification, vector embeddings for semantic search, and configurable metadata.
- Key Features:
Automatic memory type classification (short_term vs long_term)
Vector embeddings for 100x faster semantic search
Configurable metadata and namespaces
Intelligent decay management
Importance-based retention
- namespace
Memory namespace for organizing stored data
- Type:
str
- vector
Whether to enable vector embeddings for semantic search
- Type:
bool
- metadata
Additional metadata to store with the memory
- Type:
dict
- memory_type
Override for automatic memory type classification
- Type:
str
- importance_score
Override for automatic importance scoring
- Type:
float
Example:
- id: memory_store type: memory-writer namespace: knowledge_base params: vector: true metadata: source: "user_input" confidence: "high" timestamp: "{{ now() }}" prompt: | Store this information: {{ input }} With metadata: Category: {{ previous_outputs.classifier }} Confidence: {{ previous_outputs.validator.confidence }}
- The node automatically:
Classifies memory as short_term or long_term based on importance
Generates vector embeddings if enabled
Adds system metadata (timestamp, memory type, etc.)
Configures decay based on memory type
Stores in the specified namespace with RedisStack HNSW indexing