From 89de9503076c8964b7daa42927c034e85b5050da Mon Sep 17 00:00:00 2001 From: Xin Zhang Date: Tue, 9 Sep 2025 20:17:07 +0800 Subject: [PATCH] docs (langgraph): Fix bug in the code example (#6114) - **Description:** Fix the wrong variable name in the example of `memory.md`. - **Dependencies:** NA. --- docs/docs/concepts/memory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/concepts/memory.md b/docs/docs/concepts/memory.md index 83d3f29a0..390693965 100644 --- a/docs/docs/concepts/memory.md +++ b/docs/docs/concepts/memory.md @@ -134,7 +134,7 @@ def update_instructions(state: State, store: BaseStore): namespace = ("instructions",) current_instructions = store.search(namespace)[0] # Memory logic - prompt = prompt_template.format(instructions=instructions.value["instructions"], conversation=state["messages"]) + prompt = prompt_template.format(instructions=current_instructions.value["instructions"], conversation=state["messages"]) output = llm.invoke(prompt) new_instructions = output['new_instructions'] store.put(("agent_instructions",), "agent_a", {"instructions": new_instructions}) @@ -278,4 +278,4 @@ const items = await store.search( ``` ::: -For more information about the memory store, see the [Persistence](persistence.md#memory-store) guide. \ No newline at end of file +For more information about the memory store, see the [Persistence](persistence.md#memory-store) guide.