LuAITools.com
提交工具
📦AI
Memory that survives the session

Long-Term Memory

Long-term memory persists across sessions, usually in a vector database or external storage, so the agent can recognize you and remember your preferences next time.

What is long-term memory?

Short-term memory wipes clean when a session ends, so the agent meets you as a stranger next time. Long-term memory fixes exactly that: it persists important information into a database, vector store or other external storage, so the agent can remember who you are, what you like, and where you left off — across sessions.

How do short- and long-term memory divide the work?

Short-term handles "now"
It keeps the current conversation coherent. Small capacity, gone with the session.
Long-term handles "the past"
It saves what's worth keeping. Big capacity, long-lived, ready to retrieve.

How is it usually built?

A vector database
Memories get turned into vectors and stored, then retrieved by semantic similarity — no exact word match needed, just close meaning.
Structured storage
Things like user profiles, preferences and order history go into a normal database and are queried by field.
External files or a knowledge base
Key points can be written into files or a knowledge base as reference material for next time.

What it gives — and what it risks

Long-term memory turns an agent from a one-off tool into an assistant that knows you better over time — your name, your habits, your context. But it also means more personal data is kept, so access control, deletion and encryption matter.

Bottom line: long-term memory is the agent's filing cabinet — it stores what's worth remembering so you can pick up the conversation next time.

Comments