[KongchangAI]
ConceptShort-term Memory / 会话内记忆 / 对话历史

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

Timeline (last 90 days)

Oct 17

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.

Unverified50%
Oct 17

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.

Unverified50%
Oct 17

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.

Unverified50%
Oct 17

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.

Unverified50%
Oct 16

Two default practices for long-term memory: extraction should be placed asynchronously outside the reply path (because the facts of this conversation are already in this session's history); take a snapshot of memory at the start of each conversation (the memory block is placed before the history, and updating it midway would break the cache).

Verified65%
Sep 12

Cross-session memory systems are typically divided into several layers: short-term context memory, long-term explicit memory, and implicit preference memory.

Unverified70%
Sep 12

The author built a custom Memory Layer to handle short-term and long-term memory and continuously optimizes the CRUD algorithms.

Verified65%
Sep 12

Short-term memory is a storage state, while context is a received state after transmission; the two are different concepts.

Verified65%
Sep 12

Short-term memory refers to the historical information stored on the Agent's side.

Unverified50%
Sep 12

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.

Unverified60%

2 more timeline events

All Facts (16)

Verified

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.

90%
Verified

Long-term memory Agents are typically built on RAG (Retrieval-Augmented Generation) technology, converting information into high-dimensional vectors via vector databases and storing them persistently.

90%
Verified

Agent Skills 具备上下文感知、可组合性和自描述性三个关键特征

80%
Verified

Two default practices for long-term memory: extraction should be placed asynchronously outside the reply path (because the facts of this conversation are already in this session's history); take a snapshot of memory at the start of each conversation (the memory block is placed before the history, and updating it midway would break the cache).

65%
Verified

The author built a custom Memory Layer to handle short-term and long-term memory and continuously optimizes the CRUD algorithms.

65%
Verified

Short-term memory is a storage state, while context is a received state after transmission; the two are different concepts.

65%
Verified

Persistent memory is typically divided into three levels: short-term working memory, episodic memory, and semantic memory

65%
Unverified

Cross-session memory systems are typically divided into several layers: short-term context memory, long-term explicit memory, and implicit preference memory.

70%
Unverified

Production-grade agents need to distinguish between short-term memory (current session context) and long-term memory (cross-session user preferences and historical facts).

70%
Unverified

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.

60%
Unverified

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.

60%
Unverified

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.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

Short-term memory refers to the historical information stored on the Agent's side.

50%

Source Articles