orka.nodes.memory_reader_node module
- class orka.nodes.memory_reader_node.MemoryReaderNode(node_id: str, **kwargs)[source]
Bases:
BaseNode
A node that retrieves information from OrKa’s memory system using semantic search.
The MemoryReaderNode performs intelligent memory retrieval using RedisStack’s HNSW indexing for 100x faster vector search. It supports context-aware search, temporal ranking, and configurable similarity thresholds.
- Key Features:
100x faster semantic search with HNSW indexing
Context-aware memory retrieval
Temporal ranking of results
Configurable similarity thresholds
Namespace-based organization
- namespace
Memory namespace to search in
- Type:
str
- limit
Maximum number of results to return
- Type:
int
- enable_context_search
Whether to use conversation context
- Type:
bool
- context_weight
Weight given to context in search (0-1)
- Type:
float
- temporal_weight
Weight given to recency in ranking (0-1)
- Type:
float
- similarity_threshold
Minimum similarity score (0-1)
- Type:
float
- enable_temporal_ranking
Whether to boost recent memories
- Type:
bool
Example:
- id: memory_search type: memory-reader namespace: knowledge_base params: limit: 5 enable_context_search: true context_weight: 0.4 temporal_weight: 0.3 similarity_threshold: 0.8 enable_temporal_ranking: true prompt: | Find relevant information about: {{ input }} Consider: - Similar topics - Recent interactions - Related context
- The node automatically:
Converts input to vector embeddings
Performs HNSW-accelerated similarity search
Applies temporal ranking if enabled
Filters by similarity threshold
Returns formatted results with metadata