Why an AI Agent Without Memory Is an Expensive Calculator: Building Persistent Memory
Cloud.ru
The article explains why persistent memory is critical for production AI agents, detailing memory types (short-term, long-term, semantic, episodic, procedural) and practical implementation levels. It recommends starting with pgvector for vector search and storing extracted facts, not raw dialogue, and highlights the importance of separating retrieval and write decisions from the LLM to reduce errors.
Vladislav Yankovsky, technical leader of the Evolution AI Agents product at Cloud.ru, discusses building persistent memory for AI agents. He emphasizes that memory is not a goal in itself but a consequence of functional requirements; for instance, an agent querying Grafana via MCP may not need memory, while an L2 support agent handling multi-session tickets does. He distinguishes context (what fits in the model window) from memory (stored outside the model, retrieved selectively). Memory is classified by lifespan (short-term, working, long-term) and content type (semantic, episodic, procedural). In practice, 80% of product tasks require short-term plus long-term semantic memory. The article outlines implementation levels: Level 0 (simply storing dialogue history) has limitations; Level 1 involves vector search using tools like pgvector, Qdrant, Milvus, and Pinecone; Level 2 introduces structured memory with SQL or graphs (e.g., Graphiti for temporal graphs). Key advice is to store extracted facts rather than raw dialogue, and to keep original events separate for traceability. The author warns against letting the model make retrieval decisions, as this increases error-prone behavior, and suggests starting with pgvector, which covers most cases.
- Сокращения
- LLM = Large Language Model — большая языковая модель
- MCP = Model Context Protocol — протокол контекста модели
- SQL = Structured Query Language — язык структурированных запросов
- HNSW = Hierarchical Navigable Small World — иерархический навигационный малый мир
Source: Habr — хаб ИИ —
original
