new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

LangChain & LangGraph · all subjects

memory

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Short-term memory definition and scope

Short-term memory in LangGraph is thread-scoped memory that tracks ongoing conversations by maintaining message history within a session. It is managed as part of an agent's state and persisted to a database using a checkpointer so the thread can be resumed at any time. Short-term memory updates when the graph is invoked or a step is completed, and the state is read at the start of each step.

Long-term memory definition and scope

Long-term memory in LangGraph stores user-specific or application-level data across sessions and is shared across conversational threads. It can be recalled at any time and in any thread. Memories are scoped to custom namespaces, not just within a single thread ID. LangGraph provides stores to let you save and recall long-term memories.

Three types of memory in AI agents

AI agents can use three types of memory, analogous to human memory types: Semantic memory stores facts about users or concepts learned in past interactions. Episodic memory stores experiences and past agent actions. Procedural memory stores instructions, rules, and how to perform tasks, consisting of model weights, agent code, and the agent's prompt.

Context window challenges in long-term conversations

Long conversations pose challenges to LLMs because full message history may not fit inside an LLM's context window, resulting in irrecoverable errors. Even if an LLM supports the full context length, most LLMs perform poorly over long contexts, getting distracted by stale or off-topic content while suffering from slower response times and higher costs. Many applications benefit from techniques to manually remove or forget stale information.

Feature comparison: Long-term memory

LangGraph provides long-term memory via LangGraph long-term memory features. LangChain provides long-term memory via LangChain long-term memory features. Deep Agents provides long-term memory via Deep Agents long-term memory features.

mda init with memory flag creates durable memory file

The `--memory agent|none` flag in mda init optionally writes a root memory declaration. If the flag is omitted, no memory file is created and durable memory is off. If set to `agent`, a memory file is created with durable memory enabled.

Give your agent this brain