Memory · Retrieval
Lifecycle Hooks (pre / post-message)
Read/write memory at fixed points in the agent loop: before prompt assembly, after the response.
Verified against langchain-ai.github.io
How it works
Read/write memory at fixed points in the agent loop: before prompt assembly, after the response.
At a glance
StageHarvest
PhaseBoth
Used byLangMem (hot-path) · LangGraph store hooks
Trade-off
Hot-path writes add per-turn latency; rigid trigger points can fire at the wrong time.
Basis
Verified against
https://langchain-ai.github.io/langmem/concepts/conceptual_guide/ The corpus does not rewrite vendor documentation. Where copy is quoted verbatim it is marked as such and attributed to its source.