Agno + MemorySync
A memory-only db for Agno’s MemoryManager: automatic extraction and injection, server-side similarity search, an async-native twin, and deletes that cannot nuke an account.
Overview
Install agno-memorysync and wire MemoryManager(db=MemorySyncDb()) while sessions stay in your local db — the backend implements every memory method for real and makes every other BaseDb surface raise with the fix in the message, so silent session loss is impossible. Memories extracted by Agno’s native pipeline (update_memory_on_run, agentic memory, image-turn understanding) are kept in MemorySync framework state, one value per memory id, and injected into context on every run; each memory’s text is also sent to fact extraction, so its facts are recallable from every MemorySync surface. get_user_memories(search_content=...) ranks this user’s memories by similarity server-side — Agno’s built-in retrieval is last_n, first_n, or an extra LLM round-trip, and the Mem0 alternative is a toolkit the model must remember to call, with a sync client that blocks async agents and a cookbook that instructs you to comment out the add call after the first run because nothing is idempotent. Here an unchanged memory is recognised and never stored or extracted twice (retries and re-runs converge), an update replaces the facts of the previous version, a delete removes the memory and its facts, reads run under a hard 1.2s budget and fail open, writes fail open with loud logs, failed deletes raise, and the nullary clear_memories() always refuses — per-user wipes are explicit. An AsyncMemorySyncDb twin rides agno’s native AsyncBaseDb path for Agent.arun.
Setup status and requirements
- Supported version
- agno-memorysync 1.1.0 (PyPI)
- Last setup review
- 2026-08-31
- Permissions
- A MemorySync API key with read and write scopes.
- Limits
- Requires agno 2.8+ (Python 3.10+).
Capabilities
- Memory-only BaseDb — 33 non-memory surfaces raise with guidance, never silent loss
- Server-side similarity search via search_content
- AsyncMemorySyncDb twin — native AsyncBaseDb, no blocked event loop
- One value per memory id — an unchanged memory is never stored or extracted twice
- Each memory’s text becomes facts; updates replace them, deletes remove them
- clear_memories() always refuses; forget_user_memories(user_id) is the explicit wipe
- Reads fail open under a 1.2s budget; writes fail open with loud logs; deletes raise
- agent_id / team_id / topics stored and filterable
- Image-turn memories through agno’s NATIVE pipeline — no bypass
Quick Start
from agno.agent import Agentfrom agno.db.sqlite import SqliteDbfrom agno.memory import MemoryManagerfrom agno_memorysync import MemorySyncDbagent = Agent(db=SqliteDb(db_file="agent.db"), # sessions: localmemory_manager=MemoryManager(db=MemorySyncDb()), # memories: MemorySyncupdate_memory_on_run=True,user_id="customer-42",)agent.run("I prefer teal dashboards and window seats")agent.run("Which color should the new chart use?") # remembers
Use Cases
Agno agents that greet returning users with context
Replacing the tool-gated Mem0 toolkit with native automatic memory
Image-turn memories: the model’s understanding persists as recallable facts
Explore More
Built for production AI systems
Build AI systems that remember
MemorySync provides the infrastructure layer for persistent memory, adaptive retrieval, and enterprise AI intelligence.
Start free. No credit card required.