Short-Term Memory
What is short-term memory?
Short-term memory is information an AI agent retains temporarily for a conversation, session, or limited task period. It provides continuity across nearby interactions without committing every detail to long-term storage.
Examples include the user’s current objective, recent clarifications, temporary preferences for one task, and a summary of the latest conversation turns.
How short-term memory works
An application may keep short-term information in a session store, conversation record, cache, or task state. Before a model inference, it selects relevant parts and places them into the current context.
For example, if a user first asks for flights and then says “only direct options,” the agent can retain that constraint during the session. When the travel task ends, the system may discard it unless the user explicitly wants it saved as a lasting preference.
Short-term memory can have a time limit, session boundary, size limit, or task-completion rule. It should not grow indefinitely.
Short-term memory versus working memory
Short-term memory is defined mainly by how long information is retained. Working memory is defined by active use in the current problem.
A recent conversation summary may remain in short-term memory but not be needed for the current step. Conversely, a retrieved long-term preference may enter working memory because it matters now. The same information can move between these roles.
Short-term memory versus context
[Context](/glossary/context/) is the information available to the model for one inference. Short-term memory may exist outside the model and be selected into context only when relevant.
Keeping the full conversation in every prompt is one simple form of session continuity, but it consumes the context window and may preserve irrelevant or sensitive details. Summarization and selective retrieval can be more efficient.
Risks and quality
Temporary memory can still create privacy and accuracy problems. A misunderstood preference may affect several later steps. A stale session value can conflict with a new request. Summaries may omit important qualifications.
Builders should define retention boundaries, let newer instructions override older temporary details, and avoid storing sensitive information without need. Important changes should be reflected explicitly rather than inferred from silence.
Why it matters
Short-term memory makes conversations and multi-step tasks feel coherent. It prevents the agent from asking for the same information repeatedly while limiting unnecessary long-term retention.
The right design preserves enough information to continue the current work, then expires or promotes selected details according to clear rules. See [Memory in AI Agents](/memory-in-ai-agents/) for the full relationship among short-term, working, and long-term memory.
Learn More
Memory in AI AgentsContinue with the full AIRundown guide →