Vector Stores

Overview

qianmoQqianmoQ· 更新于 2026-10-08· 阅读 8 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Introduction

Memory is a system that remembers information about previous interactions. Memory has emerged, and will continue to remain, a core capability of foundation model-based agents. It underpins long-horizon reasoning, continual adaptation, and effective interaction with complex environments.1

We propose a distributed memory system for flink-agents that mirrors human cognitive processes. The solution implements four memory types: Sensory Memory, Short-term Memory, Long-term Memory and Knowledge, based on their visibility, retention and derivation.

Memory Types

Flink Agents classifies memory types based on visibility, retention and derivation.

  • visibility: The recall scope of the memory, i.e., whether it is visible across keys.

    • In Flink Agents, inputs of the agent are partitioned by their keys. This corresponds to how data are partitioned by keys in Flink’s Keyed DataStream.
  • retention: How long the memory will be remembered, within a single run or across multiple runs.

    • An agent run refers to a complete execution of an agent to process an input event. Each record from upstream will trigger a new agent run.
  • derivation: Whether the retrieved information can be a derived version of the original one.

    • original: The retrieved information is exactly the same as how it was stored.
    • derived: The retrieved information might be derived from the original information.

Memory Types

Sensory Memory

  • Use Case: Store temporary data generated during the agent execution which is only needed for a single run. For example, tool call context, or the data users want to pass to other agent actions.
  • Characteristics: Isolation between agent runs, which means the memory will be automatically cleaned up by the framework when an agent run is completed.

For more details, see Sensory & Short-term Memory.

Short-Term Memory

  • Use Case: Store data generated during the agent execution.

    • Compared to sensory memory, the lifecycle of stored data can across multiple runs.
    • Compared to long-term memory, user need retrieve all the original data they have written to the memory.
  • Characteristics:

    • The lifecycle of the stored data can across multiple runs.
    • Complete original data retrieval.
    • Supports optional automatic expiration and cleanup.

For more details, see Sensory & Short-Term Memory.

Long-Term Memory

  • Use Case: Store data generated during the agent execution, but compared to short-term memory, the data may expand rapidly as the agent execution, which requires compaction to provide concise and highly related context.

  • Characteristics:

    • Support for compacting similar items.
    • Support for semantic search.

For more details, see Long-Term Memory.

Comparison

FeatureSensory MemoryShort-Term MemoryLong-Term Memory
RetentionSingle RunMultiple RunsMultiple Runs
VisibilitySingle-KeySingle-KeySingle-Key
DerivationOriginalOriginalDerived
StorageFlink StateFlink StateExternal Vector Store
Access PatternKey-Value / Nested ObjectsKey-Value / Nested ObjectsSemantic Search
Use CaseTemporary execution states of an agent runExact information shared across multiple runsLarge, compactable and searchable information
Types of ContentsAny primitive/objectAny primitive/objectString, ChatMessage

评论

登录后参与评论

正在加载评论…