Memory and Knowledge

Short-Term Memory

Short-term memory is the conversation history an agent carries within a single session: the messages array passed to each API call, which persists across turns but resets when the session ends. Without it, every agent response would be stateless and context-blind, making multi-step tasks impossible since the agent would forget what it was doing between each tool call. The failure mode of poor short-term memory management is subtle: an agent with a naively pruned or summarized history loses track of decisions it made two steps ago and either contradicts itself or repeats work it already completed, so production systems use relevance-weighted pruning and targeted summarization to keep the right context, not just the most recent context.