Home/Glossary/Memory in AI
Concepts

Memory in AI

Mechanisms that allow AI agents to store, retrieve, and act on information across interactions.

Full Definition

Memory in AI systems refers to how agents persist and access information beyond a single context window. Four types are commonly distinguished: in-context memory (information in the active context window), external memory (vector databases or key-value stores queried at runtime), in-weights memory (knowledge encoded in model parameters during training), and in-cache memory (KV cache preserving past attention states for efficiency). Long-term memory enables agents to remember user preferences, past conversation outcomes, and evolving task state across sessions. Building effective memory systems requires decisions about what to store, when to retrieve, how to represent memories, and how to prevent memory poisoning.

Examples

1

A personal assistant agent storing a summary of every past conversation in a vector database and retrieving the top-5 most relevant memories at the start of each new session.

2

An agent using an external key-value store to remember a user's stated dietary restrictions across hundreds of meal planning sessions.

Apply this in your prompts

PromptITIN automatically uses techniques like Memory in AI to build better prompts for you.

✦ Try it free

Related Terms

Agent

An AI system that autonomously plans and executes multi-step tasks using tools a

View →

RAG (Retrieval-Augmented Generation)

Augmenting model responses by retrieving relevant documents from an external kno

View →

Agentic Workflow

A multi-step pipeline where an AI agent plans, acts, observes, and iterates to c

View →
← Browse all 100 terms