How it works
- Your agent sends conversation messages (user and assistant turns) to Cognis.
- Cognis extracts discrete facts automatically using LLM-powered extraction with auto-categorization.
- Before responding, your agent searches Cognis. The most relevant facts are returned using hybrid search (vector similarity plus BM25 keyword matching, fused with Reciprocal Rank Fusion).
- Memories persist across sessions, scoped by
owner_id,agent_id, andsession_id.
🖼️ VISUAL, Diagram, high priority Show: the four-step flow: agent sends messages to Cognis, Cognis extracts facts, agent queries Cognis before responding, facts returned to agent context. Why it helps: the add/search loop is the core usage pattern and is easier to follow as a diagram than prose. Alt text: Diagram showing the Cognis memory loop: messages flow into Cognis for extraction, then the agent queries Cognis and receives relevant memories before generating a response.
Core capabilities
Cognis provides hybrid search using Matryoshka vector embeddings and BM25 keyword matching, fused with Reciprocal Rank Fusion for relevance ranking. The LLM extraction layer automatically pulls discrete facts from conversations and categorizes them by type (identity, preferences, work context, interests, and more). Memory records are scoped withowner_id, agent_id, and session_id identifiers so the right context reaches the right agent for the right user. The context assembly method combines short-term conversation history with long-term memories into a single LLM-ready string.
Quick example
- Hosted (lyzr-adk)
- Open Source (lyzr-cognis)
pip install lyzr-adk and as an open-source library via pip install lyzr-cognis. The core extraction and search architecture is the same in both.
Next steps
Quickstart
Install Cognis and run your first memory operations in 3 minutes.
Memory types
Understand session, long-term, and cross-session memory scoping.
Add Memories
Full method reference for storing conversations.
Search Memories
Retrieve relevant facts before your agent responds.