Lyzr · Memory Infrastructure · 2026

Meet Cognis

Your AI’s memory upgrade.

Cognis is Lyzr’s production-grade memory layer for AI agents — giving every agent the ability to recall what matters, update knowledge on the fly, and stay consistent across every conversation, session, and deployment.

Hybrid Search Zero Infrastructure Smart Extraction Open Source pip install lyzr-cognis
quickstart.py
# pip install lyzr-cognis
from cognis import Cognis
m = Cognis(owner_id=“user_1”)
m.add([{“role”: “user”, “content”: “I love sushi and I work at Google”}])
# Semantic + keyword hybrid search
results = m.search(“What are the user’s food preferences?”)
context = m.get_context(messages)
~500ms
MIT License
30KB wheel
6 methods
#1
Benchmark Rank
LongMemEval SS-User Recall
3
Dependencies
Qdrant · SQLite FTS5 · LLM key
<300ms
Search Latency
Hybrid Vector + BM25
6
API Methods
add · get · search · delete · context · clear
Scroll
Hybrid Vector + BM25 Matryoshka Embeddings Reciprocal Rank Fusion SQLite FTS5 ADD / UPDATE / DELETE 13 Memory Categories owner + agent + session LongMemEval #1 MIT Open Source CrewAI Compatible Smart Extraction
01 · What is Cognis?

Memory that actually
works for agents

Most AI agents forget everything after a session ends. Cognis fixes that. It’s a lightweight Python library that gives any AI agent persistent memory — extracting facts from conversations, storing them intelligently, and surfacing the right context at the right moment. Everything runs in-process, on the user’s machine — no cloud, no setup, no infrastructure.

3
Dependencies Only
Qdrant local + SQLite FTS5 + an LLM API key. That’s it. No Docker, no servers.
13
Memory Categories
Facts auto-tagged across 13 categories — identity, work, preferences, hobbies and more.
<300ms
Search Speed
Hybrid vector + BM25 search responds in <300ms — fast enough for real-time agents.
100%
SS-User Recall
Top score on LongMemEval’s user state benchmark, outperforming all competitors.
How Cognis Extracts & Stores Memories
// data pipeline
01
Messages
  • User + assistant turns
  • Any conversation thread
  • Structured chat format
input
02
LLM Extraction
  • Pulls atomic facts
  • Auto-categorizes
  • ADD / UPDATE / DELETE
  • Name-aware context
parse
03
Extracted Facts
  • [identity] name is Alice
  • [work] works at Google
  • [preference] likes sushi
store
04
Local Storage
  • SQLite (docs + FTS5)
  • Qdrant 256D shortlist
  • Qdrant 768D rerank
  • All file-backed
Hybrid Search Under the Hood
Cognis uses a two-stage Matryoshka vector search (256D shortlist → 768D rerank) fused with BM25 keyword matching via SQLite FTS5, combined using Reciprocal Rank Fusion at a 70/30 split — tuned from ablation studies for best recall accuracy.
02 · Three Memory Types, One API

Short-term context, long-term facts, and session-scoped threads — all unified

01
Short-Term

Short-Term Memory

Raw conversation messages scoped to the current session. Gives your agent full context of the ongoing thread without cross-contaminating other sessions. Perfect for multi-turn reasoning.

Session-scoped Real-time access No contamination
02
Long-Term

Long-Term Memory

Everything the agent has ever learned about a user — preferences, identity, work, hobbies, past decisions. Persists across all sessions, surfaced via semantic + keyword search when relevant.

Persists forever Hybrid retrieval 13 categories
03
Session Memory

Session Memory

Facts scoped by owner_id + agent_id + session_id. Multiple agents can serve the same user, each building its own memory context while sharing the user’s core facts. Clean, no cross-contamination.

Triple scoping Multi-agent Isolated context
Memory Scoping
Every memory entry is scoped by owner_id + agent_id + session_id — mirroring Lyzr’s hosted platform. This means you get the same clean memory isolation in your local dev environment that you’d expect in production.
03 · Spin Up in 3 Lines of Python

From zero to memory
in under a minute

Install the package, initialize with your user ID, and start adding conversations. Cognis handles everything else — fact extraction, storage, deduplication, and retrieval.

01 · Zero Infrastructure
Everything runs in-process
Qdrant runs in local file-backed mode. SQLite is built-in. No servers to spin up, no Docker Compose, no cloud accounts needed.
02 · Intelligent Extraction
ADD, UPDATE, or DELETE — automatically
LLM-powered fact extraction automatically decides whether to ADD, UPDATE, or DELETE memories — keeping long-term knowledge accurate and de-duplicated without manual intervention.
03 · Framework Agnostic
Works with any agent framework
Works with CrewAI, LangChain, custom agents, or raw API calls. Also available natively in Lyzr Agent Studio with one-click activation.
quickstart.py
# Step 1 — Install (terminal)
# pip install lyzr-cognis
from cognis import Cognis # line 1
m = Cognis(owner_id=“user_1”) # line 2 — initialize
m.add([{“role”: “user”, “content”: “I love sushi and I work at Google”}]) # line 3
# Retrieve relevant context for a query
context = m.get_context(messages)
results = m.search(“What are the user’s food preferences?”)
# Full API — just 6 methods, that’s it
m.add(messages) # extract & store facts from conversation
m.get(memory_id) # retrieve a specific memory
m.search(query) # semantic + keyword hybrid search
m.delete(memory_id) # remove a memory
m.get_context(messages) # get formatted context string for your prompt
m.clear() # wipe all memories for this owner
~500ms search
MIT License
6 methods
3 deps
04 · Benchmark Performance

