OpenSearch
The associative memory store used for keyword and vector retrieval across experience events, semantic memories, policy state, agent activity, world-model predictions, goals, and identity state.
OpenSearch is the search and retrieval engine at the heart of the associative memory layer. It handles two fundamentally different retrieval modalities in a single system: BM25 keyword search, which finds documents by term frequency and inverse document frequency, and k-NN vector search, which finds documents by embedding similarity using HNSW indexes. This combination makes OpenSearch the right choice for the memory gateway's hybrid retrieval pipeline - most vector-only databases lack robust keyword search, and traditional search engines lack vector search. The Cognitive Substrate maintains multiple indexes within OpenSearch: experience_events (the primary memory index with multi-lane embeddings), memory_semantic (consolidated abstractions), memory_links (graph relationships), policy_history, agent_activity, world_model_predictions, goals, and identity_state. Each index has its own schema, shard count, and replica configuration tuned to its query patterns. The k-NN plugin's HNSW indexes are the most resource-intensive component: each embedding lane requires its own HNSW graph, and the ef_search parameter controls the accuracy-speed tradeoff for approximate nearest neighbor queries.