Short-Term Memory
A component of the Agent memory mechanism referring to in-context information within a single session. It is implemented by appending conversation history to the prompt and is constrained by the context window token limit. Common management strategies include sliding window and summary compression.
Core Facts
An Agent's memory mechanism is typically divided into two categories: short-term memory and long-term memory, with long-term memory requiring external persistent storage such as vector databases, relational databases, and graph databases.
长期记忆Agent通常基于RAG(检索增强生成)技术构建,通过向量数据库将信息转化为高维向量并持久化存储
Agent Skills 具备上下文感知、可组合性和自描述性三个关键特征
Timeline (last 90 days)
Short-term memory (the messages list) lives as long as the process and disappears when the process ends, and it cannot grow indefinitely due to the model's context window limit.
Short-term memory includes SystemMessage, UserMessage, AIMessage, and ToolMessage, and has three characteristics: it is easily lost, has limited capacity, and can be read directly.
A complete memory module operates in three stages: before the task starts, read memory and inject it into the System Prompt; during task execution, use short-term memory to append to the message sequence; after the task ends, write new information back to persistent storage and clear the short-term memory.
When short-term memory exceeds the context window, there are three common handling approaches: sliding window, summary compression, and external offloading, and the engineering implementation is not complicated.
The author built a custom Memory Layer to handle short-term and long-term memory and continuously optimizes the CRUD algorithms.
Short-term memory is a storage state, while context is a received state after transmission; the two are different concepts.
Short-term memory refers to the historical information stored on the Agent's side.
The core logic of an Agent's memory mechanism is to save previous chat history and send it together with the next request to the large model.
Short-term memory generally retains the raw content of the most recent 5–10 conversation turns and triggers a compression summary when the threshold is exceeded.
An Agent's memory mechanism is typically divided into two categories: short-term memory and long-term memory, with long-term memory requiring external persistent storage such as vector databases, relational databases, and graph databases.
All Facts (12)
An Agent's memory mechanism is typically divided into two categories: short-term memory and long-term memory, with long-term memory requiring external persistent storage such as vector databases, relational databases, and graph databases.
80%Verified长期记忆Agent通常基于RAG(检索增强生成)技术构建,通过向量数据库将信息转化为高维向量并持久化存储
80%VerifiedAgent Skills 具备上下文感知、可组合性和自描述性三个关键特征
80%VerifiedThe author built a custom Memory Layer to handle short-term and long-term memory and continuously optimizes the CRUD algorithms.
65%UnverifiedShort-term memory is a storage state, while context is a received state after transmission; the two are different concepts.
60%UnverifiedThe core logic of an Agent's memory mechanism is to save previous chat history and send it together with the next request to the large model.
60%UnverifiedShort-term memory (the messages list) lives as long as the process and disappears when the process ends, and it cannot grow indefinitely due to the model's context window limit.
50%UnverifiedShort-term memory includes SystemMessage, UserMessage, AIMessage, and ToolMessage, and has three characteristics: it is easily lost, has limited capacity, and can be read directly.
50%UnverifiedWhen short-term memory exceeds the context window, there are three common handling approaches: sliding window, summary compression, and external offloading, and the engineering implementation is not complicated.
50%UnverifiedA complete memory module operates in three stages: before the task starts, read memory and inject it into the System Prompt; during task execution, use short-term memory to append to the message sequence; after the task ends, write new information back to persistent storage and clear the short-term memory.
50%UnverifiedShort-term memory refers to the historical information stored on the Agent's side.
50%UnverifiedShort-term memory generally retains the raw content of the most recent 5–10 conversation turns and triggers a compression summary when the threshold is exceeded.
50%