Benchmark Performance

Cognis vs. SuperMemory, Zep/Graphiti, Full-Context, Mem0, and OpenAI — on LongMemEval & LoCoMo. All models tested with GPT-4.1. Higher is better.

Lyzr Cognis
SuperMemory / Mem0
Zep / OpenAI
Full-Context (GPT-4.1)
LongMemEval Benchmark
All systems tested with GPT-4.1 · Higher is better · Source: Lyzr internal evaluation
SS-User ★ #1 · 100%
Lyzr Cognis
100%
SuperMemory
~86%
Zep/Graphiti
~72%
Full-Context
~68%
SS-Assistant ★ #1 · 87.5%
Lyzr Cognis
87.5%
SuperMemory
~85%
Zep/Graphiti
~68%
Full-Context
~82%
SS-Preference ★ #1 · 93.3%
Lyzr Cognis
93.3%
SuperMemory
~58%
Zep/Graphiti
~44%
Full-Context
~22%
Knowledge Update ★ #1 · 92.3%
Lyzr Cognis
92.3%
SuperMemory
~83%
Zep/Graphiti
~68%
Full-Context
~62%
Temporal Reasoning ★ #1 · 84.2%
Lyzr Cognis
84.2%
SuperMemory
~76%
Zep/Graphiti
~62%
Full-Context
~55%
Multi-Session ★ #1 · 86.5%
Lyzr Cognis
86.5%
SuperMemory
~72%
Zep/Graphiti
~58%
Full-Context
~50%
100%
SS-User Score
LongMemEval · GPT-4.1
93.3%
SS-Preference
+35pt vs nearest rival
92.3%
Knowledge Update
Highest in class
6/6
Categories Won
All 6 dimensions
LoCoMo Benchmark
Long-context conversational memory · vs Zep, OpenAI, Mem0 · Higher is better
Single Hop ★ #1 · 71.99
Lyzr Cognis
71.99
Zep
~60
OpenAI
~64
Mem0
~68
Multi-Hop ★ #1 · 51.04
Lyzr Cognis
51.04
Zep
~49
OpenAI
~40
Mem0
~37
Open Domain ★ #1 · 85.85 · Largest Lead
Lyzr Cognis
85.85
Zep
~68
OpenAI
~36
Mem0
~63
Temporal Reasoning ★ #1 · 77.26
Lyzr Cognis
77.26
Zep
~62
OpenAI
~47
Mem0
~55
85.85
Open Domain
LoCoMo · Best score
77.26
Temporal Reasoning
+15pt vs Mem0
71.99
Single Hop
Highest in class
4/4
Categories Won
All 4 LoCoMo tasks

Try Cognis in Agent Studio

See the benchmarks live. Cognis is natively integrated as the default memory provider — available the moment you create an agent. No configuration needed.

05 · Feature Comparison

How Cognis Stacks Up

Feature comparison against leading memory providers — Mem0, Zep/Graphiti, and SuperMemory — across infrastructure, speed, accuracy, and privacy.

Feature Lyzr Cognis Mem0 Zep / Graphiti SuperMemory
Infrastructure Required Zero — pip install Docker / Cloud Docker required Cloud SaaS only
Search Method Hybrid (Vector + BM25) Vector only Graph + Vector Vector only
Temporal Reasoning Built-in (84.2%) Limited Partial Not supported
Fact Update (ADD/UPDATE/DELETE) Automatic via LLM Yes Partial Add only
Open Source MIT License Apache 2.0 Open Source Closed
Session Scoping owner + agent + session user + agent user-scoped user-scoped
Lyzr Studio Integration Native — Default provider No No No
Data Privacy 100% local / on-prem Cloud by default Configurable Cloud only
06 · Lyzr Agent Studio · ADLC

Memory built into your entire
Agent Development Lifecycle

Cognis is natively integrated into Lyzr Agent Studio as the default memory provider — available the moment you create an agent. No configuration, no API keys to wire up separately. It supports the full ADLC: from building and testing agents to deploying and monitoring them in production.

You also have the flexibility to switch to Lyzr Memory (balanced, short + long term) or bring your own AWS account with Amazon Bedrock AgentCore Memory — all from the same interface.

Works with CrewAI too
Already using CrewAI? Cognis has a dedicated cookbook at docs.lyzr.ai/cookbooks/cognis-crewai to drop persistent memory into your existing CrewAI pipelines in minutes.
Lyzr Cognis
Production-grade · Matryoshka embeddings · SOTA benchmarks
⭐ Default
Lyzr Memory
Balanced provider · Short + long-term memory support
✓ Ready
Amazon Bedrock AgentCore
BYOM — Bring your own AWS account for agent memory
Setup

Give Your Agents
a Memory Upgrade

3 lines of Python. No Docker. No servers. Open source under MIT. Your agents will finally remember what matters.

MIT License · 100% local · pip install lyzr-cognis · Zero Docker · Zero Servers