[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-langchain-langgraph-persistence":3,"mdc-dp4rsq-key":34,"related-repo-langchain-langgraph-persistence":7330,"related-org-langchain-langgraph-persistence":7434},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":32,"mdContent":33},"langgraph-persistence","manage state persistence and history in LangGraph","INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"langchain","LangChain","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Flangchain.png","langchain-ai",[13,17,18,21],{"name":14,"slug":15,"type":16},"LLM","llm","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"LangGraph","langgraph",{"name":22,"slug":23,"type":16},"State Management","state-management",877,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills","2026-04-06T18:26:36.07052",null,77,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":27},[],"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills\u002Ftree\u002FHEAD\u002Fconfig\u002Fskills\u002Flanggraph-persistence","---\nname: langgraph-persistence\ndescription: \"INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.\"\n---\n\n\u003Coverview>\nLangGraph's persistence layer enables durable execution by checkpointing graph state:\n\n- **Checkpointer**: Saves\u002Floads graph state at every super-step\n- **Thread ID**: Identifies separate checkpoint sequences (conversations)\n- **Store**: Cross-thread memory for user preferences, facts\n\n**Two memory types:**\n- **Short-term** (checkpointer): Thread-scoped conversation history\n- **Long-term** (store): Cross-thread user preferences, facts\n\u003C\u002Foverview>\n\n\u003Ccheckpointer-selection>\n\n| Checkpointer | Use Case | Production Ready |\n|--------------|----------|------------------|\n| `InMemorySaver` | Testing, development | No |\n| `SqliteSaver` | Local development | Partial |\n| `PostgresSaver` | Production | Yes |\n\n\u003C\u002Fcheckpointer-selection>\n\n---\n\n## Checkpointer Setup\n\n\u003Cex-basic-persistence>\n\u003Cpython>\nSet up a basic graph with in-memory checkpointing and thread-based state persistence.\n\n```python\nfrom langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict, Annotated\nimport operator\n\nclass State(TypedDict):\n    messages: Annotated[list, operator.add]\n\ndef add_message(state: State) -> dict:\n    return {\"messages\": [\"Bot response\"]}\n\ncheckpointer = InMemorySaver()\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"respond\", add_message)\n    .add_edge(START, \"respond\")\n    .add_edge(\"respond\", END)\n    .compile(checkpointer=checkpointer)  # Pass at compile time\n)\n\n# ALWAYS provide thread_id\nconfig = {\"configurable\": {\"thread_id\": \"conversation-1\"}}\n\nresult1 = graph.invoke({\"messages\": [\"Hello\"]}, config)\nprint(len(result1[\"messages\"]))  # 2\n\nresult2 = graph.invoke({\"messages\": [\"How are you?\"]}, config)\nprint(len(result2[\"messages\"]))  # 4 (previous + new)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nSet up a basic graph with in-memory checkpointing and thread-based state persistence.\n\n```typescript\nimport { MemorySaver, StateGraph, StateSchema, MessagesValue, START, END } from \"@langchain\u002Flanggraph\";\nimport { HumanMessage } from \"@langchain\u002Fcore\u002Fmessages\";\n\nconst State = new StateSchema({ messages: MessagesValue });\n\nconst addMessage = async (state: typeof State.State) => {\n  return { messages: [{ role: \"assistant\", content: \"Bot response\" }] };\n};\n\nconst checkpointer = new MemorySaver();\n\nconst graph = new StateGraph(State)\n  .addNode(\"respond\", addMessage)\n  .addEdge(START, \"respond\")\n  .addEdge(\"respond\", END)\n  .compile({ checkpointer });\n\n\u002F\u002F ALWAYS provide thread_id\nconst config = { configurable: { thread_id: \"conversation-1\" } };\n\nconst result1 = await graph.invoke({ messages: [new HumanMessage(\"Hello\")] }, config);\nconsole.log(result1.messages.length);  \u002F\u002F 2\n\nconst result2 = await graph.invoke({ messages: [new HumanMessage(\"How are you?\")] }, config);\nconsole.log(result2.messages.length);  \u002F\u002F 4 (previous + new)\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-basic-persistence>\n\n\u003Cex-production-postgres>\n\u003Cpython>\nConfigure PostgreSQL-backed checkpointing for production deployments.\n\n```python\nimport os\nfrom langgraph.checkpoint.postgres import PostgresSaver\n\n# Run once during deployment (not at application startup):\n#   PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]).setup()\n\nwith PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]) as checkpointer:\n    graph = builder.compile(checkpointer=checkpointer)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nConfigure PostgreSQL-backed checkpointing for production deployments.\n\n```typescript\nimport { PostgresSaver } from \"@langchain\u002Flanggraph-checkpoint-postgres\";\n\n\u002F\u002F Run once during deployment (not at application startup):\n\u002F\u002F   await PostgresSaver.fromConnString(process.env.DATABASE_URL!).setup();\n\nconst checkpointer = PostgresSaver.fromConnString(process.env.DATABASE_URL!);\nconst graph = builder.compile({ checkpointer });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-production-postgres>\n\n---\n\n## Thread Management\n\n\u003Cex-separate-threads>\n\u003Cpython>\nDemonstrate isolated state between different thread IDs.\n\n```python\n# Different threads maintain separate state\nalice_config = {\"configurable\": {\"thread_id\": \"user-alice\"}}\nbob_config = {\"configurable\": {\"thread_id\": \"user-bob\"}}\n\ngraph.invoke({\"messages\": [\"Hi from Alice\"]}, alice_config)\ngraph.invoke({\"messages\": [\"Hi from Bob\"]}, bob_config)\n\n# Alice's state is isolated from Bob's\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nDemonstrate isolated state between different thread IDs.\n\n```typescript\n\u002F\u002F Different threads maintain separate state\nconst aliceConfig = { configurable: { thread_id: \"user-alice\" } };\nconst bobConfig = { configurable: { thread_id: \"user-bob\" } };\n\nawait graph.invoke({ messages: [new HumanMessage(\"Hi from Alice\")] }, aliceConfig);\nawait graph.invoke({ messages: [new HumanMessage(\"Hi from Bob\")] }, bobConfig);\n\n\u002F\u002F Alice's state is isolated from Bob's\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-separate-threads>\n\n---\n\n## State History & Time Travel\n\n\u003Cex-resume-from-checkpoint>\n\u003Cpython>\nTime travel: browse checkpoint history and replay or fork from a past state.\n\n```python\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\nresult = graph.invoke({\"messages\": [\"start\"]}, config)\n\n# Browse checkpoint history\nstates = list(graph.get_state_history(config))\n\n# Replay from a past checkpoint\npast = states[-2]\nresult = graph.invoke(None, past.config)  # None = resume from checkpoint\n\n# Or fork: update state at a past checkpoint, then resume\nfork_config = graph.update_state(past.config, {\"messages\": [\"edited\"]})\nresult = graph.invoke(None, fork_config)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nTime travel: browse checkpoint history and replay or fork from a past state.\n\n```typescript\nconst config = { configurable: { thread_id: \"session-1\" } };\n\nconst result = await graph.invoke({ messages: [\"start\"] }, config);\n\n\u002F\u002F Browse checkpoint history (async iterable, collect to array)\nconst states: Awaited\u003CReturnType\u003Ctypeof graph.getState>>[] = [];\nfor await (const state of graph.getStateHistory(config)) {\n  states.push(state);\n}\n\n\u002F\u002F Replay from a past checkpoint\nconst past = states[states.length - 2];\nconst replayed = await graph.invoke(null, past.config);  \u002F\u002F null = resume from checkpoint\n\n\u002F\u002F Or fork: update state at a past checkpoint, then resume\nconst forkConfig = await graph.updateState(past.config, { messages: [\"edited\"] });\nconst forked = await graph.invoke(null, forkConfig);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-resume-from-checkpoint>\n\n\u003Cex-update-state>\n\u003Cpython>\nManually update graph state before resuming execution.\n\n```python\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\n# Modify state before resuming\ngraph.update_state(config, {\"data\": \"manually_updated\"})\n\n# Resume with updated state\nresult = graph.invoke(None, config)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nManually update graph state before resuming execution.\n\n```typescript\nconst config = { configurable: { thread_id: \"session-1\" } };\n\n\u002F\u002F Modify state before resuming\nawait graph.updateState(config, { data: \"manually_updated\" });\n\n\u002F\u002F Resume with updated state\nconst result = await graph.invoke(null, config);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-update-state>\n\n---\n\n## Subgraph Checkpointer Scoping\n\nWhen compiling a subgraph, the `checkpointer` parameter controls persistence behavior. This is critical for subgraphs that use interrupts, need multi-turn memory, or run in parallel.\n\n\u003Csubgraph-checkpointer-scoping-table>\n\n| Feature | `checkpointer=False` | `None` (default) | `True` |\n|---|---|---|---|\n| Interrupts (HITL) | No | Yes | Yes |\n| Multi-turn memory | No | No | Yes |\n| Multiple calls (different subgraphs) | Yes | Yes | Warning (namespace conflicts possible) |\n| Multiple calls (same subgraph) | Yes | Yes | No |\n| State inspection | No | Warning (current invocation only) | Yes |\n\n\u003C\u002Fsubgraph-checkpointer-scoping-table>\n\n\u003Csubgraph-checkpointer-when-to-use>\n\n### When to use each mode\n\n- **`checkpointer=False`** — Subgraph doesn't need interrupts or persistence. Simplest option, no checkpoint overhead.\n- **`None` (default \u002F omit `checkpointer`)** — Subgraph needs `interrupt()` but not multi-turn memory. Each invocation starts fresh but can pause\u002Fresume. Parallel execution works because each invocation gets a unique namespace.\n- **`checkpointer=True`** — Subgraph needs to remember state across invocations (multi-turn conversations). Each call picks up where the last left off.\n\n\u003C\u002Fsubgraph-checkpointer-when-to-use>\n\n\u003Cwarning-stateful-subgraphs-parallel>\n\n**Warning**: Stateful subgraphs (`checkpointer=True`) do NOT support calling the same subgraph instance multiple times within a single node — the calls write to the same checkpoint namespace and conflict.\n\n\u003C\u002Fwarning-stateful-subgraphs-parallel>\n\n\u003Cex-subgraph-checkpointer-modes>\n\u003Cpython>\nChoose the right checkpointer mode for your subgraph.\n\n```python\n# No interrupts needed — opt out of checkpointing\nsubgraph = subgraph_builder.compile(checkpointer=False)\n\n# Need interrupts but not cross-invocation persistence (default)\nsubgraph = subgraph_builder.compile()\n\n# Need cross-invocation persistence (stateful)\nsubgraph = subgraph_builder.compile(checkpointer=True)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nChoose the right checkpointer mode for your subgraph.\n\n```typescript\n\u002F\u002F No interrupts needed — opt out of checkpointing\nconst subgraph = subgraphBuilder.compile({ checkpointer: false });\n\n\u002F\u002F Need interrupts but not cross-invocation persistence (default)\nconst subgraph = subgraphBuilder.compile();\n\n\u002F\u002F Need cross-invocation persistence (stateful)\nconst subgraph = subgraphBuilder.compile({ checkpointer: true });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-subgraph-checkpointer-modes>\n\n\u003Cparallel-subgraph-namespacing>\n\n### Parallel subgraph namespacing\n\nWhen multiple **different** stateful subgraphs run in parallel, wrap each in its own `StateGraph` with a unique node name for stable namespace isolation:\n\n\u003Cpython>\n\n```python\nfrom langgraph.graph import MessagesState, StateGraph\n\ndef create_sub_agent(model, *, name, **kwargs):\n    \"\"\"Wrap an agent with a unique node name for namespace isolation.\"\"\"\n    agent = create_agent(model=model, name=name, **kwargs)\n    return (\n        StateGraph(MessagesState)\n        .add_node(name, agent)  # unique name -> stable namespace\n        .add_edge(\"__start__\", name)\n        .compile()\n    )\n\nfruit_agent = create_sub_agent(\n    \"gpt-4.1-mini\", name=\"fruit_agent\",\n    tools=[fruit_info], prompt=\"...\", checkpointer=True,\n)\nveggie_agent = create_sub_agent(\n    \"gpt-4.1-mini\", name=\"veggie_agent\",\n    tools=[veggie_info], prompt=\"...\", checkpointer=True,\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\n\n```typescript\nimport { StateGraph, StateSchema, MessagesValue, START } from \"@langchain\u002Flanggraph\";\n\nfunction createSubAgent(model: string, { name, ...kwargs }: { name: string; [key: string]: any }) {\n  const agent = createAgent({ model, name, ...kwargs });\n  return new StateGraph(new StateSchema({ messages: MessagesValue }))\n    .addNode(name, agent)  \u002F\u002F unique name -> stable namespace\n    .addEdge(START, name)\n    .compile();\n}\n\nconst fruitAgent = createSubAgent(\"gpt-4.1-mini\", {\n  name: \"fruit_agent\", tools: [fruitInfo], prompt: \"...\", checkpointer: true,\n});\nconst veggieAgent = createSubAgent(\"gpt-4.1-mini\", {\n  name: \"veggie_agent\", tools: [veggieInfo], prompt: \"...\", checkpointer: true,\n});\n```\n\u003C\u002Ftypescript>\n\nNote: Subgraphs added as nodes (via `add_node`) already get name-based namespaces automatically and don't need this wrapper.\n\n\u003C\u002Fparallel-subgraph-namespacing>\n\n---\n\n## Long-Term Memory (Store)\n\n\u003Cex-long-term-memory-store>\n\u003Cpython>\nUse a Store for cross-thread memory to share user preferences across conversations.\n\n```python\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\n# Save user preference (available across ALL threads)\nstore.put((\"alice\", \"preferences\"), \"language\", {\"preference\": \"short responses\"})\n\n# Node with store — access via runtime\nfrom langgraph.runtime import Runtime\n\ndef respond(state, runtime: Runtime):\n    prefs = runtime.store.get((state[\"user_id\"], \"preferences\"), \"language\")\n    return {\"response\": f\"Using preference: {prefs.value}\"}\n\n# Compile with BOTH checkpointer and store\ngraph = builder.compile(checkpointer=checkpointer, store=store)\n\n# Both threads access same long-term memory\ngraph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-1\"}})\ngraph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-2\"}})  # Same preferences!\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse a Store for cross-thread memory to share user preferences across conversations.\n\n```typescript\nimport { MemoryStore } from \"@langchain\u002Flanggraph\";\n\nconst store = new MemoryStore();\n\n\u002F\u002F Save user preference (available across ALL threads)\nawait store.put([\"alice\", \"preferences\"], \"language\", { preference: \"short responses\" });\n\n\u002F\u002F Node with store — access via runtime\nconst respond = async (state: typeof State.State, runtime: any) => {\n  const item = await runtime.store?.get([\"alice\", \"preferences\"], \"language\");\n  return { response: `Using preference: ${item?.value?.preference}` };\n};\n\n\u002F\u002F Compile with BOTH checkpointer and store\nconst graph = builder.compile({ checkpointer, store });\n\n\u002F\u002F Both threads access same long-term memory\nawait graph.invoke({ userId: \"alice\" }, { configurable: { thread_id: \"thread-1\" } });\nawait graph.invoke({ userId: \"alice\" }, { configurable: { thread_id: \"thread-2\" } });  \u002F\u002F Same preferences!\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-long-term-memory-store>\n\n\u003Cex-store-operations>\n\u003Cpython>\nBasic store operations: put, get, search, and delete.\n\n```python\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\nstore.put((\"user-123\", \"facts\"), \"location\", {\"city\": \"San Francisco\"})  # Put\nitem = store.get((\"user-123\", \"facts\"), \"location\")  # Get\nresults = store.search((\"user-123\", \"facts\"), filter={\"city\": \"San Francisco\"})  # Search\nstore.delete((\"user-123\", \"facts\"), \"location\")  # Delete\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-store-operations>\n\n---\n\n## Fixes\n\n\u003Cfix-thread-id-required>\n\u003Cpython>\nAlways provide thread_id in config to enable state persistence.\n\n```python\n# WRONG: No thread_id - state NOT persisted!\ngraph.invoke({\"messages\": [\"Hello\"]})\ngraph.invoke({\"messages\": [\"What did I say?\"]})  # Doesn't remember!\n\n# CORRECT: Always provide thread_id\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\ngraph.invoke({\"messages\": [\"Hello\"]}, config)\ngraph.invoke({\"messages\": [\"What did I say?\"]}, config)  # Remembers!\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nAlways provide thread_id in config to enable state persistence.\n\n```typescript\n\u002F\u002F WRONG: No thread_id - state NOT persisted!\nawait graph.invoke({ messages: [new HumanMessage(\"Hello\")] });\nawait graph.invoke({ messages: [new HumanMessage(\"What did I say?\")] });  \u002F\u002F Doesn't remember!\n\n\u002F\u002F CORRECT: Always provide thread_id\nconst config = { configurable: { thread_id: \"session-1\" } };\nawait graph.invoke({ messages: [new HumanMessage(\"Hello\")] }, config);\nawait graph.invoke({ messages: [new HumanMessage(\"What did I say?\")] }, config);  \u002F\u002F Remembers!\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-thread-id-required>\n\n\n\u003Cfix-inmemory-not-for-production>\n\u003Cpython>\nUse PostgresSaver instead of InMemorySaver for production persistence.\n\n```python\n# WRONG: Data lost on process restart\ncheckpointer = InMemorySaver()  # In-memory only!\n\n# CORRECT: Use persistent storage for production\nfrom langgraph.checkpoint.postgres import PostgresSaver\nwith PostgresSaver.from_conn_string(\"postgresql:\u002F\u002F...\") as checkpointer:\n    checkpointer.setup()  # only needed on first use to create tables\n    graph = builder.compile(checkpointer=checkpointer)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse PostgresSaver instead of MemorySaver for production persistence.\n\n```typescript\n\u002F\u002F WRONG: Data lost on process restart\nconst checkpointer = new MemorySaver();  \u002F\u002F In-memory only!\n\n\u002F\u002F CORRECT: Use persistent storage for production\nimport { PostgresSaver } from \"@langchain\u002Flanggraph-checkpoint-postgres\";\nconst checkpointer = PostgresSaver.fromConnString(\"postgresql:\u002F\u002F...\");\nawait checkpointer.setup(); \u002F\u002F only needed on first use to create tables\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-inmemory-not-for-production>\n\n\n\u003Cfix-update-state-with-reducers>\n\u003Cpython>\nUse Overwrite to replace state values instead of passing through reducers.\n\n```python\nfrom langgraph.types import Overwrite\n\n# State with reducer: items: Annotated[list, operator.add]\n# Current state: {\"items\": [\"A\", \"B\"]}\n\n# update_state PASSES THROUGH reducers\ngraph.update_state(config, {\"items\": [\"C\"]})  # Result: [\"A\", \"B\", \"C\"] - Appended!\n\n# To REPLACE instead, use Overwrite\ngraph.update_state(config, {\"items\": Overwrite([\"C\"])})  # Result: [\"C\"] - Replaced\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse Overwrite to replace state values instead of passing through reducers.\n\n```typescript\nimport { Overwrite } from \"@langchain\u002Flanggraph\";\n\n\u002F\u002F State with reducer: items uses concat reducer\n\u002F\u002F Current state: { items: [\"A\", \"B\"] }\n\n\u002F\u002F updateState PASSES THROUGH reducers\nawait graph.updateState(config, { items: [\"C\"] });  \u002F\u002F Result: [\"A\", \"B\", \"C\"] - Appended!\n\n\u002F\u002F To REPLACE instead, use Overwrite\nawait graph.updateState(config, { items: new Overwrite([\"C\"]) });  \u002F\u002F Result: [\"C\"] - Replaced\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-update-state-with-reducers>\n\n\u003Cfix-store-injection>\n\u003Cpython>\nAccess store via the Runtime object in graph nodes.\n\n```python\n# WRONG: Store not available in node\ndef my_node(state):\n    store.put(...)  # NameError! store not defined\n\n# CORRECT: Access store via runtime\nfrom langgraph.runtime import Runtime\n\ndef my_node(state, runtime: Runtime):\n    runtime.store.put(...)  # Correct store instance\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nAccess store via runtime parameter in graph nodes.\n\n```typescript\n\u002F\u002F WRONG: Store not available in node\nconst myNode = async (state) => {\n  store.put(...);  \u002F\u002F ReferenceError!\n};\n\n\u002F\u002F CORRECT: Access store via runtime\nconst myNode = async (state, runtime) => {\n  await runtime.store?.put(...);  \u002F\u002F Correct store instance\n};\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-store-injection>\n\n\u003Cboundaries>\n### What You Should NOT Do\n\n- Use `InMemorySaver` in production — data lost on restart; use `PostgresSaver`\n- Forget `thread_id` — state won't persist without it\n- Expect `update_state` to bypass reducers — it passes through them; use `Overwrite` to replace\n- Run the same stateful subgraph (`checkpointer=True`) in parallel within one node — namespace conflict\n- Access store directly in a node — use `runtime.store` via the `Runtime` param\n\u003C\u002Fboundaries>\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,7324],{"type":40,"tag":41,"props":42,"children":43},"element","overview",{},[44,47,83,92,115,218,222,229,1516,1792,1795,1801,2205,2208,2214,2968,3250,3253,3259,3272,3424,3494,3515,3801,4733,4736,4742,5709,5785,5788,5794,6292,6564,6924,7231],{"type":45,"value":46},"text","\nLangGraph's persistence layer enables durable execution by checkpointing graph state:\n",{"type":40,"tag":48,"props":49,"children":50},"ul",{},[51,63,73],{"type":40,"tag":52,"props":53,"children":54},"li",{},[55,61],{"type":40,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":45,"value":60},"Checkpointer",{"type":45,"value":62},": Saves\u002Floads graph state at every super-step",{"type":40,"tag":52,"props":64,"children":65},{},[66,71],{"type":40,"tag":56,"props":67,"children":68},{},[69],{"type":45,"value":70},"Thread ID",{"type":45,"value":72},": Identifies separate checkpoint sequences (conversations)",{"type":40,"tag":52,"props":74,"children":75},{},[76,81],{"type":40,"tag":56,"props":77,"children":78},{},[79],{"type":45,"value":80},"Store",{"type":45,"value":82},": Cross-thread memory for user preferences, facts",{"type":40,"tag":84,"props":85,"children":86},"p",{},[87],{"type":40,"tag":56,"props":88,"children":89},{},[90],{"type":45,"value":91},"Two memory types:",{"type":40,"tag":48,"props":93,"children":94},{},[95,105],{"type":40,"tag":52,"props":96,"children":97},{},[98,103],{"type":40,"tag":56,"props":99,"children":100},{},[101],{"type":45,"value":102},"Short-term",{"type":45,"value":104}," (checkpointer): Thread-scoped conversation history",{"type":40,"tag":52,"props":106,"children":107},{},[108,113],{"type":40,"tag":56,"props":109,"children":110},{},[111],{"type":45,"value":112},"Long-term",{"type":45,"value":114}," (store): Cross-thread user preferences, facts\n\n",{"type":40,"tag":116,"props":117,"children":118},"checkpointer-selection",{},[119],{"type":40,"tag":120,"props":121,"children":122},"table",{},[123,146],{"type":40,"tag":124,"props":125,"children":126},"thead",{},[127],{"type":40,"tag":128,"props":129,"children":130},"tr",{},[131,136,141],{"type":40,"tag":132,"props":133,"children":134},"th",{},[135],{"type":45,"value":60},{"type":40,"tag":132,"props":137,"children":138},{},[139],{"type":45,"value":140},"Use Case",{"type":40,"tag":132,"props":142,"children":143},{},[144],{"type":45,"value":145},"Production Ready",{"type":40,"tag":147,"props":148,"children":149},"tbody",{},[150,174,196],{"type":40,"tag":128,"props":151,"children":152},{},[153,164,169],{"type":40,"tag":154,"props":155,"children":156},"td",{},[157],{"type":40,"tag":158,"props":159,"children":161},"code",{"className":160},[],[162],{"type":45,"value":163},"InMemorySaver",{"type":40,"tag":154,"props":165,"children":166},{},[167],{"type":45,"value":168},"Testing, development",{"type":40,"tag":154,"props":170,"children":171},{},[172],{"type":45,"value":173},"No",{"type":40,"tag":128,"props":175,"children":176},{},[177,186,191],{"type":40,"tag":154,"props":178,"children":179},{},[180],{"type":40,"tag":158,"props":181,"children":183},{"className":182},[],[184],{"type":45,"value":185},"SqliteSaver",{"type":40,"tag":154,"props":187,"children":188},{},[189],{"type":45,"value":190},"Local development",{"type":40,"tag":154,"props":192,"children":193},{},[194],{"type":45,"value":195},"Partial",{"type":40,"tag":128,"props":197,"children":198},{},[199,208,213],{"type":40,"tag":154,"props":200,"children":201},{},[202],{"type":40,"tag":158,"props":203,"children":205},{"className":204},[],[206],{"type":45,"value":207},"PostgresSaver",{"type":40,"tag":154,"props":209,"children":210},{},[211],{"type":45,"value":212},"Production",{"type":40,"tag":154,"props":214,"children":215},{},[216],{"type":45,"value":217},"Yes",{"type":40,"tag":219,"props":220,"children":221},"hr",{},[],{"type":40,"tag":223,"props":224,"children":226},"h2",{"id":225},"checkpointer-setup",[227],{"type":45,"value":228},"Checkpointer Setup",{"type":40,"tag":230,"props":231,"children":232},"ex-basic-persistence",{},[233,507],{"type":40,"tag":234,"props":235,"children":236},"python",{},[237,239],{"type":45,"value":238},"\nSet up a basic graph with in-memory checkpointing and thread-based state persistence.\n",{"type":40,"tag":240,"props":241,"children":245},"pre",{"className":242,"code":243,"language":234,"meta":244,"style":244},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict, Annotated\nimport operator\n\nclass State(TypedDict):\n    messages: Annotated[list, operator.add]\n\ndef add_message(state: State) -> dict:\n    return {\"messages\": [\"Bot response\"]}\n\ncheckpointer = InMemorySaver()\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"respond\", add_message)\n    .add_edge(START, \"respond\")\n    .add_edge(\"respond\", END)\n    .compile(checkpointer=checkpointer)  # Pass at compile time\n)\n\n# ALWAYS provide thread_id\nconfig = {\"configurable\": {\"thread_id\": \"conversation-1\"}}\n\nresult1 = graph.invoke({\"messages\": [\"Hello\"]}, config)\nprint(len(result1[\"messages\"]))  # 2\n\nresult2 = graph.invoke({\"messages\": [\"How are you?\"]}, config)\nprint(len(result2[\"messages\"]))  # 4 (previous + new)\n","",[246],{"type":40,"tag":158,"props":247,"children":248},{"__ignoreMap":244},[249,260,269,278,287,297,306,315,323,332,341,349,358,366,375,384,393,402,411,420,429,437,446,455,463,472,481,489,498],{"type":40,"tag":250,"props":251,"children":254},"span",{"class":252,"line":253},"line",1,[255],{"type":40,"tag":250,"props":256,"children":257},{},[258],{"type":45,"value":259},"from langgraph.checkpoint.memory import InMemorySaver\n",{"type":40,"tag":250,"props":261,"children":263},{"class":252,"line":262},2,[264],{"type":40,"tag":250,"props":265,"children":266},{},[267],{"type":45,"value":268},"from langgraph.graph import StateGraph, START, END\n",{"type":40,"tag":250,"props":270,"children":272},{"class":252,"line":271},3,[273],{"type":40,"tag":250,"props":274,"children":275},{},[276],{"type":45,"value":277},"from typing_extensions import TypedDict, Annotated\n",{"type":40,"tag":250,"props":279,"children":281},{"class":252,"line":280},4,[282],{"type":40,"tag":250,"props":283,"children":284},{},[285],{"type":45,"value":286},"import operator\n",{"type":40,"tag":250,"props":288,"children":290},{"class":252,"line":289},5,[291],{"type":40,"tag":250,"props":292,"children":294},{"emptyLinePlaceholder":293},true,[295],{"type":45,"value":296},"\n",{"type":40,"tag":250,"props":298,"children":300},{"class":252,"line":299},6,[301],{"type":40,"tag":250,"props":302,"children":303},{},[304],{"type":45,"value":305},"class State(TypedDict):\n",{"type":40,"tag":250,"props":307,"children":309},{"class":252,"line":308},7,[310],{"type":40,"tag":250,"props":311,"children":312},{},[313],{"type":45,"value":314},"    messages: Annotated[list, operator.add]\n",{"type":40,"tag":250,"props":316,"children":318},{"class":252,"line":317},8,[319],{"type":40,"tag":250,"props":320,"children":321},{"emptyLinePlaceholder":293},[322],{"type":45,"value":296},{"type":40,"tag":250,"props":324,"children":326},{"class":252,"line":325},9,[327],{"type":40,"tag":250,"props":328,"children":329},{},[330],{"type":45,"value":331},"def add_message(state: State) -> dict:\n",{"type":40,"tag":250,"props":333,"children":335},{"class":252,"line":334},10,[336],{"type":40,"tag":250,"props":337,"children":338},{},[339],{"type":45,"value":340},"    return {\"messages\": [\"Bot response\"]}\n",{"type":40,"tag":250,"props":342,"children":344},{"class":252,"line":343},11,[345],{"type":40,"tag":250,"props":346,"children":347},{"emptyLinePlaceholder":293},[348],{"type":45,"value":296},{"type":40,"tag":250,"props":350,"children":352},{"class":252,"line":351},12,[353],{"type":40,"tag":250,"props":354,"children":355},{},[356],{"type":45,"value":357},"checkpointer = InMemorySaver()\n",{"type":40,"tag":250,"props":359,"children":361},{"class":252,"line":360},13,[362],{"type":40,"tag":250,"props":363,"children":364},{"emptyLinePlaceholder":293},[365],{"type":45,"value":296},{"type":40,"tag":250,"props":367,"children":369},{"class":252,"line":368},14,[370],{"type":40,"tag":250,"props":371,"children":372},{},[373],{"type":45,"value":374},"graph = (\n",{"type":40,"tag":250,"props":376,"children":378},{"class":252,"line":377},15,[379],{"type":40,"tag":250,"props":380,"children":381},{},[382],{"type":45,"value":383},"    StateGraph(State)\n",{"type":40,"tag":250,"props":385,"children":387},{"class":252,"line":386},16,[388],{"type":40,"tag":250,"props":389,"children":390},{},[391],{"type":45,"value":392},"    .add_node(\"respond\", add_message)\n",{"type":40,"tag":250,"props":394,"children":396},{"class":252,"line":395},17,[397],{"type":40,"tag":250,"props":398,"children":399},{},[400],{"type":45,"value":401},"    .add_edge(START, \"respond\")\n",{"type":40,"tag":250,"props":403,"children":405},{"class":252,"line":404},18,[406],{"type":40,"tag":250,"props":407,"children":408},{},[409],{"type":45,"value":410},"    .add_edge(\"respond\", END)\n",{"type":40,"tag":250,"props":412,"children":414},{"class":252,"line":413},19,[415],{"type":40,"tag":250,"props":416,"children":417},{},[418],{"type":45,"value":419},"    .compile(checkpointer=checkpointer)  # Pass at compile time\n",{"type":40,"tag":250,"props":421,"children":423},{"class":252,"line":422},20,[424],{"type":40,"tag":250,"props":425,"children":426},{},[427],{"type":45,"value":428},")\n",{"type":40,"tag":250,"props":430,"children":432},{"class":252,"line":431},21,[433],{"type":40,"tag":250,"props":434,"children":435},{"emptyLinePlaceholder":293},[436],{"type":45,"value":296},{"type":40,"tag":250,"props":438,"children":440},{"class":252,"line":439},22,[441],{"type":40,"tag":250,"props":442,"children":443},{},[444],{"type":45,"value":445},"# ALWAYS provide thread_id\n",{"type":40,"tag":250,"props":447,"children":449},{"class":252,"line":448},23,[450],{"type":40,"tag":250,"props":451,"children":452},{},[453],{"type":45,"value":454},"config = {\"configurable\": {\"thread_id\": \"conversation-1\"}}\n",{"type":40,"tag":250,"props":456,"children":458},{"class":252,"line":457},24,[459],{"type":40,"tag":250,"props":460,"children":461},{"emptyLinePlaceholder":293},[462],{"type":45,"value":296},{"type":40,"tag":250,"props":464,"children":466},{"class":252,"line":465},25,[467],{"type":40,"tag":250,"props":468,"children":469},{},[470],{"type":45,"value":471},"result1 = graph.invoke({\"messages\": [\"Hello\"]}, config)\n",{"type":40,"tag":250,"props":473,"children":475},{"class":252,"line":474},26,[476],{"type":40,"tag":250,"props":477,"children":478},{},[479],{"type":45,"value":480},"print(len(result1[\"messages\"]))  # 2\n",{"type":40,"tag":250,"props":482,"children":484},{"class":252,"line":483},27,[485],{"type":40,"tag":250,"props":486,"children":487},{"emptyLinePlaceholder":293},[488],{"type":45,"value":296},{"type":40,"tag":250,"props":490,"children":492},{"class":252,"line":491},28,[493],{"type":40,"tag":250,"props":494,"children":495},{},[496],{"type":45,"value":497},"result2 = graph.invoke({\"messages\": [\"How are you?\"]}, config)\n",{"type":40,"tag":250,"props":499,"children":501},{"class":252,"line":500},29,[502],{"type":40,"tag":250,"props":503,"children":504},{},[505],{"type":45,"value":506},"print(len(result2[\"messages\"]))  # 4 (previous + new)\n",{"type":40,"tag":508,"props":509,"children":510},"typescript",{},[511,512],{"type":45,"value":238},{"type":40,"tag":240,"props":513,"children":516},{"className":514,"code":515,"language":508,"meta":244,"style":244},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { MemorySaver, StateGraph, StateSchema, MessagesValue, START, END } from \"@langchain\u002Flanggraph\";\nimport { HumanMessage } from \"@langchain\u002Fcore\u002Fmessages\";\n\nconst State = new StateSchema({ messages: MessagesValue });\n\nconst addMessage = async (state: typeof State.State) => {\n  return { messages: [{ role: \"assistant\", content: \"Bot response\" }] };\n};\n\nconst checkpointer = new MemorySaver();\n\nconst graph = new StateGraph(State)\n  .addNode(\"respond\", addMessage)\n  .addEdge(START, \"respond\")\n  .addEdge(\"respond\", END)\n  .compile({ checkpointer });\n\n\u002F\u002F ALWAYS provide thread_id\nconst config = { configurable: { thread_id: \"conversation-1\" } };\n\nconst result1 = await graph.invoke({ messages: [new HumanMessage(\"Hello\")] }, config);\nconsole.log(result1.messages.length);  \u002F\u002F 2\n\nconst result2 = await graph.invoke({ messages: [new HumanMessage(\"How are you?\")] }, config);\nconsole.log(result2.messages.length);  \u002F\u002F 4 (previous + new)\n",[517],{"type":40,"tag":158,"props":518,"children":519},{"__ignoreMap":244},[520,618,659,666,735,742,812,903,910,917,950,957,986,1025,1062,1098,1134,1141,1150,1214,1221,1321,1371,1378,1471],{"type":40,"tag":250,"props":521,"children":522},{"class":252,"line":253},[523,529,535,541,546,551,555,560,564,569,573,578,582,587,592,597,602,608,613],{"type":40,"tag":250,"props":524,"children":526},{"style":525},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[527],{"type":45,"value":528},"import",{"type":40,"tag":250,"props":530,"children":532},{"style":531},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[533],{"type":45,"value":534}," {",{"type":40,"tag":250,"props":536,"children":538},{"style":537},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[539],{"type":45,"value":540}," MemorySaver",{"type":40,"tag":250,"props":542,"children":543},{"style":531},[544],{"type":45,"value":545},",",{"type":40,"tag":250,"props":547,"children":548},{"style":537},[549],{"type":45,"value":550}," StateGraph",{"type":40,"tag":250,"props":552,"children":553},{"style":531},[554],{"type":45,"value":545},{"type":40,"tag":250,"props":556,"children":557},{"style":537},[558],{"type":45,"value":559}," StateSchema",{"type":40,"tag":250,"props":561,"children":562},{"style":531},[563],{"type":45,"value":545},{"type":40,"tag":250,"props":565,"children":566},{"style":537},[567],{"type":45,"value":568}," MessagesValue",{"type":40,"tag":250,"props":570,"children":571},{"style":531},[572],{"type":45,"value":545},{"type":40,"tag":250,"props":574,"children":575},{"style":537},[576],{"type":45,"value":577}," START",{"type":40,"tag":250,"props":579,"children":580},{"style":531},[581],{"type":45,"value":545},{"type":40,"tag":250,"props":583,"children":584},{"style":537},[585],{"type":45,"value":586}," END",{"type":40,"tag":250,"props":588,"children":589},{"style":531},[590],{"type":45,"value":591}," }",{"type":40,"tag":250,"props":593,"children":594},{"style":525},[595],{"type":45,"value":596}," from",{"type":40,"tag":250,"props":598,"children":599},{"style":531},[600],{"type":45,"value":601}," \"",{"type":40,"tag":250,"props":603,"children":605},{"style":604},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[606],{"type":45,"value":607},"@langchain\u002Flanggraph",{"type":40,"tag":250,"props":609,"children":610},{"style":531},[611],{"type":45,"value":612},"\"",{"type":40,"tag":250,"props":614,"children":615},{"style":531},[616],{"type":45,"value":617},";\n",{"type":40,"tag":250,"props":619,"children":620},{"class":252,"line":262},[621,625,629,634,638,642,646,651,655],{"type":40,"tag":250,"props":622,"children":623},{"style":525},[624],{"type":45,"value":528},{"type":40,"tag":250,"props":626,"children":627},{"style":531},[628],{"type":45,"value":534},{"type":40,"tag":250,"props":630,"children":631},{"style":537},[632],{"type":45,"value":633}," HumanMessage",{"type":40,"tag":250,"props":635,"children":636},{"style":531},[637],{"type":45,"value":591},{"type":40,"tag":250,"props":639,"children":640},{"style":525},[641],{"type":45,"value":596},{"type":40,"tag":250,"props":643,"children":644},{"style":531},[645],{"type":45,"value":601},{"type":40,"tag":250,"props":647,"children":648},{"style":604},[649],{"type":45,"value":650},"@langchain\u002Fcore\u002Fmessages",{"type":40,"tag":250,"props":652,"children":653},{"style":531},[654],{"type":45,"value":612},{"type":40,"tag":250,"props":656,"children":657},{"style":531},[658],{"type":45,"value":617},{"type":40,"tag":250,"props":660,"children":661},{"class":252,"line":271},[662],{"type":40,"tag":250,"props":663,"children":664},{"emptyLinePlaceholder":293},[665],{"type":45,"value":296},{"type":40,"tag":250,"props":667,"children":668},{"class":252,"line":280},[669,675,680,685,690,695,700,705,711,716,721,726,731],{"type":40,"tag":250,"props":670,"children":672},{"style":671},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[673],{"type":45,"value":674},"const",{"type":40,"tag":250,"props":676,"children":677},{"style":537},[678],{"type":45,"value":679}," State ",{"type":40,"tag":250,"props":681,"children":682},{"style":531},[683],{"type":45,"value":684},"=",{"type":40,"tag":250,"props":686,"children":687},{"style":531},[688],{"type":45,"value":689}," new",{"type":40,"tag":250,"props":691,"children":693},{"style":692},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[694],{"type":45,"value":559},{"type":40,"tag":250,"props":696,"children":697},{"style":537},[698],{"type":45,"value":699},"(",{"type":40,"tag":250,"props":701,"children":702},{"style":531},[703],{"type":45,"value":704},"{",{"type":40,"tag":250,"props":706,"children":708},{"style":707},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[709],{"type":45,"value":710}," messages",{"type":40,"tag":250,"props":712,"children":713},{"style":531},[714],{"type":45,"value":715},":",{"type":40,"tag":250,"props":717,"children":718},{"style":537},[719],{"type":45,"value":720}," MessagesValue ",{"type":40,"tag":250,"props":722,"children":723},{"style":531},[724],{"type":45,"value":725},"}",{"type":40,"tag":250,"props":727,"children":728},{"style":537},[729],{"type":45,"value":730},")",{"type":40,"tag":250,"props":732,"children":733},{"style":531},[734],{"type":45,"value":617},{"type":40,"tag":250,"props":736,"children":737},{"class":252,"line":289},[738],{"type":40,"tag":250,"props":739,"children":740},{"emptyLinePlaceholder":293},[741],{"type":45,"value":296},{"type":40,"tag":250,"props":743,"children":744},{"class":252,"line":299},[745,749,754,758,763,768,774,778,783,788,793,798,802,807],{"type":40,"tag":250,"props":746,"children":747},{"style":671},[748],{"type":45,"value":674},{"type":40,"tag":250,"props":750,"children":751},{"style":537},[752],{"type":45,"value":753}," addMessage ",{"type":40,"tag":250,"props":755,"children":756},{"style":531},[757],{"type":45,"value":684},{"type":40,"tag":250,"props":759,"children":760},{"style":671},[761],{"type":45,"value":762}," async",{"type":40,"tag":250,"props":764,"children":765},{"style":531},[766],{"type":45,"value":767}," (",{"type":40,"tag":250,"props":769,"children":771},{"style":770},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[772],{"type":45,"value":773},"state",{"type":40,"tag":250,"props":775,"children":776},{"style":531},[777],{"type":45,"value":715},{"type":40,"tag":250,"props":779,"children":780},{"style":531},[781],{"type":45,"value":782}," typeof",{"type":40,"tag":250,"props":784,"children":785},{"style":537},[786],{"type":45,"value":787}," State",{"type":40,"tag":250,"props":789,"children":790},{"style":531},[791],{"type":45,"value":792},".",{"type":40,"tag":250,"props":794,"children":795},{"style":537},[796],{"type":45,"value":797},"State",{"type":40,"tag":250,"props":799,"children":800},{"style":531},[801],{"type":45,"value":730},{"type":40,"tag":250,"props":803,"children":804},{"style":671},[805],{"type":45,"value":806}," =>",{"type":40,"tag":250,"props":808,"children":809},{"style":531},[810],{"type":45,"value":811}," {\n",{"type":40,"tag":250,"props":813,"children":814},{"class":252,"line":308},[815,820,824,828,832,837,841,846,850,854,859,863,867,872,876,880,885,889,893,898],{"type":40,"tag":250,"props":816,"children":817},{"style":525},[818],{"type":45,"value":819},"  return",{"type":40,"tag":250,"props":821,"children":822},{"style":531},[823],{"type":45,"value":534},{"type":40,"tag":250,"props":825,"children":826},{"style":707},[827],{"type":45,"value":710},{"type":40,"tag":250,"props":829,"children":830},{"style":531},[831],{"type":45,"value":715},{"type":40,"tag":250,"props":833,"children":834},{"style":707},[835],{"type":45,"value":836}," [",{"type":40,"tag":250,"props":838,"children":839},{"style":531},[840],{"type":45,"value":704},{"type":40,"tag":250,"props":842,"children":843},{"style":707},[844],{"type":45,"value":845}," role",{"type":40,"tag":250,"props":847,"children":848},{"style":531},[849],{"type":45,"value":715},{"type":40,"tag":250,"props":851,"children":852},{"style":531},[853],{"type":45,"value":601},{"type":40,"tag":250,"props":855,"children":856},{"style":604},[857],{"type":45,"value":858},"assistant",{"type":40,"tag":250,"props":860,"children":861},{"style":531},[862],{"type":45,"value":612},{"type":40,"tag":250,"props":864,"children":865},{"style":531},[866],{"type":45,"value":545},{"type":40,"tag":250,"props":868,"children":869},{"style":707},[870],{"type":45,"value":871}," content",{"type":40,"tag":250,"props":873,"children":874},{"style":531},[875],{"type":45,"value":715},{"type":40,"tag":250,"props":877,"children":878},{"style":531},[879],{"type":45,"value":601},{"type":40,"tag":250,"props":881,"children":882},{"style":604},[883],{"type":45,"value":884},"Bot response",{"type":40,"tag":250,"props":886,"children":887},{"style":531},[888],{"type":45,"value":612},{"type":40,"tag":250,"props":890,"children":891},{"style":531},[892],{"type":45,"value":591},{"type":40,"tag":250,"props":894,"children":895},{"style":707},[896],{"type":45,"value":897},"] ",{"type":40,"tag":250,"props":899,"children":900},{"style":531},[901],{"type":45,"value":902},"};\n",{"type":40,"tag":250,"props":904,"children":905},{"class":252,"line":317},[906],{"type":40,"tag":250,"props":907,"children":908},{"style":531},[909],{"type":45,"value":902},{"type":40,"tag":250,"props":911,"children":912},{"class":252,"line":325},[913],{"type":40,"tag":250,"props":914,"children":915},{"emptyLinePlaceholder":293},[916],{"type":45,"value":296},{"type":40,"tag":250,"props":918,"children":919},{"class":252,"line":334},[920,924,929,933,937,941,946],{"type":40,"tag":250,"props":921,"children":922},{"style":671},[923],{"type":45,"value":674},{"type":40,"tag":250,"props":925,"children":926},{"style":537},[927],{"type":45,"value":928}," checkpointer ",{"type":40,"tag":250,"props":930,"children":931},{"style":531},[932],{"type":45,"value":684},{"type":40,"tag":250,"props":934,"children":935},{"style":531},[936],{"type":45,"value":689},{"type":40,"tag":250,"props":938,"children":939},{"style":692},[940],{"type":45,"value":540},{"type":40,"tag":250,"props":942,"children":943},{"style":537},[944],{"type":45,"value":945},"()",{"type":40,"tag":250,"props":947,"children":948},{"style":531},[949],{"type":45,"value":617},{"type":40,"tag":250,"props":951,"children":952},{"class":252,"line":343},[953],{"type":40,"tag":250,"props":954,"children":955},{"emptyLinePlaceholder":293},[956],{"type":45,"value":296},{"type":40,"tag":250,"props":958,"children":959},{"class":252,"line":351},[960,964,969,973,977,981],{"type":40,"tag":250,"props":961,"children":962},{"style":671},[963],{"type":45,"value":674},{"type":40,"tag":250,"props":965,"children":966},{"style":537},[967],{"type":45,"value":968}," graph ",{"type":40,"tag":250,"props":970,"children":971},{"style":531},[972],{"type":45,"value":684},{"type":40,"tag":250,"props":974,"children":975},{"style":531},[976],{"type":45,"value":689},{"type":40,"tag":250,"props":978,"children":979},{"style":692},[980],{"type":45,"value":550},{"type":40,"tag":250,"props":982,"children":983},{"style":537},[984],{"type":45,"value":985},"(State)\n",{"type":40,"tag":250,"props":987,"children":988},{"class":252,"line":360},[989,994,999,1003,1007,1012,1016,1020],{"type":40,"tag":250,"props":990,"children":991},{"style":531},[992],{"type":45,"value":993},"  .",{"type":40,"tag":250,"props":995,"children":996},{"style":692},[997],{"type":45,"value":998},"addNode",{"type":40,"tag":250,"props":1000,"children":1001},{"style":537},[1002],{"type":45,"value":699},{"type":40,"tag":250,"props":1004,"children":1005},{"style":531},[1006],{"type":45,"value":612},{"type":40,"tag":250,"props":1008,"children":1009},{"style":604},[1010],{"type":45,"value":1011},"respond",{"type":40,"tag":250,"props":1013,"children":1014},{"style":531},[1015],{"type":45,"value":612},{"type":40,"tag":250,"props":1017,"children":1018},{"style":531},[1019],{"type":45,"value":545},{"type":40,"tag":250,"props":1021,"children":1022},{"style":537},[1023],{"type":45,"value":1024}," addMessage)\n",{"type":40,"tag":250,"props":1026,"children":1027},{"class":252,"line":368},[1028,1032,1037,1042,1046,1050,1054,1058],{"type":40,"tag":250,"props":1029,"children":1030},{"style":531},[1031],{"type":45,"value":993},{"type":40,"tag":250,"props":1033,"children":1034},{"style":692},[1035],{"type":45,"value":1036},"addEdge",{"type":40,"tag":250,"props":1038,"children":1039},{"style":537},[1040],{"type":45,"value":1041},"(START",{"type":40,"tag":250,"props":1043,"children":1044},{"style":531},[1045],{"type":45,"value":545},{"type":40,"tag":250,"props":1047,"children":1048},{"style":531},[1049],{"type":45,"value":601},{"type":40,"tag":250,"props":1051,"children":1052},{"style":604},[1053],{"type":45,"value":1011},{"type":40,"tag":250,"props":1055,"children":1056},{"style":531},[1057],{"type":45,"value":612},{"type":40,"tag":250,"props":1059,"children":1060},{"style":537},[1061],{"type":45,"value":428},{"type":40,"tag":250,"props":1063,"children":1064},{"class":252,"line":377},[1065,1069,1073,1077,1081,1085,1089,1093],{"type":40,"tag":250,"props":1066,"children":1067},{"style":531},[1068],{"type":45,"value":993},{"type":40,"tag":250,"props":1070,"children":1071},{"style":692},[1072],{"type":45,"value":1036},{"type":40,"tag":250,"props":1074,"children":1075},{"style":537},[1076],{"type":45,"value":699},{"type":40,"tag":250,"props":1078,"children":1079},{"style":531},[1080],{"type":45,"value":612},{"type":40,"tag":250,"props":1082,"children":1083},{"style":604},[1084],{"type":45,"value":1011},{"type":40,"tag":250,"props":1086,"children":1087},{"style":531},[1088],{"type":45,"value":612},{"type":40,"tag":250,"props":1090,"children":1091},{"style":531},[1092],{"type":45,"value":545},{"type":40,"tag":250,"props":1094,"children":1095},{"style":537},[1096],{"type":45,"value":1097}," END)\n",{"type":40,"tag":250,"props":1099,"children":1100},{"class":252,"line":386},[1101,1105,1110,1114,1118,1122,1126,1130],{"type":40,"tag":250,"props":1102,"children":1103},{"style":531},[1104],{"type":45,"value":993},{"type":40,"tag":250,"props":1106,"children":1107},{"style":692},[1108],{"type":45,"value":1109},"compile",{"type":40,"tag":250,"props":1111,"children":1112},{"style":537},[1113],{"type":45,"value":699},{"type":40,"tag":250,"props":1115,"children":1116},{"style":531},[1117],{"type":45,"value":704},{"type":40,"tag":250,"props":1119,"children":1120},{"style":537},[1121],{"type":45,"value":928},{"type":40,"tag":250,"props":1123,"children":1124},{"style":531},[1125],{"type":45,"value":725},{"type":40,"tag":250,"props":1127,"children":1128},{"style":537},[1129],{"type":45,"value":730},{"type":40,"tag":250,"props":1131,"children":1132},{"style":531},[1133],{"type":45,"value":617},{"type":40,"tag":250,"props":1135,"children":1136},{"class":252,"line":395},[1137],{"type":40,"tag":250,"props":1138,"children":1139},{"emptyLinePlaceholder":293},[1140],{"type":45,"value":296},{"type":40,"tag":250,"props":1142,"children":1143},{"class":252,"line":404},[1144],{"type":40,"tag":250,"props":1145,"children":1147},{"style":1146},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1148],{"type":45,"value":1149},"\u002F\u002F ALWAYS provide thread_id\n",{"type":40,"tag":250,"props":1151,"children":1152},{"class":252,"line":413},[1153,1157,1162,1166,1170,1175,1179,1183,1188,1192,1196,1201,1205,1209],{"type":40,"tag":250,"props":1154,"children":1155},{"style":671},[1156],{"type":45,"value":674},{"type":40,"tag":250,"props":1158,"children":1159},{"style":537},[1160],{"type":45,"value":1161}," config ",{"type":40,"tag":250,"props":1163,"children":1164},{"style":531},[1165],{"type":45,"value":684},{"type":40,"tag":250,"props":1167,"children":1168},{"style":531},[1169],{"type":45,"value":534},{"type":40,"tag":250,"props":1171,"children":1172},{"style":707},[1173],{"type":45,"value":1174}," configurable",{"type":40,"tag":250,"props":1176,"children":1177},{"style":531},[1178],{"type":45,"value":715},{"type":40,"tag":250,"props":1180,"children":1181},{"style":531},[1182],{"type":45,"value":534},{"type":40,"tag":250,"props":1184,"children":1185},{"style":707},[1186],{"type":45,"value":1187}," thread_id",{"type":40,"tag":250,"props":1189,"children":1190},{"style":531},[1191],{"type":45,"value":715},{"type":40,"tag":250,"props":1193,"children":1194},{"style":531},[1195],{"type":45,"value":601},{"type":40,"tag":250,"props":1197,"children":1198},{"style":604},[1199],{"type":45,"value":1200},"conversation-1",{"type":40,"tag":250,"props":1202,"children":1203},{"style":531},[1204],{"type":45,"value":612},{"type":40,"tag":250,"props":1206,"children":1207},{"style":531},[1208],{"type":45,"value":591},{"type":40,"tag":250,"props":1210,"children":1211},{"style":531},[1212],{"type":45,"value":1213}," };\n",{"type":40,"tag":250,"props":1215,"children":1216},{"class":252,"line":422},[1217],{"type":40,"tag":250,"props":1218,"children":1219},{"emptyLinePlaceholder":293},[1220],{"type":45,"value":296},{"type":40,"tag":250,"props":1222,"children":1223},{"class":252,"line":431},[1224,1228,1233,1237,1242,1247,1251,1256,1260,1264,1268,1272,1276,1281,1285,1289,1293,1298,1302,1307,1312,1317],{"type":40,"tag":250,"props":1225,"children":1226},{"style":671},[1227],{"type":45,"value":674},{"type":40,"tag":250,"props":1229,"children":1230},{"style":537},[1231],{"type":45,"value":1232}," result1 ",{"type":40,"tag":250,"props":1234,"children":1235},{"style":531},[1236],{"type":45,"value":684},{"type":40,"tag":250,"props":1238,"children":1239},{"style":525},[1240],{"type":45,"value":1241}," await",{"type":40,"tag":250,"props":1243,"children":1244},{"style":537},[1245],{"type":45,"value":1246}," graph",{"type":40,"tag":250,"props":1248,"children":1249},{"style":531},[1250],{"type":45,"value":792},{"type":40,"tag":250,"props":1252,"children":1253},{"style":692},[1254],{"type":45,"value":1255},"invoke",{"type":40,"tag":250,"props":1257,"children":1258},{"style":537},[1259],{"type":45,"value":699},{"type":40,"tag":250,"props":1261,"children":1262},{"style":531},[1263],{"type":45,"value":704},{"type":40,"tag":250,"props":1265,"children":1266},{"style":707},[1267],{"type":45,"value":710},{"type":40,"tag":250,"props":1269,"children":1270},{"style":531},[1271],{"type":45,"value":715},{"type":40,"tag":250,"props":1273,"children":1274},{"style":537},[1275],{"type":45,"value":836},{"type":40,"tag":250,"props":1277,"children":1278},{"style":531},[1279],{"type":45,"value":1280},"new",{"type":40,"tag":250,"props":1282,"children":1283},{"style":692},[1284],{"type":45,"value":633},{"type":40,"tag":250,"props":1286,"children":1287},{"style":537},[1288],{"type":45,"value":699},{"type":40,"tag":250,"props":1290,"children":1291},{"style":531},[1292],{"type":45,"value":612},{"type":40,"tag":250,"props":1294,"children":1295},{"style":604},[1296],{"type":45,"value":1297},"Hello",{"type":40,"tag":250,"props":1299,"children":1300},{"style":531},[1301],{"type":45,"value":612},{"type":40,"tag":250,"props":1303,"children":1304},{"style":537},[1305],{"type":45,"value":1306},")] ",{"type":40,"tag":250,"props":1308,"children":1309},{"style":531},[1310],{"type":45,"value":1311},"},",{"type":40,"tag":250,"props":1313,"children":1314},{"style":537},[1315],{"type":45,"value":1316}," config)",{"type":40,"tag":250,"props":1318,"children":1319},{"style":531},[1320],{"type":45,"value":617},{"type":40,"tag":250,"props":1322,"children":1323},{"class":252,"line":439},[1324,1329,1333,1338,1343,1347,1352,1356,1361,1366],{"type":40,"tag":250,"props":1325,"children":1326},{"style":537},[1327],{"type":45,"value":1328},"console",{"type":40,"tag":250,"props":1330,"children":1331},{"style":531},[1332],{"type":45,"value":792},{"type":40,"tag":250,"props":1334,"children":1335},{"style":692},[1336],{"type":45,"value":1337},"log",{"type":40,"tag":250,"props":1339,"children":1340},{"style":537},[1341],{"type":45,"value":1342},"(result1",{"type":40,"tag":250,"props":1344,"children":1345},{"style":531},[1346],{"type":45,"value":792},{"type":40,"tag":250,"props":1348,"children":1349},{"style":537},[1350],{"type":45,"value":1351},"messages",{"type":40,"tag":250,"props":1353,"children":1354},{"style":531},[1355],{"type":45,"value":792},{"type":40,"tag":250,"props":1357,"children":1358},{"style":537},[1359],{"type":45,"value":1360},"length)",{"type":40,"tag":250,"props":1362,"children":1363},{"style":531},[1364],{"type":45,"value":1365},";",{"type":40,"tag":250,"props":1367,"children":1368},{"style":1146},[1369],{"type":45,"value":1370},"  \u002F\u002F 2\n",{"type":40,"tag":250,"props":1372,"children":1373},{"class":252,"line":448},[1374],{"type":40,"tag":250,"props":1375,"children":1376},{"emptyLinePlaceholder":293},[1377],{"type":45,"value":296},{"type":40,"tag":250,"props":1379,"children":1380},{"class":252,"line":457},[1381,1385,1390,1394,1398,1402,1406,1410,1414,1418,1422,1426,1430,1434,1438,1442,1446,1451,1455,1459,1463,1467],{"type":40,"tag":250,"props":1382,"children":1383},{"style":671},[1384],{"type":45,"value":674},{"type":40,"tag":250,"props":1386,"children":1387},{"style":537},[1388],{"type":45,"value":1389}," result2 ",{"type":40,"tag":250,"props":1391,"children":1392},{"style":531},[1393],{"type":45,"value":684},{"type":40,"tag":250,"props":1395,"children":1396},{"style":525},[1397],{"type":45,"value":1241},{"type":40,"tag":250,"props":1399,"children":1400},{"style":537},[1401],{"type":45,"value":1246},{"type":40,"tag":250,"props":1403,"children":1404},{"style":531},[1405],{"type":45,"value":792},{"type":40,"tag":250,"props":1407,"children":1408},{"style":692},[1409],{"type":45,"value":1255},{"type":40,"tag":250,"props":1411,"children":1412},{"style":537},[1413],{"type":45,"value":699},{"type":40,"tag":250,"props":1415,"children":1416},{"style":531},[1417],{"type":45,"value":704},{"type":40,"tag":250,"props":1419,"children":1420},{"style":707},[1421],{"type":45,"value":710},{"type":40,"tag":250,"props":1423,"children":1424},{"style":531},[1425],{"type":45,"value":715},{"type":40,"tag":250,"props":1427,"children":1428},{"style":537},[1429],{"type":45,"value":836},{"type":40,"tag":250,"props":1431,"children":1432},{"style":531},[1433],{"type":45,"value":1280},{"type":40,"tag":250,"props":1435,"children":1436},{"style":692},[1437],{"type":45,"value":633},{"type":40,"tag":250,"props":1439,"children":1440},{"style":537},[1441],{"type":45,"value":699},{"type":40,"tag":250,"props":1443,"children":1444},{"style":531},[1445],{"type":45,"value":612},{"type":40,"tag":250,"props":1447,"children":1448},{"style":604},[1449],{"type":45,"value":1450},"How are you?",{"type":40,"tag":250,"props":1452,"children":1453},{"style":531},[1454],{"type":45,"value":612},{"type":40,"tag":250,"props":1456,"children":1457},{"style":537},[1458],{"type":45,"value":1306},{"type":40,"tag":250,"props":1460,"children":1461},{"style":531},[1462],{"type":45,"value":1311},{"type":40,"tag":250,"props":1464,"children":1465},{"style":537},[1466],{"type":45,"value":1316},{"type":40,"tag":250,"props":1468,"children":1469},{"style":531},[1470],{"type":45,"value":617},{"type":40,"tag":250,"props":1472,"children":1473},{"class":252,"line":465},[1474,1478,1482,1486,1491,1495,1499,1503,1507,1511],{"type":40,"tag":250,"props":1475,"children":1476},{"style":537},[1477],{"type":45,"value":1328},{"type":40,"tag":250,"props":1479,"children":1480},{"style":531},[1481],{"type":45,"value":792},{"type":40,"tag":250,"props":1483,"children":1484},{"style":692},[1485],{"type":45,"value":1337},{"type":40,"tag":250,"props":1487,"children":1488},{"style":537},[1489],{"type":45,"value":1490},"(result2",{"type":40,"tag":250,"props":1492,"children":1493},{"style":531},[1494],{"type":45,"value":792},{"type":40,"tag":250,"props":1496,"children":1497},{"style":537},[1498],{"type":45,"value":1351},{"type":40,"tag":250,"props":1500,"children":1501},{"style":531},[1502],{"type":45,"value":792},{"type":40,"tag":250,"props":1504,"children":1505},{"style":537},[1506],{"type":45,"value":1360},{"type":40,"tag":250,"props":1508,"children":1509},{"style":531},[1510],{"type":45,"value":1365},{"type":40,"tag":250,"props":1512,"children":1513},{"style":1146},[1514],{"type":45,"value":1515},"  \u002F\u002F 4 (previous + new)\n",{"type":40,"tag":1517,"props":1518,"children":1519},"ex-production-postgres",{},[1520,1594],{"type":40,"tag":234,"props":1521,"children":1522},{},[1523,1525],{"type":45,"value":1524},"\nConfigure PostgreSQL-backed checkpointing for production deployments.\n",{"type":40,"tag":240,"props":1526,"children":1528},{"className":242,"code":1527,"language":234,"meta":244,"style":244},"import os\nfrom langgraph.checkpoint.postgres import PostgresSaver\n\n# Run once during deployment (not at application startup):\n#   PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]).setup()\n\nwith PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]) as checkpointer:\n    graph = builder.compile(checkpointer=checkpointer)\n",[1529],{"type":40,"tag":158,"props":1530,"children":1531},{"__ignoreMap":244},[1532,1540,1548,1555,1563,1571,1578,1586],{"type":40,"tag":250,"props":1533,"children":1534},{"class":252,"line":253},[1535],{"type":40,"tag":250,"props":1536,"children":1537},{},[1538],{"type":45,"value":1539},"import os\n",{"type":40,"tag":250,"props":1541,"children":1542},{"class":252,"line":262},[1543],{"type":40,"tag":250,"props":1544,"children":1545},{},[1546],{"type":45,"value":1547},"from langgraph.checkpoint.postgres import PostgresSaver\n",{"type":40,"tag":250,"props":1549,"children":1550},{"class":252,"line":271},[1551],{"type":40,"tag":250,"props":1552,"children":1553},{"emptyLinePlaceholder":293},[1554],{"type":45,"value":296},{"type":40,"tag":250,"props":1556,"children":1557},{"class":252,"line":280},[1558],{"type":40,"tag":250,"props":1559,"children":1560},{},[1561],{"type":45,"value":1562},"# Run once during deployment (not at application startup):\n",{"type":40,"tag":250,"props":1564,"children":1565},{"class":252,"line":289},[1566],{"type":40,"tag":250,"props":1567,"children":1568},{},[1569],{"type":45,"value":1570},"#   PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]).setup()\n",{"type":40,"tag":250,"props":1572,"children":1573},{"class":252,"line":299},[1574],{"type":40,"tag":250,"props":1575,"children":1576},{"emptyLinePlaceholder":293},[1577],{"type":45,"value":296},{"type":40,"tag":250,"props":1579,"children":1580},{"class":252,"line":308},[1581],{"type":40,"tag":250,"props":1582,"children":1583},{},[1584],{"type":45,"value":1585},"with PostgresSaver.from_conn_string(os.environ[\"DATABASE_URL\"]) as checkpointer:\n",{"type":40,"tag":250,"props":1587,"children":1588},{"class":252,"line":317},[1589],{"type":40,"tag":250,"props":1590,"children":1591},{},[1592],{"type":45,"value":1593},"    graph = builder.compile(checkpointer=checkpointer)\n",{"type":40,"tag":508,"props":1595,"children":1596},{},[1597,1598],{"type":45,"value":1524},{"type":40,"tag":240,"props":1599,"children":1601},{"className":514,"code":1600,"language":508,"meta":244,"style":244},"import { PostgresSaver } from \"@langchain\u002Flanggraph-checkpoint-postgres\";\n\n\u002F\u002F Run once during deployment (not at application startup):\n\u002F\u002F   await PostgresSaver.fromConnString(process.env.DATABASE_URL!).setup();\n\nconst checkpointer = PostgresSaver.fromConnString(process.env.DATABASE_URL!);\nconst graph = builder.compile({ checkpointer });\n",[1602],{"type":40,"tag":158,"props":1603,"children":1604},{"__ignoreMap":244},[1605,1646,1653,1661,1669,1676,1740],{"type":40,"tag":250,"props":1606,"children":1607},{"class":252,"line":253},[1608,1612,1616,1621,1625,1629,1633,1638,1642],{"type":40,"tag":250,"props":1609,"children":1610},{"style":525},[1611],{"type":45,"value":528},{"type":40,"tag":250,"props":1613,"children":1614},{"style":531},[1615],{"type":45,"value":534},{"type":40,"tag":250,"props":1617,"children":1618},{"style":537},[1619],{"type":45,"value":1620}," PostgresSaver",{"type":40,"tag":250,"props":1622,"children":1623},{"style":531},[1624],{"type":45,"value":591},{"type":40,"tag":250,"props":1626,"children":1627},{"style":525},[1628],{"type":45,"value":596},{"type":40,"tag":250,"props":1630,"children":1631},{"style":531},[1632],{"type":45,"value":601},{"type":40,"tag":250,"props":1634,"children":1635},{"style":604},[1636],{"type":45,"value":1637},"@langchain\u002Flanggraph-checkpoint-postgres",{"type":40,"tag":250,"props":1639,"children":1640},{"style":531},[1641],{"type":45,"value":612},{"type":40,"tag":250,"props":1643,"children":1644},{"style":531},[1645],{"type":45,"value":617},{"type":40,"tag":250,"props":1647,"children":1648},{"class":252,"line":262},[1649],{"type":40,"tag":250,"props":1650,"children":1651},{"emptyLinePlaceholder":293},[1652],{"type":45,"value":296},{"type":40,"tag":250,"props":1654,"children":1655},{"class":252,"line":271},[1656],{"type":40,"tag":250,"props":1657,"children":1658},{"style":1146},[1659],{"type":45,"value":1660},"\u002F\u002F Run once during deployment (not at application startup):\n",{"type":40,"tag":250,"props":1662,"children":1663},{"class":252,"line":280},[1664],{"type":40,"tag":250,"props":1665,"children":1666},{"style":1146},[1667],{"type":45,"value":1668},"\u002F\u002F   await PostgresSaver.fromConnString(process.env.DATABASE_URL!).setup();\n",{"type":40,"tag":250,"props":1670,"children":1671},{"class":252,"line":289},[1672],{"type":40,"tag":250,"props":1673,"children":1674},{"emptyLinePlaceholder":293},[1675],{"type":45,"value":296},{"type":40,"tag":250,"props":1677,"children":1678},{"class":252,"line":299},[1679,1683,1687,1691,1695,1699,1704,1709,1713,1718,1722,1727,1732,1736],{"type":40,"tag":250,"props":1680,"children":1681},{"style":671},[1682],{"type":45,"value":674},{"type":40,"tag":250,"props":1684,"children":1685},{"style":537},[1686],{"type":45,"value":928},{"type":40,"tag":250,"props":1688,"children":1689},{"style":531},[1690],{"type":45,"value":684},{"type":40,"tag":250,"props":1692,"children":1693},{"style":537},[1694],{"type":45,"value":1620},{"type":40,"tag":250,"props":1696,"children":1697},{"style":531},[1698],{"type":45,"value":792},{"type":40,"tag":250,"props":1700,"children":1701},{"style":692},[1702],{"type":45,"value":1703},"fromConnString",{"type":40,"tag":250,"props":1705,"children":1706},{"style":537},[1707],{"type":45,"value":1708},"(process",{"type":40,"tag":250,"props":1710,"children":1711},{"style":531},[1712],{"type":45,"value":792},{"type":40,"tag":250,"props":1714,"children":1715},{"style":537},[1716],{"type":45,"value":1717},"env",{"type":40,"tag":250,"props":1719,"children":1720},{"style":531},[1721],{"type":45,"value":792},{"type":40,"tag":250,"props":1723,"children":1724},{"style":537},[1725],{"type":45,"value":1726},"DATABASE_URL",{"type":40,"tag":250,"props":1728,"children":1729},{"style":531},[1730],{"type":45,"value":1731},"!",{"type":40,"tag":250,"props":1733,"children":1734},{"style":537},[1735],{"type":45,"value":730},{"type":40,"tag":250,"props":1737,"children":1738},{"style":531},[1739],{"type":45,"value":617},{"type":40,"tag":250,"props":1741,"children":1742},{"class":252,"line":308},[1743,1747,1751,1755,1760,1764,1768,1772,1776,1780,1784,1788],{"type":40,"tag":250,"props":1744,"children":1745},{"style":671},[1746],{"type":45,"value":674},{"type":40,"tag":250,"props":1748,"children":1749},{"style":537},[1750],{"type":45,"value":968},{"type":40,"tag":250,"props":1752,"children":1753},{"style":531},[1754],{"type":45,"value":684},{"type":40,"tag":250,"props":1756,"children":1757},{"style":537},[1758],{"type":45,"value":1759}," builder",{"type":40,"tag":250,"props":1761,"children":1762},{"style":531},[1763],{"type":45,"value":792},{"type":40,"tag":250,"props":1765,"children":1766},{"style":692},[1767],{"type":45,"value":1109},{"type":40,"tag":250,"props":1769,"children":1770},{"style":537},[1771],{"type":45,"value":699},{"type":40,"tag":250,"props":1773,"children":1774},{"style":531},[1775],{"type":45,"value":704},{"type":40,"tag":250,"props":1777,"children":1778},{"style":537},[1779],{"type":45,"value":928},{"type":40,"tag":250,"props":1781,"children":1782},{"style":531},[1783],{"type":45,"value":725},{"type":40,"tag":250,"props":1785,"children":1786},{"style":537},[1787],{"type":45,"value":730},{"type":40,"tag":250,"props":1789,"children":1790},{"style":531},[1791],{"type":45,"value":617},{"type":40,"tag":219,"props":1793,"children":1794},{},[],{"type":40,"tag":223,"props":1796,"children":1798},{"id":1797},"thread-management",[1799],{"type":45,"value":1800},"Thread Management",{"type":40,"tag":1802,"props":1803,"children":1804},"ex-separate-threads",{},[1805,1879],{"type":40,"tag":234,"props":1806,"children":1807},{},[1808,1810],{"type":45,"value":1809},"\nDemonstrate isolated state between different thread IDs.\n",{"type":40,"tag":240,"props":1811,"children":1813},{"className":242,"code":1812,"language":234,"meta":244,"style":244},"# Different threads maintain separate state\nalice_config = {\"configurable\": {\"thread_id\": \"user-alice\"}}\nbob_config = {\"configurable\": {\"thread_id\": \"user-bob\"}}\n\ngraph.invoke({\"messages\": [\"Hi from Alice\"]}, alice_config)\ngraph.invoke({\"messages\": [\"Hi from Bob\"]}, bob_config)\n\n# Alice's state is isolated from Bob's\n",[1814],{"type":40,"tag":158,"props":1815,"children":1816},{"__ignoreMap":244},[1817,1825,1833,1841,1848,1856,1864,1871],{"type":40,"tag":250,"props":1818,"children":1819},{"class":252,"line":253},[1820],{"type":40,"tag":250,"props":1821,"children":1822},{},[1823],{"type":45,"value":1824},"# Different threads maintain separate state\n",{"type":40,"tag":250,"props":1826,"children":1827},{"class":252,"line":262},[1828],{"type":40,"tag":250,"props":1829,"children":1830},{},[1831],{"type":45,"value":1832},"alice_config = {\"configurable\": {\"thread_id\": \"user-alice\"}}\n",{"type":40,"tag":250,"props":1834,"children":1835},{"class":252,"line":271},[1836],{"type":40,"tag":250,"props":1837,"children":1838},{},[1839],{"type":45,"value":1840},"bob_config = {\"configurable\": {\"thread_id\": \"user-bob\"}}\n",{"type":40,"tag":250,"props":1842,"children":1843},{"class":252,"line":280},[1844],{"type":40,"tag":250,"props":1845,"children":1846},{"emptyLinePlaceholder":293},[1847],{"type":45,"value":296},{"type":40,"tag":250,"props":1849,"children":1850},{"class":252,"line":289},[1851],{"type":40,"tag":250,"props":1852,"children":1853},{},[1854],{"type":45,"value":1855},"graph.invoke({\"messages\": [\"Hi from Alice\"]}, alice_config)\n",{"type":40,"tag":250,"props":1857,"children":1858},{"class":252,"line":299},[1859],{"type":40,"tag":250,"props":1860,"children":1861},{},[1862],{"type":45,"value":1863},"graph.invoke({\"messages\": [\"Hi from Bob\"]}, bob_config)\n",{"type":40,"tag":250,"props":1865,"children":1866},{"class":252,"line":308},[1867],{"type":40,"tag":250,"props":1868,"children":1869},{"emptyLinePlaceholder":293},[1870],{"type":45,"value":296},{"type":40,"tag":250,"props":1872,"children":1873},{"class":252,"line":317},[1874],{"type":40,"tag":250,"props":1875,"children":1876},{},[1877],{"type":45,"value":1878},"# Alice's state is isolated from Bob's\n",{"type":40,"tag":508,"props":1880,"children":1881},{},[1882,1883],{"type":45,"value":1809},{"type":40,"tag":240,"props":1884,"children":1886},{"className":514,"code":1885,"language":508,"meta":244,"style":244},"\u002F\u002F Different threads maintain separate state\nconst aliceConfig = { configurable: { thread_id: \"user-alice\" } };\nconst bobConfig = { configurable: { thread_id: \"user-bob\" } };\n\nawait graph.invoke({ messages: [new HumanMessage(\"Hi from Alice\")] }, aliceConfig);\nawait graph.invoke({ messages: [new HumanMessage(\"Hi from Bob\")] }, bobConfig);\n\n\u002F\u002F Alice's state is isolated from Bob's\n",[1887],{"type":40,"tag":158,"props":1888,"children":1889},{"__ignoreMap":244},[1890,1898,1959,2020,2027,2109,2190,2197],{"type":40,"tag":250,"props":1891,"children":1892},{"class":252,"line":253},[1893],{"type":40,"tag":250,"props":1894,"children":1895},{"style":1146},[1896],{"type":45,"value":1897},"\u002F\u002F Different threads maintain separate state\n",{"type":40,"tag":250,"props":1899,"children":1900},{"class":252,"line":262},[1901,1905,1910,1914,1918,1922,1926,1930,1934,1938,1942,1947,1951,1955],{"type":40,"tag":250,"props":1902,"children":1903},{"style":671},[1904],{"type":45,"value":674},{"type":40,"tag":250,"props":1906,"children":1907},{"style":537},[1908],{"type":45,"value":1909}," aliceConfig ",{"type":40,"tag":250,"props":1911,"children":1912},{"style":531},[1913],{"type":45,"value":684},{"type":40,"tag":250,"props":1915,"children":1916},{"style":531},[1917],{"type":45,"value":534},{"type":40,"tag":250,"props":1919,"children":1920},{"style":707},[1921],{"type":45,"value":1174},{"type":40,"tag":250,"props":1923,"children":1924},{"style":531},[1925],{"type":45,"value":715},{"type":40,"tag":250,"props":1927,"children":1928},{"style":531},[1929],{"type":45,"value":534},{"type":40,"tag":250,"props":1931,"children":1932},{"style":707},[1933],{"type":45,"value":1187},{"type":40,"tag":250,"props":1935,"children":1936},{"style":531},[1937],{"type":45,"value":715},{"type":40,"tag":250,"props":1939,"children":1940},{"style":531},[1941],{"type":45,"value":601},{"type":40,"tag":250,"props":1943,"children":1944},{"style":604},[1945],{"type":45,"value":1946},"user-alice",{"type":40,"tag":250,"props":1948,"children":1949},{"style":531},[1950],{"type":45,"value":612},{"type":40,"tag":250,"props":1952,"children":1953},{"style":531},[1954],{"type":45,"value":591},{"type":40,"tag":250,"props":1956,"children":1957},{"style":531},[1958],{"type":45,"value":1213},{"type":40,"tag":250,"props":1960,"children":1961},{"class":252,"line":271},[1962,1966,1971,1975,1979,1983,1987,1991,1995,1999,2003,2008,2012,2016],{"type":40,"tag":250,"props":1963,"children":1964},{"style":671},[1965],{"type":45,"value":674},{"type":40,"tag":250,"props":1967,"children":1968},{"style":537},[1969],{"type":45,"value":1970}," bobConfig ",{"type":40,"tag":250,"props":1972,"children":1973},{"style":531},[1974],{"type":45,"value":684},{"type":40,"tag":250,"props":1976,"children":1977},{"style":531},[1978],{"type":45,"value":534},{"type":40,"tag":250,"props":1980,"children":1981},{"style":707},[1982],{"type":45,"value":1174},{"type":40,"tag":250,"props":1984,"children":1985},{"style":531},[1986],{"type":45,"value":715},{"type":40,"tag":250,"props":1988,"children":1989},{"style":531},[1990],{"type":45,"value":534},{"type":40,"tag":250,"props":1992,"children":1993},{"style":707},[1994],{"type":45,"value":1187},{"type":40,"tag":250,"props":1996,"children":1997},{"style":531},[1998],{"type":45,"value":715},{"type":40,"tag":250,"props":2000,"children":2001},{"style":531},[2002],{"type":45,"value":601},{"type":40,"tag":250,"props":2004,"children":2005},{"style":604},[2006],{"type":45,"value":2007},"user-bob",{"type":40,"tag":250,"props":2009,"children":2010},{"style":531},[2011],{"type":45,"value":612},{"type":40,"tag":250,"props":2013,"children":2014},{"style":531},[2015],{"type":45,"value":591},{"type":40,"tag":250,"props":2017,"children":2018},{"style":531},[2019],{"type":45,"value":1213},{"type":40,"tag":250,"props":2021,"children":2022},{"class":252,"line":280},[2023],{"type":40,"tag":250,"props":2024,"children":2025},{"emptyLinePlaceholder":293},[2026],{"type":45,"value":296},{"type":40,"tag":250,"props":2028,"children":2029},{"class":252,"line":289},[2030,2035,2039,2043,2047,2051,2055,2059,2063,2067,2071,2075,2079,2083,2088,2092,2096,2100,2105],{"type":40,"tag":250,"props":2031,"children":2032},{"style":525},[2033],{"type":45,"value":2034},"await",{"type":40,"tag":250,"props":2036,"children":2037},{"style":537},[2038],{"type":45,"value":1246},{"type":40,"tag":250,"props":2040,"children":2041},{"style":531},[2042],{"type":45,"value":792},{"type":40,"tag":250,"props":2044,"children":2045},{"style":692},[2046],{"type":45,"value":1255},{"type":40,"tag":250,"props":2048,"children":2049},{"style":537},[2050],{"type":45,"value":699},{"type":40,"tag":250,"props":2052,"children":2053},{"style":531},[2054],{"type":45,"value":704},{"type":40,"tag":250,"props":2056,"children":2057},{"style":707},[2058],{"type":45,"value":710},{"type":40,"tag":250,"props":2060,"children":2061},{"style":531},[2062],{"type":45,"value":715},{"type":40,"tag":250,"props":2064,"children":2065},{"style":537},[2066],{"type":45,"value":836},{"type":40,"tag":250,"props":2068,"children":2069},{"style":531},[2070],{"type":45,"value":1280},{"type":40,"tag":250,"props":2072,"children":2073},{"style":692},[2074],{"type":45,"value":633},{"type":40,"tag":250,"props":2076,"children":2077},{"style":537},[2078],{"type":45,"value":699},{"type":40,"tag":250,"props":2080,"children":2081},{"style":531},[2082],{"type":45,"value":612},{"type":40,"tag":250,"props":2084,"children":2085},{"style":604},[2086],{"type":45,"value":2087},"Hi from Alice",{"type":40,"tag":250,"props":2089,"children":2090},{"style":531},[2091],{"type":45,"value":612},{"type":40,"tag":250,"props":2093,"children":2094},{"style":537},[2095],{"type":45,"value":1306},{"type":40,"tag":250,"props":2097,"children":2098},{"style":531},[2099],{"type":45,"value":1311},{"type":40,"tag":250,"props":2101,"children":2102},{"style":537},[2103],{"type":45,"value":2104}," aliceConfig)",{"type":40,"tag":250,"props":2106,"children":2107},{"style":531},[2108],{"type":45,"value":617},{"type":40,"tag":250,"props":2110,"children":2111},{"class":252,"line":299},[2112,2116,2120,2124,2128,2132,2136,2140,2144,2148,2152,2156,2160,2164,2169,2173,2177,2181,2186],{"type":40,"tag":250,"props":2113,"children":2114},{"style":525},[2115],{"type":45,"value":2034},{"type":40,"tag":250,"props":2117,"children":2118},{"style":537},[2119],{"type":45,"value":1246},{"type":40,"tag":250,"props":2121,"children":2122},{"style":531},[2123],{"type":45,"value":792},{"type":40,"tag":250,"props":2125,"children":2126},{"style":692},[2127],{"type":45,"value":1255},{"type":40,"tag":250,"props":2129,"children":2130},{"style":537},[2131],{"type":45,"value":699},{"type":40,"tag":250,"props":2133,"children":2134},{"style":531},[2135],{"type":45,"value":704},{"type":40,"tag":250,"props":2137,"children":2138},{"style":707},[2139],{"type":45,"value":710},{"type":40,"tag":250,"props":2141,"children":2142},{"style":531},[2143],{"type":45,"value":715},{"type":40,"tag":250,"props":2145,"children":2146},{"style":537},[2147],{"type":45,"value":836},{"type":40,"tag":250,"props":2149,"children":2150},{"style":531},[2151],{"type":45,"value":1280},{"type":40,"tag":250,"props":2153,"children":2154},{"style":692},[2155],{"type":45,"value":633},{"type":40,"tag":250,"props":2157,"children":2158},{"style":537},[2159],{"type":45,"value":699},{"type":40,"tag":250,"props":2161,"children":2162},{"style":531},[2163],{"type":45,"value":612},{"type":40,"tag":250,"props":2165,"children":2166},{"style":604},[2167],{"type":45,"value":2168},"Hi from Bob",{"type":40,"tag":250,"props":2170,"children":2171},{"style":531},[2172],{"type":45,"value":612},{"type":40,"tag":250,"props":2174,"children":2175},{"style":537},[2176],{"type":45,"value":1306},{"type":40,"tag":250,"props":2178,"children":2179},{"style":531},[2180],{"type":45,"value":1311},{"type":40,"tag":250,"props":2182,"children":2183},{"style":537},[2184],{"type":45,"value":2185}," bobConfig)",{"type":40,"tag":250,"props":2187,"children":2188},{"style":531},[2189],{"type":45,"value":617},{"type":40,"tag":250,"props":2191,"children":2192},{"class":252,"line":308},[2193],{"type":40,"tag":250,"props":2194,"children":2195},{"emptyLinePlaceholder":293},[2196],{"type":45,"value":296},{"type":40,"tag":250,"props":2198,"children":2199},{"class":252,"line":317},[2200],{"type":40,"tag":250,"props":2201,"children":2202},{"style":1146},[2203],{"type":45,"value":2204},"\u002F\u002F Alice's state is isolated from Bob's\n",{"type":40,"tag":219,"props":2206,"children":2207},{},[],{"type":40,"tag":223,"props":2209,"children":2211},{"id":2210},"state-history-time-travel",[2212],{"type":45,"value":2213},"State History & Time Travel",{"type":40,"tag":2215,"props":2216,"children":2217},"ex-resume-from-checkpoint",{},[2218,2338],{"type":40,"tag":234,"props":2219,"children":2220},{},[2221,2223],{"type":45,"value":2222},"\nTime travel: browse checkpoint history and replay or fork from a past state.\n",{"type":40,"tag":240,"props":2224,"children":2226},{"className":242,"code":2225,"language":234,"meta":244,"style":244},"config = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\nresult = graph.invoke({\"messages\": [\"start\"]}, config)\n\n# Browse checkpoint history\nstates = list(graph.get_state_history(config))\n\n# Replay from a past checkpoint\npast = states[-2]\nresult = graph.invoke(None, past.config)  # None = resume from checkpoint\n\n# Or fork: update state at a past checkpoint, then resume\nfork_config = graph.update_state(past.config, {\"messages\": [\"edited\"]})\nresult = graph.invoke(None, fork_config)\n",[2227],{"type":40,"tag":158,"props":2228,"children":2229},{"__ignoreMap":244},[2230,2238,2245,2253,2260,2268,2276,2283,2291,2299,2307,2314,2322,2330],{"type":40,"tag":250,"props":2231,"children":2232},{"class":252,"line":253},[2233],{"type":40,"tag":250,"props":2234,"children":2235},{},[2236],{"type":45,"value":2237},"config = {\"configurable\": {\"thread_id\": \"session-1\"}}\n",{"type":40,"tag":250,"props":2239,"children":2240},{"class":252,"line":262},[2241],{"type":40,"tag":250,"props":2242,"children":2243},{"emptyLinePlaceholder":293},[2244],{"type":45,"value":296},{"type":40,"tag":250,"props":2246,"children":2247},{"class":252,"line":271},[2248],{"type":40,"tag":250,"props":2249,"children":2250},{},[2251],{"type":45,"value":2252},"result = graph.invoke({\"messages\": [\"start\"]}, config)\n",{"type":40,"tag":250,"props":2254,"children":2255},{"class":252,"line":280},[2256],{"type":40,"tag":250,"props":2257,"children":2258},{"emptyLinePlaceholder":293},[2259],{"type":45,"value":296},{"type":40,"tag":250,"props":2261,"children":2262},{"class":252,"line":289},[2263],{"type":40,"tag":250,"props":2264,"children":2265},{},[2266],{"type":45,"value":2267},"# Browse checkpoint history\n",{"type":40,"tag":250,"props":2269,"children":2270},{"class":252,"line":299},[2271],{"type":40,"tag":250,"props":2272,"children":2273},{},[2274],{"type":45,"value":2275},"states = list(graph.get_state_history(config))\n",{"type":40,"tag":250,"props":2277,"children":2278},{"class":252,"line":308},[2279],{"type":40,"tag":250,"props":2280,"children":2281},{"emptyLinePlaceholder":293},[2282],{"type":45,"value":296},{"type":40,"tag":250,"props":2284,"children":2285},{"class":252,"line":317},[2286],{"type":40,"tag":250,"props":2287,"children":2288},{},[2289],{"type":45,"value":2290},"# Replay from a past checkpoint\n",{"type":40,"tag":250,"props":2292,"children":2293},{"class":252,"line":325},[2294],{"type":40,"tag":250,"props":2295,"children":2296},{},[2297],{"type":45,"value":2298},"past = states[-2]\n",{"type":40,"tag":250,"props":2300,"children":2301},{"class":252,"line":334},[2302],{"type":40,"tag":250,"props":2303,"children":2304},{},[2305],{"type":45,"value":2306},"result = graph.invoke(None, past.config)  # None = resume from checkpoint\n",{"type":40,"tag":250,"props":2308,"children":2309},{"class":252,"line":343},[2310],{"type":40,"tag":250,"props":2311,"children":2312},{"emptyLinePlaceholder":293},[2313],{"type":45,"value":296},{"type":40,"tag":250,"props":2315,"children":2316},{"class":252,"line":351},[2317],{"type":40,"tag":250,"props":2318,"children":2319},{},[2320],{"type":45,"value":2321},"# Or fork: update state at a past checkpoint, then resume\n",{"type":40,"tag":250,"props":2323,"children":2324},{"class":252,"line":360},[2325],{"type":40,"tag":250,"props":2326,"children":2327},{},[2328],{"type":45,"value":2329},"fork_config = graph.update_state(past.config, {\"messages\": [\"edited\"]})\n",{"type":40,"tag":250,"props":2331,"children":2332},{"class":252,"line":368},[2333],{"type":40,"tag":250,"props":2334,"children":2335},{},[2336],{"type":45,"value":2337},"result = graph.invoke(None, fork_config)\n",{"type":40,"tag":508,"props":2339,"children":2340},{},[2341,2342],{"type":45,"value":2222},{"type":40,"tag":240,"props":2343,"children":2345},{"className":514,"code":2344,"language":508,"meta":244,"style":244},"const config = { configurable: { thread_id: \"session-1\" } };\n\nconst result = await graph.invoke({ messages: [\"start\"] }, config);\n\n\u002F\u002F Browse checkpoint history (async iterable, collect to array)\nconst states: Awaited\u003CReturnType\u003Ctypeof graph.getState>>[] = [];\nfor await (const state of graph.getStateHistory(config)) {\n  states.push(state);\n}\n\n\u002F\u002F Replay from a past checkpoint\nconst past = states[states.length - 2];\nconst replayed = await graph.invoke(null, past.config);  \u002F\u002F null = resume from checkpoint\n\n\u002F\u002F Or fork: update state at a past checkpoint, then resume\nconst forkConfig = await graph.updateState(past.config, { messages: [\"edited\"] });\nconst forked = await graph.invoke(null, forkConfig);\n",[2346],{"type":40,"tag":158,"props":2347,"children":2348},{"__ignoreMap":244},[2349,2409,2416,2497,2504,2512,2585,2638,2671,2679,2686,2694,2744,2808,2815,2823,2919],{"type":40,"tag":250,"props":2350,"children":2351},{"class":252,"line":253},[2352,2356,2360,2364,2368,2372,2376,2380,2384,2388,2392,2397,2401,2405],{"type":40,"tag":250,"props":2353,"children":2354},{"style":671},[2355],{"type":45,"value":674},{"type":40,"tag":250,"props":2357,"children":2358},{"style":537},[2359],{"type":45,"value":1161},{"type":40,"tag":250,"props":2361,"children":2362},{"style":531},[2363],{"type":45,"value":684},{"type":40,"tag":250,"props":2365,"children":2366},{"style":531},[2367],{"type":45,"value":534},{"type":40,"tag":250,"props":2369,"children":2370},{"style":707},[2371],{"type":45,"value":1174},{"type":40,"tag":250,"props":2373,"children":2374},{"style":531},[2375],{"type":45,"value":715},{"type":40,"tag":250,"props":2377,"children":2378},{"style":531},[2379],{"type":45,"value":534},{"type":40,"tag":250,"props":2381,"children":2382},{"style":707},[2383],{"type":45,"value":1187},{"type":40,"tag":250,"props":2385,"children":2386},{"style":531},[2387],{"type":45,"value":715},{"type":40,"tag":250,"props":2389,"children":2390},{"style":531},[2391],{"type":45,"value":601},{"type":40,"tag":250,"props":2393,"children":2394},{"style":604},[2395],{"type":45,"value":2396},"session-1",{"type":40,"tag":250,"props":2398,"children":2399},{"style":531},[2400],{"type":45,"value":612},{"type":40,"tag":250,"props":2402,"children":2403},{"style":531},[2404],{"type":45,"value":591},{"type":40,"tag":250,"props":2406,"children":2407},{"style":531},[2408],{"type":45,"value":1213},{"type":40,"tag":250,"props":2410,"children":2411},{"class":252,"line":262},[2412],{"type":40,"tag":250,"props":2413,"children":2414},{"emptyLinePlaceholder":293},[2415],{"type":45,"value":296},{"type":40,"tag":250,"props":2417,"children":2418},{"class":252,"line":271},[2419,2423,2428,2432,2436,2440,2444,2448,2452,2456,2460,2464,2468,2472,2477,2481,2485,2489,2493],{"type":40,"tag":250,"props":2420,"children":2421},{"style":671},[2422],{"type":45,"value":674},{"type":40,"tag":250,"props":2424,"children":2425},{"style":537},[2426],{"type":45,"value":2427}," result ",{"type":40,"tag":250,"props":2429,"children":2430},{"style":531},[2431],{"type":45,"value":684},{"type":40,"tag":250,"props":2433,"children":2434},{"style":525},[2435],{"type":45,"value":1241},{"type":40,"tag":250,"props":2437,"children":2438},{"style":537},[2439],{"type":45,"value":1246},{"type":40,"tag":250,"props":2441,"children":2442},{"style":531},[2443],{"type":45,"value":792},{"type":40,"tag":250,"props":2445,"children":2446},{"style":692},[2447],{"type":45,"value":1255},{"type":40,"tag":250,"props":2449,"children":2450},{"style":537},[2451],{"type":45,"value":699},{"type":40,"tag":250,"props":2453,"children":2454},{"style":531},[2455],{"type":45,"value":704},{"type":40,"tag":250,"props":2457,"children":2458},{"style":707},[2459],{"type":45,"value":710},{"type":40,"tag":250,"props":2461,"children":2462},{"style":531},[2463],{"type":45,"value":715},{"type":40,"tag":250,"props":2465,"children":2466},{"style":537},[2467],{"type":45,"value":836},{"type":40,"tag":250,"props":2469,"children":2470},{"style":531},[2471],{"type":45,"value":612},{"type":40,"tag":250,"props":2473,"children":2474},{"style":604},[2475],{"type":45,"value":2476},"start",{"type":40,"tag":250,"props":2478,"children":2479},{"style":531},[2480],{"type":45,"value":612},{"type":40,"tag":250,"props":2482,"children":2483},{"style":537},[2484],{"type":45,"value":897},{"type":40,"tag":250,"props":2486,"children":2487},{"style":531},[2488],{"type":45,"value":1311},{"type":40,"tag":250,"props":2490,"children":2491},{"style":537},[2492],{"type":45,"value":1316},{"type":40,"tag":250,"props":2494,"children":2495},{"style":531},[2496],{"type":45,"value":617},{"type":40,"tag":250,"props":2498,"children":2499},{"class":252,"line":280},[2500],{"type":40,"tag":250,"props":2501,"children":2502},{"emptyLinePlaceholder":293},[2503],{"type":45,"value":296},{"type":40,"tag":250,"props":2505,"children":2506},{"class":252,"line":289},[2507],{"type":40,"tag":250,"props":2508,"children":2509},{"style":1146},[2510],{"type":45,"value":2511},"\u002F\u002F Browse checkpoint history (async iterable, collect to array)\n",{"type":40,"tag":250,"props":2513,"children":2514},{"class":252,"line":299},[2515,2519,2524,2528,2534,2539,2544,2549,2553,2557,2562,2567,2572,2576,2581],{"type":40,"tag":250,"props":2516,"children":2517},{"style":671},[2518],{"type":45,"value":674},{"type":40,"tag":250,"props":2520,"children":2521},{"style":537},[2522],{"type":45,"value":2523}," states",{"type":40,"tag":250,"props":2525,"children":2526},{"style":531},[2527],{"type":45,"value":715},{"type":40,"tag":250,"props":2529,"children":2531},{"style":2530},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2532],{"type":45,"value":2533}," Awaited",{"type":40,"tag":250,"props":2535,"children":2536},{"style":531},[2537],{"type":45,"value":2538},"\u003C",{"type":40,"tag":250,"props":2540,"children":2541},{"style":2530},[2542],{"type":45,"value":2543},"ReturnType",{"type":40,"tag":250,"props":2545,"children":2546},{"style":531},[2547],{"type":45,"value":2548},"\u003Ctypeof",{"type":40,"tag":250,"props":2550,"children":2551},{"style":537},[2552],{"type":45,"value":1246},{"type":40,"tag":250,"props":2554,"children":2555},{"style":531},[2556],{"type":45,"value":792},{"type":40,"tag":250,"props":2558,"children":2559},{"style":537},[2560],{"type":45,"value":2561},"getState",{"type":40,"tag":250,"props":2563,"children":2564},{"style":531},[2565],{"type":45,"value":2566},">>",{"type":40,"tag":250,"props":2568,"children":2569},{"style":537},[2570],{"type":45,"value":2571},"[] ",{"type":40,"tag":250,"props":2573,"children":2574},{"style":531},[2575],{"type":45,"value":684},{"type":40,"tag":250,"props":2577,"children":2578},{"style":537},[2579],{"type":45,"value":2580}," []",{"type":40,"tag":250,"props":2582,"children":2583},{"style":531},[2584],{"type":45,"value":617},{"type":40,"tag":250,"props":2586,"children":2587},{"class":252,"line":308},[2588,2593,2597,2601,2605,2610,2615,2619,2623,2628,2633],{"type":40,"tag":250,"props":2589,"children":2590},{"style":525},[2591],{"type":45,"value":2592},"for",{"type":40,"tag":250,"props":2594,"children":2595},{"style":525},[2596],{"type":45,"value":1241},{"type":40,"tag":250,"props":2598,"children":2599},{"style":537},[2600],{"type":45,"value":767},{"type":40,"tag":250,"props":2602,"children":2603},{"style":671},[2604],{"type":45,"value":674},{"type":40,"tag":250,"props":2606,"children":2607},{"style":537},[2608],{"type":45,"value":2609}," state ",{"type":40,"tag":250,"props":2611,"children":2612},{"style":531},[2613],{"type":45,"value":2614},"of",{"type":40,"tag":250,"props":2616,"children":2617},{"style":537},[2618],{"type":45,"value":1246},{"type":40,"tag":250,"props":2620,"children":2621},{"style":531},[2622],{"type":45,"value":792},{"type":40,"tag":250,"props":2624,"children":2625},{"style":692},[2626],{"type":45,"value":2627},"getStateHistory",{"type":40,"tag":250,"props":2629,"children":2630},{"style":537},[2631],{"type":45,"value":2632},"(config)) ",{"type":40,"tag":250,"props":2634,"children":2635},{"style":531},[2636],{"type":45,"value":2637},"{\n",{"type":40,"tag":250,"props":2639,"children":2640},{"class":252,"line":317},[2641,2646,2650,2655,2659,2663,2667],{"type":40,"tag":250,"props":2642,"children":2643},{"style":537},[2644],{"type":45,"value":2645},"  states",{"type":40,"tag":250,"props":2647,"children":2648},{"style":531},[2649],{"type":45,"value":792},{"type":40,"tag":250,"props":2651,"children":2652},{"style":692},[2653],{"type":45,"value":2654},"push",{"type":40,"tag":250,"props":2656,"children":2657},{"style":707},[2658],{"type":45,"value":699},{"type":40,"tag":250,"props":2660,"children":2661},{"style":537},[2662],{"type":45,"value":773},{"type":40,"tag":250,"props":2664,"children":2665},{"style":707},[2666],{"type":45,"value":730},{"type":40,"tag":250,"props":2668,"children":2669},{"style":531},[2670],{"type":45,"value":617},{"type":40,"tag":250,"props":2672,"children":2673},{"class":252,"line":325},[2674],{"type":40,"tag":250,"props":2675,"children":2676},{"style":531},[2677],{"type":45,"value":2678},"}\n",{"type":40,"tag":250,"props":2680,"children":2681},{"class":252,"line":334},[2682],{"type":40,"tag":250,"props":2683,"children":2684},{"emptyLinePlaceholder":293},[2685],{"type":45,"value":296},{"type":40,"tag":250,"props":2687,"children":2688},{"class":252,"line":343},[2689],{"type":40,"tag":250,"props":2690,"children":2691},{"style":1146},[2692],{"type":45,"value":2693},"\u002F\u002F Replay from a past checkpoint\n",{"type":40,"tag":250,"props":2695,"children":2696},{"class":252,"line":351},[2697,2701,2706,2710,2715,2719,2724,2729,2735,2740],{"type":40,"tag":250,"props":2698,"children":2699},{"style":671},[2700],{"type":45,"value":674},{"type":40,"tag":250,"props":2702,"children":2703},{"style":537},[2704],{"type":45,"value":2705}," past ",{"type":40,"tag":250,"props":2707,"children":2708},{"style":531},[2709],{"type":45,"value":684},{"type":40,"tag":250,"props":2711,"children":2712},{"style":537},[2713],{"type":45,"value":2714}," states[states",{"type":40,"tag":250,"props":2716,"children":2717},{"style":531},[2718],{"type":45,"value":792},{"type":40,"tag":250,"props":2720,"children":2721},{"style":537},[2722],{"type":45,"value":2723},"length ",{"type":40,"tag":250,"props":2725,"children":2726},{"style":531},[2727],{"type":45,"value":2728},"-",{"type":40,"tag":250,"props":2730,"children":2732},{"style":2731},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2733],{"type":45,"value":2734}," 2",{"type":40,"tag":250,"props":2736,"children":2737},{"style":537},[2738],{"type":45,"value":2739},"]",{"type":40,"tag":250,"props":2741,"children":2742},{"style":531},[2743],{"type":45,"value":617},{"type":40,"tag":250,"props":2745,"children":2746},{"class":252,"line":360},[2747,2751,2756,2760,2764,2768,2772,2776,2780,2785,2790,2794,2799,2803],{"type":40,"tag":250,"props":2748,"children":2749},{"style":671},[2750],{"type":45,"value":674},{"type":40,"tag":250,"props":2752,"children":2753},{"style":537},[2754],{"type":45,"value":2755}," replayed ",{"type":40,"tag":250,"props":2757,"children":2758},{"style":531},[2759],{"type":45,"value":684},{"type":40,"tag":250,"props":2761,"children":2762},{"style":525},[2763],{"type":45,"value":1241},{"type":40,"tag":250,"props":2765,"children":2766},{"style":537},[2767],{"type":45,"value":1246},{"type":40,"tag":250,"props":2769,"children":2770},{"style":531},[2771],{"type":45,"value":792},{"type":40,"tag":250,"props":2773,"children":2774},{"style":692},[2775],{"type":45,"value":1255},{"type":40,"tag":250,"props":2777,"children":2778},{"style":537},[2779],{"type":45,"value":699},{"type":40,"tag":250,"props":2781,"children":2782},{"style":531},[2783],{"type":45,"value":2784},"null,",{"type":40,"tag":250,"props":2786,"children":2787},{"style":537},[2788],{"type":45,"value":2789}," past",{"type":40,"tag":250,"props":2791,"children":2792},{"style":531},[2793],{"type":45,"value":792},{"type":40,"tag":250,"props":2795,"children":2796},{"style":537},[2797],{"type":45,"value":2798},"config)",{"type":40,"tag":250,"props":2800,"children":2801},{"style":531},[2802],{"type":45,"value":1365},{"type":40,"tag":250,"props":2804,"children":2805},{"style":1146},[2806],{"type":45,"value":2807},"  \u002F\u002F null = resume from checkpoint\n",{"type":40,"tag":250,"props":2809,"children":2810},{"class":252,"line":368},[2811],{"type":40,"tag":250,"props":2812,"children":2813},{"emptyLinePlaceholder":293},[2814],{"type":45,"value":296},{"type":40,"tag":250,"props":2816,"children":2817},{"class":252,"line":377},[2818],{"type":40,"tag":250,"props":2819,"children":2820},{"style":1146},[2821],{"type":45,"value":2822},"\u002F\u002F Or fork: update state at a past checkpoint, then resume\n",{"type":40,"tag":250,"props":2824,"children":2825},{"class":252,"line":386},[2826,2830,2835,2839,2843,2847,2851,2856,2861,2865,2870,2874,2878,2882,2886,2890,2894,2899,2903,2907,2911,2915],{"type":40,"tag":250,"props":2827,"children":2828},{"style":671},[2829],{"type":45,"value":674},{"type":40,"tag":250,"props":2831,"children":2832},{"style":537},[2833],{"type":45,"value":2834}," forkConfig ",{"type":40,"tag":250,"props":2836,"children":2837},{"style":531},[2838],{"type":45,"value":684},{"type":40,"tag":250,"props":2840,"children":2841},{"style":525},[2842],{"type":45,"value":1241},{"type":40,"tag":250,"props":2844,"children":2845},{"style":537},[2846],{"type":45,"value":1246},{"type":40,"tag":250,"props":2848,"children":2849},{"style":531},[2850],{"type":45,"value":792},{"type":40,"tag":250,"props":2852,"children":2853},{"style":692},[2854],{"type":45,"value":2855},"updateState",{"type":40,"tag":250,"props":2857,"children":2858},{"style":537},[2859],{"type":45,"value":2860},"(past",{"type":40,"tag":250,"props":2862,"children":2863},{"style":531},[2864],{"type":45,"value":792},{"type":40,"tag":250,"props":2866,"children":2867},{"style":537},[2868],{"type":45,"value":2869},"config",{"type":40,"tag":250,"props":2871,"children":2872},{"style":531},[2873],{"type":45,"value":545},{"type":40,"tag":250,"props":2875,"children":2876},{"style":531},[2877],{"type":45,"value":534},{"type":40,"tag":250,"props":2879,"children":2880},{"style":707},[2881],{"type":45,"value":710},{"type":40,"tag":250,"props":2883,"children":2884},{"style":531},[2885],{"type":45,"value":715},{"type":40,"tag":250,"props":2887,"children":2888},{"style":537},[2889],{"type":45,"value":836},{"type":40,"tag":250,"props":2891,"children":2892},{"style":531},[2893],{"type":45,"value":612},{"type":40,"tag":250,"props":2895,"children":2896},{"style":604},[2897],{"type":45,"value":2898},"edited",{"type":40,"tag":250,"props":2900,"children":2901},{"style":531},[2902],{"type":45,"value":612},{"type":40,"tag":250,"props":2904,"children":2905},{"style":537},[2906],{"type":45,"value":897},{"type":40,"tag":250,"props":2908,"children":2909},{"style":531},[2910],{"type":45,"value":725},{"type":40,"tag":250,"props":2912,"children":2913},{"style":537},[2914],{"type":45,"value":730},{"type":40,"tag":250,"props":2916,"children":2917},{"style":531},[2918],{"type":45,"value":617},{"type":40,"tag":250,"props":2920,"children":2921},{"class":252,"line":395},[2922,2926,2931,2935,2939,2943,2947,2951,2955,2959,2964],{"type":40,"tag":250,"props":2923,"children":2924},{"style":671},[2925],{"type":45,"value":674},{"type":40,"tag":250,"props":2927,"children":2928},{"style":537},[2929],{"type":45,"value":2930}," forked ",{"type":40,"tag":250,"props":2932,"children":2933},{"style":531},[2934],{"type":45,"value":684},{"type":40,"tag":250,"props":2936,"children":2937},{"style":525},[2938],{"type":45,"value":1241},{"type":40,"tag":250,"props":2940,"children":2941},{"style":537},[2942],{"type":45,"value":1246},{"type":40,"tag":250,"props":2944,"children":2945},{"style":531},[2946],{"type":45,"value":792},{"type":40,"tag":250,"props":2948,"children":2949},{"style":692},[2950],{"type":45,"value":1255},{"type":40,"tag":250,"props":2952,"children":2953},{"style":537},[2954],{"type":45,"value":699},{"type":40,"tag":250,"props":2956,"children":2957},{"style":531},[2958],{"type":45,"value":2784},{"type":40,"tag":250,"props":2960,"children":2961},{"style":537},[2962],{"type":45,"value":2963}," forkConfig)",{"type":40,"tag":250,"props":2965,"children":2966},{"style":531},[2967],{"type":45,"value":617},{"type":40,"tag":2969,"props":2970,"children":2971},"ex-update-state",{},[2972,3037],{"type":40,"tag":234,"props":2973,"children":2974},{},[2975,2977],{"type":45,"value":2976},"\nManually update graph state before resuming execution.\n",{"type":40,"tag":240,"props":2978,"children":2980},{"className":242,"code":2979,"language":234,"meta":244,"style":244},"config = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\n# Modify state before resuming\ngraph.update_state(config, {\"data\": \"manually_updated\"})\n\n# Resume with updated state\nresult = graph.invoke(None, config)\n",[2981],{"type":40,"tag":158,"props":2982,"children":2983},{"__ignoreMap":244},[2984,2991,2998,3006,3014,3021,3029],{"type":40,"tag":250,"props":2985,"children":2986},{"class":252,"line":253},[2987],{"type":40,"tag":250,"props":2988,"children":2989},{},[2990],{"type":45,"value":2237},{"type":40,"tag":250,"props":2992,"children":2993},{"class":252,"line":262},[2994],{"type":40,"tag":250,"props":2995,"children":2996},{"emptyLinePlaceholder":293},[2997],{"type":45,"value":296},{"type":40,"tag":250,"props":2999,"children":3000},{"class":252,"line":271},[3001],{"type":40,"tag":250,"props":3002,"children":3003},{},[3004],{"type":45,"value":3005},"# Modify state before resuming\n",{"type":40,"tag":250,"props":3007,"children":3008},{"class":252,"line":280},[3009],{"type":40,"tag":250,"props":3010,"children":3011},{},[3012],{"type":45,"value":3013},"graph.update_state(config, {\"data\": \"manually_updated\"})\n",{"type":40,"tag":250,"props":3015,"children":3016},{"class":252,"line":289},[3017],{"type":40,"tag":250,"props":3018,"children":3019},{"emptyLinePlaceholder":293},[3020],{"type":45,"value":296},{"type":40,"tag":250,"props":3022,"children":3023},{"class":252,"line":299},[3024],{"type":40,"tag":250,"props":3025,"children":3026},{},[3027],{"type":45,"value":3028},"# Resume with updated state\n",{"type":40,"tag":250,"props":3030,"children":3031},{"class":252,"line":308},[3032],{"type":40,"tag":250,"props":3033,"children":3034},{},[3035],{"type":45,"value":3036},"result = graph.invoke(None, config)\n",{"type":40,"tag":508,"props":3038,"children":3039},{},[3040,3041],{"type":45,"value":2976},{"type":40,"tag":240,"props":3042,"children":3044},{"className":514,"code":3043,"language":508,"meta":244,"style":244},"const config = { configurable: { thread_id: \"session-1\" } };\n\n\u002F\u002F Modify state before resuming\nawait graph.updateState(config, { data: \"manually_updated\" });\n\n\u002F\u002F Resume with updated state\nconst result = await graph.invoke(null, config);\n",[3045],{"type":40,"tag":158,"props":3046,"children":3047},{"__ignoreMap":244},[3048,3107,3114,3122,3188,3195,3203],{"type":40,"tag":250,"props":3049,"children":3050},{"class":252,"line":253},[3051,3055,3059,3063,3067,3071,3075,3079,3083,3087,3091,3095,3099,3103],{"type":40,"tag":250,"props":3052,"children":3053},{"style":671},[3054],{"type":45,"value":674},{"type":40,"tag":250,"props":3056,"children":3057},{"style":537},[3058],{"type":45,"value":1161},{"type":40,"tag":250,"props":3060,"children":3061},{"style":531},[3062],{"type":45,"value":684},{"type":40,"tag":250,"props":3064,"children":3065},{"style":531},[3066],{"type":45,"value":534},{"type":40,"tag":250,"props":3068,"children":3069},{"style":707},[3070],{"type":45,"value":1174},{"type":40,"tag":250,"props":3072,"children":3073},{"style":531},[3074],{"type":45,"value":715},{"type":40,"tag":250,"props":3076,"children":3077},{"style":531},[3078],{"type":45,"value":534},{"type":40,"tag":250,"props":3080,"children":3081},{"style":707},[3082],{"type":45,"value":1187},{"type":40,"tag":250,"props":3084,"children":3085},{"style":531},[3086],{"type":45,"value":715},{"type":40,"tag":250,"props":3088,"children":3089},{"style":531},[3090],{"type":45,"value":601},{"type":40,"tag":250,"props":3092,"children":3093},{"style":604},[3094],{"type":45,"value":2396},{"type":40,"tag":250,"props":3096,"children":3097},{"style":531},[3098],{"type":45,"value":612},{"type":40,"tag":250,"props":3100,"children":3101},{"style":531},[3102],{"type":45,"value":591},{"type":40,"tag":250,"props":3104,"children":3105},{"style":531},[3106],{"type":45,"value":1213},{"type":40,"tag":250,"props":3108,"children":3109},{"class":252,"line":262},[3110],{"type":40,"tag":250,"props":3111,"children":3112},{"emptyLinePlaceholder":293},[3113],{"type":45,"value":296},{"type":40,"tag":250,"props":3115,"children":3116},{"class":252,"line":271},[3117],{"type":40,"tag":250,"props":3118,"children":3119},{"style":1146},[3120],{"type":45,"value":3121},"\u002F\u002F Modify state before resuming\n",{"type":40,"tag":250,"props":3123,"children":3124},{"class":252,"line":280},[3125,3129,3133,3137,3141,3146,3150,3154,3159,3163,3167,3172,3176,3180,3184],{"type":40,"tag":250,"props":3126,"children":3127},{"style":525},[3128],{"type":45,"value":2034},{"type":40,"tag":250,"props":3130,"children":3131},{"style":537},[3132],{"type":45,"value":1246},{"type":40,"tag":250,"props":3134,"children":3135},{"style":531},[3136],{"type":45,"value":792},{"type":40,"tag":250,"props":3138,"children":3139},{"style":692},[3140],{"type":45,"value":2855},{"type":40,"tag":250,"props":3142,"children":3143},{"style":537},[3144],{"type":45,"value":3145},"(config",{"type":40,"tag":250,"props":3147,"children":3148},{"style":531},[3149],{"type":45,"value":545},{"type":40,"tag":250,"props":3151,"children":3152},{"style":531},[3153],{"type":45,"value":534},{"type":40,"tag":250,"props":3155,"children":3156},{"style":707},[3157],{"type":45,"value":3158}," data",{"type":40,"tag":250,"props":3160,"children":3161},{"style":531},[3162],{"type":45,"value":715},{"type":40,"tag":250,"props":3164,"children":3165},{"style":531},[3166],{"type":45,"value":601},{"type":40,"tag":250,"props":3168,"children":3169},{"style":604},[3170],{"type":45,"value":3171},"manually_updated",{"type":40,"tag":250,"props":3173,"children":3174},{"style":531},[3175],{"type":45,"value":612},{"type":40,"tag":250,"props":3177,"children":3178},{"style":531},[3179],{"type":45,"value":591},{"type":40,"tag":250,"props":3181,"children":3182},{"style":537},[3183],{"type":45,"value":730},{"type":40,"tag":250,"props":3185,"children":3186},{"style":531},[3187],{"type":45,"value":617},{"type":40,"tag":250,"props":3189,"children":3190},{"class":252,"line":289},[3191],{"type":40,"tag":250,"props":3192,"children":3193},{"emptyLinePlaceholder":293},[3194],{"type":45,"value":296},{"type":40,"tag":250,"props":3196,"children":3197},{"class":252,"line":299},[3198],{"type":40,"tag":250,"props":3199,"children":3200},{"style":1146},[3201],{"type":45,"value":3202},"\u002F\u002F Resume with updated state\n",{"type":40,"tag":250,"props":3204,"children":3205},{"class":252,"line":308},[3206,3210,3214,3218,3222,3226,3230,3234,3238,3242,3246],{"type":40,"tag":250,"props":3207,"children":3208},{"style":671},[3209],{"type":45,"value":674},{"type":40,"tag":250,"props":3211,"children":3212},{"style":537},[3213],{"type":45,"value":2427},{"type":40,"tag":250,"props":3215,"children":3216},{"style":531},[3217],{"type":45,"value":684},{"type":40,"tag":250,"props":3219,"children":3220},{"style":525},[3221],{"type":45,"value":1241},{"type":40,"tag":250,"props":3223,"children":3224},{"style":537},[3225],{"type":45,"value":1246},{"type":40,"tag":250,"props":3227,"children":3228},{"style":531},[3229],{"type":45,"value":792},{"type":40,"tag":250,"props":3231,"children":3232},{"style":692},[3233],{"type":45,"value":1255},{"type":40,"tag":250,"props":3235,"children":3236},{"style":537},[3237],{"type":45,"value":699},{"type":40,"tag":250,"props":3239,"children":3240},{"style":531},[3241],{"type":45,"value":2784},{"type":40,"tag":250,"props":3243,"children":3244},{"style":537},[3245],{"type":45,"value":1316},{"type":40,"tag":250,"props":3247,"children":3248},{"style":531},[3249],{"type":45,"value":617},{"type":40,"tag":219,"props":3251,"children":3252},{},[],{"type":40,"tag":223,"props":3254,"children":3256},{"id":3255},"subgraph-checkpointer-scoping",[3257],{"type":45,"value":3258},"Subgraph Checkpointer Scoping",{"type":40,"tag":84,"props":3260,"children":3261},{},[3262,3264,3270],{"type":45,"value":3263},"When compiling a subgraph, the ",{"type":40,"tag":158,"props":3265,"children":3267},{"className":3266},[],[3268],{"type":45,"value":3269},"checkpointer",{"type":45,"value":3271}," parameter controls persistence behavior. This is critical for subgraphs that use interrupts, need multi-turn memory, or run in parallel.",{"type":40,"tag":3273,"props":3274,"children":3275},"subgraph-checkpointer-scoping-table",{},[3276],{"type":40,"tag":120,"props":3277,"children":3278},{},[3279,3319],{"type":40,"tag":124,"props":3280,"children":3281},{},[3282],{"type":40,"tag":128,"props":3283,"children":3284},{},[3285,3290,3299,3310],{"type":40,"tag":132,"props":3286,"children":3287},{},[3288],{"type":45,"value":3289},"Feature",{"type":40,"tag":132,"props":3291,"children":3292},{},[3293],{"type":40,"tag":158,"props":3294,"children":3296},{"className":3295},[],[3297],{"type":45,"value":3298},"checkpointer=False",{"type":40,"tag":132,"props":3300,"children":3301},{},[3302,3308],{"type":40,"tag":158,"props":3303,"children":3305},{"className":3304},[],[3306],{"type":45,"value":3307},"None",{"type":45,"value":3309}," (default)",{"type":40,"tag":132,"props":3311,"children":3312},{},[3313],{"type":40,"tag":158,"props":3314,"children":3316},{"className":3315},[],[3317],{"type":45,"value":3318},"True",{"type":40,"tag":147,"props":3320,"children":3321},{},[3322,3342,3362,3383,3403],{"type":40,"tag":128,"props":3323,"children":3324},{},[3325,3330,3334,3338],{"type":40,"tag":154,"props":3326,"children":3327},{},[3328],{"type":45,"value":3329},"Interrupts (HITL)",{"type":40,"tag":154,"props":3331,"children":3332},{},[3333],{"type":45,"value":173},{"type":40,"tag":154,"props":3335,"children":3336},{},[3337],{"type":45,"value":217},{"type":40,"tag":154,"props":3339,"children":3340},{},[3341],{"type":45,"value":217},{"type":40,"tag":128,"props":3343,"children":3344},{},[3345,3350,3354,3358],{"type":40,"tag":154,"props":3346,"children":3347},{},[3348],{"type":45,"value":3349},"Multi-turn memory",{"type":40,"tag":154,"props":3351,"children":3352},{},[3353],{"type":45,"value":173},{"type":40,"tag":154,"props":3355,"children":3356},{},[3357],{"type":45,"value":173},{"type":40,"tag":154,"props":3359,"children":3360},{},[3361],{"type":45,"value":217},{"type":40,"tag":128,"props":3363,"children":3364},{},[3365,3370,3374,3378],{"type":40,"tag":154,"props":3366,"children":3367},{},[3368],{"type":45,"value":3369},"Multiple calls (different subgraphs)",{"type":40,"tag":154,"props":3371,"children":3372},{},[3373],{"type":45,"value":217},{"type":40,"tag":154,"props":3375,"children":3376},{},[3377],{"type":45,"value":217},{"type":40,"tag":154,"props":3379,"children":3380},{},[3381],{"type":45,"value":3382},"Warning (namespace conflicts possible)",{"type":40,"tag":128,"props":3384,"children":3385},{},[3386,3391,3395,3399],{"type":40,"tag":154,"props":3387,"children":3388},{},[3389],{"type":45,"value":3390},"Multiple calls (same subgraph)",{"type":40,"tag":154,"props":3392,"children":3393},{},[3394],{"type":45,"value":217},{"type":40,"tag":154,"props":3396,"children":3397},{},[3398],{"type":45,"value":217},{"type":40,"tag":154,"props":3400,"children":3401},{},[3402],{"type":45,"value":173},{"type":40,"tag":128,"props":3404,"children":3405},{},[3406,3411,3415,3420],{"type":40,"tag":154,"props":3407,"children":3408},{},[3409],{"type":45,"value":3410},"State inspection",{"type":40,"tag":154,"props":3412,"children":3413},{},[3414],{"type":45,"value":173},{"type":40,"tag":154,"props":3416,"children":3417},{},[3418],{"type":45,"value":3419},"Warning (current invocation only)",{"type":40,"tag":154,"props":3421,"children":3422},{},[3423],{"type":45,"value":217},{"type":40,"tag":3425,"props":3426,"children":3427},"subgraph-checkpointer-when-to-use",{},[3428,3435],{"type":40,"tag":3429,"props":3430,"children":3432},"h3",{"id":3431},"when-to-use-each-mode",[3433],{"type":45,"value":3434},"When to use each mode",{"type":40,"tag":48,"props":3436,"children":3437},{},[3438,3451,3480],{"type":40,"tag":52,"props":3439,"children":3440},{},[3441,3449],{"type":40,"tag":56,"props":3442,"children":3443},{},[3444],{"type":40,"tag":158,"props":3445,"children":3447},{"className":3446},[],[3448],{"type":45,"value":3298},{"type":45,"value":3450}," — Subgraph doesn't need interrupts or persistence. Simplest option, no checkpoint overhead.",{"type":40,"tag":52,"props":3452,"children":3453},{},[3454,3470,3472,3478],{"type":40,"tag":56,"props":3455,"children":3456},{},[3457,3462,3464,3469],{"type":40,"tag":158,"props":3458,"children":3460},{"className":3459},[],[3461],{"type":45,"value":3307},{"type":45,"value":3463}," (default \u002F omit ",{"type":40,"tag":158,"props":3465,"children":3467},{"className":3466},[],[3468],{"type":45,"value":3269},{"type":45,"value":730},{"type":45,"value":3471}," — Subgraph needs ",{"type":40,"tag":158,"props":3473,"children":3475},{"className":3474},[],[3476],{"type":45,"value":3477},"interrupt()",{"type":45,"value":3479}," but not multi-turn memory. Each invocation starts fresh but can pause\u002Fresume. Parallel execution works because each invocation gets a unique namespace.",{"type":40,"tag":52,"props":3481,"children":3482},{},[3483,3492],{"type":40,"tag":56,"props":3484,"children":3485},{},[3486],{"type":40,"tag":158,"props":3487,"children":3489},{"className":3488},[],[3490],{"type":45,"value":3491},"checkpointer=True",{"type":45,"value":3493}," — Subgraph needs to remember state across invocations (multi-turn conversations). Each call picks up where the last left off.",{"type":40,"tag":3495,"props":3496,"children":3497},"warning-stateful-subgraphs-parallel",{},[3498],{"type":40,"tag":84,"props":3499,"children":3500},{},[3501,3506,3508,3513],{"type":40,"tag":56,"props":3502,"children":3503},{},[3504],{"type":45,"value":3505},"Warning",{"type":45,"value":3507},": Stateful subgraphs (",{"type":40,"tag":158,"props":3509,"children":3511},{"className":3510},[],[3512],{"type":45,"value":3491},{"type":45,"value":3514},") do NOT support calling the same subgraph instance multiple times within a single node — the calls write to the same checkpoint namespace and conflict.",{"type":40,"tag":3516,"props":3517,"children":3518},"ex-subgraph-checkpointer-modes",{},[3519,3593],{"type":40,"tag":234,"props":3520,"children":3521},{},[3522,3524],{"type":45,"value":3523},"\nChoose the right checkpointer mode for your subgraph.\n",{"type":40,"tag":240,"props":3525,"children":3527},{"className":242,"code":3526,"language":234,"meta":244,"style":244},"# No interrupts needed — opt out of checkpointing\nsubgraph = subgraph_builder.compile(checkpointer=False)\n\n# Need interrupts but not cross-invocation persistence (default)\nsubgraph = subgraph_builder.compile()\n\n# Need cross-invocation persistence (stateful)\nsubgraph = subgraph_builder.compile(checkpointer=True)\n",[3528],{"type":40,"tag":158,"props":3529,"children":3530},{"__ignoreMap":244},[3531,3539,3547,3554,3562,3570,3577,3585],{"type":40,"tag":250,"props":3532,"children":3533},{"class":252,"line":253},[3534],{"type":40,"tag":250,"props":3535,"children":3536},{},[3537],{"type":45,"value":3538},"# No interrupts needed — opt out of checkpointing\n",{"type":40,"tag":250,"props":3540,"children":3541},{"class":252,"line":262},[3542],{"type":40,"tag":250,"props":3543,"children":3544},{},[3545],{"type":45,"value":3546},"subgraph = subgraph_builder.compile(checkpointer=False)\n",{"type":40,"tag":250,"props":3548,"children":3549},{"class":252,"line":271},[3550],{"type":40,"tag":250,"props":3551,"children":3552},{"emptyLinePlaceholder":293},[3553],{"type":45,"value":296},{"type":40,"tag":250,"props":3555,"children":3556},{"class":252,"line":280},[3557],{"type":40,"tag":250,"props":3558,"children":3559},{},[3560],{"type":45,"value":3561},"# Need interrupts but not cross-invocation persistence (default)\n",{"type":40,"tag":250,"props":3563,"children":3564},{"class":252,"line":289},[3565],{"type":40,"tag":250,"props":3566,"children":3567},{},[3568],{"type":45,"value":3569},"subgraph = subgraph_builder.compile()\n",{"type":40,"tag":250,"props":3571,"children":3572},{"class":252,"line":299},[3573],{"type":40,"tag":250,"props":3574,"children":3575},{"emptyLinePlaceholder":293},[3576],{"type":45,"value":296},{"type":40,"tag":250,"props":3578,"children":3579},{"class":252,"line":308},[3580],{"type":40,"tag":250,"props":3581,"children":3582},{},[3583],{"type":45,"value":3584},"# Need cross-invocation persistence (stateful)\n",{"type":40,"tag":250,"props":3586,"children":3587},{"class":252,"line":317},[3588],{"type":40,"tag":250,"props":3589,"children":3590},{},[3591],{"type":45,"value":3592},"subgraph = subgraph_builder.compile(checkpointer=True)\n",{"type":40,"tag":508,"props":3594,"children":3595},{},[3596,3597],{"type":45,"value":3523},{"type":40,"tag":240,"props":3598,"children":3600},{"className":514,"code":3599,"language":508,"meta":244,"style":244},"\u002F\u002F No interrupts needed — opt out of checkpointing\nconst subgraph = subgraphBuilder.compile({ checkpointer: false });\n\n\u002F\u002F Need interrupts but not cross-invocation persistence (default)\nconst subgraph = subgraphBuilder.compile();\n\n\u002F\u002F Need cross-invocation persistence (stateful)\nconst subgraph = subgraphBuilder.compile({ checkpointer: true });\n",[3601],{"type":40,"tag":158,"props":3602,"children":3603},{"__ignoreMap":244},[3604,3612,3676,3683,3691,3726,3733,3741],{"type":40,"tag":250,"props":3605,"children":3606},{"class":252,"line":253},[3607],{"type":40,"tag":250,"props":3608,"children":3609},{"style":1146},[3610],{"type":45,"value":3611},"\u002F\u002F No interrupts needed — opt out of checkpointing\n",{"type":40,"tag":250,"props":3613,"children":3614},{"class":252,"line":262},[3615,3619,3624,3628,3633,3637,3641,3645,3649,3654,3658,3664,3668,3672],{"type":40,"tag":250,"props":3616,"children":3617},{"style":671},[3618],{"type":45,"value":674},{"type":40,"tag":250,"props":3620,"children":3621},{"style":537},[3622],{"type":45,"value":3623}," subgraph ",{"type":40,"tag":250,"props":3625,"children":3626},{"style":531},[3627],{"type":45,"value":684},{"type":40,"tag":250,"props":3629,"children":3630},{"style":537},[3631],{"type":45,"value":3632}," subgraphBuilder",{"type":40,"tag":250,"props":3634,"children":3635},{"style":531},[3636],{"type":45,"value":792},{"type":40,"tag":250,"props":3638,"children":3639},{"style":692},[3640],{"type":45,"value":1109},{"type":40,"tag":250,"props":3642,"children":3643},{"style":537},[3644],{"type":45,"value":699},{"type":40,"tag":250,"props":3646,"children":3647},{"style":531},[3648],{"type":45,"value":704},{"type":40,"tag":250,"props":3650,"children":3651},{"style":707},[3652],{"type":45,"value":3653}," checkpointer",{"type":40,"tag":250,"props":3655,"children":3656},{"style":531},[3657],{"type":45,"value":715},{"type":40,"tag":250,"props":3659,"children":3661},{"style":3660},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[3662],{"type":45,"value":3663}," false",{"type":40,"tag":250,"props":3665,"children":3666},{"style":531},[3667],{"type":45,"value":591},{"type":40,"tag":250,"props":3669,"children":3670},{"style":537},[3671],{"type":45,"value":730},{"type":40,"tag":250,"props":3673,"children":3674},{"style":531},[3675],{"type":45,"value":617},{"type":40,"tag":250,"props":3677,"children":3678},{"class":252,"line":271},[3679],{"type":40,"tag":250,"props":3680,"children":3681},{"emptyLinePlaceholder":293},[3682],{"type":45,"value":296},{"type":40,"tag":250,"props":3684,"children":3685},{"class":252,"line":280},[3686],{"type":40,"tag":250,"props":3687,"children":3688},{"style":1146},[3689],{"type":45,"value":3690},"\u002F\u002F Need interrupts but not cross-invocation persistence (default)\n",{"type":40,"tag":250,"props":3692,"children":3693},{"class":252,"line":289},[3694,3698,3702,3706,3710,3714,3718,3722],{"type":40,"tag":250,"props":3695,"children":3696},{"style":671},[3697],{"type":45,"value":674},{"type":40,"tag":250,"props":3699,"children":3700},{"style":537},[3701],{"type":45,"value":3623},{"type":40,"tag":250,"props":3703,"children":3704},{"style":531},[3705],{"type":45,"value":684},{"type":40,"tag":250,"props":3707,"children":3708},{"style":537},[3709],{"type":45,"value":3632},{"type":40,"tag":250,"props":3711,"children":3712},{"style":531},[3713],{"type":45,"value":792},{"type":40,"tag":250,"props":3715,"children":3716},{"style":692},[3717],{"type":45,"value":1109},{"type":40,"tag":250,"props":3719,"children":3720},{"style":537},[3721],{"type":45,"value":945},{"type":40,"tag":250,"props":3723,"children":3724},{"style":531},[3725],{"type":45,"value":617},{"type":40,"tag":250,"props":3727,"children":3728},{"class":252,"line":299},[3729],{"type":40,"tag":250,"props":3730,"children":3731},{"emptyLinePlaceholder":293},[3732],{"type":45,"value":296},{"type":40,"tag":250,"props":3734,"children":3735},{"class":252,"line":308},[3736],{"type":40,"tag":250,"props":3737,"children":3738},{"style":1146},[3739],{"type":45,"value":3740},"\u002F\u002F Need cross-invocation persistence (stateful)\n",{"type":40,"tag":250,"props":3742,"children":3743},{"class":252,"line":317},[3744,3748,3752,3756,3760,3764,3768,3772,3776,3780,3784,3789,3793,3797],{"type":40,"tag":250,"props":3745,"children":3746},{"style":671},[3747],{"type":45,"value":674},{"type":40,"tag":250,"props":3749,"children":3750},{"style":537},[3751],{"type":45,"value":3623},{"type":40,"tag":250,"props":3753,"children":3754},{"style":531},[3755],{"type":45,"value":684},{"type":40,"tag":250,"props":3757,"children":3758},{"style":537},[3759],{"type":45,"value":3632},{"type":40,"tag":250,"props":3761,"children":3762},{"style":531},[3763],{"type":45,"value":792},{"type":40,"tag":250,"props":3765,"children":3766},{"style":692},[3767],{"type":45,"value":1109},{"type":40,"tag":250,"props":3769,"children":3770},{"style":537},[3771],{"type":45,"value":699},{"type":40,"tag":250,"props":3773,"children":3774},{"style":531},[3775],{"type":45,"value":704},{"type":40,"tag":250,"props":3777,"children":3778},{"style":707},[3779],{"type":45,"value":3653},{"type":40,"tag":250,"props":3781,"children":3782},{"style":531},[3783],{"type":45,"value":715},{"type":40,"tag":250,"props":3785,"children":3786},{"style":3660},[3787],{"type":45,"value":3788}," true",{"type":40,"tag":250,"props":3790,"children":3791},{"style":531},[3792],{"type":45,"value":591},{"type":40,"tag":250,"props":3794,"children":3795},{"style":537},[3796],{"type":45,"value":730},{"type":40,"tag":250,"props":3798,"children":3799},{"style":531},[3800],{"type":45,"value":617},{"type":40,"tag":3802,"props":3803,"children":3804},"parallel-subgraph-namespacing",{},[3805,3810,3830,3996,4720],{"type":40,"tag":3429,"props":3806,"children":3807},{"id":3802},[3808],{"type":45,"value":3809},"Parallel subgraph namespacing",{"type":40,"tag":84,"props":3811,"children":3812},{},[3813,3815,3820,3822,3828],{"type":45,"value":3814},"When multiple ",{"type":40,"tag":56,"props":3816,"children":3817},{},[3818],{"type":45,"value":3819},"different",{"type":45,"value":3821}," stateful subgraphs run in parallel, wrap each in its own ",{"type":40,"tag":158,"props":3823,"children":3825},{"className":3824},[],[3826],{"type":45,"value":3827},"StateGraph",{"type":45,"value":3829}," with a unique node name for stable namespace isolation:",{"type":40,"tag":234,"props":3831,"children":3832},{},[3833],{"type":40,"tag":240,"props":3834,"children":3836},{"className":242,"code":3835,"language":234,"meta":244,"style":244},"from langgraph.graph import MessagesState, StateGraph\n\ndef create_sub_agent(model, *, name, **kwargs):\n    \"\"\"Wrap an agent with a unique node name for namespace isolation.\"\"\"\n    agent = create_agent(model=model, name=name, **kwargs)\n    return (\n        StateGraph(MessagesState)\n        .add_node(name, agent)  # unique name -> stable namespace\n        .add_edge(\"__start__\", name)\n        .compile()\n    )\n\nfruit_agent = create_sub_agent(\n    \"gpt-4.1-mini\", name=\"fruit_agent\",\n    tools=[fruit_info], prompt=\"...\", checkpointer=True,\n)\nveggie_agent = create_sub_agent(\n    \"gpt-4.1-mini\", name=\"veggie_agent\",\n    tools=[veggie_info], prompt=\"...\", checkpointer=True,\n)\n",[3837],{"type":40,"tag":158,"props":3838,"children":3839},{"__ignoreMap":244},[3840,3848,3855,3863,3871,3879,3887,3895,3903,3911,3919,3927,3934,3942,3950,3958,3965,3973,3981,3989],{"type":40,"tag":250,"props":3841,"children":3842},{"class":252,"line":253},[3843],{"type":40,"tag":250,"props":3844,"children":3845},{},[3846],{"type":45,"value":3847},"from langgraph.graph import MessagesState, StateGraph\n",{"type":40,"tag":250,"props":3849,"children":3850},{"class":252,"line":262},[3851],{"type":40,"tag":250,"props":3852,"children":3853},{"emptyLinePlaceholder":293},[3854],{"type":45,"value":296},{"type":40,"tag":250,"props":3856,"children":3857},{"class":252,"line":271},[3858],{"type":40,"tag":250,"props":3859,"children":3860},{},[3861],{"type":45,"value":3862},"def create_sub_agent(model, *, name, **kwargs):\n",{"type":40,"tag":250,"props":3864,"children":3865},{"class":252,"line":280},[3866],{"type":40,"tag":250,"props":3867,"children":3868},{},[3869],{"type":45,"value":3870},"    \"\"\"Wrap an agent with a unique node name for namespace isolation.\"\"\"\n",{"type":40,"tag":250,"props":3872,"children":3873},{"class":252,"line":289},[3874],{"type":40,"tag":250,"props":3875,"children":3876},{},[3877],{"type":45,"value":3878},"    agent = create_agent(model=model, name=name, **kwargs)\n",{"type":40,"tag":250,"props":3880,"children":3881},{"class":252,"line":299},[3882],{"type":40,"tag":250,"props":3883,"children":3884},{},[3885],{"type":45,"value":3886},"    return (\n",{"type":40,"tag":250,"props":3888,"children":3889},{"class":252,"line":308},[3890],{"type":40,"tag":250,"props":3891,"children":3892},{},[3893],{"type":45,"value":3894},"        StateGraph(MessagesState)\n",{"type":40,"tag":250,"props":3896,"children":3897},{"class":252,"line":317},[3898],{"type":40,"tag":250,"props":3899,"children":3900},{},[3901],{"type":45,"value":3902},"        .add_node(name, agent)  # unique name -> stable namespace\n",{"type":40,"tag":250,"props":3904,"children":3905},{"class":252,"line":325},[3906],{"type":40,"tag":250,"props":3907,"children":3908},{},[3909],{"type":45,"value":3910},"        .add_edge(\"__start__\", name)\n",{"type":40,"tag":250,"props":3912,"children":3913},{"class":252,"line":334},[3914],{"type":40,"tag":250,"props":3915,"children":3916},{},[3917],{"type":45,"value":3918},"        .compile()\n",{"type":40,"tag":250,"props":3920,"children":3921},{"class":252,"line":343},[3922],{"type":40,"tag":250,"props":3923,"children":3924},{},[3925],{"type":45,"value":3926},"    )\n",{"type":40,"tag":250,"props":3928,"children":3929},{"class":252,"line":351},[3930],{"type":40,"tag":250,"props":3931,"children":3932},{"emptyLinePlaceholder":293},[3933],{"type":45,"value":296},{"type":40,"tag":250,"props":3935,"children":3936},{"class":252,"line":360},[3937],{"type":40,"tag":250,"props":3938,"children":3939},{},[3940],{"type":45,"value":3941},"fruit_agent = create_sub_agent(\n",{"type":40,"tag":250,"props":3943,"children":3944},{"class":252,"line":368},[3945],{"type":40,"tag":250,"props":3946,"children":3947},{},[3948],{"type":45,"value":3949},"    \"gpt-4.1-mini\", name=\"fruit_agent\",\n",{"type":40,"tag":250,"props":3951,"children":3952},{"class":252,"line":377},[3953],{"type":40,"tag":250,"props":3954,"children":3955},{},[3956],{"type":45,"value":3957},"    tools=[fruit_info], prompt=\"...\", checkpointer=True,\n",{"type":40,"tag":250,"props":3959,"children":3960},{"class":252,"line":386},[3961],{"type":40,"tag":250,"props":3962,"children":3963},{},[3964],{"type":45,"value":428},{"type":40,"tag":250,"props":3966,"children":3967},{"class":252,"line":395},[3968],{"type":40,"tag":250,"props":3969,"children":3970},{},[3971],{"type":45,"value":3972},"veggie_agent = create_sub_agent(\n",{"type":40,"tag":250,"props":3974,"children":3975},{"class":252,"line":404},[3976],{"type":40,"tag":250,"props":3977,"children":3978},{},[3979],{"type":45,"value":3980},"    \"gpt-4.1-mini\", name=\"veggie_agent\",\n",{"type":40,"tag":250,"props":3982,"children":3983},{"class":252,"line":413},[3984],{"type":40,"tag":250,"props":3985,"children":3986},{},[3987],{"type":45,"value":3988},"    tools=[veggie_info], prompt=\"...\", checkpointer=True,\n",{"type":40,"tag":250,"props":3990,"children":3991},{"class":252,"line":422},[3992],{"type":40,"tag":250,"props":3993,"children":3994},{},[3995],{"type":45,"value":428},{"type":40,"tag":508,"props":3997,"children":3998},{},[3999],{"type":40,"tag":240,"props":4000,"children":4002},{"className":514,"code":4001,"language":508,"meta":244,"style":244},"import { StateGraph, StateSchema, MessagesValue, START } from \"@langchain\u002Flanggraph\";\n\nfunction createSubAgent(model: string, { name, ...kwargs }: { name: string; [key: string]: any }) {\n  const agent = createAgent({ model, name, ...kwargs });\n  return new StateGraph(new StateSchema({ messages: MessagesValue }))\n    .addNode(name, agent)  \u002F\u002F unique name -> stable namespace\n    .addEdge(START, name)\n    .compile();\n}\n\nconst fruitAgent = createSubAgent(\"gpt-4.1-mini\", {\n  name: \"fruit_agent\", tools: [fruitInfo], prompt: \"...\", checkpointer: true,\n});\nconst veggieAgent = createSubAgent(\"gpt-4.1-mini\", {\n  name: \"veggie_agent\", tools: [veggieInfo], prompt: \"...\", checkpointer: true,\n});\n",[4003],{"type":40,"tag":158,"props":4004,"children":4005},{"__ignoreMap":244},[4006,4069,4076,4198,4266,4322,4361,4393,4412,4419,4426,4471,4561,4576,4620,4705],{"type":40,"tag":250,"props":4007,"children":4008},{"class":252,"line":253},[4009,4013,4017,4021,4025,4029,4033,4037,4041,4045,4049,4053,4057,4061,4065],{"type":40,"tag":250,"props":4010,"children":4011},{"style":525},[4012],{"type":45,"value":528},{"type":40,"tag":250,"props":4014,"children":4015},{"style":531},[4016],{"type":45,"value":534},{"type":40,"tag":250,"props":4018,"children":4019},{"style":537},[4020],{"type":45,"value":550},{"type":40,"tag":250,"props":4022,"children":4023},{"style":531},[4024],{"type":45,"value":545},{"type":40,"tag":250,"props":4026,"children":4027},{"style":537},[4028],{"type":45,"value":559},{"type":40,"tag":250,"props":4030,"children":4031},{"style":531},[4032],{"type":45,"value":545},{"type":40,"tag":250,"props":4034,"children":4035},{"style":537},[4036],{"type":45,"value":568},{"type":40,"tag":250,"props":4038,"children":4039},{"style":531},[4040],{"type":45,"value":545},{"type":40,"tag":250,"props":4042,"children":4043},{"style":537},[4044],{"type":45,"value":577},{"type":40,"tag":250,"props":4046,"children":4047},{"style":531},[4048],{"type":45,"value":591},{"type":40,"tag":250,"props":4050,"children":4051},{"style":525},[4052],{"type":45,"value":596},{"type":40,"tag":250,"props":4054,"children":4055},{"style":531},[4056],{"type":45,"value":601},{"type":40,"tag":250,"props":4058,"children":4059},{"style":604},[4060],{"type":45,"value":607},{"type":40,"tag":250,"props":4062,"children":4063},{"style":531},[4064],{"type":45,"value":612},{"type":40,"tag":250,"props":4066,"children":4067},{"style":531},[4068],{"type":45,"value":617},{"type":40,"tag":250,"props":4070,"children":4071},{"class":252,"line":262},[4072],{"type":40,"tag":250,"props":4073,"children":4074},{"emptyLinePlaceholder":293},[4075],{"type":45,"value":296},{"type":40,"tag":250,"props":4077,"children":4078},{"class":252,"line":271},[4079,4084,4089,4093,4098,4102,4107,4111,4115,4120,4124,4129,4134,4139,4143,4147,4151,4155,4159,4163,4168,4172,4176,4180,4184,4189,4194],{"type":40,"tag":250,"props":4080,"children":4081},{"style":671},[4082],{"type":45,"value":4083},"function",{"type":40,"tag":250,"props":4085,"children":4086},{"style":692},[4087],{"type":45,"value":4088}," createSubAgent",{"type":40,"tag":250,"props":4090,"children":4091},{"style":531},[4092],{"type":45,"value":699},{"type":40,"tag":250,"props":4094,"children":4095},{"style":770},[4096],{"type":45,"value":4097},"model",{"type":40,"tag":250,"props":4099,"children":4100},{"style":531},[4101],{"type":45,"value":715},{"type":40,"tag":250,"props":4103,"children":4104},{"style":2530},[4105],{"type":45,"value":4106}," string",{"type":40,"tag":250,"props":4108,"children":4109},{"style":531},[4110],{"type":45,"value":545},{"type":40,"tag":250,"props":4112,"children":4113},{"style":531},[4114],{"type":45,"value":534},{"type":40,"tag":250,"props":4116,"children":4117},{"style":770},[4118],{"type":45,"value":4119}," name",{"type":40,"tag":250,"props":4121,"children":4122},{"style":531},[4123],{"type":45,"value":545},{"type":40,"tag":250,"props":4125,"children":4126},{"style":531},[4127],{"type":45,"value":4128}," ...",{"type":40,"tag":250,"props":4130,"children":4131},{"style":770},[4132],{"type":45,"value":4133},"kwargs",{"type":40,"tag":250,"props":4135,"children":4136},{"style":531},[4137],{"type":45,"value":4138}," }:",{"type":40,"tag":250,"props":4140,"children":4141},{"style":531},[4142],{"type":45,"value":534},{"type":40,"tag":250,"props":4144,"children":4145},{"style":707},[4146],{"type":45,"value":4119},{"type":40,"tag":250,"props":4148,"children":4149},{"style":531},[4150],{"type":45,"value":715},{"type":40,"tag":250,"props":4152,"children":4153},{"style":2530},[4154],{"type":45,"value":4106},{"type":40,"tag":250,"props":4156,"children":4157},{"style":531},[4158],{"type":45,"value":1365},{"type":40,"tag":250,"props":4160,"children":4161},{"style":537},[4162],{"type":45,"value":836},{"type":40,"tag":250,"props":4164,"children":4165},{"style":770},[4166],{"type":45,"value":4167},"key",{"type":40,"tag":250,"props":4169,"children":4170},{"style":531},[4171],{"type":45,"value":715},{"type":40,"tag":250,"props":4173,"children":4174},{"style":2530},[4175],{"type":45,"value":4106},{"type":40,"tag":250,"props":4177,"children":4178},{"style":537},[4179],{"type":45,"value":2739},{"type":40,"tag":250,"props":4181,"children":4182},{"style":531},[4183],{"type":45,"value":715},{"type":40,"tag":250,"props":4185,"children":4186},{"style":2530},[4187],{"type":45,"value":4188}," any",{"type":40,"tag":250,"props":4190,"children":4191},{"style":531},[4192],{"type":45,"value":4193}," })",{"type":40,"tag":250,"props":4195,"children":4196},{"style":531},[4197],{"type":45,"value":811},{"type":40,"tag":250,"props":4199,"children":4200},{"class":252,"line":280},[4201,4206,4211,4216,4221,4225,4229,4234,4238,4242,4246,4250,4254,4258,4262],{"type":40,"tag":250,"props":4202,"children":4203},{"style":671},[4204],{"type":45,"value":4205},"  const",{"type":40,"tag":250,"props":4207,"children":4208},{"style":537},[4209],{"type":45,"value":4210}," agent",{"type":40,"tag":250,"props":4212,"children":4213},{"style":531},[4214],{"type":45,"value":4215}," =",{"type":40,"tag":250,"props":4217,"children":4218},{"style":692},[4219],{"type":45,"value":4220}," createAgent",{"type":40,"tag":250,"props":4222,"children":4223},{"style":707},[4224],{"type":45,"value":699},{"type":40,"tag":250,"props":4226,"children":4227},{"style":531},[4228],{"type":45,"value":704},{"type":40,"tag":250,"props":4230,"children":4231},{"style":537},[4232],{"type":45,"value":4233}," model",{"type":40,"tag":250,"props":4235,"children":4236},{"style":531},[4237],{"type":45,"value":545},{"type":40,"tag":250,"props":4239,"children":4240},{"style":537},[4241],{"type":45,"value":4119},{"type":40,"tag":250,"props":4243,"children":4244},{"style":531},[4245],{"type":45,"value":545},{"type":40,"tag":250,"props":4247,"children":4248},{"style":531},[4249],{"type":45,"value":4128},{"type":40,"tag":250,"props":4251,"children":4252},{"style":537},[4253],{"type":45,"value":4133},{"type":40,"tag":250,"props":4255,"children":4256},{"style":531},[4257],{"type":45,"value":591},{"type":40,"tag":250,"props":4259,"children":4260},{"style":707},[4261],{"type":45,"value":730},{"type":40,"tag":250,"props":4263,"children":4264},{"style":531},[4265],{"type":45,"value":617},{"type":40,"tag":250,"props":4267,"children":4268},{"class":252,"line":289},[4269,4273,4277,4281,4285,4289,4293,4297,4301,4305,4309,4313,4317],{"type":40,"tag":250,"props":4270,"children":4271},{"style":525},[4272],{"type":45,"value":819},{"type":40,"tag":250,"props":4274,"children":4275},{"style":531},[4276],{"type":45,"value":689},{"type":40,"tag":250,"props":4278,"children":4279},{"style":692},[4280],{"type":45,"value":550},{"type":40,"tag":250,"props":4282,"children":4283},{"style":707},[4284],{"type":45,"value":699},{"type":40,"tag":250,"props":4286,"children":4287},{"style":531},[4288],{"type":45,"value":1280},{"type":40,"tag":250,"props":4290,"children":4291},{"style":692},[4292],{"type":45,"value":559},{"type":40,"tag":250,"props":4294,"children":4295},{"style":707},[4296],{"type":45,"value":699},{"type":40,"tag":250,"props":4298,"children":4299},{"style":531},[4300],{"type":45,"value":704},{"type":40,"tag":250,"props":4302,"children":4303},{"style":707},[4304],{"type":45,"value":710},{"type":40,"tag":250,"props":4306,"children":4307},{"style":531},[4308],{"type":45,"value":715},{"type":40,"tag":250,"props":4310,"children":4311},{"style":537},[4312],{"type":45,"value":568},{"type":40,"tag":250,"props":4314,"children":4315},{"style":531},[4316],{"type":45,"value":591},{"type":40,"tag":250,"props":4318,"children":4319},{"style":707},[4320],{"type":45,"value":4321},"))\n",{"type":40,"tag":250,"props":4323,"children":4324},{"class":252,"line":299},[4325,4330,4334,4338,4343,4347,4351,4356],{"type":40,"tag":250,"props":4326,"children":4327},{"style":531},[4328],{"type":45,"value":4329},"    .",{"type":40,"tag":250,"props":4331,"children":4332},{"style":692},[4333],{"type":45,"value":998},{"type":40,"tag":250,"props":4335,"children":4336},{"style":707},[4337],{"type":45,"value":699},{"type":40,"tag":250,"props":4339,"children":4340},{"style":537},[4341],{"type":45,"value":4342},"name",{"type":40,"tag":250,"props":4344,"children":4345},{"style":531},[4346],{"type":45,"value":545},{"type":40,"tag":250,"props":4348,"children":4349},{"style":537},[4350],{"type":45,"value":4210},{"type":40,"tag":250,"props":4352,"children":4353},{"style":707},[4354],{"type":45,"value":4355},")  ",{"type":40,"tag":250,"props":4357,"children":4358},{"style":1146},[4359],{"type":45,"value":4360},"\u002F\u002F unique name -> stable namespace\n",{"type":40,"tag":250,"props":4362,"children":4363},{"class":252,"line":308},[4364,4368,4372,4376,4381,4385,4389],{"type":40,"tag":250,"props":4365,"children":4366},{"style":531},[4367],{"type":45,"value":4329},{"type":40,"tag":250,"props":4369,"children":4370},{"style":692},[4371],{"type":45,"value":1036},{"type":40,"tag":250,"props":4373,"children":4374},{"style":707},[4375],{"type":45,"value":699},{"type":40,"tag":250,"props":4377,"children":4378},{"style":537},[4379],{"type":45,"value":4380},"START",{"type":40,"tag":250,"props":4382,"children":4383},{"style":531},[4384],{"type":45,"value":545},{"type":40,"tag":250,"props":4386,"children":4387},{"style":537},[4388],{"type":45,"value":4119},{"type":40,"tag":250,"props":4390,"children":4391},{"style":707},[4392],{"type":45,"value":428},{"type":40,"tag":250,"props":4394,"children":4395},{"class":252,"line":317},[4396,4400,4404,4408],{"type":40,"tag":250,"props":4397,"children":4398},{"style":531},[4399],{"type":45,"value":4329},{"type":40,"tag":250,"props":4401,"children":4402},{"style":692},[4403],{"type":45,"value":1109},{"type":40,"tag":250,"props":4405,"children":4406},{"style":707},[4407],{"type":45,"value":945},{"type":40,"tag":250,"props":4409,"children":4410},{"style":531},[4411],{"type":45,"value":617},{"type":40,"tag":250,"props":4413,"children":4414},{"class":252,"line":325},[4415],{"type":40,"tag":250,"props":4416,"children":4417},{"style":531},[4418],{"type":45,"value":2678},{"type":40,"tag":250,"props":4420,"children":4421},{"class":252,"line":334},[4422],{"type":40,"tag":250,"props":4423,"children":4424},{"emptyLinePlaceholder":293},[4425],{"type":45,"value":296},{"type":40,"tag":250,"props":4427,"children":4428},{"class":252,"line":343},[4429,4433,4438,4442,4446,4450,4454,4459,4463,4467],{"type":40,"tag":250,"props":4430,"children":4431},{"style":671},[4432],{"type":45,"value":674},{"type":40,"tag":250,"props":4434,"children":4435},{"style":537},[4436],{"type":45,"value":4437}," fruitAgent ",{"type":40,"tag":250,"props":4439,"children":4440},{"style":531},[4441],{"type":45,"value":684},{"type":40,"tag":250,"props":4443,"children":4444},{"style":692},[4445],{"type":45,"value":4088},{"type":40,"tag":250,"props":4447,"children":4448},{"style":537},[4449],{"type":45,"value":699},{"type":40,"tag":250,"props":4451,"children":4452},{"style":531},[4453],{"type":45,"value":612},{"type":40,"tag":250,"props":4455,"children":4456},{"style":604},[4457],{"type":45,"value":4458},"gpt-4.1-mini",{"type":40,"tag":250,"props":4460,"children":4461},{"style":531},[4462],{"type":45,"value":612},{"type":40,"tag":250,"props":4464,"children":4465},{"style":531},[4466],{"type":45,"value":545},{"type":40,"tag":250,"props":4468,"children":4469},{"style":531},[4470],{"type":45,"value":811},{"type":40,"tag":250,"props":4472,"children":4473},{"class":252,"line":351},[4474,4479,4483,4487,4492,4496,4500,4505,4509,4514,4518,4523,4527,4531,4536,4540,4544,4548,4552,4556],{"type":40,"tag":250,"props":4475,"children":4476},{"style":707},[4477],{"type":45,"value":4478},"  name",{"type":40,"tag":250,"props":4480,"children":4481},{"style":531},[4482],{"type":45,"value":715},{"type":40,"tag":250,"props":4484,"children":4485},{"style":531},[4486],{"type":45,"value":601},{"type":40,"tag":250,"props":4488,"children":4489},{"style":604},[4490],{"type":45,"value":4491},"fruit_agent",{"type":40,"tag":250,"props":4493,"children":4494},{"style":531},[4495],{"type":45,"value":612},{"type":40,"tag":250,"props":4497,"children":4498},{"style":531},[4499],{"type":45,"value":545},{"type":40,"tag":250,"props":4501,"children":4502},{"style":707},[4503],{"type":45,"value":4504}," tools",{"type":40,"tag":250,"props":4506,"children":4507},{"style":531},[4508],{"type":45,"value":715},{"type":40,"tag":250,"props":4510,"children":4511},{"style":537},[4512],{"type":45,"value":4513}," [fruitInfo]",{"type":40,"tag":250,"props":4515,"children":4516},{"style":531},[4517],{"type":45,"value":545},{"type":40,"tag":250,"props":4519,"children":4520},{"style":707},[4521],{"type":45,"value":4522}," prompt",{"type":40,"tag":250,"props":4524,"children":4525},{"style":531},[4526],{"type":45,"value":715},{"type":40,"tag":250,"props":4528,"children":4529},{"style":531},[4530],{"type":45,"value":601},{"type":40,"tag":250,"props":4532,"children":4533},{"style":604},[4534],{"type":45,"value":4535},"...",{"type":40,"tag":250,"props":4537,"children":4538},{"style":531},[4539],{"type":45,"value":612},{"type":40,"tag":250,"props":4541,"children":4542},{"style":531},[4543],{"type":45,"value":545},{"type":40,"tag":250,"props":4545,"children":4546},{"style":707},[4547],{"type":45,"value":3653},{"type":40,"tag":250,"props":4549,"children":4550},{"style":531},[4551],{"type":45,"value":715},{"type":40,"tag":250,"props":4553,"children":4554},{"style":3660},[4555],{"type":45,"value":3788},{"type":40,"tag":250,"props":4557,"children":4558},{"style":531},[4559],{"type":45,"value":4560},",\n",{"type":40,"tag":250,"props":4562,"children":4563},{"class":252,"line":360},[4564,4568,4572],{"type":40,"tag":250,"props":4565,"children":4566},{"style":531},[4567],{"type":45,"value":725},{"type":40,"tag":250,"props":4569,"children":4570},{"style":537},[4571],{"type":45,"value":730},{"type":40,"tag":250,"props":4573,"children":4574},{"style":531},[4575],{"type":45,"value":617},{"type":40,"tag":250,"props":4577,"children":4578},{"class":252,"line":368},[4579,4583,4588,4592,4596,4600,4604,4608,4612,4616],{"type":40,"tag":250,"props":4580,"children":4581},{"style":671},[4582],{"type":45,"value":674},{"type":40,"tag":250,"props":4584,"children":4585},{"style":537},[4586],{"type":45,"value":4587}," veggieAgent ",{"type":40,"tag":250,"props":4589,"children":4590},{"style":531},[4591],{"type":45,"value":684},{"type":40,"tag":250,"props":4593,"children":4594},{"style":692},[4595],{"type":45,"value":4088},{"type":40,"tag":250,"props":4597,"children":4598},{"style":537},[4599],{"type":45,"value":699},{"type":40,"tag":250,"props":4601,"children":4602},{"style":531},[4603],{"type":45,"value":612},{"type":40,"tag":250,"props":4605,"children":4606},{"style":604},[4607],{"type":45,"value":4458},{"type":40,"tag":250,"props":4609,"children":4610},{"style":531},[4611],{"type":45,"value":612},{"type":40,"tag":250,"props":4613,"children":4614},{"style":531},[4615],{"type":45,"value":545},{"type":40,"tag":250,"props":4617,"children":4618},{"style":531},[4619],{"type":45,"value":811},{"type":40,"tag":250,"props":4621,"children":4622},{"class":252,"line":377},[4623,4627,4631,4635,4640,4644,4648,4652,4656,4661,4665,4669,4673,4677,4681,4685,4689,4693,4697,4701],{"type":40,"tag":250,"props":4624,"children":4625},{"style":707},[4626],{"type":45,"value":4478},{"type":40,"tag":250,"props":4628,"children":4629},{"style":531},[4630],{"type":45,"value":715},{"type":40,"tag":250,"props":4632,"children":4633},{"style":531},[4634],{"type":45,"value":601},{"type":40,"tag":250,"props":4636,"children":4637},{"style":604},[4638],{"type":45,"value":4639},"veggie_agent",{"type":40,"tag":250,"props":4641,"children":4642},{"style":531},[4643],{"type":45,"value":612},{"type":40,"tag":250,"props":4645,"children":4646},{"style":531},[4647],{"type":45,"value":545},{"type":40,"tag":250,"props":4649,"children":4650},{"style":707},[4651],{"type":45,"value":4504},{"type":40,"tag":250,"props":4653,"children":4654},{"style":531},[4655],{"type":45,"value":715},{"type":40,"tag":250,"props":4657,"children":4658},{"style":537},[4659],{"type":45,"value":4660}," [veggieInfo]",{"type":40,"tag":250,"props":4662,"children":4663},{"style":531},[4664],{"type":45,"value":545},{"type":40,"tag":250,"props":4666,"children":4667},{"style":707},[4668],{"type":45,"value":4522},{"type":40,"tag":250,"props":4670,"children":4671},{"style":531},[4672],{"type":45,"value":715},{"type":40,"tag":250,"props":4674,"children":4675},{"style":531},[4676],{"type":45,"value":601},{"type":40,"tag":250,"props":4678,"children":4679},{"style":604},[4680],{"type":45,"value":4535},{"type":40,"tag":250,"props":4682,"children":4683},{"style":531},[4684],{"type":45,"value":612},{"type":40,"tag":250,"props":4686,"children":4687},{"style":531},[4688],{"type":45,"value":545},{"type":40,"tag":250,"props":4690,"children":4691},{"style":707},[4692],{"type":45,"value":3653},{"type":40,"tag":250,"props":4694,"children":4695},{"style":531},[4696],{"type":45,"value":715},{"type":40,"tag":250,"props":4698,"children":4699},{"style":3660},[4700],{"type":45,"value":3788},{"type":40,"tag":250,"props":4702,"children":4703},{"style":531},[4704],{"type":45,"value":4560},{"type":40,"tag":250,"props":4706,"children":4707},{"class":252,"line":386},[4708,4712,4716],{"type":40,"tag":250,"props":4709,"children":4710},{"style":531},[4711],{"type":45,"value":725},{"type":40,"tag":250,"props":4713,"children":4714},{"style":537},[4715],{"type":45,"value":730},{"type":40,"tag":250,"props":4717,"children":4718},{"style":531},[4719],{"type":45,"value":617},{"type":40,"tag":84,"props":4721,"children":4722},{},[4723,4725,4731],{"type":45,"value":4724},"Note: Subgraphs added as nodes (via ",{"type":40,"tag":158,"props":4726,"children":4728},{"className":4727},[],[4729],{"type":45,"value":4730},"add_node",{"type":45,"value":4732},") already get name-based namespaces automatically and don't need this wrapper.",{"type":40,"tag":219,"props":4734,"children":4735},{},[],{"type":40,"tag":223,"props":4737,"children":4739},{"id":4738},"long-term-memory-store",[4740],{"type":45,"value":4741},"Long-Term Memory (Store)",{"type":40,"tag":4743,"props":4744,"children":4745},"ex-long-term-memory-store",{},[4746,4912],{"type":40,"tag":234,"props":4747,"children":4748},{},[4749,4751],{"type":45,"value":4750},"\nUse a Store for cross-thread memory to share user preferences across conversations.\n",{"type":40,"tag":240,"props":4752,"children":4754},{"className":242,"code":4753,"language":234,"meta":244,"style":244},"from langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\n# Save user preference (available across ALL threads)\nstore.put((\"alice\", \"preferences\"), \"language\", {\"preference\": \"short responses\"})\n\n# Node with store — access via runtime\nfrom langgraph.runtime import Runtime\n\ndef respond(state, runtime: Runtime):\n    prefs = runtime.store.get((state[\"user_id\"], \"preferences\"), \"language\")\n    return {\"response\": f\"Using preference: {prefs.value}\"}\n\n# Compile with BOTH checkpointer and store\ngraph = builder.compile(checkpointer=checkpointer, store=store)\n\n# Both threads access same long-term memory\ngraph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-1\"}})\ngraph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-2\"}})  # Same preferences!\n",[4755],{"type":40,"tag":158,"props":4756,"children":4757},{"__ignoreMap":244},[4758,4766,4773,4781,4788,4796,4804,4811,4819,4827,4834,4842,4850,4858,4865,4873,4881,4888,4896,4904],{"type":40,"tag":250,"props":4759,"children":4760},{"class":252,"line":253},[4761],{"type":40,"tag":250,"props":4762,"children":4763},{},[4764],{"type":45,"value":4765},"from langgraph.store.memory import InMemoryStore\n",{"type":40,"tag":250,"props":4767,"children":4768},{"class":252,"line":262},[4769],{"type":40,"tag":250,"props":4770,"children":4771},{"emptyLinePlaceholder":293},[4772],{"type":45,"value":296},{"type":40,"tag":250,"props":4774,"children":4775},{"class":252,"line":271},[4776],{"type":40,"tag":250,"props":4777,"children":4778},{},[4779],{"type":45,"value":4780},"store = InMemoryStore()\n",{"type":40,"tag":250,"props":4782,"children":4783},{"class":252,"line":280},[4784],{"type":40,"tag":250,"props":4785,"children":4786},{"emptyLinePlaceholder":293},[4787],{"type":45,"value":296},{"type":40,"tag":250,"props":4789,"children":4790},{"class":252,"line":289},[4791],{"type":40,"tag":250,"props":4792,"children":4793},{},[4794],{"type":45,"value":4795},"# Save user preference (available across ALL threads)\n",{"type":40,"tag":250,"props":4797,"children":4798},{"class":252,"line":299},[4799],{"type":40,"tag":250,"props":4800,"children":4801},{},[4802],{"type":45,"value":4803},"store.put((\"alice\", \"preferences\"), \"language\", {\"preference\": \"short responses\"})\n",{"type":40,"tag":250,"props":4805,"children":4806},{"class":252,"line":308},[4807],{"type":40,"tag":250,"props":4808,"children":4809},{"emptyLinePlaceholder":293},[4810],{"type":45,"value":296},{"type":40,"tag":250,"props":4812,"children":4813},{"class":252,"line":317},[4814],{"type":40,"tag":250,"props":4815,"children":4816},{},[4817],{"type":45,"value":4818},"# Node with store — access via runtime\n",{"type":40,"tag":250,"props":4820,"children":4821},{"class":252,"line":325},[4822],{"type":40,"tag":250,"props":4823,"children":4824},{},[4825],{"type":45,"value":4826},"from langgraph.runtime import Runtime\n",{"type":40,"tag":250,"props":4828,"children":4829},{"class":252,"line":334},[4830],{"type":40,"tag":250,"props":4831,"children":4832},{"emptyLinePlaceholder":293},[4833],{"type":45,"value":296},{"type":40,"tag":250,"props":4835,"children":4836},{"class":252,"line":343},[4837],{"type":40,"tag":250,"props":4838,"children":4839},{},[4840],{"type":45,"value":4841},"def respond(state, runtime: Runtime):\n",{"type":40,"tag":250,"props":4843,"children":4844},{"class":252,"line":351},[4845],{"type":40,"tag":250,"props":4846,"children":4847},{},[4848],{"type":45,"value":4849},"    prefs = runtime.store.get((state[\"user_id\"], \"preferences\"), \"language\")\n",{"type":40,"tag":250,"props":4851,"children":4852},{"class":252,"line":360},[4853],{"type":40,"tag":250,"props":4854,"children":4855},{},[4856],{"type":45,"value":4857},"    return {\"response\": f\"Using preference: {prefs.value}\"}\n",{"type":40,"tag":250,"props":4859,"children":4860},{"class":252,"line":368},[4861],{"type":40,"tag":250,"props":4862,"children":4863},{"emptyLinePlaceholder":293},[4864],{"type":45,"value":296},{"type":40,"tag":250,"props":4866,"children":4867},{"class":252,"line":377},[4868],{"type":40,"tag":250,"props":4869,"children":4870},{},[4871],{"type":45,"value":4872},"# Compile with BOTH checkpointer and store\n",{"type":40,"tag":250,"props":4874,"children":4875},{"class":252,"line":386},[4876],{"type":40,"tag":250,"props":4877,"children":4878},{},[4879],{"type":45,"value":4880},"graph = builder.compile(checkpointer=checkpointer, store=store)\n",{"type":40,"tag":250,"props":4882,"children":4883},{"class":252,"line":395},[4884],{"type":40,"tag":250,"props":4885,"children":4886},{"emptyLinePlaceholder":293},[4887],{"type":45,"value":296},{"type":40,"tag":250,"props":4889,"children":4890},{"class":252,"line":404},[4891],{"type":40,"tag":250,"props":4892,"children":4893},{},[4894],{"type":45,"value":4895},"# Both threads access same long-term memory\n",{"type":40,"tag":250,"props":4897,"children":4898},{"class":252,"line":413},[4899],{"type":40,"tag":250,"props":4900,"children":4901},{},[4902],{"type":45,"value":4903},"graph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-1\"}})\n",{"type":40,"tag":250,"props":4905,"children":4906},{"class":252,"line":422},[4907],{"type":40,"tag":250,"props":4908,"children":4909},{},[4910],{"type":45,"value":4911},"graph.invoke({\"user_id\": \"alice\"}, {\"configurable\": {\"thread_id\": \"thread-2\"}})  # Same preferences!\n",{"type":40,"tag":508,"props":4913,"children":4914},{},[4915,4916],{"type":45,"value":4750},{"type":40,"tag":240,"props":4917,"children":4919},{"className":514,"code":4918,"language":508,"meta":244,"style":244},"import { MemoryStore } from \"@langchain\u002Flanggraph\";\n\nconst store = new MemoryStore();\n\n\u002F\u002F Save user preference (available across ALL threads)\nawait store.put([\"alice\", \"preferences\"], \"language\", { preference: \"short responses\" });\n\n\u002F\u002F Node with store — access via runtime\nconst respond = async (state: typeof State.State, runtime: any) => {\n  const item = await runtime.store?.get([\"alice\", \"preferences\"], \"language\");\n  return { response: `Using preference: ${item?.value?.preference}` };\n};\n\n\u002F\u002F Compile with BOTH checkpointer and store\nconst graph = builder.compile({ checkpointer, store });\n\n\u002F\u002F Both threads access same long-term memory\nawait graph.invoke({ userId: \"alice\" }, { configurable: { thread_id: \"thread-1\" } });\nawait graph.invoke({ userId: \"alice\" }, { configurable: { thread_id: \"thread-2\" } });  \u002F\u002F Same preferences!\n",[4920],{"type":40,"tag":158,"props":4921,"children":4922},{"__ignoreMap":244},[4923,4963,4970,5002,5009,5017,5136,5143,5151,5228,5331,5398,5405,5412,5420,5479,5486,5494,5600],{"type":40,"tag":250,"props":4924,"children":4925},{"class":252,"line":253},[4926,4930,4934,4939,4943,4947,4951,4955,4959],{"type":40,"tag":250,"props":4927,"children":4928},{"style":525},[4929],{"type":45,"value":528},{"type":40,"tag":250,"props":4931,"children":4932},{"style":531},[4933],{"type":45,"value":534},{"type":40,"tag":250,"props":4935,"children":4936},{"style":537},[4937],{"type":45,"value":4938}," MemoryStore",{"type":40,"tag":250,"props":4940,"children":4941},{"style":531},[4942],{"type":45,"value":591},{"type":40,"tag":250,"props":4944,"children":4945},{"style":525},[4946],{"type":45,"value":596},{"type":40,"tag":250,"props":4948,"children":4949},{"style":531},[4950],{"type":45,"value":601},{"type":40,"tag":250,"props":4952,"children":4953},{"style":604},[4954],{"type":45,"value":607},{"type":40,"tag":250,"props":4956,"children":4957},{"style":531},[4958],{"type":45,"value":612},{"type":40,"tag":250,"props":4960,"children":4961},{"style":531},[4962],{"type":45,"value":617},{"type":40,"tag":250,"props":4964,"children":4965},{"class":252,"line":262},[4966],{"type":40,"tag":250,"props":4967,"children":4968},{"emptyLinePlaceholder":293},[4969],{"type":45,"value":296},{"type":40,"tag":250,"props":4971,"children":4972},{"class":252,"line":271},[4973,4977,4982,4986,4990,4994,4998],{"type":40,"tag":250,"props":4974,"children":4975},{"style":671},[4976],{"type":45,"value":674},{"type":40,"tag":250,"props":4978,"children":4979},{"style":537},[4980],{"type":45,"value":4981}," store ",{"type":40,"tag":250,"props":4983,"children":4984},{"style":531},[4985],{"type":45,"value":684},{"type":40,"tag":250,"props":4987,"children":4988},{"style":531},[4989],{"type":45,"value":689},{"type":40,"tag":250,"props":4991,"children":4992},{"style":692},[4993],{"type":45,"value":4938},{"type":40,"tag":250,"props":4995,"children":4996},{"style":537},[4997],{"type":45,"value":945},{"type":40,"tag":250,"props":4999,"children":5000},{"style":531},[5001],{"type":45,"value":617},{"type":40,"tag":250,"props":5003,"children":5004},{"class":252,"line":280},[5005],{"type":40,"tag":250,"props":5006,"children":5007},{"emptyLinePlaceholder":293},[5008],{"type":45,"value":296},{"type":40,"tag":250,"props":5010,"children":5011},{"class":252,"line":289},[5012],{"type":40,"tag":250,"props":5013,"children":5014},{"style":1146},[5015],{"type":45,"value":5016},"\u002F\u002F Save user preference (available across ALL threads)\n",{"type":40,"tag":250,"props":5018,"children":5019},{"class":252,"line":299},[5020,5024,5029,5033,5038,5043,5047,5052,5056,5060,5064,5069,5073,5077,5081,5085,5090,5094,5098,5102,5107,5111,5115,5120,5124,5128,5132],{"type":40,"tag":250,"props":5021,"children":5022},{"style":525},[5023],{"type":45,"value":2034},{"type":40,"tag":250,"props":5025,"children":5026},{"style":537},[5027],{"type":45,"value":5028}," store",{"type":40,"tag":250,"props":5030,"children":5031},{"style":531},[5032],{"type":45,"value":792},{"type":40,"tag":250,"props":5034,"children":5035},{"style":692},[5036],{"type":45,"value":5037},"put",{"type":40,"tag":250,"props":5039,"children":5040},{"style":537},[5041],{"type":45,"value":5042},"([",{"type":40,"tag":250,"props":5044,"children":5045},{"style":531},[5046],{"type":45,"value":612},{"type":40,"tag":250,"props":5048,"children":5049},{"style":604},[5050],{"type":45,"value":5051},"alice",{"type":40,"tag":250,"props":5053,"children":5054},{"style":531},[5055],{"type":45,"value":612},{"type":40,"tag":250,"props":5057,"children":5058},{"style":531},[5059],{"type":45,"value":545},{"type":40,"tag":250,"props":5061,"children":5062},{"style":531},[5063],{"type":45,"value":601},{"type":40,"tag":250,"props":5065,"children":5066},{"style":604},[5067],{"type":45,"value":5068},"preferences",{"type":40,"tag":250,"props":5070,"children":5071},{"style":531},[5072],{"type":45,"value":612},{"type":40,"tag":250,"props":5074,"children":5075},{"style":537},[5076],{"type":45,"value":2739},{"type":40,"tag":250,"props":5078,"children":5079},{"style":531},[5080],{"type":45,"value":545},{"type":40,"tag":250,"props":5082,"children":5083},{"style":531},[5084],{"type":45,"value":601},{"type":40,"tag":250,"props":5086,"children":5087},{"style":604},[5088],{"type":45,"value":5089},"language",{"type":40,"tag":250,"props":5091,"children":5092},{"style":531},[5093],{"type":45,"value":612},{"type":40,"tag":250,"props":5095,"children":5096},{"style":531},[5097],{"type":45,"value":545},{"type":40,"tag":250,"props":5099,"children":5100},{"style":531},[5101],{"type":45,"value":534},{"type":40,"tag":250,"props":5103,"children":5104},{"style":707},[5105],{"type":45,"value":5106}," preference",{"type":40,"tag":250,"props":5108,"children":5109},{"style":531},[5110],{"type":45,"value":715},{"type":40,"tag":250,"props":5112,"children":5113},{"style":531},[5114],{"type":45,"value":601},{"type":40,"tag":250,"props":5116,"children":5117},{"style":604},[5118],{"type":45,"value":5119},"short responses",{"type":40,"tag":250,"props":5121,"children":5122},{"style":531},[5123],{"type":45,"value":612},{"type":40,"tag":250,"props":5125,"children":5126},{"style":531},[5127],{"type":45,"value":591},{"type":40,"tag":250,"props":5129,"children":5130},{"style":537},[5131],{"type":45,"value":730},{"type":40,"tag":250,"props":5133,"children":5134},{"style":531},[5135],{"type":45,"value":617},{"type":40,"tag":250,"props":5137,"children":5138},{"class":252,"line":308},[5139],{"type":40,"tag":250,"props":5140,"children":5141},{"emptyLinePlaceholder":293},[5142],{"type":45,"value":296},{"type":40,"tag":250,"props":5144,"children":5145},{"class":252,"line":317},[5146],{"type":40,"tag":250,"props":5147,"children":5148},{"style":1146},[5149],{"type":45,"value":5150},"\u002F\u002F Node with store — access via runtime\n",{"type":40,"tag":250,"props":5152,"children":5153},{"class":252,"line":325},[5154,5158,5163,5167,5171,5175,5179,5183,5187,5191,5195,5199,5203,5208,5212,5216,5220,5224],{"type":40,"tag":250,"props":5155,"children":5156},{"style":671},[5157],{"type":45,"value":674},{"type":40,"tag":250,"props":5159,"children":5160},{"style":537},[5161],{"type":45,"value":5162}," respond ",{"type":40,"tag":250,"props":5164,"children":5165},{"style":531},[5166],{"type":45,"value":684},{"type":40,"tag":250,"props":5168,"children":5169},{"style":671},[5170],{"type":45,"value":762},{"type":40,"tag":250,"props":5172,"children":5173},{"style":531},[5174],{"type":45,"value":767},{"type":40,"tag":250,"props":5176,"children":5177},{"style":770},[5178],{"type":45,"value":773},{"type":40,"tag":250,"props":5180,"children":5181},{"style":531},[5182],{"type":45,"value":715},{"type":40,"tag":250,"props":5184,"children":5185},{"style":531},[5186],{"type":45,"value":782},{"type":40,"tag":250,"props":5188,"children":5189},{"style":537},[5190],{"type":45,"value":787},{"type":40,"tag":250,"props":5192,"children":5193},{"style":531},[5194],{"type":45,"value":792},{"type":40,"tag":250,"props":5196,"children":5197},{"style":537},[5198],{"type":45,"value":797},{"type":40,"tag":250,"props":5200,"children":5201},{"style":531},[5202],{"type":45,"value":545},{"type":40,"tag":250,"props":5204,"children":5205},{"style":770},[5206],{"type":45,"value":5207}," runtime",{"type":40,"tag":250,"props":5209,"children":5210},{"style":531},[5211],{"type":45,"value":715},{"type":40,"tag":250,"props":5213,"children":5214},{"style":2530},[5215],{"type":45,"value":4188},{"type":40,"tag":250,"props":5217,"children":5218},{"style":531},[5219],{"type":45,"value":730},{"type":40,"tag":250,"props":5221,"children":5222},{"style":671},[5223],{"type":45,"value":806},{"type":40,"tag":250,"props":5225,"children":5226},{"style":531},[5227],{"type":45,"value":811},{"type":40,"tag":250,"props":5229,"children":5230},{"class":252,"line":334},[5231,5235,5240,5244,5248,5252,5256,5261,5266,5271,5275,5279,5283,5287,5291,5295,5299,5303,5307,5311,5315,5319,5323,5327],{"type":40,"tag":250,"props":5232,"children":5233},{"style":671},[5234],{"type":45,"value":4205},{"type":40,"tag":250,"props":5236,"children":5237},{"style":537},[5238],{"type":45,"value":5239}," item",{"type":40,"tag":250,"props":5241,"children":5242},{"style":531},[5243],{"type":45,"value":4215},{"type":40,"tag":250,"props":5245,"children":5246},{"style":525},[5247],{"type":45,"value":1241},{"type":40,"tag":250,"props":5249,"children":5250},{"style":537},[5251],{"type":45,"value":5207},{"type":40,"tag":250,"props":5253,"children":5254},{"style":531},[5255],{"type":45,"value":792},{"type":40,"tag":250,"props":5257,"children":5258},{"style":537},[5259],{"type":45,"value":5260},"store",{"type":40,"tag":250,"props":5262,"children":5263},{"style":531},[5264],{"type":45,"value":5265},"?.",{"type":40,"tag":250,"props":5267,"children":5268},{"style":692},[5269],{"type":45,"value":5270},"get",{"type":40,"tag":250,"props":5272,"children":5273},{"style":707},[5274],{"type":45,"value":5042},{"type":40,"tag":250,"props":5276,"children":5277},{"style":531},[5278],{"type":45,"value":612},{"type":40,"tag":250,"props":5280,"children":5281},{"style":604},[5282],{"type":45,"value":5051},{"type":40,"tag":250,"props":5284,"children":5285},{"style":531},[5286],{"type":45,"value":612},{"type":40,"tag":250,"props":5288,"children":5289},{"style":531},[5290],{"type":45,"value":545},{"type":40,"tag":250,"props":5292,"children":5293},{"style":531},[5294],{"type":45,"value":601},{"type":40,"tag":250,"props":5296,"children":5297},{"style":604},[5298],{"type":45,"value":5068},{"type":40,"tag":250,"props":5300,"children":5301},{"style":531},[5302],{"type":45,"value":612},{"type":40,"tag":250,"props":5304,"children":5305},{"style":707},[5306],{"type":45,"value":2739},{"type":40,"tag":250,"props":5308,"children":5309},{"style":531},[5310],{"type":45,"value":545},{"type":40,"tag":250,"props":5312,"children":5313},{"style":531},[5314],{"type":45,"value":601},{"type":40,"tag":250,"props":5316,"children":5317},{"style":604},[5318],{"type":45,"value":5089},{"type":40,"tag":250,"props":5320,"children":5321},{"style":531},[5322],{"type":45,"value":612},{"type":40,"tag":250,"props":5324,"children":5325},{"style":707},[5326],{"type":45,"value":730},{"type":40,"tag":250,"props":5328,"children":5329},{"style":531},[5330],{"type":45,"value":617},{"type":40,"tag":250,"props":5332,"children":5333},{"class":252,"line":343},[5334,5338,5342,5347,5351,5356,5361,5366,5371,5375,5380,5384,5389,5394],{"type":40,"tag":250,"props":5335,"children":5336},{"style":525},[5337],{"type":45,"value":819},{"type":40,"tag":250,"props":5339,"children":5340},{"style":531},[5341],{"type":45,"value":534},{"type":40,"tag":250,"props":5343,"children":5344},{"style":707},[5345],{"type":45,"value":5346}," response",{"type":40,"tag":250,"props":5348,"children":5349},{"style":531},[5350],{"type":45,"value":715},{"type":40,"tag":250,"props":5352,"children":5353},{"style":531},[5354],{"type":45,"value":5355}," `",{"type":40,"tag":250,"props":5357,"children":5358},{"style":604},[5359],{"type":45,"value":5360},"Using preference: ",{"type":40,"tag":250,"props":5362,"children":5363},{"style":531},[5364],{"type":45,"value":5365},"${",{"type":40,"tag":250,"props":5367,"children":5368},{"style":537},[5369],{"type":45,"value":5370},"item",{"type":40,"tag":250,"props":5372,"children":5373},{"style":531},[5374],{"type":45,"value":5265},{"type":40,"tag":250,"props":5376,"children":5377},{"style":537},[5378],{"type":45,"value":5379},"value",{"type":40,"tag":250,"props":5381,"children":5382},{"style":531},[5383],{"type":45,"value":5265},{"type":40,"tag":250,"props":5385,"children":5386},{"style":537},[5387],{"type":45,"value":5388},"preference",{"type":40,"tag":250,"props":5390,"children":5391},{"style":531},[5392],{"type":45,"value":5393},"}`",{"type":40,"tag":250,"props":5395,"children":5396},{"style":531},[5397],{"type":45,"value":1213},{"type":40,"tag":250,"props":5399,"children":5400},{"class":252,"line":351},[5401],{"type":40,"tag":250,"props":5402,"children":5403},{"style":531},[5404],{"type":45,"value":902},{"type":40,"tag":250,"props":5406,"children":5407},{"class":252,"line":360},[5408],{"type":40,"tag":250,"props":5409,"children":5410},{"emptyLinePlaceholder":293},[5411],{"type":45,"value":296},{"type":40,"tag":250,"props":5413,"children":5414},{"class":252,"line":368},[5415],{"type":40,"tag":250,"props":5416,"children":5417},{"style":1146},[5418],{"type":45,"value":5419},"\u002F\u002F Compile with BOTH checkpointer and store\n",{"type":40,"tag":250,"props":5421,"children":5422},{"class":252,"line":377},[5423,5427,5431,5435,5439,5443,5447,5451,5455,5459,5463,5467,5471,5475],{"type":40,"tag":250,"props":5424,"children":5425},{"style":671},[5426],{"type":45,"value":674},{"type":40,"tag":250,"props":5428,"children":5429},{"style":537},[5430],{"type":45,"value":968},{"type":40,"tag":250,"props":5432,"children":5433},{"style":531},[5434],{"type":45,"value":684},{"type":40,"tag":250,"props":5436,"children":5437},{"style":537},[5438],{"type":45,"value":1759},{"type":40,"tag":250,"props":5440,"children":5441},{"style":531},[5442],{"type":45,"value":792},{"type":40,"tag":250,"props":5444,"children":5445},{"style":692},[5446],{"type":45,"value":1109},{"type":40,"tag":250,"props":5448,"children":5449},{"style":537},[5450],{"type":45,"value":699},{"type":40,"tag":250,"props":5452,"children":5453},{"style":531},[5454],{"type":45,"value":704},{"type":40,"tag":250,"props":5456,"children":5457},{"style":537},[5458],{"type":45,"value":3653},{"type":40,"tag":250,"props":5460,"children":5461},{"style":531},[5462],{"type":45,"value":545},{"type":40,"tag":250,"props":5464,"children":5465},{"style":537},[5466],{"type":45,"value":4981},{"type":40,"tag":250,"props":5468,"children":5469},{"style":531},[5470],{"type":45,"value":725},{"type":40,"tag":250,"props":5472,"children":5473},{"style":537},[5474],{"type":45,"value":730},{"type":40,"tag":250,"props":5476,"children":5477},{"style":531},[5478],{"type":45,"value":617},{"type":40,"tag":250,"props":5480,"children":5481},{"class":252,"line":386},[5482],{"type":40,"tag":250,"props":5483,"children":5484},{"emptyLinePlaceholder":293},[5485],{"type":45,"value":296},{"type":40,"tag":250,"props":5487,"children":5488},{"class":252,"line":395},[5489],{"type":40,"tag":250,"props":5490,"children":5491},{"style":1146},[5492],{"type":45,"value":5493},"\u002F\u002F Both threads access same long-term memory\n",{"type":40,"tag":250,"props":5495,"children":5496},{"class":252,"line":404},[5497,5501,5505,5509,5513,5517,5521,5526,5530,5534,5538,5542,5547,5551,5555,5559,5563,5567,5571,5575,5580,5584,5588,5592,5596],{"type":40,"tag":250,"props":5498,"children":5499},{"style":525},[5500],{"type":45,"value":2034},{"type":40,"tag":250,"props":5502,"children":5503},{"style":537},[5504],{"type":45,"value":1246},{"type":40,"tag":250,"props":5506,"children":5507},{"style":531},[5508],{"type":45,"value":792},{"type":40,"tag":250,"props":5510,"children":5511},{"style":692},[5512],{"type":45,"value":1255},{"type":40,"tag":250,"props":5514,"children":5515},{"style":537},[5516],{"type":45,"value":699},{"type":40,"tag":250,"props":5518,"children":5519},{"style":531},[5520],{"type":45,"value":704},{"type":40,"tag":250,"props":5522,"children":5523},{"style":707},[5524],{"type":45,"value":5525}," userId",{"type":40,"tag":250,"props":5527,"children":5528},{"style":531},[5529],{"type":45,"value":715},{"type":40,"tag":250,"props":5531,"children":5532},{"style":531},[5533],{"type":45,"value":601},{"type":40,"tag":250,"props":5535,"children":5536},{"style":604},[5537],{"type":45,"value":5051},{"type":40,"tag":250,"props":5539,"children":5540},{"style":531},[5541],{"type":45,"value":612},{"type":40,"tag":250,"props":5543,"children":5544},{"style":531},[5545],{"type":45,"value":5546}," },",{"type":40,"tag":250,"props":5548,"children":5549},{"style":531},[5550],{"type":45,"value":534},{"type":40,"tag":250,"props":5552,"children":5553},{"style":707},[5554],{"type":45,"value":1174},{"type":40,"tag":250,"props":5556,"children":5557},{"style":531},[5558],{"type":45,"value":715},{"type":40,"tag":250,"props":5560,"children":5561},{"style":531},[5562],{"type":45,"value":534},{"type":40,"tag":250,"props":5564,"children":5565},{"style":707},[5566],{"type":45,"value":1187},{"type":40,"tag":250,"props":5568,"children":5569},{"style":531},[5570],{"type":45,"value":715},{"type":40,"tag":250,"props":5572,"children":5573},{"style":531},[5574],{"type":45,"value":601},{"type":40,"tag":250,"props":5576,"children":5577},{"style":604},[5578],{"type":45,"value":5579},"thread-1",{"type":40,"tag":250,"props":5581,"children":5582},{"style":531},[5583],{"type":45,"value":612},{"type":40,"tag":250,"props":5585,"children":5586},{"style":531},[5587],{"type":45,"value":591},{"type":40,"tag":250,"props":5589,"children":5590},{"style":531},[5591],{"type":45,"value":591},{"type":40,"tag":250,"props":5593,"children":5594},{"style":537},[5595],{"type":45,"value":730},{"type":40,"tag":250,"props":5597,"children":5598},{"style":531},[5599],{"type":45,"value":617},{"type":40,"tag":250,"props":5601,"children":5602},{"class":252,"line":413},[5603,5607,5611,5615,5619,5623,5627,5631,5635,5639,5643,5647,5651,5655,5659,5663,5667,5671,5675,5679,5684,5688,5692,5696,5700,5704],{"type":40,"tag":250,"props":5604,"children":5605},{"style":525},[5606],{"type":45,"value":2034},{"type":40,"tag":250,"props":5608,"children":5609},{"style":537},[5610],{"type":45,"value":1246},{"type":40,"tag":250,"props":5612,"children":5613},{"style":531},[5614],{"type":45,"value":792},{"type":40,"tag":250,"props":5616,"children":5617},{"style":692},[5618],{"type":45,"value":1255},{"type":40,"tag":250,"props":5620,"children":5621},{"style":537},[5622],{"type":45,"value":699},{"type":40,"tag":250,"props":5624,"children":5625},{"style":531},[5626],{"type":45,"value":704},{"type":40,"tag":250,"props":5628,"children":5629},{"style":707},[5630],{"type":45,"value":5525},{"type":40,"tag":250,"props":5632,"children":5633},{"style":531},[5634],{"type":45,"value":715},{"type":40,"tag":250,"props":5636,"children":5637},{"style":531},[5638],{"type":45,"value":601},{"type":40,"tag":250,"props":5640,"children":5641},{"style":604},[5642],{"type":45,"value":5051},{"type":40,"tag":250,"props":5644,"children":5645},{"style":531},[5646],{"type":45,"value":612},{"type":40,"tag":250,"props":5648,"children":5649},{"style":531},[5650],{"type":45,"value":5546},{"type":40,"tag":250,"props":5652,"children":5653},{"style":531},[5654],{"type":45,"value":534},{"type":40,"tag":250,"props":5656,"children":5657},{"style":707},[5658],{"type":45,"value":1174},{"type":40,"tag":250,"props":5660,"children":5661},{"style":531},[5662],{"type":45,"value":715},{"type":40,"tag":250,"props":5664,"children":5665},{"style":531},[5666],{"type":45,"value":534},{"type":40,"tag":250,"props":5668,"children":5669},{"style":707},[5670],{"type":45,"value":1187},{"type":40,"tag":250,"props":5672,"children":5673},{"style":531},[5674],{"type":45,"value":715},{"type":40,"tag":250,"props":5676,"children":5677},{"style":531},[5678],{"type":45,"value":601},{"type":40,"tag":250,"props":5680,"children":5681},{"style":604},[5682],{"type":45,"value":5683},"thread-2",{"type":40,"tag":250,"props":5685,"children":5686},{"style":531},[5687],{"type":45,"value":612},{"type":40,"tag":250,"props":5689,"children":5690},{"style":531},[5691],{"type":45,"value":591},{"type":40,"tag":250,"props":5693,"children":5694},{"style":531},[5695],{"type":45,"value":591},{"type":40,"tag":250,"props":5697,"children":5698},{"style":537},[5699],{"type":45,"value":730},{"type":40,"tag":250,"props":5701,"children":5702},{"style":531},[5703],{"type":45,"value":1365},{"type":40,"tag":250,"props":5705,"children":5706},{"style":1146},[5707],{"type":45,"value":5708},"  \u002F\u002F Same preferences!\n",{"type":40,"tag":5710,"props":5711,"children":5712},"ex-store-operations",{},[5713],{"type":40,"tag":234,"props":5714,"children":5715},{},[5716,5718],{"type":45,"value":5717},"\nBasic store operations: put, get, search, and delete.\n",{"type":40,"tag":240,"props":5719,"children":5721},{"className":242,"code":5720,"language":234,"meta":244,"style":244},"from langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\nstore.put((\"user-123\", \"facts\"), \"location\", {\"city\": \"San Francisco\"})  # Put\nitem = store.get((\"user-123\", \"facts\"), \"location\")  # Get\nresults = store.search((\"user-123\", \"facts\"), filter={\"city\": \"San Francisco\"})  # Search\nstore.delete((\"user-123\", \"facts\"), \"location\")  # Delete\n",[5722],{"type":40,"tag":158,"props":5723,"children":5724},{"__ignoreMap":244},[5725,5732,5739,5746,5753,5761,5769,5777],{"type":40,"tag":250,"props":5726,"children":5727},{"class":252,"line":253},[5728],{"type":40,"tag":250,"props":5729,"children":5730},{},[5731],{"type":45,"value":4765},{"type":40,"tag":250,"props":5733,"children":5734},{"class":252,"line":262},[5735],{"type":40,"tag":250,"props":5736,"children":5737},{"emptyLinePlaceholder":293},[5738],{"type":45,"value":296},{"type":40,"tag":250,"props":5740,"children":5741},{"class":252,"line":271},[5742],{"type":40,"tag":250,"props":5743,"children":5744},{},[5745],{"type":45,"value":4780},{"type":40,"tag":250,"props":5747,"children":5748},{"class":252,"line":280},[5749],{"type":40,"tag":250,"props":5750,"children":5751},{"emptyLinePlaceholder":293},[5752],{"type":45,"value":296},{"type":40,"tag":250,"props":5754,"children":5755},{"class":252,"line":289},[5756],{"type":40,"tag":250,"props":5757,"children":5758},{},[5759],{"type":45,"value":5760},"store.put((\"user-123\", \"facts\"), \"location\", {\"city\": \"San Francisco\"})  # Put\n",{"type":40,"tag":250,"props":5762,"children":5763},{"class":252,"line":299},[5764],{"type":40,"tag":250,"props":5765,"children":5766},{},[5767],{"type":45,"value":5768},"item = store.get((\"user-123\", \"facts\"), \"location\")  # Get\n",{"type":40,"tag":250,"props":5770,"children":5771},{"class":252,"line":308},[5772],{"type":40,"tag":250,"props":5773,"children":5774},{},[5775],{"type":45,"value":5776},"results = store.search((\"user-123\", \"facts\"), filter={\"city\": \"San Francisco\"})  # Search\n",{"type":40,"tag":250,"props":5778,"children":5779},{"class":252,"line":317},[5780],{"type":40,"tag":250,"props":5781,"children":5782},{},[5783],{"type":45,"value":5784},"store.delete((\"user-123\", \"facts\"), \"location\")  # Delete\n",{"type":40,"tag":219,"props":5786,"children":5787},{},[],{"type":40,"tag":223,"props":5789,"children":5791},{"id":5790},"fixes",[5792],{"type":45,"value":5793},"Fixes",{"type":40,"tag":5795,"props":5796,"children":5797},"fix-thread-id-required",{},[5798,5872],{"type":40,"tag":234,"props":5799,"children":5800},{},[5801,5803],{"type":45,"value":5802},"\nAlways provide thread_id in config to enable state persistence.\n",{"type":40,"tag":240,"props":5804,"children":5806},{"className":242,"code":5805,"language":234,"meta":244,"style":244},"# WRONG: No thread_id - state NOT persisted!\ngraph.invoke({\"messages\": [\"Hello\"]})\ngraph.invoke({\"messages\": [\"What did I say?\"]})  # Doesn't remember!\n\n# CORRECT: Always provide thread_id\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\ngraph.invoke({\"messages\": [\"Hello\"]}, config)\ngraph.invoke({\"messages\": [\"What did I say?\"]}, config)  # Remembers!\n",[5807],{"type":40,"tag":158,"props":5808,"children":5809},{"__ignoreMap":244},[5810,5818,5826,5834,5841,5849,5856,5864],{"type":40,"tag":250,"props":5811,"children":5812},{"class":252,"line":253},[5813],{"type":40,"tag":250,"props":5814,"children":5815},{},[5816],{"type":45,"value":5817},"# WRONG: No thread_id - state NOT persisted!\n",{"type":40,"tag":250,"props":5819,"children":5820},{"class":252,"line":262},[5821],{"type":40,"tag":250,"props":5822,"children":5823},{},[5824],{"type":45,"value":5825},"graph.invoke({\"messages\": [\"Hello\"]})\n",{"type":40,"tag":250,"props":5827,"children":5828},{"class":252,"line":271},[5829],{"type":40,"tag":250,"props":5830,"children":5831},{},[5832],{"type":45,"value":5833},"graph.invoke({\"messages\": [\"What did I say?\"]})  # Doesn't remember!\n",{"type":40,"tag":250,"props":5835,"children":5836},{"class":252,"line":280},[5837],{"type":40,"tag":250,"props":5838,"children":5839},{"emptyLinePlaceholder":293},[5840],{"type":45,"value":296},{"type":40,"tag":250,"props":5842,"children":5843},{"class":252,"line":289},[5844],{"type":40,"tag":250,"props":5845,"children":5846},{},[5847],{"type":45,"value":5848},"# CORRECT: Always provide thread_id\n",{"type":40,"tag":250,"props":5850,"children":5851},{"class":252,"line":299},[5852],{"type":40,"tag":250,"props":5853,"children":5854},{},[5855],{"type":45,"value":2237},{"type":40,"tag":250,"props":5857,"children":5858},{"class":252,"line":308},[5859],{"type":40,"tag":250,"props":5860,"children":5861},{},[5862],{"type":45,"value":5863},"graph.invoke({\"messages\": [\"Hello\"]}, config)\n",{"type":40,"tag":250,"props":5865,"children":5866},{"class":252,"line":317},[5867],{"type":40,"tag":250,"props":5868,"children":5869},{},[5870],{"type":45,"value":5871},"graph.invoke({\"messages\": [\"What did I say?\"]}, config)  # Remembers!\n",{"type":40,"tag":508,"props":5873,"children":5874},{},[5875,5876],{"type":45,"value":5802},{"type":40,"tag":240,"props":5877,"children":5879},{"className":514,"code":5878,"language":508,"meta":244,"style":244},"\u002F\u002F WRONG: No thread_id - state NOT persisted!\nawait graph.invoke({ messages: [new HumanMessage(\"Hello\")] });\nawait graph.invoke({ messages: [new HumanMessage(\"What did I say?\")] });  \u002F\u002F Doesn't remember!\n\n\u002F\u002F CORRECT: Always provide thread_id\nconst config = { configurable: { thread_id: \"session-1\" } };\nawait graph.invoke({ messages: [new HumanMessage(\"Hello\")] }, config);\nawait graph.invoke({ messages: [new HumanMessage(\"What did I say?\")] }, config);  \u002F\u002F Remembers!\n",[5880],{"type":40,"tag":158,"props":5881,"children":5882},{"__ignoreMap":244},[5883,5891,5970,6055,6062,6070,6129,6208],{"type":40,"tag":250,"props":5884,"children":5885},{"class":252,"line":253},[5886],{"type":40,"tag":250,"props":5887,"children":5888},{"style":1146},[5889],{"type":45,"value":5890},"\u002F\u002F WRONG: No thread_id - state NOT persisted!\n",{"type":40,"tag":250,"props":5892,"children":5893},{"class":252,"line":262},[5894,5898,5902,5906,5910,5914,5918,5922,5926,5930,5934,5938,5942,5946,5950,5954,5958,5962,5966],{"type":40,"tag":250,"props":5895,"children":5896},{"style":525},[5897],{"type":45,"value":2034},{"type":40,"tag":250,"props":5899,"children":5900},{"style":537},[5901],{"type":45,"value":1246},{"type":40,"tag":250,"props":5903,"children":5904},{"style":531},[5905],{"type":45,"value":792},{"type":40,"tag":250,"props":5907,"children":5908},{"style":692},[5909],{"type":45,"value":1255},{"type":40,"tag":250,"props":5911,"children":5912},{"style":537},[5913],{"type":45,"value":699},{"type":40,"tag":250,"props":5915,"children":5916},{"style":531},[5917],{"type":45,"value":704},{"type":40,"tag":250,"props":5919,"children":5920},{"style":707},[5921],{"type":45,"value":710},{"type":40,"tag":250,"props":5923,"children":5924},{"style":531},[5925],{"type":45,"value":715},{"type":40,"tag":250,"props":5927,"children":5928},{"style":537},[5929],{"type":45,"value":836},{"type":40,"tag":250,"props":5931,"children":5932},{"style":531},[5933],{"type":45,"value":1280},{"type":40,"tag":250,"props":5935,"children":5936},{"style":692},[5937],{"type":45,"value":633},{"type":40,"tag":250,"props":5939,"children":5940},{"style":537},[5941],{"type":45,"value":699},{"type":40,"tag":250,"props":5943,"children":5944},{"style":531},[5945],{"type":45,"value":612},{"type":40,"tag":250,"props":5947,"children":5948},{"style":604},[5949],{"type":45,"value":1297},{"type":40,"tag":250,"props":5951,"children":5952},{"style":531},[5953],{"type":45,"value":612},{"type":40,"tag":250,"props":5955,"children":5956},{"style":537},[5957],{"type":45,"value":1306},{"type":40,"tag":250,"props":5959,"children":5960},{"style":531},[5961],{"type":45,"value":725},{"type":40,"tag":250,"props":5963,"children":5964},{"style":537},[5965],{"type":45,"value":730},{"type":40,"tag":250,"props":5967,"children":5968},{"style":531},[5969],{"type":45,"value":617},{"type":40,"tag":250,"props":5971,"children":5972},{"class":252,"line":271},[5973,5977,5981,5985,5989,5993,5997,6001,6005,6009,6013,6017,6021,6025,6030,6034,6038,6042,6046,6050],{"type":40,"tag":250,"props":5974,"children":5975},{"style":525},[5976],{"type":45,"value":2034},{"type":40,"tag":250,"props":5978,"children":5979},{"style":537},[5980],{"type":45,"value":1246},{"type":40,"tag":250,"props":5982,"children":5983},{"style":531},[5984],{"type":45,"value":792},{"type":40,"tag":250,"props":5986,"children":5987},{"style":692},[5988],{"type":45,"value":1255},{"type":40,"tag":250,"props":5990,"children":5991},{"style":537},[5992],{"type":45,"value":699},{"type":40,"tag":250,"props":5994,"children":5995},{"style":531},[5996],{"type":45,"value":704},{"type":40,"tag":250,"props":5998,"children":5999},{"style":707},[6000],{"type":45,"value":710},{"type":40,"tag":250,"props":6002,"children":6003},{"style":531},[6004],{"type":45,"value":715},{"type":40,"tag":250,"props":6006,"children":6007},{"style":537},[6008],{"type":45,"value":836},{"type":40,"tag":250,"props":6010,"children":6011},{"style":531},[6012],{"type":45,"value":1280},{"type":40,"tag":250,"props":6014,"children":6015},{"style":692},[6016],{"type":45,"value":633},{"type":40,"tag":250,"props":6018,"children":6019},{"style":537},[6020],{"type":45,"value":699},{"type":40,"tag":250,"props":6022,"children":6023},{"style":531},[6024],{"type":45,"value":612},{"type":40,"tag":250,"props":6026,"children":6027},{"style":604},[6028],{"type":45,"value":6029},"What did I say?",{"type":40,"tag":250,"props":6031,"children":6032},{"style":531},[6033],{"type":45,"value":612},{"type":40,"tag":250,"props":6035,"children":6036},{"style":537},[6037],{"type":45,"value":1306},{"type":40,"tag":250,"props":6039,"children":6040},{"style":531},[6041],{"type":45,"value":725},{"type":40,"tag":250,"props":6043,"children":6044},{"style":537},[6045],{"type":45,"value":730},{"type":40,"tag":250,"props":6047,"children":6048},{"style":531},[6049],{"type":45,"value":1365},{"type":40,"tag":250,"props":6051,"children":6052},{"style":1146},[6053],{"type":45,"value":6054},"  \u002F\u002F Doesn't remember!\n",{"type":40,"tag":250,"props":6056,"children":6057},{"class":252,"line":280},[6058],{"type":40,"tag":250,"props":6059,"children":6060},{"emptyLinePlaceholder":293},[6061],{"type":45,"value":296},{"type":40,"tag":250,"props":6063,"children":6064},{"class":252,"line":289},[6065],{"type":40,"tag":250,"props":6066,"children":6067},{"style":1146},[6068],{"type":45,"value":6069},"\u002F\u002F CORRECT: Always provide thread_id\n",{"type":40,"tag":250,"props":6071,"children":6072},{"class":252,"line":299},[6073,6077,6081,6085,6089,6093,6097,6101,6105,6109,6113,6117,6121,6125],{"type":40,"tag":250,"props":6074,"children":6075},{"style":671},[6076],{"type":45,"value":674},{"type":40,"tag":250,"props":6078,"children":6079},{"style":537},[6080],{"type":45,"value":1161},{"type":40,"tag":250,"props":6082,"children":6083},{"style":531},[6084],{"type":45,"value":684},{"type":40,"tag":250,"props":6086,"children":6087},{"style":531},[6088],{"type":45,"value":534},{"type":40,"tag":250,"props":6090,"children":6091},{"style":707},[6092],{"type":45,"value":1174},{"type":40,"tag":250,"props":6094,"children":6095},{"style":531},[6096],{"type":45,"value":715},{"type":40,"tag":250,"props":6098,"children":6099},{"style":531},[6100],{"type":45,"value":534},{"type":40,"tag":250,"props":6102,"children":6103},{"style":707},[6104],{"type":45,"value":1187},{"type":40,"tag":250,"props":6106,"children":6107},{"style":531},[6108],{"type":45,"value":715},{"type":40,"tag":250,"props":6110,"children":6111},{"style":531},[6112],{"type":45,"value":601},{"type":40,"tag":250,"props":6114,"children":6115},{"style":604},[6116],{"type":45,"value":2396},{"type":40,"tag":250,"props":6118,"children":6119},{"style":531},[6120],{"type":45,"value":612},{"type":40,"tag":250,"props":6122,"children":6123},{"style":531},[6124],{"type":45,"value":591},{"type":40,"tag":250,"props":6126,"children":6127},{"style":531},[6128],{"type":45,"value":1213},{"type":40,"tag":250,"props":6130,"children":6131},{"class":252,"line":308},[6132,6136,6140,6144,6148,6152,6156,6160,6164,6168,6172,6176,6180,6184,6188,6192,6196,6200,6204],{"type":40,"tag":250,"props":6133,"children":6134},{"style":525},[6135],{"type":45,"value":2034},{"type":40,"tag":250,"props":6137,"children":6138},{"style":537},[6139],{"type":45,"value":1246},{"type":40,"tag":250,"props":6141,"children":6142},{"style":531},[6143],{"type":45,"value":792},{"type":40,"tag":250,"props":6145,"children":6146},{"style":692},[6147],{"type":45,"value":1255},{"type":40,"tag":250,"props":6149,"children":6150},{"style":537},[6151],{"type":45,"value":699},{"type":40,"tag":250,"props":6153,"children":6154},{"style":531},[6155],{"type":45,"value":704},{"type":40,"tag":250,"props":6157,"children":6158},{"style":707},[6159],{"type":45,"value":710},{"type":40,"tag":250,"props":6161,"children":6162},{"style":531},[6163],{"type":45,"value":715},{"type":40,"tag":250,"props":6165,"children":6166},{"style":537},[6167],{"type":45,"value":836},{"type":40,"tag":250,"props":6169,"children":6170},{"style":531},[6171],{"type":45,"value":1280},{"type":40,"tag":250,"props":6173,"children":6174},{"style":692},[6175],{"type":45,"value":633},{"type":40,"tag":250,"props":6177,"children":6178},{"style":537},[6179],{"type":45,"value":699},{"type":40,"tag":250,"props":6181,"children":6182},{"style":531},[6183],{"type":45,"value":612},{"type":40,"tag":250,"props":6185,"children":6186},{"style":604},[6187],{"type":45,"value":1297},{"type":40,"tag":250,"props":6189,"children":6190},{"style":531},[6191],{"type":45,"value":612},{"type":40,"tag":250,"props":6193,"children":6194},{"style":537},[6195],{"type":45,"value":1306},{"type":40,"tag":250,"props":6197,"children":6198},{"style":531},[6199],{"type":45,"value":1311},{"type":40,"tag":250,"props":6201,"children":6202},{"style":537},[6203],{"type":45,"value":1316},{"type":40,"tag":250,"props":6205,"children":6206},{"style":531},[6207],{"type":45,"value":617},{"type":40,"tag":250,"props":6209,"children":6210},{"class":252,"line":317},[6211,6215,6219,6223,6227,6231,6235,6239,6243,6247,6251,6255,6259,6263,6267,6271,6275,6279,6283,6287],{"type":40,"tag":250,"props":6212,"children":6213},{"style":525},[6214],{"type":45,"value":2034},{"type":40,"tag":250,"props":6216,"children":6217},{"style":537},[6218],{"type":45,"value":1246},{"type":40,"tag":250,"props":6220,"children":6221},{"style":531},[6222],{"type":45,"value":792},{"type":40,"tag":250,"props":6224,"children":6225},{"style":692},[6226],{"type":45,"value":1255},{"type":40,"tag":250,"props":6228,"children":6229},{"style":537},[6230],{"type":45,"value":699},{"type":40,"tag":250,"props":6232,"children":6233},{"style":531},[6234],{"type":45,"value":704},{"type":40,"tag":250,"props":6236,"children":6237},{"style":707},[6238],{"type":45,"value":710},{"type":40,"tag":250,"props":6240,"children":6241},{"style":531},[6242],{"type":45,"value":715},{"type":40,"tag":250,"props":6244,"children":6245},{"style":537},[6246],{"type":45,"value":836},{"type":40,"tag":250,"props":6248,"children":6249},{"style":531},[6250],{"type":45,"value":1280},{"type":40,"tag":250,"props":6252,"children":6253},{"style":692},[6254],{"type":45,"value":633},{"type":40,"tag":250,"props":6256,"children":6257},{"style":537},[6258],{"type":45,"value":699},{"type":40,"tag":250,"props":6260,"children":6261},{"style":531},[6262],{"type":45,"value":612},{"type":40,"tag":250,"props":6264,"children":6265},{"style":604},[6266],{"type":45,"value":6029},{"type":40,"tag":250,"props":6268,"children":6269},{"style":531},[6270],{"type":45,"value":612},{"type":40,"tag":250,"props":6272,"children":6273},{"style":537},[6274],{"type":45,"value":1306},{"type":40,"tag":250,"props":6276,"children":6277},{"style":531},[6278],{"type":45,"value":1311},{"type":40,"tag":250,"props":6280,"children":6281},{"style":537},[6282],{"type":45,"value":1316},{"type":40,"tag":250,"props":6284,"children":6285},{"style":531},[6286],{"type":45,"value":1365},{"type":40,"tag":250,"props":6288,"children":6289},{"style":1146},[6290],{"type":45,"value":6291},"  \u002F\u002F Remembers!\n",{"type":40,"tag":6293,"props":6294,"children":6295},"fix-inmemory-not-for-production",{},[6296,6369],{"type":40,"tag":234,"props":6297,"children":6298},{},[6299,6301],{"type":45,"value":6300},"\nUse PostgresSaver instead of InMemorySaver for production persistence.\n",{"type":40,"tag":240,"props":6302,"children":6304},{"className":242,"code":6303,"language":234,"meta":244,"style":244},"# WRONG: Data lost on process restart\ncheckpointer = InMemorySaver()  # In-memory only!\n\n# CORRECT: Use persistent storage for production\nfrom langgraph.checkpoint.postgres import PostgresSaver\nwith PostgresSaver.from_conn_string(\"postgresql:\u002F\u002F...\") as checkpointer:\n    checkpointer.setup()  # only needed on first use to create tables\n    graph = builder.compile(checkpointer=checkpointer)\n",[6305],{"type":40,"tag":158,"props":6306,"children":6307},{"__ignoreMap":244},[6308,6316,6324,6331,6339,6346,6354,6362],{"type":40,"tag":250,"props":6309,"children":6310},{"class":252,"line":253},[6311],{"type":40,"tag":250,"props":6312,"children":6313},{},[6314],{"type":45,"value":6315},"# WRONG: Data lost on process restart\n",{"type":40,"tag":250,"props":6317,"children":6318},{"class":252,"line":262},[6319],{"type":40,"tag":250,"props":6320,"children":6321},{},[6322],{"type":45,"value":6323},"checkpointer = InMemorySaver()  # In-memory only!\n",{"type":40,"tag":250,"props":6325,"children":6326},{"class":252,"line":271},[6327],{"type":40,"tag":250,"props":6328,"children":6329},{"emptyLinePlaceholder":293},[6330],{"type":45,"value":296},{"type":40,"tag":250,"props":6332,"children":6333},{"class":252,"line":280},[6334],{"type":40,"tag":250,"props":6335,"children":6336},{},[6337],{"type":45,"value":6338},"# CORRECT: Use persistent storage for production\n",{"type":40,"tag":250,"props":6340,"children":6341},{"class":252,"line":289},[6342],{"type":40,"tag":250,"props":6343,"children":6344},{},[6345],{"type":45,"value":1547},{"type":40,"tag":250,"props":6347,"children":6348},{"class":252,"line":299},[6349],{"type":40,"tag":250,"props":6350,"children":6351},{},[6352],{"type":45,"value":6353},"with PostgresSaver.from_conn_string(\"postgresql:\u002F\u002F...\") as checkpointer:\n",{"type":40,"tag":250,"props":6355,"children":6356},{"class":252,"line":308},[6357],{"type":40,"tag":250,"props":6358,"children":6359},{},[6360],{"type":45,"value":6361},"    checkpointer.setup()  # only needed on first use to create tables\n",{"type":40,"tag":250,"props":6363,"children":6364},{"class":252,"line":317},[6365],{"type":40,"tag":250,"props":6366,"children":6367},{},[6368],{"type":45,"value":1593},{"type":40,"tag":508,"props":6370,"children":6371},{},[6372,6374],{"type":45,"value":6373},"\nUse PostgresSaver instead of MemorySaver for production persistence.\n",{"type":40,"tag":240,"props":6375,"children":6377},{"className":514,"code":6376,"language":508,"meta":244,"style":244},"\u002F\u002F WRONG: Data lost on process restart\nconst checkpointer = new MemorySaver();  \u002F\u002F In-memory only!\n\n\u002F\u002F CORRECT: Use persistent storage for production\nimport { PostgresSaver } from \"@langchain\u002Flanggraph-checkpoint-postgres\";\nconst checkpointer = PostgresSaver.fromConnString(\"postgresql:\u002F\u002F...\");\nawait checkpointer.setup(); \u002F\u002F only needed on first use to create tables\n",[6378],{"type":40,"tag":158,"props":6379,"children":6380},{"__ignoreMap":244},[6381,6389,6425,6432,6440,6479,6531],{"type":40,"tag":250,"props":6382,"children":6383},{"class":252,"line":253},[6384],{"type":40,"tag":250,"props":6385,"children":6386},{"style":1146},[6387],{"type":45,"value":6388},"\u002F\u002F WRONG: Data lost on process restart\n",{"type":40,"tag":250,"props":6390,"children":6391},{"class":252,"line":262},[6392,6396,6400,6404,6408,6412,6416,6420],{"type":40,"tag":250,"props":6393,"children":6394},{"style":671},[6395],{"type":45,"value":674},{"type":40,"tag":250,"props":6397,"children":6398},{"style":537},[6399],{"type":45,"value":928},{"type":40,"tag":250,"props":6401,"children":6402},{"style":531},[6403],{"type":45,"value":684},{"type":40,"tag":250,"props":6405,"children":6406},{"style":531},[6407],{"type":45,"value":689},{"type":40,"tag":250,"props":6409,"children":6410},{"style":692},[6411],{"type":45,"value":540},{"type":40,"tag":250,"props":6413,"children":6414},{"style":537},[6415],{"type":45,"value":945},{"type":40,"tag":250,"props":6417,"children":6418},{"style":531},[6419],{"type":45,"value":1365},{"type":40,"tag":250,"props":6421,"children":6422},{"style":1146},[6423],{"type":45,"value":6424},"  \u002F\u002F In-memory only!\n",{"type":40,"tag":250,"props":6426,"children":6427},{"class":252,"line":271},[6428],{"type":40,"tag":250,"props":6429,"children":6430},{"emptyLinePlaceholder":293},[6431],{"type":45,"value":296},{"type":40,"tag":250,"props":6433,"children":6434},{"class":252,"line":280},[6435],{"type":40,"tag":250,"props":6436,"children":6437},{"style":1146},[6438],{"type":45,"value":6439},"\u002F\u002F CORRECT: Use persistent storage for production\n",{"type":40,"tag":250,"props":6441,"children":6442},{"class":252,"line":289},[6443,6447,6451,6455,6459,6463,6467,6471,6475],{"type":40,"tag":250,"props":6444,"children":6445},{"style":525},[6446],{"type":45,"value":528},{"type":40,"tag":250,"props":6448,"children":6449},{"style":531},[6450],{"type":45,"value":534},{"type":40,"tag":250,"props":6452,"children":6453},{"style":537},[6454],{"type":45,"value":1620},{"type":40,"tag":250,"props":6456,"children":6457},{"style":531},[6458],{"type":45,"value":591},{"type":40,"tag":250,"props":6460,"children":6461},{"style":525},[6462],{"type":45,"value":596},{"type":40,"tag":250,"props":6464,"children":6465},{"style":531},[6466],{"type":45,"value":601},{"type":40,"tag":250,"props":6468,"children":6469},{"style":604},[6470],{"type":45,"value":1637},{"type":40,"tag":250,"props":6472,"children":6473},{"style":531},[6474],{"type":45,"value":612},{"type":40,"tag":250,"props":6476,"children":6477},{"style":531},[6478],{"type":45,"value":617},{"type":40,"tag":250,"props":6480,"children":6481},{"class":252,"line":299},[6482,6486,6490,6494,6498,6502,6506,6510,6514,6519,6523,6527],{"type":40,"tag":250,"props":6483,"children":6484},{"style":671},[6485],{"type":45,"value":674},{"type":40,"tag":250,"props":6487,"children":6488},{"style":537},[6489],{"type":45,"value":928},{"type":40,"tag":250,"props":6491,"children":6492},{"style":531},[6493],{"type":45,"value":684},{"type":40,"tag":250,"props":6495,"children":6496},{"style":537},[6497],{"type":45,"value":1620},{"type":40,"tag":250,"props":6499,"children":6500},{"style":531},[6501],{"type":45,"value":792},{"type":40,"tag":250,"props":6503,"children":6504},{"style":692},[6505],{"type":45,"value":1703},{"type":40,"tag":250,"props":6507,"children":6508},{"style":537},[6509],{"type":45,"value":699},{"type":40,"tag":250,"props":6511,"children":6512},{"style":531},[6513],{"type":45,"value":612},{"type":40,"tag":250,"props":6515,"children":6516},{"style":604},[6517],{"type":45,"value":6518},"postgresql:\u002F\u002F...",{"type":40,"tag":250,"props":6520,"children":6521},{"style":531},[6522],{"type":45,"value":612},{"type":40,"tag":250,"props":6524,"children":6525},{"style":537},[6526],{"type":45,"value":730},{"type":40,"tag":250,"props":6528,"children":6529},{"style":531},[6530],{"type":45,"value":617},{"type":40,"tag":250,"props":6532,"children":6533},{"class":252,"line":308},[6534,6538,6542,6546,6551,6555,6559],{"type":40,"tag":250,"props":6535,"children":6536},{"style":525},[6537],{"type":45,"value":2034},{"type":40,"tag":250,"props":6539,"children":6540},{"style":537},[6541],{"type":45,"value":3653},{"type":40,"tag":250,"props":6543,"children":6544},{"style":531},[6545],{"type":45,"value":792},{"type":40,"tag":250,"props":6547,"children":6548},{"style":692},[6549],{"type":45,"value":6550},"setup",{"type":40,"tag":250,"props":6552,"children":6553},{"style":537},[6554],{"type":45,"value":945},{"type":40,"tag":250,"props":6556,"children":6557},{"style":531},[6558],{"type":45,"value":1365},{"type":40,"tag":250,"props":6560,"children":6561},{"style":1146},[6562],{"type":45,"value":6563}," \u002F\u002F only needed on first use to create tables\n",{"type":40,"tag":6565,"props":6566,"children":6567},"fix-update-state-with-reducers",{},[6568,6657],{"type":40,"tag":234,"props":6569,"children":6570},{},[6571,6573],{"type":45,"value":6572},"\nUse Overwrite to replace state values instead of passing through reducers.\n",{"type":40,"tag":240,"props":6574,"children":6576},{"className":242,"code":6575,"language":234,"meta":244,"style":244},"from langgraph.types import Overwrite\n\n# State with reducer: items: Annotated[list, operator.add]\n# Current state: {\"items\": [\"A\", \"B\"]}\n\n# update_state PASSES THROUGH reducers\ngraph.update_state(config, {\"items\": [\"C\"]})  # Result: [\"A\", \"B\", \"C\"] - Appended!\n\n# To REPLACE instead, use Overwrite\ngraph.update_state(config, {\"items\": Overwrite([\"C\"])})  # Result: [\"C\"] - Replaced\n",[6577],{"type":40,"tag":158,"props":6578,"children":6579},{"__ignoreMap":244},[6580,6588,6595,6603,6611,6618,6626,6634,6641,6649],{"type":40,"tag":250,"props":6581,"children":6582},{"class":252,"line":253},[6583],{"type":40,"tag":250,"props":6584,"children":6585},{},[6586],{"type":45,"value":6587},"from langgraph.types import Overwrite\n",{"type":40,"tag":250,"props":6589,"children":6590},{"class":252,"line":262},[6591],{"type":40,"tag":250,"props":6592,"children":6593},{"emptyLinePlaceholder":293},[6594],{"type":45,"value":296},{"type":40,"tag":250,"props":6596,"children":6597},{"class":252,"line":271},[6598],{"type":40,"tag":250,"props":6599,"children":6600},{},[6601],{"type":45,"value":6602},"# State with reducer: items: Annotated[list, operator.add]\n",{"type":40,"tag":250,"props":6604,"children":6605},{"class":252,"line":280},[6606],{"type":40,"tag":250,"props":6607,"children":6608},{},[6609],{"type":45,"value":6610},"# Current state: {\"items\": [\"A\", \"B\"]}\n",{"type":40,"tag":250,"props":6612,"children":6613},{"class":252,"line":289},[6614],{"type":40,"tag":250,"props":6615,"children":6616},{"emptyLinePlaceholder":293},[6617],{"type":45,"value":296},{"type":40,"tag":250,"props":6619,"children":6620},{"class":252,"line":299},[6621],{"type":40,"tag":250,"props":6622,"children":6623},{},[6624],{"type":45,"value":6625},"# update_state PASSES THROUGH reducers\n",{"type":40,"tag":250,"props":6627,"children":6628},{"class":252,"line":308},[6629],{"type":40,"tag":250,"props":6630,"children":6631},{},[6632],{"type":45,"value":6633},"graph.update_state(config, {\"items\": [\"C\"]})  # Result: [\"A\", \"B\", \"C\"] - Appended!\n",{"type":40,"tag":250,"props":6635,"children":6636},{"class":252,"line":317},[6637],{"type":40,"tag":250,"props":6638,"children":6639},{"emptyLinePlaceholder":293},[6640],{"type":45,"value":296},{"type":40,"tag":250,"props":6642,"children":6643},{"class":252,"line":325},[6644],{"type":40,"tag":250,"props":6645,"children":6646},{},[6647],{"type":45,"value":6648},"# To REPLACE instead, use Overwrite\n",{"type":40,"tag":250,"props":6650,"children":6651},{"class":252,"line":334},[6652],{"type":40,"tag":250,"props":6653,"children":6654},{},[6655],{"type":45,"value":6656},"graph.update_state(config, {\"items\": Overwrite([\"C\"])})  # Result: [\"C\"] - Replaced\n",{"type":40,"tag":508,"props":6658,"children":6659},{},[6660,6661],{"type":45,"value":6572},{"type":40,"tag":240,"props":6662,"children":6664},{"className":514,"code":6663,"language":508,"meta":244,"style":244},"import { Overwrite } from \"@langchain\u002Flanggraph\";\n\n\u002F\u002F State with reducer: items uses concat reducer\n\u002F\u002F Current state: { items: [\"A\", \"B\"] }\n\n\u002F\u002F updateState PASSES THROUGH reducers\nawait graph.updateState(config, { items: [\"C\"] });  \u002F\u002F Result: [\"A\", \"B\", \"C\"] - Appended!\n\n\u002F\u002F To REPLACE instead, use Overwrite\nawait graph.updateState(config, { items: new Overwrite([\"C\"]) });  \u002F\u002F Result: [\"C\"] - Replaced\n",[6665],{"type":40,"tag":158,"props":6666,"children":6667},{"__ignoreMap":244},[6668,6708,6715,6723,6731,6738,6746,6824,6831,6839],{"type":40,"tag":250,"props":6669,"children":6670},{"class":252,"line":253},[6671,6675,6679,6684,6688,6692,6696,6700,6704],{"type":40,"tag":250,"props":6672,"children":6673},{"style":525},[6674],{"type":45,"value":528},{"type":40,"tag":250,"props":6676,"children":6677},{"style":531},[6678],{"type":45,"value":534},{"type":40,"tag":250,"props":6680,"children":6681},{"style":537},[6682],{"type":45,"value":6683}," Overwrite",{"type":40,"tag":250,"props":6685,"children":6686},{"style":531},[6687],{"type":45,"value":591},{"type":40,"tag":250,"props":6689,"children":6690},{"style":525},[6691],{"type":45,"value":596},{"type":40,"tag":250,"props":6693,"children":6694},{"style":531},[6695],{"type":45,"value":601},{"type":40,"tag":250,"props":6697,"children":6698},{"style":604},[6699],{"type":45,"value":607},{"type":40,"tag":250,"props":6701,"children":6702},{"style":531},[6703],{"type":45,"value":612},{"type":40,"tag":250,"props":6705,"children":6706},{"style":531},[6707],{"type":45,"value":617},{"type":40,"tag":250,"props":6709,"children":6710},{"class":252,"line":262},[6711],{"type":40,"tag":250,"props":6712,"children":6713},{"emptyLinePlaceholder":293},[6714],{"type":45,"value":296},{"type":40,"tag":250,"props":6716,"children":6717},{"class":252,"line":271},[6718],{"type":40,"tag":250,"props":6719,"children":6720},{"style":1146},[6721],{"type":45,"value":6722},"\u002F\u002F State with reducer: items uses concat reducer\n",{"type":40,"tag":250,"props":6724,"children":6725},{"class":252,"line":280},[6726],{"type":40,"tag":250,"props":6727,"children":6728},{"style":1146},[6729],{"type":45,"value":6730},"\u002F\u002F Current state: { items: [\"A\", \"B\"] }\n",{"type":40,"tag":250,"props":6732,"children":6733},{"class":252,"line":289},[6734],{"type":40,"tag":250,"props":6735,"children":6736},{"emptyLinePlaceholder":293},[6737],{"type":45,"value":296},{"type":40,"tag":250,"props":6739,"children":6740},{"class":252,"line":299},[6741],{"type":40,"tag":250,"props":6742,"children":6743},{"style":1146},[6744],{"type":45,"value":6745},"\u002F\u002F updateState PASSES THROUGH reducers\n",{"type":40,"tag":250,"props":6747,"children":6748},{"class":252,"line":308},[6749,6753,6757,6761,6765,6769,6773,6777,6782,6786,6790,6794,6799,6803,6807,6811,6815,6819],{"type":40,"tag":250,"props":6750,"children":6751},{"style":525},[6752],{"type":45,"value":2034},{"type":40,"tag":250,"props":6754,"children":6755},{"style":537},[6756],{"type":45,"value":1246},{"type":40,"tag":250,"props":6758,"children":6759},{"style":531},[6760],{"type":45,"value":792},{"type":40,"tag":250,"props":6762,"children":6763},{"style":692},[6764],{"type":45,"value":2855},{"type":40,"tag":250,"props":6766,"children":6767},{"style":537},[6768],{"type":45,"value":3145},{"type":40,"tag":250,"props":6770,"children":6771},{"style":531},[6772],{"type":45,"value":545},{"type":40,"tag":250,"props":6774,"children":6775},{"style":531},[6776],{"type":45,"value":534},{"type":40,"tag":250,"props":6778,"children":6779},{"style":707},[6780],{"type":45,"value":6781}," items",{"type":40,"tag":250,"props":6783,"children":6784},{"style":531},[6785],{"type":45,"value":715},{"type":40,"tag":250,"props":6787,"children":6788},{"style":537},[6789],{"type":45,"value":836},{"type":40,"tag":250,"props":6791,"children":6792},{"style":531},[6793],{"type":45,"value":612},{"type":40,"tag":250,"props":6795,"children":6796},{"style":604},[6797],{"type":45,"value":6798},"C",{"type":40,"tag":250,"props":6800,"children":6801},{"style":531},[6802],{"type":45,"value":612},{"type":40,"tag":250,"props":6804,"children":6805},{"style":537},[6806],{"type":45,"value":897},{"type":40,"tag":250,"props":6808,"children":6809},{"style":531},[6810],{"type":45,"value":725},{"type":40,"tag":250,"props":6812,"children":6813},{"style":537},[6814],{"type":45,"value":730},{"type":40,"tag":250,"props":6816,"children":6817},{"style":531},[6818],{"type":45,"value":1365},{"type":40,"tag":250,"props":6820,"children":6821},{"style":1146},[6822],{"type":45,"value":6823},"  \u002F\u002F Result: [\"A\", \"B\", \"C\"] - Appended!\n",{"type":40,"tag":250,"props":6825,"children":6826},{"class":252,"line":317},[6827],{"type":40,"tag":250,"props":6828,"children":6829},{"emptyLinePlaceholder":293},[6830],{"type":45,"value":296},{"type":40,"tag":250,"props":6832,"children":6833},{"class":252,"line":325},[6834],{"type":40,"tag":250,"props":6835,"children":6836},{"style":1146},[6837],{"type":45,"value":6838},"\u002F\u002F To REPLACE instead, use Overwrite\n",{"type":40,"tag":250,"props":6840,"children":6841},{"class":252,"line":334},[6842,6846,6850,6854,6858,6862,6866,6870,6874,6878,6882,6886,6890,6894,6898,6902,6907,6911,6915,6919],{"type":40,"tag":250,"props":6843,"children":6844},{"style":525},[6845],{"type":45,"value":2034},{"type":40,"tag":250,"props":6847,"children":6848},{"style":537},[6849],{"type":45,"value":1246},{"type":40,"tag":250,"props":6851,"children":6852},{"style":531},[6853],{"type":45,"value":792},{"type":40,"tag":250,"props":6855,"children":6856},{"style":692},[6857],{"type":45,"value":2855},{"type":40,"tag":250,"props":6859,"children":6860},{"style":537},[6861],{"type":45,"value":3145},{"type":40,"tag":250,"props":6863,"children":6864},{"style":531},[6865],{"type":45,"value":545},{"type":40,"tag":250,"props":6867,"children":6868},{"style":531},[6869],{"type":45,"value":534},{"type":40,"tag":250,"props":6871,"children":6872},{"style":707},[6873],{"type":45,"value":6781},{"type":40,"tag":250,"props":6875,"children":6876},{"style":531},[6877],{"type":45,"value":715},{"type":40,"tag":250,"props":6879,"children":6880},{"style":531},[6881],{"type":45,"value":689},{"type":40,"tag":250,"props":6883,"children":6884},{"style":692},[6885],{"type":45,"value":6683},{"type":40,"tag":250,"props":6887,"children":6888},{"style":537},[6889],{"type":45,"value":5042},{"type":40,"tag":250,"props":6891,"children":6892},{"style":531},[6893],{"type":45,"value":612},{"type":40,"tag":250,"props":6895,"children":6896},{"style":604},[6897],{"type":45,"value":6798},{"type":40,"tag":250,"props":6899,"children":6900},{"style":531},[6901],{"type":45,"value":612},{"type":40,"tag":250,"props":6903,"children":6904},{"style":537},[6905],{"type":45,"value":6906},"]) ",{"type":40,"tag":250,"props":6908,"children":6909},{"style":531},[6910],{"type":45,"value":725},{"type":40,"tag":250,"props":6912,"children":6913},{"style":537},[6914],{"type":45,"value":730},{"type":40,"tag":250,"props":6916,"children":6917},{"style":531},[6918],{"type":45,"value":1365},{"type":40,"tag":250,"props":6920,"children":6921},{"style":1146},[6922],{"type":45,"value":6923},"  \u002F\u002F Result: [\"C\"] - Replaced\n",{"type":40,"tag":6925,"props":6926,"children":6927},"fix-store-injection",{},[6928,7009],{"type":40,"tag":234,"props":6929,"children":6930},{},[6931,6933],{"type":45,"value":6932},"\nAccess store via the Runtime object in graph nodes.\n",{"type":40,"tag":240,"props":6934,"children":6936},{"className":242,"code":6935,"language":234,"meta":244,"style":244},"# WRONG: Store not available in node\ndef my_node(state):\n    store.put(...)  # NameError! store not defined\n\n# CORRECT: Access store via runtime\nfrom langgraph.runtime import Runtime\n\ndef my_node(state, runtime: Runtime):\n    runtime.store.put(...)  # Correct store instance\n",[6937],{"type":40,"tag":158,"props":6938,"children":6939},{"__ignoreMap":244},[6940,6948,6956,6964,6971,6979,6986,6993,7001],{"type":40,"tag":250,"props":6941,"children":6942},{"class":252,"line":253},[6943],{"type":40,"tag":250,"props":6944,"children":6945},{},[6946],{"type":45,"value":6947},"# WRONG: Store not available in node\n",{"type":40,"tag":250,"props":6949,"children":6950},{"class":252,"line":262},[6951],{"type":40,"tag":250,"props":6952,"children":6953},{},[6954],{"type":45,"value":6955},"def my_node(state):\n",{"type":40,"tag":250,"props":6957,"children":6958},{"class":252,"line":271},[6959],{"type":40,"tag":250,"props":6960,"children":6961},{},[6962],{"type":45,"value":6963},"    store.put(...)  # NameError! store not defined\n",{"type":40,"tag":250,"props":6965,"children":6966},{"class":252,"line":280},[6967],{"type":40,"tag":250,"props":6968,"children":6969},{"emptyLinePlaceholder":293},[6970],{"type":45,"value":296},{"type":40,"tag":250,"props":6972,"children":6973},{"class":252,"line":289},[6974],{"type":40,"tag":250,"props":6975,"children":6976},{},[6977],{"type":45,"value":6978},"# CORRECT: Access store via runtime\n",{"type":40,"tag":250,"props":6980,"children":6981},{"class":252,"line":299},[6982],{"type":40,"tag":250,"props":6983,"children":6984},{},[6985],{"type":45,"value":4826},{"type":40,"tag":250,"props":6987,"children":6988},{"class":252,"line":308},[6989],{"type":40,"tag":250,"props":6990,"children":6991},{"emptyLinePlaceholder":293},[6992],{"type":45,"value":296},{"type":40,"tag":250,"props":6994,"children":6995},{"class":252,"line":317},[6996],{"type":40,"tag":250,"props":6997,"children":6998},{},[6999],{"type":45,"value":7000},"def my_node(state, runtime: Runtime):\n",{"type":40,"tag":250,"props":7002,"children":7003},{"class":252,"line":325},[7004],{"type":40,"tag":250,"props":7005,"children":7006},{},[7007],{"type":45,"value":7008},"    runtime.store.put(...)  # Correct store instance\n",{"type":40,"tag":508,"props":7010,"children":7011},{},[7012,7014],{"type":45,"value":7013},"\nAccess store via runtime parameter in graph nodes.\n",{"type":40,"tag":240,"props":7015,"children":7017},{"className":514,"code":7016,"language":508,"meta":244,"style":244},"\u002F\u002F WRONG: Store not available in node\nconst myNode = async (state) => {\n  store.put(...);  \u002F\u002F ReferenceError!\n};\n\n\u002F\u002F CORRECT: Access store via runtime\nconst myNode = async (state, runtime) => {\n  await runtime.store?.put(...);  \u002F\u002F Correct store instance\n};\n",[7018],{"type":40,"tag":158,"props":7019,"children":7020},{"__ignoreMap":244},[7021,7029,7069,7106,7113,7120,7128,7175,7224],{"type":40,"tag":250,"props":7022,"children":7023},{"class":252,"line":253},[7024],{"type":40,"tag":250,"props":7025,"children":7026},{"style":1146},[7027],{"type":45,"value":7028},"\u002F\u002F WRONG: Store not available in node\n",{"type":40,"tag":250,"props":7030,"children":7031},{"class":252,"line":262},[7032,7036,7041,7045,7049,7053,7057,7061,7065],{"type":40,"tag":250,"props":7033,"children":7034},{"style":671},[7035],{"type":45,"value":674},{"type":40,"tag":250,"props":7037,"children":7038},{"style":537},[7039],{"type":45,"value":7040}," myNode ",{"type":40,"tag":250,"props":7042,"children":7043},{"style":531},[7044],{"type":45,"value":684},{"type":40,"tag":250,"props":7046,"children":7047},{"style":671},[7048],{"type":45,"value":762},{"type":40,"tag":250,"props":7050,"children":7051},{"style":531},[7052],{"type":45,"value":767},{"type":40,"tag":250,"props":7054,"children":7055},{"style":770},[7056],{"type":45,"value":773},{"type":40,"tag":250,"props":7058,"children":7059},{"style":531},[7060],{"type":45,"value":730},{"type":40,"tag":250,"props":7062,"children":7063},{"style":671},[7064],{"type":45,"value":806},{"type":40,"tag":250,"props":7066,"children":7067},{"style":531},[7068],{"type":45,"value":811},{"type":40,"tag":250,"props":7070,"children":7071},{"class":252,"line":271},[7072,7077,7081,7085,7089,7093,7097,7101],{"type":40,"tag":250,"props":7073,"children":7074},{"style":537},[7075],{"type":45,"value":7076},"  store",{"type":40,"tag":250,"props":7078,"children":7079},{"style":531},[7080],{"type":45,"value":792},{"type":40,"tag":250,"props":7082,"children":7083},{"style":692},[7084],{"type":45,"value":5037},{"type":40,"tag":250,"props":7086,"children":7087},{"style":707},[7088],{"type":45,"value":699},{"type":40,"tag":250,"props":7090,"children":7091},{"style":531},[7092],{"type":45,"value":4535},{"type":40,"tag":250,"props":7094,"children":7095},{"style":707},[7096],{"type":45,"value":730},{"type":40,"tag":250,"props":7098,"children":7099},{"style":531},[7100],{"type":45,"value":1365},{"type":40,"tag":250,"props":7102,"children":7103},{"style":1146},[7104],{"type":45,"value":7105},"  \u002F\u002F ReferenceError!\n",{"type":40,"tag":250,"props":7107,"children":7108},{"class":252,"line":280},[7109],{"type":40,"tag":250,"props":7110,"children":7111},{"style":531},[7112],{"type":45,"value":902},{"type":40,"tag":250,"props":7114,"children":7115},{"class":252,"line":289},[7116],{"type":40,"tag":250,"props":7117,"children":7118},{"emptyLinePlaceholder":293},[7119],{"type":45,"value":296},{"type":40,"tag":250,"props":7121,"children":7122},{"class":252,"line":299},[7123],{"type":40,"tag":250,"props":7124,"children":7125},{"style":1146},[7126],{"type":45,"value":7127},"\u002F\u002F CORRECT: Access store via runtime\n",{"type":40,"tag":250,"props":7129,"children":7130},{"class":252,"line":308},[7131,7135,7139,7143,7147,7151,7155,7159,7163,7167,7171],{"type":40,"tag":250,"props":7132,"children":7133},{"style":671},[7134],{"type":45,"value":674},{"type":40,"tag":250,"props":7136,"children":7137},{"style":537},[7138],{"type":45,"value":7040},{"type":40,"tag":250,"props":7140,"children":7141},{"style":531},[7142],{"type":45,"value":684},{"type":40,"tag":250,"props":7144,"children":7145},{"style":671},[7146],{"type":45,"value":762},{"type":40,"tag":250,"props":7148,"children":7149},{"style":531},[7150],{"type":45,"value":767},{"type":40,"tag":250,"props":7152,"children":7153},{"style":770},[7154],{"type":45,"value":773},{"type":40,"tag":250,"props":7156,"children":7157},{"style":531},[7158],{"type":45,"value":545},{"type":40,"tag":250,"props":7160,"children":7161},{"style":770},[7162],{"type":45,"value":5207},{"type":40,"tag":250,"props":7164,"children":7165},{"style":531},[7166],{"type":45,"value":730},{"type":40,"tag":250,"props":7168,"children":7169},{"style":671},[7170],{"type":45,"value":806},{"type":40,"tag":250,"props":7172,"children":7173},{"style":531},[7174],{"type":45,"value":811},{"type":40,"tag":250,"props":7176,"children":7177},{"class":252,"line":317},[7178,7183,7187,7191,7195,7199,7203,7207,7211,7215,7219],{"type":40,"tag":250,"props":7179,"children":7180},{"style":525},[7181],{"type":45,"value":7182},"  await",{"type":40,"tag":250,"props":7184,"children":7185},{"style":537},[7186],{"type":45,"value":5207},{"type":40,"tag":250,"props":7188,"children":7189},{"style":531},[7190],{"type":45,"value":792},{"type":40,"tag":250,"props":7192,"children":7193},{"style":537},[7194],{"type":45,"value":5260},{"type":40,"tag":250,"props":7196,"children":7197},{"style":531},[7198],{"type":45,"value":5265},{"type":40,"tag":250,"props":7200,"children":7201},{"style":692},[7202],{"type":45,"value":5037},{"type":40,"tag":250,"props":7204,"children":7205},{"style":707},[7206],{"type":45,"value":699},{"type":40,"tag":250,"props":7208,"children":7209},{"style":531},[7210],{"type":45,"value":4535},{"type":40,"tag":250,"props":7212,"children":7213},{"style":707},[7214],{"type":45,"value":730},{"type":40,"tag":250,"props":7216,"children":7217},{"style":531},[7218],{"type":45,"value":1365},{"type":40,"tag":250,"props":7220,"children":7221},{"style":1146},[7222],{"type":45,"value":7223},"  \u002F\u002F Correct store instance\n",{"type":40,"tag":250,"props":7225,"children":7226},{"class":252,"line":325},[7227],{"type":40,"tag":250,"props":7228,"children":7229},{"style":531},[7230],{"type":45,"value":902},{"type":40,"tag":7232,"props":7233,"children":7234},"boundaries",{},[7235,7237],{"type":45,"value":7236},"\n### What You Should NOT Do\n",{"type":40,"tag":48,"props":7238,"children":7239},{},[7240,7257,7270,7291,7303],{"type":40,"tag":52,"props":7241,"children":7242},{},[7243,7245,7250,7252],{"type":45,"value":7244},"Use ",{"type":40,"tag":158,"props":7246,"children":7248},{"className":7247},[],[7249],{"type":45,"value":163},{"type":45,"value":7251}," in production — data lost on restart; use ",{"type":40,"tag":158,"props":7253,"children":7255},{"className":7254},[],[7256],{"type":45,"value":207},{"type":40,"tag":52,"props":7258,"children":7259},{},[7260,7262,7268],{"type":45,"value":7261},"Forget ",{"type":40,"tag":158,"props":7263,"children":7265},{"className":7264},[],[7266],{"type":45,"value":7267},"thread_id",{"type":45,"value":7269}," — state won't persist without it",{"type":40,"tag":52,"props":7271,"children":7272},{},[7273,7275,7281,7283,7289],{"type":45,"value":7274},"Expect ",{"type":40,"tag":158,"props":7276,"children":7278},{"className":7277},[],[7279],{"type":45,"value":7280},"update_state",{"type":45,"value":7282}," to bypass reducers — it passes through them; use ",{"type":40,"tag":158,"props":7284,"children":7286},{"className":7285},[],[7287],{"type":45,"value":7288},"Overwrite",{"type":45,"value":7290}," to replace",{"type":40,"tag":52,"props":7292,"children":7293},{},[7294,7296,7301],{"type":45,"value":7295},"Run the same stateful subgraph (",{"type":40,"tag":158,"props":7297,"children":7299},{"className":7298},[],[7300],{"type":45,"value":3491},{"type":45,"value":7302},") in parallel within one node — namespace conflict",{"type":40,"tag":52,"props":7304,"children":7305},{},[7306,7308,7314,7316,7322],{"type":45,"value":7307},"Access store directly in a node — use ",{"type":40,"tag":158,"props":7309,"children":7311},{"className":7310},[],[7312],{"type":45,"value":7313},"runtime.store",{"type":45,"value":7315}," via the ",{"type":40,"tag":158,"props":7317,"children":7319},{"className":7318},[],[7320],{"type":45,"value":7321},"Runtime",{"type":45,"value":7323}," param\n\n",{"type":40,"tag":7325,"props":7326,"children":7327},"style",{},[7328],{"type":45,"value":7329},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":7331,"total":439},[7332,7347,7362,7380,7391,7402,7416],{"slug":7333,"name":7333,"fn":7334,"description":7335,"org":7336,"tags":7337,"stars":24,"repoUrl":25,"updatedAt":7346},"deep-agents-core","build applications with LangChain Deep Agents","INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7338,7341,7344,7345],{"name":7339,"slug":7340,"type":16},"Agents","agents",{"name":7342,"slug":7343,"type":16},"Architecture","architecture",{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:26:24.822592",{"slug":7348,"name":7348,"fn":7349,"description":7350,"org":7351,"tags":7352,"stars":24,"repoUrl":25,"updatedAt":7361},"deep-agents-memory","implement memory and persistence for Deep Agents","INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7353,7354,7355,7358],{"name":7339,"slug":7340,"type":16},{"name":9,"slug":8,"type":16},{"name":7356,"slug":7357,"type":16},"Memory","memory",{"name":7359,"slug":7360,"type":16},"Storage","storage","2026-04-06T18:26:26.065654",{"slug":7363,"name":7363,"fn":7364,"description":7365,"org":7366,"tags":7367,"stars":24,"repoUrl":25,"updatedAt":7379},"deep-agents-orchestration","orchestrate subagents and tasks in Deep Agents","INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7368,7369,7372,7373,7376],{"name":7339,"slug":7340,"type":16},{"name":7370,"slug":7371,"type":16},"Approvals","approvals",{"name":9,"slug":8,"type":16},{"name":7374,"slug":7375,"type":16},"Multi-Agent","multi-agent",{"name":7377,"slug":7378,"type":16},"Workflow Automation","workflow-automation","2026-04-06T18:26:32.280463",{"slug":7381,"name":7381,"fn":7382,"description":7383,"org":7384,"tags":7385,"stars":24,"repoUrl":25,"updatedAt":7390},"deepagents-python-quickstart","scaffold local Deep Agents","Scaffold a minimal local Deep Agent in Python by following the official quickstart, using provider-native web search instead of Tavily. Use when the user wants to quickly build or try a Deep Agent locally.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7386,7387,7388],{"name":7339,"slug":7340,"type":16},{"name":9,"slug":8,"type":16},{"name":7389,"slug":234,"type":16},"Python","2026-07-24T06:09:00.291108",{"slug":7392,"name":7392,"fn":7393,"description":7394,"org":7395,"tags":7396,"stars":24,"repoUrl":25,"updatedAt":7401},"deepagents-typescript-quickstart","build Deep Agents in TypeScript","Scaffold a minimal local Deep Agent in TypeScript by following the official quickstart, using provider-native web search instead of Tavily. Use when the user wants to quickly build or try a Deep Agent locally.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7397,7398,7399],{"name":7339,"slug":7340,"type":16},{"name":9,"slug":8,"type":16},{"name":7400,"slug":508,"type":16},"TypeScript","2026-07-24T06:09:00.673714",{"slug":7403,"name":7403,"fn":7404,"description":7405,"org":7406,"tags":7407,"stars":24,"repoUrl":25,"updatedAt":7415},"ecosystem-primer","select frameworks for LangChain and LangGraph agents","INVOKE FIRST for any LangChain \u002F LangGraph \u002F Deep Agents agent building project before consulting other skills or writing any agent code. Required starting point for up to date info on framework selection (LangChain vs LangGraph vs Deep Agents vs hybrid composition), agent patterns, install, environment setup, and which skill to load next.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7408,7409,7412,7413,7414],{"name":7339,"slug":7340,"type":16},{"name":7410,"slug":7411,"type":16},"AI Infrastructure","ai-infrastructure",{"name":7342,"slug":7343,"type":16},{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"2026-07-24T05:42:48.348966",{"slug":7417,"name":7417,"fn":7418,"description":7419,"org":7420,"tags":7421,"stars":24,"repoUrl":25,"updatedAt":7433},"eval-engineering","create and audit Harbor agent evals","Iteratively inspect an agent repository and optional user-provided traces, interview the user, and create, run, and audit Harbor evals one at a time. Use for agent evals, Harbor tasks, benchmark cases, verifier design, or controlled agent environments.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7422,7423,7426,7429,7430],{"name":7339,"slug":7340,"type":16},{"name":7424,"slug":7425,"type":16},"Code Analysis","code-analysis",{"name":7427,"slug":7428,"type":16},"Evals","evals",{"name":9,"slug":8,"type":16},{"name":7431,"slug":7432,"type":16},"Testing","testing","2026-07-31T05:53:29.552458",{"items":7435,"total":7606},[7436,7457,7468,7485,7498,7513,7526,7539,7553,7563,7574,7593],{"slug":7437,"name":7437,"fn":7438,"description":7439,"org":7440,"tags":7441,"stars":7454,"repoUrl":7455,"updatedAt":7456},"analyze-market","perform market analysis and size estimation","Perform a market analysis for a product category or segment. Trigger on: market analysis, market size, TAM SAM SOM, market opportunity, industry analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7442,7445,7448,7451],{"name":7443,"slug":7444,"type":16},"Marketing","marketing",{"name":7446,"slug":7447,"type":16},"Research","research",{"name":7449,"slug":7450,"type":16},"Sales","sales",{"name":7452,"slug":7453,"type":16},"Strategy","strategy",26592,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fdeepagents","2026-04-18T04:46:54.557115",{"slug":7458,"name":7458,"fn":7459,"description":7460,"org":7461,"tags":7462,"stars":7454,"repoUrl":7455,"updatedAt":7467},"arxiv-search","search arXiv for academic research papers","Searches arXiv for preprints and academic papers, retrieves abstracts, and filters by topic. Use when the user asks to find research papers, search arXiv, look up preprints, find academic articles in physics, math, CS, biology, statistics, or related fields.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7463,7464],{"name":7446,"slug":7447,"type":16},{"name":7465,"slug":7466,"type":16},"Search","search","2026-05-13T06:11:01.203061",{"slug":7469,"name":7469,"fn":7470,"description":7471,"org":7472,"tags":7473,"stars":7454,"repoUrl":7455,"updatedAt":7484},"blog-post","write SEO-optimized blog posts","Write long-form blog posts with SEO optimization and clear structure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7474,7477,7478,7481],{"name":7475,"slug":7476,"type":16},"Content Creation","content-creation",{"name":7443,"slug":7444,"type":16},{"name":7479,"slug":7480,"type":16},"SEO","seo",{"name":7482,"slug":7483,"type":16},"Writing","writing","2026-04-15T05:00:54.149813",{"slug":7486,"name":7486,"fn":7487,"description":7488,"org":7489,"tags":7490,"stars":7454,"repoUrl":7455,"updatedAt":7497},"competitor-analysis","analyze competitors and market positioning","Analyze competitors in a given market segment. Trigger on: competitive landscape, competitor analysis, market comparison, competitive positioning.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7491,7494,7495,7496],{"name":7492,"slug":7493,"type":16},"Competitive Intelligence","competitive-intelligence",{"name":7443,"slug":7444,"type":16},{"name":7446,"slug":7447,"type":16},{"name":7452,"slug":7453,"type":16},"2026-04-18T04:46:55.79306",{"slug":7499,"name":7499,"fn":7500,"description":7501,"org":7502,"tags":7503,"stars":7454,"repoUrl":7455,"updatedAt":7512},"deepagents-thread-inspector","inspect local Deep Agents conversation threads","Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse ~\u002F.deepagents\u002F.state\u002Fsessions.db and a thread UUID or prefix.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7504,7505,7508,7509],{"name":7339,"slug":7340,"type":16},{"name":7506,"slug":7507,"type":16},"Debugging","debugging",{"name":9,"slug":8,"type":16},{"name":7510,"slug":7511,"type":16},"SQLite","sqlite","2026-07-24T06:08:57.102689",{"slug":7514,"name":7514,"fn":7515,"description":7516,"org":7517,"tags":7518,"stars":7454,"repoUrl":7455,"updatedAt":7525},"langgraph-docs","build stateful agents with LangGraph","Fetches and references LangGraph Python documentation to build stateful agents, create multi-agent workflows, and implement human-in-the-loop patterns. Use when the user asks about LangGraph, graph agents, state machines, agent orchestration, LangGraph API, or needs LangGraph implementation guidance.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7519,7520,7523,7524],{"name":7339,"slug":7340,"type":16},{"name":7521,"slug":7522,"type":16},"Documentation","documentation",{"name":19,"slug":20,"type":16},{"name":7374,"slug":7375,"type":16},"2026-05-13T06:11:03.650877",{"slug":7527,"name":7527,"fn":7528,"description":7529,"org":7530,"tags":7531,"stars":7454,"repoUrl":7455,"updatedAt":7538},"remember","capture knowledge into persistent memory","Review the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback — into persistent memory (AGENTS.md) or reusable skills. Use when the user says: (1) remember this, (2) save what we learned, (3) update memory, (4) capture learnings.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7532,7533,7534,7537],{"name":7339,"slug":7340,"type":16},{"name":7521,"slug":7522,"type":16},{"name":7535,"slug":7536,"type":16},"Knowledge Management","knowledge-management",{"name":7356,"slug":7357,"type":16},"2026-05-13T06:10:58.510037",{"slug":7540,"name":7540,"fn":7541,"description":7542,"org":7543,"tags":7544,"stars":7454,"repoUrl":7455,"updatedAt":7552},"skill-creator","create agent skills and tool integrations","Guide for creating effective skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Use this skill when the user asks to: (1) create a new skill, (2) make a skill, (3) build a skill, (4) set up a skill, (5) initialize a skill, (6) scaffold a skill, (7) update or modify an existing skill, (8) validate a skill, (9) learn about skill structure, (10) understand how skills work, or (11) get guidance on skill design patterns. Trigger on phrases like \"create a skill\", \"new skill\", \"make a skill\", \"skill for X\", \"how do I create a skill\", or \"help me build a skill\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7545,7546,7549],{"name":7339,"slug":7340,"type":16},{"name":7547,"slug":7548,"type":16},"Engineering","engineering",{"name":7550,"slug":7551,"type":16},"Plugin Development","plugin-development","2026-05-13T06:10:59.88449",{"slug":7554,"name":7554,"fn":7555,"description":7556,"org":7557,"tags":7558,"stars":7454,"repoUrl":7455,"updatedAt":7562},"social-media","create optimized social media posts","Create social media posts optimized for engagement across platforms.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7559,7560,7561],{"name":7475,"slug":7476,"type":16},{"name":7443,"slug":7444,"type":16},{"name":7482,"slug":7483,"type":16},"2026-04-15T05:00:55.37452",{"slug":7564,"name":7564,"fn":7565,"description":7566,"org":7567,"tags":7568,"stars":7454,"repoUrl":7455,"updatedAt":7573},"web-research","conduct and synthesize web research","Searches multiple web sources, synthesizes findings, and produces cited research reports using delegated subagents. Use when the user asks to research a topic online, search the web, look something up, find current information, compare options, or produce a research report.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7569,7570,7571,7572],{"name":7339,"slug":7340,"type":16},{"name":7374,"slug":7375,"type":16},{"name":7446,"slug":7447,"type":16},{"name":7465,"slug":7466,"type":16},"2026-05-13T06:11:04.930044",{"slug":7575,"name":7575,"fn":7576,"description":7577,"org":7578,"tags":7579,"stars":7590,"repoUrl":7591,"updatedAt":7592},"mermaid-diagrams","embed Mermaid diagrams in documentation","Embed Mermaid diagrams in generated wiki pages. Use whenever documenting a runtime or request flow, a call sequence, a state machine or lifecycle, a data model or entity relationships, or non-trivial control flow, since these are clearer as a diagram than as prose. Also use when an update run touches a page that already contains a mermaid fence, or a page that contains a text fence a previous run degraded.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7580,7583,7584,7587],{"name":7581,"slug":7582,"type":16},"Diagrams","diagrams",{"name":7521,"slug":7522,"type":16},{"name":7585,"slug":7586,"type":16},"Markdown","markdown",{"name":7588,"slug":7589,"type":16},"Technical Writing","technical-writing",12181,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fopenwiki","2026-07-24T06:09:01.089597",{"slug":7594,"name":7594,"fn":7595,"description":7596,"org":7597,"tags":7598,"stars":7590,"repoUrl":7591,"updatedAt":7605},"write-connector","implement OpenWiki source connectors","Add a new built-in OpenWiki source connector. Use when a user asks to create or implement an OpenWiki connector.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7599,7602],{"name":7600,"slug":7601,"type":16},"API Development","api-development",{"name":7603,"slug":7604,"type":16},"Integrations","integrations","2026-07-18T05:48:23.961804",41]