[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-langchain-langgraph-human-in-the-loop":3,"mdc-hrdfzy-key":37,"related-org-langchain-langgraph-human-in-the-loop":7005,"related-repo-langchain-langgraph-human-in-the-loop":7181},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":35,"mdContent":36},"langgraph-human-in-the-loop","implement human-in-the-loop patterns in LangGraph","INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval\u002Fvalidation workflows, and the 4-tier error handling strategy.",{"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,15,18,21,24],{"name":9,"slug":8,"type":14},"tag",{"name":16,"slug":17,"type":14},"LangGraph","langgraph",{"name":19,"slug":20,"type":14},"Agents","agents",{"name":22,"slug":23,"type":14},"Approvals","approvals",{"name":25,"slug":26,"type":14},"Workflow Automation","workflow-automation",877,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills","2026-04-06T18:26:33.547632",null,77,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":30},[],"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills\u002Ftree\u002FHEAD\u002Fconfig\u002Fskills\u002Flanggraph-human-in-the-loop","---\nname: langgraph-human-in-the-loop\ndescription: \"INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval\u002Fvalidation workflows, and the 4-tier error handling strategy.\"\n---\n\n\u003Coverview>\nLangGraph's human-in-the-loop patterns let you pause graph execution, surface data to users, and resume with their input:\n\n- **`interrupt(value)`** — pauses execution, surfaces a value to the caller\n- **`Command(resume=value)`** — resumes execution, providing the value back to `interrupt()`\n- **Checkpointer** — required to save state while paused\n- **Thread ID** — required to identify which paused execution to resume\n\u003C\u002Foverview>\n\n---\n\n## Requirements\n\nThree things are required for interrupts to work:\n\n1. **Checkpointer** — compile with `checkpointer=InMemorySaver()` (dev) or `PostgresSaver` (prod)\n2. **Thread ID** — pass `{\"configurable\": {\"thread_id\": \"...\"}}` to every `invoke`\u002F`stream` call\n3. **JSON-serializable payload** — the value passed to `interrupt()` must be JSON-serializable\n\n---\n\n## Basic Interrupt + Resume\n\n`interrupt(value)` pauses the graph. The value surfaces in the result under `__interrupt__`. `Command(resume=value)` resumes — the resume value becomes the return value of `interrupt()`.\n\n**Critical**: when the graph resumes, the node restarts from the **beginning** — all code before `interrupt()` re-runs.\n\n\u003Cex-basic-interrupt-resume>\n\u003Cpython>\nPause execution for human review and resume with Command.\n\n```python\nfrom langgraph.types import interrupt, Command\nfrom langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict\n\nclass State(TypedDict):\n    approved: bool\n\ndef approval_node(state: State):\n    # Pause and ask for approval\n    approved = interrupt(\"Do you approve this action?\")\n    # When resumed, Command(resume=...) returns that value here\n    return {\"approved\": approved}\n\ncheckpointer = InMemorySaver()\ngraph = (\n    StateGraph(State)\n    .add_node(\"approval\", approval_node)\n    .add_edge(START, \"approval\")\n    .add_edge(\"approval\", END)\n    .compile(checkpointer=checkpointer)\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"thread-1\"}}\n\n# Initial run — hits interrupt and pauses\nresult = graph.invoke({\"approved\": False}, config)\nprint(result[\"__interrupt__\"])\n# [Interrupt(value='Do you approve this action?')]\n\n# Resume with the human's response\nresult = graph.invoke(Command(resume=True), config)\nprint(result[\"approved\"])  # True\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nPause execution for human review and resume with Command.\n\n```typescript\nimport { interrupt, Command, MemorySaver, StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  approved: z.boolean().default(false),\n});\n\nconst approvalNode = async (state: typeof State.State) => {\n  \u002F\u002F Pause and ask for approval\n  const approved = interrupt(\"Do you approve this action?\");\n  \u002F\u002F When resumed, Command({ resume }) returns that value here\n  return { approved };\n};\n\nconst checkpointer = new MemorySaver();\nconst graph = new StateGraph(State)\n  .addNode(\"approval\", approvalNode)\n  .addEdge(START, \"approval\")\n  .addEdge(\"approval\", END)\n  .compile({ checkpointer });\n\nconst config = { configurable: { thread_id: \"thread-1\" } };\n\n\u002F\u002F Initial run — hits interrupt and pauses\nlet result = await graph.invoke({ approved: false }, config);\nconsole.log(result.__interrupt__);\n\u002F\u002F [{ value: 'Do you approve this action?', ... }]\n\n\u002F\u002F Resume with the human's response\nresult = await graph.invoke(new Command({ resume: true }), config);\nconsole.log(result.approved);  \u002F\u002F true\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-basic-interrupt-resume>\n\n---\n\n## Approval Workflow\n\nA common pattern: interrupt to show a draft, then route based on the human's decision.\n\n\u003Cex-approval-workflow>\n\u003Cpython>\nInterrupt for human review, then route to send or end based on the decision.\n\n```python\nfrom langgraph.types import interrupt, Command\nfrom langgraph.graph import StateGraph, START, END\nfrom typing import Literal\nfrom typing_extensions import TypedDict\n\nclass EmailAgentState(TypedDict):\n    email_content: str\n    draft_response: str\n    classification: dict\n\ndef human_review(state: EmailAgentState) -> Command[Literal[\"send_reply\", \"__end__\"]]:\n    \"\"\"Pause for human review using interrupt and route based on decision.\"\"\"\n    classification = state.get(\"classification\", {})\n\n    # interrupt() must come first — any code before it will re-run on resume\n    human_decision = interrupt({\n        \"email_id\": state.get(\"email_content\", \"\"),\n        \"draft_response\": state.get(\"draft_response\", \"\"),\n        \"urgency\": classification.get(\"urgency\"),\n        \"action\": \"Please review and approve\u002Fedit this response\"\n    })\n\n    # Process the human's decision\n    if human_decision.get(\"approved\"):\n        return Command(\n            update={\"draft_response\": human_decision.get(\"edited_response\", state.get(\"draft_response\", \"\"))},\n            goto=\"send_reply\"\n        )\n    else:\n        # Rejection — human will handle directly\n        return Command(update={}, goto=END)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nInterrupt for human review, then route to send or end based on the decision.\n\n```typescript\nimport { interrupt, Command, END, GraphNode } from \"@langchain\u002Flanggraph\";\n\nconst humanReview: GraphNode\u003Ctypeof EmailAgentState> = async (state) => {\n  const classification = state.classification!;\n\n  \u002F\u002F interrupt() must come first — any code before it will re-run on resume\n  const humanDecision = interrupt({\n    emailId: state.emailContent,\n    draftResponse: state.responseText,\n    urgency: classification.urgency,\n    action: \"Please review and approve\u002Fedit this response\",\n  });\n\n  \u002F\u002F Process the human's decision\n  if (humanDecision.approved) {\n    return new Command({\n      update: { responseText: humanDecision.editedResponse || state.responseText },\n      goto: \"sendReply\",\n    });\n  } else {\n    return new Command({ update: {}, goto: END });\n  }\n};\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-approval-workflow>\n\n---\n\n## Validation Loop\n\nUse `interrupt()` in a loop to validate human input and re-prompt if invalid.\n\n\u003Cex-validation-loop>\n\u003Cpython>\nValidate human input in a loop, re-prompting until valid.\n\n```python\nfrom langgraph.types import interrupt\n\ndef get_age_node(state):\n    prompt = \"What is your age?\"\n\n    while True:\n        answer = interrupt(prompt)\n\n        # Validate the input\n        if isinstance(answer, int) and answer > 0:\n            break\n        else:\n            # Invalid input — ask again with a more specific prompt\n            prompt = f\"'{answer}' is not a valid age. Please enter a positive number.\"\n\n    return {\"age\": answer}\n```\n\nEach `Command(resume=...)` call provides the next answer. If invalid, the loop re-interrupts with a clearer message.\n\n```python\nconfig = {\"configurable\": {\"thread_id\": \"form-1\"}}\nfirst = graph.invoke({\"age\": None}, config)\n# __interrupt__: \"What is your age?\"\n\nretry = graph.invoke(Command(resume=\"thirty\"), config)\n# __interrupt__: \"'thirty' is not a valid age...\"\n\nfinal = graph.invoke(Command(resume=30), config)\nprint(final[\"age\"])  # 30\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nValidate human input in a loop, re-prompting until valid.\n\n```typescript\nimport { interrupt } from \"@langchain\u002Flanggraph\";\n\nconst getAgeNode = (state: typeof State.State) => {\n  let prompt = \"What is your age?\";\n\n  while (true) {\n    const answer = interrupt(prompt);\n\n    \u002F\u002F Validate the input\n    if (typeof answer === \"number\" && answer > 0) {\n      return { age: answer };\n    } else {\n      \u002F\u002F Invalid input — ask again with a more specific prompt\n      prompt = `'${answer}' is not a valid age. Please enter a positive number.`;\n    }\n  }\n};\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-validation-loop>\n\n---\n\n## Multiple Interrupts\n\nWhen parallel branches each call `interrupt()`, resume all of them in a single invocation by mapping each interrupt ID to its resume value.\n\n\u003Cex-multiple-interrupts>\n\u003Cpython>\nResume multiple parallel interrupts by mapping interrupt IDs to values.\n\n```python\nfrom typing import Annotated, TypedDict\nimport operator\nfrom langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import START, END, StateGraph\nfrom langgraph.types import Command, interrupt\n\nclass State(TypedDict):\n    vals: Annotated[list[str], operator.add]\n\ndef node_a(state):\n    answer = interrupt(\"question_a\")\n    return {\"vals\": [f\"a:{answer}\"]}\n\ndef node_b(state):\n    answer = interrupt(\"question_b\")\n    return {\"vals\": [f\"b:{answer}\"]}\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"a\", node_a)\n    .add_node(\"b\", node_b)\n    .add_edge(START, \"a\")\n    .add_edge(START, \"b\")\n    .add_edge(\"a\", END)\n    .add_edge(\"b\", END)\n    .compile(checkpointer=InMemorySaver())\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"1\"}}\n\n# Both parallel nodes hit interrupt() and pause\nresult = graph.invoke({\"vals\": []}, config)\n# result[\"__interrupt__\"] contains both Interrupt objects with IDs\n\n# Resume all pending interrupts at once using a map of id -> value\nresume_map = {\n    i.id: f\"answer for {i.value}\"\n    for i in result[\"__interrupt__\"]\n}\nresult = graph.invoke(Command(resume=resume_map), config)\n# result[\"vals\"] = [\"a:answer for question_a\", \"b:answer for question_b\"]\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nResume multiple parallel interrupts by mapping interrupt IDs to values.\n\n```typescript\nimport { Command, END, MemorySaver, START, StateGraph, interrupt, isInterrupted, INTERRUPT, Annotation } from \"@langchain\u002Flanggraph\";\n\nconst State = Annotation.Root({\n  vals: Annotation\u003Cstring[]>({\n    reducer: (left, right) => left.concat(Array.isArray(right) ? right : [right]),\n    default: () => [],\n  }),\n});\n\nfunction nodeA(_state: typeof State.State) {\n  const answer = interrupt(\"question_a\") as string;\n  return { vals: [`a:${answer}`] };\n}\n\nfunction nodeB(_state: typeof State.State) {\n  const answer = interrupt(\"question_b\") as string;\n  return { vals: [`b:${answer}`] };\n}\n\nconst graph = new StateGraph(State)\n  .addNode(\"a\", nodeA)\n  .addNode(\"b\", nodeB)\n  .addEdge(START, \"a\")\n  .addEdge(START, \"b\")\n  .addEdge(\"a\", END)\n  .addEdge(\"b\", END)\n  .compile({ checkpointer: new MemorySaver() });\n\nconst config = { configurable: { thread_id: \"1\" } };\n\nconst interruptedResult = await graph.invoke({ vals: [] }, config);\n\n\u002F\u002F Resume all pending interrupts at once\nconst resumeMap: Record\u003Cstring, string> = {};\nif (isInterrupted(interruptedResult)) {\n  for (const i of interruptedResult[INTERRUPT]) {\n    if (i.id != null) {\n      resumeMap[i.id] = `answer for ${i.value}`;\n    }\n  }\n}\nconst result = await graph.invoke(new Command({ resume: resumeMap }), config);\n\u002F\u002F result.vals = [\"a:answer for question_a\", \"b:answer for question_b\"]\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-multiple-interrupts>\n\nUser-fixable errors use `interrupt()` to pause and collect missing data — that's the pattern covered by this skill. For the full 4-tier error handling strategy (RetryPolicy, Command error loops, etc.), see the **fundamentals** skill.\n\n---\n\n## Side Effects Before Interrupt Must Be Idempotent\n\nWhen the graph resumes, the node restarts from the **beginning** — ALL code before `interrupt()` re-runs. In subgraphs, BOTH the parent node and the subgraph node re-execute.\n\n\u003Cidempotency-rules>\n\n**Do:**\n- Use **upsert** (not insert) operations before `interrupt()`\n- Use **check-before-create** patterns\n- Place side effects **after** `interrupt()` when possible\n- Separate side effects into their own nodes\n\n**Don't:**\n- Create new records before `interrupt()` — duplicates on each resume\n- Append to lists before `interrupt()` — duplicate entries on each resume\n\n\u003C\u002Fidempotency-rules>\n\n\u003Cex-idempotent-patterns>\n\u003Cpython>\nIdempotent operations before interrupt vs non-idempotent (wrong).\n\n```python\n# GOOD: Upsert is idempotent — safe before interrupt\ndef node_a(state: State):\n    db.upsert_user(user_id=state[\"user_id\"], status=\"pending_approval\")\n    approved = interrupt(\"Approve this change?\")\n    return {\"approved\": approved}\n\n# GOOD: Side effect AFTER interrupt — only runs once\ndef node_a(state: State):\n    approved = interrupt(\"Approve this change?\")\n    if approved:\n        db.create_audit_log(user_id=state[\"user_id\"], action=\"approved\")\n    return {\"approved\": approved}\n\n# BAD: Insert creates duplicates on each resume!\ndef node_a(state: State):\n    audit_id = db.create_audit_log({  # Runs again on resume!\n        \"user_id\": state[\"user_id\"],\n        \"action\": \"pending_approval\",\n    })\n    approved = interrupt(\"Approve this change?\")\n    return {\"approved\": approved}\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nIdempotent operations before interrupt vs non-idempotent (wrong).\n\n```typescript\n\u002F\u002F GOOD: Upsert is idempotent — safe before interrupt\nconst nodeA = async (state: typeof State.State) => {\n  await db.upsertUser({ userId: state.userId, status: \"pending_approval\" });\n  const approved = interrupt(\"Approve this change?\");\n  return { approved };\n};\n\n\u002F\u002F GOOD: Side effect AFTER interrupt — only runs once\nconst nodeA = async (state: typeof State.State) => {\n  const approved = interrupt(\"Approve this change?\");\n  if (approved) {\n    await db.createAuditLog({ userId: state.userId, action: \"approved\" });\n  }\n  return { approved };\n};\n\n\u002F\u002F BAD: Insert creates duplicates on each resume!\nconst nodeA = async (state: typeof State.State) => {\n  await db.createAuditLog({  \u002F\u002F Runs again on resume!\n    userId: state.userId,\n    action: \"pending_approval\",\n  });\n  const approved = interrupt(\"Approve this change?\");\n  return { approved };\n};\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-idempotent-patterns>\n\n\u003Csubgraph-interrupt-re-execution>\n\n### Subgraph re-execution on resume\n\nWhen a subgraph contains an `interrupt()`, resuming re-executes BOTH the parent node (that invoked the subgraph) AND the subgraph node (that called `interrupt()`):\n\n\u003Cpython>\n\n```python\ndef node_in_parent_graph(state: State):\n    some_code()  # \u003C-- Re-executes on resume\n    subgraph_result = subgraph.invoke(some_input)\n    # ...\n\ndef node_in_subgraph(state: State):\n    some_other_code()  # \u003C-- Also re-executes on resume\n    result = interrupt(\"What's your name?\")\n    # ...\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\n\n```typescript\nasync function nodeInParentGraph(state: State) {\n  someCode();  \u002F\u002F \u003C-- Re-executes on resume\n  const subgraphResult = await subgraph.invoke(someInput);\n  \u002F\u002F ...\n}\n\nasync function nodeInSubgraph(state: State) {\n  someOtherCode();  \u002F\u002F \u003C-- Also re-executes on resume\n  const result = interrupt(\"What's your name?\");\n  \u002F\u002F ...\n}\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fsubgraph-interrupt-re-execution>\n\n---\n\n## Command(resume) Warning\n\n`Command(resume=...)` is the **only** Command pattern intended as input to `invoke()`\u002F`stream()`. Do NOT pass `Command(update=...)` as input — it resumes from the latest checkpoint and the graph appears stuck. See the fundamentals skill for the full antipattern explanation.\n\n---\n\n## Fixes\n\n\u003Cfix-checkpointer-required-for-interrupts>\n\u003Cpython>\nCheckpointer required for interrupt functionality.\n\n```python\n# WRONG\ngraph = builder.compile()\n\n# CORRECT\ngraph = builder.compile(checkpointer=InMemorySaver())\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nCheckpointer required for interrupt functionality.\n\n```typescript\n\u002F\u002F WRONG\nconst graph = builder.compile();\n\n\u002F\u002F CORRECT\nconst graph = builder.compile({ checkpointer: new MemorySaver() });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-checkpointer-required-for-interrupts>\n\n\u003Cfix-resume-with-command>\n\u003Cpython>\nUse Command to resume from an interrupt (regular dict restarts graph).\n\n```python\n# WRONG\ngraph.invoke({\"resume_data\": \"approve\"}, config)\n\n# CORRECT\ngraph.invoke(Command(resume=\"approve\"), config)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse Command to resume from an interrupt (regular object restarts graph).\n\n```typescript\n\u002F\u002F WRONG\nawait graph.invoke({ resumeData: \"approve\" }, config);\n\n\u002F\u002F CORRECT\nawait graph.invoke(new Command({ resume: \"approve\" }), config);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-resume-with-command>\n\n\u003Cboundaries>\n### What You Should NOT Do\n\n- Use interrupts without a checkpointer — will fail\n- Resume without the same thread_id — creates a new thread instead of resuming\n- Pass `Command(update=...)` as invoke input — graph appears stuck (use plain dict)\n- Perform non-idempotent side effects before `interrupt()` — creates duplicates on resume\n- Assume code before `interrupt()` only runs once — it re-runs every resume\n\u003C\u002Fboundaries>\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,6999],{"type":43,"tag":44,"props":45,"children":46},"element","overview",{},[47,50,111,115,122,128,207,210,216,248,272,1591,1594,1600,1605,2490,2493,2499,2511,3164,3167,3173,3185,5028,5047,5050,5056,5074,5175,6092,6467,6470,6476,6516,6519,6525,6717,6944],{"type":48,"value":49},"text","\nLangGraph's human-in-the-loop patterns let you pause graph execution, surface data to users, and resume with their input:\n",{"type":43,"tag":51,"props":52,"children":53},"ul",{},[54,71,91,101],{"type":43,"tag":55,"props":56,"children":57},"li",{},[58,69],{"type":43,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":43,"tag":63,"props":64,"children":66},"code",{"className":65},[],[67],{"type":48,"value":68},"interrupt(value)",{"type":48,"value":70}," — pauses execution, surfaces a value to the caller",{"type":43,"tag":55,"props":72,"children":73},{},[74,83,85],{"type":43,"tag":59,"props":75,"children":76},{},[77],{"type":43,"tag":63,"props":78,"children":80},{"className":79},[],[81],{"type":48,"value":82},"Command(resume=value)",{"type":48,"value":84}," — resumes execution, providing the value back to ",{"type":43,"tag":63,"props":86,"children":88},{"className":87},[],[89],{"type":48,"value":90},"interrupt()",{"type":43,"tag":55,"props":92,"children":93},{},[94,99],{"type":43,"tag":59,"props":95,"children":96},{},[97],{"type":48,"value":98},"Checkpointer",{"type":48,"value":100}," — required to save state while paused",{"type":43,"tag":55,"props":102,"children":103},{},[104,109],{"type":43,"tag":59,"props":105,"children":106},{},[107],{"type":48,"value":108},"Thread ID",{"type":48,"value":110}," — required to identify which paused execution to resume\n\n",{"type":43,"tag":112,"props":113,"children":114},"hr",{},[],{"type":43,"tag":116,"props":117,"children":119},"h2",{"id":118},"requirements",[120],{"type":48,"value":121},"Requirements",{"type":43,"tag":123,"props":124,"children":125},"p",{},[126],{"type":48,"value":127},"Three things are required for interrupts to work:",{"type":43,"tag":129,"props":130,"children":131},"ol",{},[132,157,190],{"type":43,"tag":55,"props":133,"children":134},{},[135,139,141,147,149,155],{"type":43,"tag":59,"props":136,"children":137},{},[138],{"type":48,"value":98},{"type":48,"value":140}," — compile with ",{"type":43,"tag":63,"props":142,"children":144},{"className":143},[],[145],{"type":48,"value":146},"checkpointer=InMemorySaver()",{"type":48,"value":148}," (dev) or ",{"type":43,"tag":63,"props":150,"children":152},{"className":151},[],[153],{"type":48,"value":154},"PostgresSaver",{"type":48,"value":156}," (prod)",{"type":43,"tag":55,"props":158,"children":159},{},[160,164,166,172,174,180,182,188],{"type":43,"tag":59,"props":161,"children":162},{},[163],{"type":48,"value":108},{"type":48,"value":165}," — pass ",{"type":43,"tag":63,"props":167,"children":169},{"className":168},[],[170],{"type":48,"value":171},"{\"configurable\": {\"thread_id\": \"...\"}}",{"type":48,"value":173}," to every ",{"type":43,"tag":63,"props":175,"children":177},{"className":176},[],[178],{"type":48,"value":179},"invoke",{"type":48,"value":181},"\u002F",{"type":43,"tag":63,"props":183,"children":185},{"className":184},[],[186],{"type":48,"value":187},"stream",{"type":48,"value":189}," call",{"type":43,"tag":55,"props":191,"children":192},{},[193,198,200,205],{"type":43,"tag":59,"props":194,"children":195},{},[196],{"type":48,"value":197},"JSON-serializable payload",{"type":48,"value":199}," — the value passed to ",{"type":43,"tag":63,"props":201,"children":203},{"className":202},[],[204],{"type":48,"value":90},{"type":48,"value":206}," must be JSON-serializable",{"type":43,"tag":112,"props":208,"children":209},{},[],{"type":43,"tag":116,"props":211,"children":213},{"id":212},"basic-interrupt-resume",[214],{"type":48,"value":215},"Basic Interrupt + Resume",{"type":43,"tag":123,"props":217,"children":218},{},[219,224,226,232,234,239,241,246],{"type":43,"tag":63,"props":220,"children":222},{"className":221},[],[223],{"type":48,"value":68},{"type":48,"value":225}," pauses the graph. The value surfaces in the result under ",{"type":43,"tag":63,"props":227,"children":229},{"className":228},[],[230],{"type":48,"value":231},"__interrupt__",{"type":48,"value":233},". ",{"type":43,"tag":63,"props":235,"children":237},{"className":236},[],[238],{"type":48,"value":82},{"type":48,"value":240}," resumes — the resume value becomes the return value of ",{"type":43,"tag":63,"props":242,"children":244},{"className":243},[],[245],{"type":48,"value":90},{"type":48,"value":247},".",{"type":43,"tag":123,"props":249,"children":250},{},[251,256,258,263,265,270],{"type":43,"tag":59,"props":252,"children":253},{},[254],{"type":48,"value":255},"Critical",{"type":48,"value":257},": when the graph resumes, the node restarts from the ",{"type":43,"tag":59,"props":259,"children":260},{},[261],{"type":48,"value":262},"beginning",{"type":48,"value":264}," — all code before ",{"type":43,"tag":63,"props":266,"children":268},{"className":267},[],[269],{"type":48,"value":90},{"type":48,"value":271}," re-runs.",{"type":43,"tag":273,"props":274,"children":275},"ex-basic-interrupt-resume",{},[276,587],{"type":43,"tag":277,"props":278,"children":279},"python",{},[280,282],{"type":48,"value":281},"\nPause execution for human review and resume with Command.\n",{"type":43,"tag":283,"props":284,"children":288},"pre",{"className":285,"code":286,"language":277,"meta":287,"style":287},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from langgraph.types import interrupt, Command\nfrom langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict\n\nclass State(TypedDict):\n    approved: bool\n\ndef approval_node(state: State):\n    # Pause and ask for approval\n    approved = interrupt(\"Do you approve this action?\")\n    # When resumed, Command(resume=...) returns that value here\n    return {\"approved\": approved}\n\ncheckpointer = InMemorySaver()\ngraph = (\n    StateGraph(State)\n    .add_node(\"approval\", approval_node)\n    .add_edge(START, \"approval\")\n    .add_edge(\"approval\", END)\n    .compile(checkpointer=checkpointer)\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"thread-1\"}}\n\n# Initial run — hits interrupt and pauses\nresult = graph.invoke({\"approved\": False}, config)\nprint(result[\"__interrupt__\"])\n# [Interrupt(value='Do you approve this action?')]\n\n# Resume with the human's response\nresult = graph.invoke(Command(resume=True), config)\nprint(result[\"approved\"])  # True\n","",[289],{"type":43,"tag":63,"props":290,"children":291},{"__ignoreMap":287},[292,303,312,321,330,340,349,358,366,375,384,393,402,411,419,428,437,446,455,464,473,482,491,499,508,516,525,534,543,552,560,569,578],{"type":43,"tag":293,"props":294,"children":297},"span",{"class":295,"line":296},"line",1,[298],{"type":43,"tag":293,"props":299,"children":300},{},[301],{"type":48,"value":302},"from langgraph.types import interrupt, Command\n",{"type":43,"tag":293,"props":304,"children":306},{"class":295,"line":305},2,[307],{"type":43,"tag":293,"props":308,"children":309},{},[310],{"type":48,"value":311},"from langgraph.checkpoint.memory import InMemorySaver\n",{"type":43,"tag":293,"props":313,"children":315},{"class":295,"line":314},3,[316],{"type":43,"tag":293,"props":317,"children":318},{},[319],{"type":48,"value":320},"from langgraph.graph import StateGraph, START, END\n",{"type":43,"tag":293,"props":322,"children":324},{"class":295,"line":323},4,[325],{"type":43,"tag":293,"props":326,"children":327},{},[328],{"type":48,"value":329},"from typing_extensions import TypedDict\n",{"type":43,"tag":293,"props":331,"children":333},{"class":295,"line":332},5,[334],{"type":43,"tag":293,"props":335,"children":337},{"emptyLinePlaceholder":336},true,[338],{"type":48,"value":339},"\n",{"type":43,"tag":293,"props":341,"children":343},{"class":295,"line":342},6,[344],{"type":43,"tag":293,"props":345,"children":346},{},[347],{"type":48,"value":348},"class State(TypedDict):\n",{"type":43,"tag":293,"props":350,"children":352},{"class":295,"line":351},7,[353],{"type":43,"tag":293,"props":354,"children":355},{},[356],{"type":48,"value":357},"    approved: bool\n",{"type":43,"tag":293,"props":359,"children":361},{"class":295,"line":360},8,[362],{"type":43,"tag":293,"props":363,"children":364},{"emptyLinePlaceholder":336},[365],{"type":48,"value":339},{"type":43,"tag":293,"props":367,"children":369},{"class":295,"line":368},9,[370],{"type":43,"tag":293,"props":371,"children":372},{},[373],{"type":48,"value":374},"def approval_node(state: State):\n",{"type":43,"tag":293,"props":376,"children":378},{"class":295,"line":377},10,[379],{"type":43,"tag":293,"props":380,"children":381},{},[382],{"type":48,"value":383},"    # Pause and ask for approval\n",{"type":43,"tag":293,"props":385,"children":387},{"class":295,"line":386},11,[388],{"type":43,"tag":293,"props":389,"children":390},{},[391],{"type":48,"value":392},"    approved = interrupt(\"Do you approve this action?\")\n",{"type":43,"tag":293,"props":394,"children":396},{"class":295,"line":395},12,[397],{"type":43,"tag":293,"props":398,"children":399},{},[400],{"type":48,"value":401},"    # When resumed, Command(resume=...) returns that value here\n",{"type":43,"tag":293,"props":403,"children":405},{"class":295,"line":404},13,[406],{"type":43,"tag":293,"props":407,"children":408},{},[409],{"type":48,"value":410},"    return {\"approved\": approved}\n",{"type":43,"tag":293,"props":412,"children":414},{"class":295,"line":413},14,[415],{"type":43,"tag":293,"props":416,"children":417},{"emptyLinePlaceholder":336},[418],{"type":48,"value":339},{"type":43,"tag":293,"props":420,"children":422},{"class":295,"line":421},15,[423],{"type":43,"tag":293,"props":424,"children":425},{},[426],{"type":48,"value":427},"checkpointer = InMemorySaver()\n",{"type":43,"tag":293,"props":429,"children":431},{"class":295,"line":430},16,[432],{"type":43,"tag":293,"props":433,"children":434},{},[435],{"type":48,"value":436},"graph = (\n",{"type":43,"tag":293,"props":438,"children":440},{"class":295,"line":439},17,[441],{"type":43,"tag":293,"props":442,"children":443},{},[444],{"type":48,"value":445},"    StateGraph(State)\n",{"type":43,"tag":293,"props":447,"children":449},{"class":295,"line":448},18,[450],{"type":43,"tag":293,"props":451,"children":452},{},[453],{"type":48,"value":454},"    .add_node(\"approval\", approval_node)\n",{"type":43,"tag":293,"props":456,"children":458},{"class":295,"line":457},19,[459],{"type":43,"tag":293,"props":460,"children":461},{},[462],{"type":48,"value":463},"    .add_edge(START, \"approval\")\n",{"type":43,"tag":293,"props":465,"children":467},{"class":295,"line":466},20,[468],{"type":43,"tag":293,"props":469,"children":470},{},[471],{"type":48,"value":472},"    .add_edge(\"approval\", END)\n",{"type":43,"tag":293,"props":474,"children":476},{"class":295,"line":475},21,[477],{"type":43,"tag":293,"props":478,"children":479},{},[480],{"type":48,"value":481},"    .compile(checkpointer=checkpointer)\n",{"type":43,"tag":293,"props":483,"children":485},{"class":295,"line":484},22,[486],{"type":43,"tag":293,"props":487,"children":488},{},[489],{"type":48,"value":490},")\n",{"type":43,"tag":293,"props":492,"children":494},{"class":295,"line":493},23,[495],{"type":43,"tag":293,"props":496,"children":497},{"emptyLinePlaceholder":336},[498],{"type":48,"value":339},{"type":43,"tag":293,"props":500,"children":502},{"class":295,"line":501},24,[503],{"type":43,"tag":293,"props":504,"children":505},{},[506],{"type":48,"value":507},"config = {\"configurable\": {\"thread_id\": \"thread-1\"}}\n",{"type":43,"tag":293,"props":509,"children":511},{"class":295,"line":510},25,[512],{"type":43,"tag":293,"props":513,"children":514},{"emptyLinePlaceholder":336},[515],{"type":48,"value":339},{"type":43,"tag":293,"props":517,"children":519},{"class":295,"line":518},26,[520],{"type":43,"tag":293,"props":521,"children":522},{},[523],{"type":48,"value":524},"# Initial run — hits interrupt and pauses\n",{"type":43,"tag":293,"props":526,"children":528},{"class":295,"line":527},27,[529],{"type":43,"tag":293,"props":530,"children":531},{},[532],{"type":48,"value":533},"result = graph.invoke({\"approved\": False}, config)\n",{"type":43,"tag":293,"props":535,"children":537},{"class":295,"line":536},28,[538],{"type":43,"tag":293,"props":539,"children":540},{},[541],{"type":48,"value":542},"print(result[\"__interrupt__\"])\n",{"type":43,"tag":293,"props":544,"children":546},{"class":295,"line":545},29,[547],{"type":43,"tag":293,"props":548,"children":549},{},[550],{"type":48,"value":551},"# [Interrupt(value='Do you approve this action?')]\n",{"type":43,"tag":293,"props":553,"children":555},{"class":295,"line":554},30,[556],{"type":43,"tag":293,"props":557,"children":558},{"emptyLinePlaceholder":336},[559],{"type":48,"value":339},{"type":43,"tag":293,"props":561,"children":563},{"class":295,"line":562},31,[564],{"type":43,"tag":293,"props":565,"children":566},{},[567],{"type":48,"value":568},"# Resume with the human's response\n",{"type":43,"tag":293,"props":570,"children":572},{"class":295,"line":571},32,[573],{"type":43,"tag":293,"props":574,"children":575},{},[576],{"type":48,"value":577},"result = graph.invoke(Command(resume=True), config)\n",{"type":43,"tag":293,"props":579,"children":581},{"class":295,"line":580},33,[582],{"type":43,"tag":293,"props":583,"children":584},{},[585],{"type":48,"value":586},"print(result[\"approved\"])  # True\n",{"type":43,"tag":588,"props":589,"children":590},"typescript",{},[591,592],{"type":48,"value":281},{"type":43,"tag":283,"props":593,"children":596},{"className":594,"code":595,"language":588,"meta":287,"style":287},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { interrupt, Command, MemorySaver, StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  approved: z.boolean().default(false),\n});\n\nconst approvalNode = async (state: typeof State.State) => {\n  \u002F\u002F Pause and ask for approval\n  const approved = interrupt(\"Do you approve this action?\");\n  \u002F\u002F When resumed, Command({ resume }) returns that value here\n  return { approved };\n};\n\nconst checkpointer = new MemorySaver();\nconst graph = new StateGraph(State)\n  .addNode(\"approval\", approvalNode)\n  .addEdge(START, \"approval\")\n  .addEdge(\"approval\", END)\n  .compile({ checkpointer });\n\nconst config = { configurable: { thread_id: \"thread-1\" } };\n\n\u002F\u002F Initial run — hits interrupt and pauses\nlet result = await graph.invoke({ approved: false }, config);\nconsole.log(result.__interrupt__);\n\u002F\u002F [{ value: 'Do you approve this action?', ... }]\n\n\u002F\u002F Resume with the human's response\nresult = await graph.invoke(new Command({ resume: true }), config);\nconsole.log(result.approved);  \u002F\u002F true\n",[597],{"type":43,"tag":63,"props":598,"children":599},{"__ignoreMap":287},[600,707,748,755,794,855,871,878,947,956,1003,1011,1032,1040,1047,1079,1108,1147,1184,1220,1257,1264,1327,1334,1342,1412,1447,1455,1462,1470,1553],{"type":43,"tag":293,"props":601,"children":602},{"class":295,"line":296},[603,609,615,621,626,631,635,640,644,649,653,658,662,667,671,676,681,686,691,697,702],{"type":43,"tag":293,"props":604,"children":606},{"style":605},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[607],{"type":48,"value":608},"import",{"type":43,"tag":293,"props":610,"children":612},{"style":611},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[613],{"type":48,"value":614}," {",{"type":43,"tag":293,"props":616,"children":618},{"style":617},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[619],{"type":48,"value":620}," interrupt",{"type":43,"tag":293,"props":622,"children":623},{"style":611},[624],{"type":48,"value":625},",",{"type":43,"tag":293,"props":627,"children":628},{"style":617},[629],{"type":48,"value":630}," Command",{"type":43,"tag":293,"props":632,"children":633},{"style":611},[634],{"type":48,"value":625},{"type":43,"tag":293,"props":636,"children":637},{"style":617},[638],{"type":48,"value":639}," MemorySaver",{"type":43,"tag":293,"props":641,"children":642},{"style":611},[643],{"type":48,"value":625},{"type":43,"tag":293,"props":645,"children":646},{"style":617},[647],{"type":48,"value":648}," StateGraph",{"type":43,"tag":293,"props":650,"children":651},{"style":611},[652],{"type":48,"value":625},{"type":43,"tag":293,"props":654,"children":655},{"style":617},[656],{"type":48,"value":657}," StateSchema",{"type":43,"tag":293,"props":659,"children":660},{"style":611},[661],{"type":48,"value":625},{"type":43,"tag":293,"props":663,"children":664},{"style":617},[665],{"type":48,"value":666}," START",{"type":43,"tag":293,"props":668,"children":669},{"style":611},[670],{"type":48,"value":625},{"type":43,"tag":293,"props":672,"children":673},{"style":617},[674],{"type":48,"value":675}," END",{"type":43,"tag":293,"props":677,"children":678},{"style":611},[679],{"type":48,"value":680}," }",{"type":43,"tag":293,"props":682,"children":683},{"style":605},[684],{"type":48,"value":685}," from",{"type":43,"tag":293,"props":687,"children":688},{"style":611},[689],{"type":48,"value":690}," \"",{"type":43,"tag":293,"props":692,"children":694},{"style":693},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[695],{"type":48,"value":696},"@langchain\u002Flanggraph",{"type":43,"tag":293,"props":698,"children":699},{"style":611},[700],{"type":48,"value":701},"\"",{"type":43,"tag":293,"props":703,"children":704},{"style":611},[705],{"type":48,"value":706},";\n",{"type":43,"tag":293,"props":708,"children":709},{"class":295,"line":305},[710,714,718,723,727,731,735,740,744],{"type":43,"tag":293,"props":711,"children":712},{"style":605},[713],{"type":48,"value":608},{"type":43,"tag":293,"props":715,"children":716},{"style":611},[717],{"type":48,"value":614},{"type":43,"tag":293,"props":719,"children":720},{"style":617},[721],{"type":48,"value":722}," z",{"type":43,"tag":293,"props":724,"children":725},{"style":611},[726],{"type":48,"value":680},{"type":43,"tag":293,"props":728,"children":729},{"style":605},[730],{"type":48,"value":685},{"type":43,"tag":293,"props":732,"children":733},{"style":611},[734],{"type":48,"value":690},{"type":43,"tag":293,"props":736,"children":737},{"style":693},[738],{"type":48,"value":739},"zod",{"type":43,"tag":293,"props":741,"children":742},{"style":611},[743],{"type":48,"value":701},{"type":43,"tag":293,"props":745,"children":746},{"style":611},[747],{"type":48,"value":706},{"type":43,"tag":293,"props":749,"children":750},{"class":295,"line":314},[751],{"type":43,"tag":293,"props":752,"children":753},{"emptyLinePlaceholder":336},[754],{"type":48,"value":339},{"type":43,"tag":293,"props":756,"children":757},{"class":295,"line":323},[758,764,769,774,779,784,789],{"type":43,"tag":293,"props":759,"children":761},{"style":760},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[762],{"type":48,"value":763},"const",{"type":43,"tag":293,"props":765,"children":766},{"style":617},[767],{"type":48,"value":768}," State ",{"type":43,"tag":293,"props":770,"children":771},{"style":611},[772],{"type":48,"value":773},"=",{"type":43,"tag":293,"props":775,"children":776},{"style":611},[777],{"type":48,"value":778}," new",{"type":43,"tag":293,"props":780,"children":782},{"style":781},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[783],{"type":48,"value":657},{"type":43,"tag":293,"props":785,"children":786},{"style":617},[787],{"type":48,"value":788},"(",{"type":43,"tag":293,"props":790,"children":791},{"style":611},[792],{"type":48,"value":793},"{\n",{"type":43,"tag":293,"props":795,"children":796},{"class":295,"line":332},[797,803,808,812,816,821,826,830,835,839,845,850],{"type":43,"tag":293,"props":798,"children":800},{"style":799},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[801],{"type":48,"value":802},"  approved",{"type":43,"tag":293,"props":804,"children":805},{"style":611},[806],{"type":48,"value":807},":",{"type":43,"tag":293,"props":809,"children":810},{"style":617},[811],{"type":48,"value":722},{"type":43,"tag":293,"props":813,"children":814},{"style":611},[815],{"type":48,"value":247},{"type":43,"tag":293,"props":817,"children":818},{"style":781},[819],{"type":48,"value":820},"boolean",{"type":43,"tag":293,"props":822,"children":823},{"style":617},[824],{"type":48,"value":825},"()",{"type":43,"tag":293,"props":827,"children":828},{"style":611},[829],{"type":48,"value":247},{"type":43,"tag":293,"props":831,"children":832},{"style":781},[833],{"type":48,"value":834},"default",{"type":43,"tag":293,"props":836,"children":837},{"style":617},[838],{"type":48,"value":788},{"type":43,"tag":293,"props":840,"children":842},{"style":841},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[843],{"type":48,"value":844},"false",{"type":43,"tag":293,"props":846,"children":847},{"style":617},[848],{"type":48,"value":849},")",{"type":43,"tag":293,"props":851,"children":852},{"style":611},[853],{"type":48,"value":854},",\n",{"type":43,"tag":293,"props":856,"children":857},{"class":295,"line":342},[858,863,867],{"type":43,"tag":293,"props":859,"children":860},{"style":611},[861],{"type":48,"value":862},"}",{"type":43,"tag":293,"props":864,"children":865},{"style":617},[866],{"type":48,"value":849},{"type":43,"tag":293,"props":868,"children":869},{"style":611},[870],{"type":48,"value":706},{"type":43,"tag":293,"props":872,"children":873},{"class":295,"line":351},[874],{"type":43,"tag":293,"props":875,"children":876},{"emptyLinePlaceholder":336},[877],{"type":48,"value":339},{"type":43,"tag":293,"props":879,"children":880},{"class":295,"line":360},[881,885,890,894,899,904,910,914,919,924,928,933,937,942],{"type":43,"tag":293,"props":882,"children":883},{"style":760},[884],{"type":48,"value":763},{"type":43,"tag":293,"props":886,"children":887},{"style":617},[888],{"type":48,"value":889}," approvalNode ",{"type":43,"tag":293,"props":891,"children":892},{"style":611},[893],{"type":48,"value":773},{"type":43,"tag":293,"props":895,"children":896},{"style":760},[897],{"type":48,"value":898}," async",{"type":43,"tag":293,"props":900,"children":901},{"style":611},[902],{"type":48,"value":903}," (",{"type":43,"tag":293,"props":905,"children":907},{"style":906},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[908],{"type":48,"value":909},"state",{"type":43,"tag":293,"props":911,"children":912},{"style":611},[913],{"type":48,"value":807},{"type":43,"tag":293,"props":915,"children":916},{"style":611},[917],{"type":48,"value":918}," typeof",{"type":43,"tag":293,"props":920,"children":921},{"style":617},[922],{"type":48,"value":923}," State",{"type":43,"tag":293,"props":925,"children":926},{"style":611},[927],{"type":48,"value":247},{"type":43,"tag":293,"props":929,"children":930},{"style":617},[931],{"type":48,"value":932},"State",{"type":43,"tag":293,"props":934,"children":935},{"style":611},[936],{"type":48,"value":849},{"type":43,"tag":293,"props":938,"children":939},{"style":760},[940],{"type":48,"value":941}," =>",{"type":43,"tag":293,"props":943,"children":944},{"style":611},[945],{"type":48,"value":946}," {\n",{"type":43,"tag":293,"props":948,"children":949},{"class":295,"line":368},[950],{"type":43,"tag":293,"props":951,"children":953},{"style":952},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[954],{"type":48,"value":955},"  \u002F\u002F Pause and ask for approval\n",{"type":43,"tag":293,"props":957,"children":958},{"class":295,"line":377},[959,964,969,974,978,982,986,991,995,999],{"type":43,"tag":293,"props":960,"children":961},{"style":760},[962],{"type":48,"value":963},"  const",{"type":43,"tag":293,"props":965,"children":966},{"style":617},[967],{"type":48,"value":968}," approved",{"type":43,"tag":293,"props":970,"children":971},{"style":611},[972],{"type":48,"value":973}," =",{"type":43,"tag":293,"props":975,"children":976},{"style":781},[977],{"type":48,"value":620},{"type":43,"tag":293,"props":979,"children":980},{"style":799},[981],{"type":48,"value":788},{"type":43,"tag":293,"props":983,"children":984},{"style":611},[985],{"type":48,"value":701},{"type":43,"tag":293,"props":987,"children":988},{"style":693},[989],{"type":48,"value":990},"Do you approve this action?",{"type":43,"tag":293,"props":992,"children":993},{"style":611},[994],{"type":48,"value":701},{"type":43,"tag":293,"props":996,"children":997},{"style":799},[998],{"type":48,"value":849},{"type":43,"tag":293,"props":1000,"children":1001},{"style":611},[1002],{"type":48,"value":706},{"type":43,"tag":293,"props":1004,"children":1005},{"class":295,"line":386},[1006],{"type":43,"tag":293,"props":1007,"children":1008},{"style":952},[1009],{"type":48,"value":1010},"  \u002F\u002F When resumed, Command({ resume }) returns that value here\n",{"type":43,"tag":293,"props":1012,"children":1013},{"class":295,"line":395},[1014,1019,1023,1027],{"type":43,"tag":293,"props":1015,"children":1016},{"style":605},[1017],{"type":48,"value":1018},"  return",{"type":43,"tag":293,"props":1020,"children":1021},{"style":611},[1022],{"type":48,"value":614},{"type":43,"tag":293,"props":1024,"children":1025},{"style":617},[1026],{"type":48,"value":968},{"type":43,"tag":293,"props":1028,"children":1029},{"style":611},[1030],{"type":48,"value":1031}," };\n",{"type":43,"tag":293,"props":1033,"children":1034},{"class":295,"line":404},[1035],{"type":43,"tag":293,"props":1036,"children":1037},{"style":611},[1038],{"type":48,"value":1039},"};\n",{"type":43,"tag":293,"props":1041,"children":1042},{"class":295,"line":413},[1043],{"type":43,"tag":293,"props":1044,"children":1045},{"emptyLinePlaceholder":336},[1046],{"type":48,"value":339},{"type":43,"tag":293,"props":1048,"children":1049},{"class":295,"line":421},[1050,1054,1059,1063,1067,1071,1075],{"type":43,"tag":293,"props":1051,"children":1052},{"style":760},[1053],{"type":48,"value":763},{"type":43,"tag":293,"props":1055,"children":1056},{"style":617},[1057],{"type":48,"value":1058}," checkpointer ",{"type":43,"tag":293,"props":1060,"children":1061},{"style":611},[1062],{"type":48,"value":773},{"type":43,"tag":293,"props":1064,"children":1065},{"style":611},[1066],{"type":48,"value":778},{"type":43,"tag":293,"props":1068,"children":1069},{"style":781},[1070],{"type":48,"value":639},{"type":43,"tag":293,"props":1072,"children":1073},{"style":617},[1074],{"type":48,"value":825},{"type":43,"tag":293,"props":1076,"children":1077},{"style":611},[1078],{"type":48,"value":706},{"type":43,"tag":293,"props":1080,"children":1081},{"class":295,"line":430},[1082,1086,1091,1095,1099,1103],{"type":43,"tag":293,"props":1083,"children":1084},{"style":760},[1085],{"type":48,"value":763},{"type":43,"tag":293,"props":1087,"children":1088},{"style":617},[1089],{"type":48,"value":1090}," graph ",{"type":43,"tag":293,"props":1092,"children":1093},{"style":611},[1094],{"type":48,"value":773},{"type":43,"tag":293,"props":1096,"children":1097},{"style":611},[1098],{"type":48,"value":778},{"type":43,"tag":293,"props":1100,"children":1101},{"style":781},[1102],{"type":48,"value":648},{"type":43,"tag":293,"props":1104,"children":1105},{"style":617},[1106],{"type":48,"value":1107},"(State)\n",{"type":43,"tag":293,"props":1109,"children":1110},{"class":295,"line":439},[1111,1116,1121,1125,1129,1134,1138,1142],{"type":43,"tag":293,"props":1112,"children":1113},{"style":611},[1114],{"type":48,"value":1115},"  .",{"type":43,"tag":293,"props":1117,"children":1118},{"style":781},[1119],{"type":48,"value":1120},"addNode",{"type":43,"tag":293,"props":1122,"children":1123},{"style":617},[1124],{"type":48,"value":788},{"type":43,"tag":293,"props":1126,"children":1127},{"style":611},[1128],{"type":48,"value":701},{"type":43,"tag":293,"props":1130,"children":1131},{"style":693},[1132],{"type":48,"value":1133},"approval",{"type":43,"tag":293,"props":1135,"children":1136},{"style":611},[1137],{"type":48,"value":701},{"type":43,"tag":293,"props":1139,"children":1140},{"style":611},[1141],{"type":48,"value":625},{"type":43,"tag":293,"props":1143,"children":1144},{"style":617},[1145],{"type":48,"value":1146}," approvalNode)\n",{"type":43,"tag":293,"props":1148,"children":1149},{"class":295,"line":448},[1150,1154,1159,1164,1168,1172,1176,1180],{"type":43,"tag":293,"props":1151,"children":1152},{"style":611},[1153],{"type":48,"value":1115},{"type":43,"tag":293,"props":1155,"children":1156},{"style":781},[1157],{"type":48,"value":1158},"addEdge",{"type":43,"tag":293,"props":1160,"children":1161},{"style":617},[1162],{"type":48,"value":1163},"(START",{"type":43,"tag":293,"props":1165,"children":1166},{"style":611},[1167],{"type":48,"value":625},{"type":43,"tag":293,"props":1169,"children":1170},{"style":611},[1171],{"type":48,"value":690},{"type":43,"tag":293,"props":1173,"children":1174},{"style":693},[1175],{"type":48,"value":1133},{"type":43,"tag":293,"props":1177,"children":1178},{"style":611},[1179],{"type":48,"value":701},{"type":43,"tag":293,"props":1181,"children":1182},{"style":617},[1183],{"type":48,"value":490},{"type":43,"tag":293,"props":1185,"children":1186},{"class":295,"line":457},[1187,1191,1195,1199,1203,1207,1211,1215],{"type":43,"tag":293,"props":1188,"children":1189},{"style":611},[1190],{"type":48,"value":1115},{"type":43,"tag":293,"props":1192,"children":1193},{"style":781},[1194],{"type":48,"value":1158},{"type":43,"tag":293,"props":1196,"children":1197},{"style":617},[1198],{"type":48,"value":788},{"type":43,"tag":293,"props":1200,"children":1201},{"style":611},[1202],{"type":48,"value":701},{"type":43,"tag":293,"props":1204,"children":1205},{"style":693},[1206],{"type":48,"value":1133},{"type":43,"tag":293,"props":1208,"children":1209},{"style":611},[1210],{"type":48,"value":701},{"type":43,"tag":293,"props":1212,"children":1213},{"style":611},[1214],{"type":48,"value":625},{"type":43,"tag":293,"props":1216,"children":1217},{"style":617},[1218],{"type":48,"value":1219}," END)\n",{"type":43,"tag":293,"props":1221,"children":1222},{"class":295,"line":466},[1223,1227,1232,1236,1241,1245,1249,1253],{"type":43,"tag":293,"props":1224,"children":1225},{"style":611},[1226],{"type":48,"value":1115},{"type":43,"tag":293,"props":1228,"children":1229},{"style":781},[1230],{"type":48,"value":1231},"compile",{"type":43,"tag":293,"props":1233,"children":1234},{"style":617},[1235],{"type":48,"value":788},{"type":43,"tag":293,"props":1237,"children":1238},{"style":611},[1239],{"type":48,"value":1240},"{",{"type":43,"tag":293,"props":1242,"children":1243},{"style":617},[1244],{"type":48,"value":1058},{"type":43,"tag":293,"props":1246,"children":1247},{"style":611},[1248],{"type":48,"value":862},{"type":43,"tag":293,"props":1250,"children":1251},{"style":617},[1252],{"type":48,"value":849},{"type":43,"tag":293,"props":1254,"children":1255},{"style":611},[1256],{"type":48,"value":706},{"type":43,"tag":293,"props":1258,"children":1259},{"class":295,"line":475},[1260],{"type":43,"tag":293,"props":1261,"children":1262},{"emptyLinePlaceholder":336},[1263],{"type":48,"value":339},{"type":43,"tag":293,"props":1265,"children":1266},{"class":295,"line":484},[1267,1271,1276,1280,1284,1289,1293,1297,1302,1306,1310,1315,1319,1323],{"type":43,"tag":293,"props":1268,"children":1269},{"style":760},[1270],{"type":48,"value":763},{"type":43,"tag":293,"props":1272,"children":1273},{"style":617},[1274],{"type":48,"value":1275}," config ",{"type":43,"tag":293,"props":1277,"children":1278},{"style":611},[1279],{"type":48,"value":773},{"type":43,"tag":293,"props":1281,"children":1282},{"style":611},[1283],{"type":48,"value":614},{"type":43,"tag":293,"props":1285,"children":1286},{"style":799},[1287],{"type":48,"value":1288}," configurable",{"type":43,"tag":293,"props":1290,"children":1291},{"style":611},[1292],{"type":48,"value":807},{"type":43,"tag":293,"props":1294,"children":1295},{"style":611},[1296],{"type":48,"value":614},{"type":43,"tag":293,"props":1298,"children":1299},{"style":799},[1300],{"type":48,"value":1301}," thread_id",{"type":43,"tag":293,"props":1303,"children":1304},{"style":611},[1305],{"type":48,"value":807},{"type":43,"tag":293,"props":1307,"children":1308},{"style":611},[1309],{"type":48,"value":690},{"type":43,"tag":293,"props":1311,"children":1312},{"style":693},[1313],{"type":48,"value":1314},"thread-1",{"type":43,"tag":293,"props":1316,"children":1317},{"style":611},[1318],{"type":48,"value":701},{"type":43,"tag":293,"props":1320,"children":1321},{"style":611},[1322],{"type":48,"value":680},{"type":43,"tag":293,"props":1324,"children":1325},{"style":611},[1326],{"type":48,"value":1031},{"type":43,"tag":293,"props":1328,"children":1329},{"class":295,"line":493},[1330],{"type":43,"tag":293,"props":1331,"children":1332},{"emptyLinePlaceholder":336},[1333],{"type":48,"value":339},{"type":43,"tag":293,"props":1335,"children":1336},{"class":295,"line":501},[1337],{"type":43,"tag":293,"props":1338,"children":1339},{"style":952},[1340],{"type":48,"value":1341},"\u002F\u002F Initial run — hits interrupt and pauses\n",{"type":43,"tag":293,"props":1343,"children":1344},{"class":295,"line":510},[1345,1350,1355,1359,1364,1369,1373,1377,1381,1385,1389,1393,1398,1403,1408],{"type":43,"tag":293,"props":1346,"children":1347},{"style":760},[1348],{"type":48,"value":1349},"let",{"type":43,"tag":293,"props":1351,"children":1352},{"style":617},[1353],{"type":48,"value":1354}," result ",{"type":43,"tag":293,"props":1356,"children":1357},{"style":611},[1358],{"type":48,"value":773},{"type":43,"tag":293,"props":1360,"children":1361},{"style":605},[1362],{"type":48,"value":1363}," await",{"type":43,"tag":293,"props":1365,"children":1366},{"style":617},[1367],{"type":48,"value":1368}," graph",{"type":43,"tag":293,"props":1370,"children":1371},{"style":611},[1372],{"type":48,"value":247},{"type":43,"tag":293,"props":1374,"children":1375},{"style":781},[1376],{"type":48,"value":179},{"type":43,"tag":293,"props":1378,"children":1379},{"style":617},[1380],{"type":48,"value":788},{"type":43,"tag":293,"props":1382,"children":1383},{"style":611},[1384],{"type":48,"value":1240},{"type":43,"tag":293,"props":1386,"children":1387},{"style":799},[1388],{"type":48,"value":968},{"type":43,"tag":293,"props":1390,"children":1391},{"style":611},[1392],{"type":48,"value":807},{"type":43,"tag":293,"props":1394,"children":1395},{"style":841},[1396],{"type":48,"value":1397}," false",{"type":43,"tag":293,"props":1399,"children":1400},{"style":611},[1401],{"type":48,"value":1402}," },",{"type":43,"tag":293,"props":1404,"children":1405},{"style":617},[1406],{"type":48,"value":1407}," config)",{"type":43,"tag":293,"props":1409,"children":1410},{"style":611},[1411],{"type":48,"value":706},{"type":43,"tag":293,"props":1413,"children":1414},{"class":295,"line":518},[1415,1420,1424,1429,1434,1438,1443],{"type":43,"tag":293,"props":1416,"children":1417},{"style":617},[1418],{"type":48,"value":1419},"console",{"type":43,"tag":293,"props":1421,"children":1422},{"style":611},[1423],{"type":48,"value":247},{"type":43,"tag":293,"props":1425,"children":1426},{"style":781},[1427],{"type":48,"value":1428},"log",{"type":43,"tag":293,"props":1430,"children":1431},{"style":617},[1432],{"type":48,"value":1433},"(result",{"type":43,"tag":293,"props":1435,"children":1436},{"style":611},[1437],{"type":48,"value":247},{"type":43,"tag":293,"props":1439,"children":1440},{"style":617},[1441],{"type":48,"value":1442},"__interrupt__)",{"type":43,"tag":293,"props":1444,"children":1445},{"style":611},[1446],{"type":48,"value":706},{"type":43,"tag":293,"props":1448,"children":1449},{"class":295,"line":527},[1450],{"type":43,"tag":293,"props":1451,"children":1452},{"style":952},[1453],{"type":48,"value":1454},"\u002F\u002F [{ value: 'Do you approve this action?', ... }]\n",{"type":43,"tag":293,"props":1456,"children":1457},{"class":295,"line":536},[1458],{"type":43,"tag":293,"props":1459,"children":1460},{"emptyLinePlaceholder":336},[1461],{"type":48,"value":339},{"type":43,"tag":293,"props":1463,"children":1464},{"class":295,"line":545},[1465],{"type":43,"tag":293,"props":1466,"children":1467},{"style":952},[1468],{"type":48,"value":1469},"\u002F\u002F Resume with the human's response\n",{"type":43,"tag":293,"props":1471,"children":1472},{"class":295,"line":554},[1473,1478,1482,1486,1490,1494,1498,1502,1507,1511,1515,1519,1524,1528,1533,1537,1541,1545,1549],{"type":43,"tag":293,"props":1474,"children":1475},{"style":617},[1476],{"type":48,"value":1477},"result ",{"type":43,"tag":293,"props":1479,"children":1480},{"style":611},[1481],{"type":48,"value":773},{"type":43,"tag":293,"props":1483,"children":1484},{"style":605},[1485],{"type":48,"value":1363},{"type":43,"tag":293,"props":1487,"children":1488},{"style":617},[1489],{"type":48,"value":1368},{"type":43,"tag":293,"props":1491,"children":1492},{"style":611},[1493],{"type":48,"value":247},{"type":43,"tag":293,"props":1495,"children":1496},{"style":781},[1497],{"type":48,"value":179},{"type":43,"tag":293,"props":1499,"children":1500},{"style":617},[1501],{"type":48,"value":788},{"type":43,"tag":293,"props":1503,"children":1504},{"style":611},[1505],{"type":48,"value":1506},"new",{"type":43,"tag":293,"props":1508,"children":1509},{"style":781},[1510],{"type":48,"value":630},{"type":43,"tag":293,"props":1512,"children":1513},{"style":617},[1514],{"type":48,"value":788},{"type":43,"tag":293,"props":1516,"children":1517},{"style":611},[1518],{"type":48,"value":1240},{"type":43,"tag":293,"props":1520,"children":1521},{"style":799},[1522],{"type":48,"value":1523}," resume",{"type":43,"tag":293,"props":1525,"children":1526},{"style":611},[1527],{"type":48,"value":807},{"type":43,"tag":293,"props":1529,"children":1530},{"style":841},[1531],{"type":48,"value":1532}," true",{"type":43,"tag":293,"props":1534,"children":1535},{"style":611},[1536],{"type":48,"value":680},{"type":43,"tag":293,"props":1538,"children":1539},{"style":617},[1540],{"type":48,"value":849},{"type":43,"tag":293,"props":1542,"children":1543},{"style":611},[1544],{"type":48,"value":625},{"type":43,"tag":293,"props":1546,"children":1547},{"style":617},[1548],{"type":48,"value":1407},{"type":43,"tag":293,"props":1550,"children":1551},{"style":611},[1552],{"type":48,"value":706},{"type":43,"tag":293,"props":1554,"children":1555},{"class":295,"line":562},[1556,1560,1564,1568,1572,1576,1581,1586],{"type":43,"tag":293,"props":1557,"children":1558},{"style":617},[1559],{"type":48,"value":1419},{"type":43,"tag":293,"props":1561,"children":1562},{"style":611},[1563],{"type":48,"value":247},{"type":43,"tag":293,"props":1565,"children":1566},{"style":781},[1567],{"type":48,"value":1428},{"type":43,"tag":293,"props":1569,"children":1570},{"style":617},[1571],{"type":48,"value":1433},{"type":43,"tag":293,"props":1573,"children":1574},{"style":611},[1575],{"type":48,"value":247},{"type":43,"tag":293,"props":1577,"children":1578},{"style":617},[1579],{"type":48,"value":1580},"approved)",{"type":43,"tag":293,"props":1582,"children":1583},{"style":611},[1584],{"type":48,"value":1585},";",{"type":43,"tag":293,"props":1587,"children":1588},{"style":952},[1589],{"type":48,"value":1590},"  \u002F\u002F true\n",{"type":43,"tag":112,"props":1592,"children":1593},{},[],{"type":43,"tag":116,"props":1595,"children":1597},{"id":1596},"approval-workflow",[1598],{"type":48,"value":1599},"Approval Workflow",{"type":43,"tag":123,"props":1601,"children":1602},{},[1603],{"type":48,"value":1604},"A common pattern: interrupt to show a draft, then route based on the human's decision.",{"type":43,"tag":1606,"props":1607,"children":1608},"ex-approval-workflow",{},[1609,1862],{"type":43,"tag":277,"props":1610,"children":1611},{},[1612,1614],{"type":48,"value":1613},"\nInterrupt for human review, then route to send or end based on the decision.\n",{"type":43,"tag":283,"props":1615,"children":1617},{"className":285,"code":1616,"language":277,"meta":287,"style":287},"from langgraph.types import interrupt, Command\nfrom langgraph.graph import StateGraph, START, END\nfrom typing import Literal\nfrom typing_extensions import TypedDict\n\nclass EmailAgentState(TypedDict):\n    email_content: str\n    draft_response: str\n    classification: dict\n\ndef human_review(state: EmailAgentState) -> Command[Literal[\"send_reply\", \"__end__\"]]:\n    \"\"\"Pause for human review using interrupt and route based on decision.\"\"\"\n    classification = state.get(\"classification\", {})\n\n    # interrupt() must come first — any code before it will re-run on resume\n    human_decision = interrupt({\n        \"email_id\": state.get(\"email_content\", \"\"),\n        \"draft_response\": state.get(\"draft_response\", \"\"),\n        \"urgency\": classification.get(\"urgency\"),\n        \"action\": \"Please review and approve\u002Fedit this response\"\n    })\n\n    # Process the human's decision\n    if human_decision.get(\"approved\"):\n        return Command(\n            update={\"draft_response\": human_decision.get(\"edited_response\", state.get(\"draft_response\", \"\"))},\n            goto=\"send_reply\"\n        )\n    else:\n        # Rejection — human will handle directly\n        return Command(update={}, goto=END)\n",[1618],{"type":43,"tag":63,"props":1619,"children":1620},{"__ignoreMap":287},[1621,1628,1635,1643,1650,1657,1665,1673,1681,1689,1696,1704,1712,1720,1727,1735,1743,1751,1759,1767,1775,1783,1790,1798,1806,1814,1822,1830,1838,1846,1854],{"type":43,"tag":293,"props":1622,"children":1623},{"class":295,"line":296},[1624],{"type":43,"tag":293,"props":1625,"children":1626},{},[1627],{"type":48,"value":302},{"type":43,"tag":293,"props":1629,"children":1630},{"class":295,"line":305},[1631],{"type":43,"tag":293,"props":1632,"children":1633},{},[1634],{"type":48,"value":320},{"type":43,"tag":293,"props":1636,"children":1637},{"class":295,"line":314},[1638],{"type":43,"tag":293,"props":1639,"children":1640},{},[1641],{"type":48,"value":1642},"from typing import Literal\n",{"type":43,"tag":293,"props":1644,"children":1645},{"class":295,"line":323},[1646],{"type":43,"tag":293,"props":1647,"children":1648},{},[1649],{"type":48,"value":329},{"type":43,"tag":293,"props":1651,"children":1652},{"class":295,"line":332},[1653],{"type":43,"tag":293,"props":1654,"children":1655},{"emptyLinePlaceholder":336},[1656],{"type":48,"value":339},{"type":43,"tag":293,"props":1658,"children":1659},{"class":295,"line":342},[1660],{"type":43,"tag":293,"props":1661,"children":1662},{},[1663],{"type":48,"value":1664},"class EmailAgentState(TypedDict):\n",{"type":43,"tag":293,"props":1666,"children":1667},{"class":295,"line":351},[1668],{"type":43,"tag":293,"props":1669,"children":1670},{},[1671],{"type":48,"value":1672},"    email_content: str\n",{"type":43,"tag":293,"props":1674,"children":1675},{"class":295,"line":360},[1676],{"type":43,"tag":293,"props":1677,"children":1678},{},[1679],{"type":48,"value":1680},"    draft_response: str\n",{"type":43,"tag":293,"props":1682,"children":1683},{"class":295,"line":368},[1684],{"type":43,"tag":293,"props":1685,"children":1686},{},[1687],{"type":48,"value":1688},"    classification: dict\n",{"type":43,"tag":293,"props":1690,"children":1691},{"class":295,"line":377},[1692],{"type":43,"tag":293,"props":1693,"children":1694},{"emptyLinePlaceholder":336},[1695],{"type":48,"value":339},{"type":43,"tag":293,"props":1697,"children":1698},{"class":295,"line":386},[1699],{"type":43,"tag":293,"props":1700,"children":1701},{},[1702],{"type":48,"value":1703},"def human_review(state: EmailAgentState) -> Command[Literal[\"send_reply\", \"__end__\"]]:\n",{"type":43,"tag":293,"props":1705,"children":1706},{"class":295,"line":395},[1707],{"type":43,"tag":293,"props":1708,"children":1709},{},[1710],{"type":48,"value":1711},"    \"\"\"Pause for human review using interrupt and route based on decision.\"\"\"\n",{"type":43,"tag":293,"props":1713,"children":1714},{"class":295,"line":404},[1715],{"type":43,"tag":293,"props":1716,"children":1717},{},[1718],{"type":48,"value":1719},"    classification = state.get(\"classification\", {})\n",{"type":43,"tag":293,"props":1721,"children":1722},{"class":295,"line":413},[1723],{"type":43,"tag":293,"props":1724,"children":1725},{"emptyLinePlaceholder":336},[1726],{"type":48,"value":339},{"type":43,"tag":293,"props":1728,"children":1729},{"class":295,"line":421},[1730],{"type":43,"tag":293,"props":1731,"children":1732},{},[1733],{"type":48,"value":1734},"    # interrupt() must come first — any code before it will re-run on resume\n",{"type":43,"tag":293,"props":1736,"children":1737},{"class":295,"line":430},[1738],{"type":43,"tag":293,"props":1739,"children":1740},{},[1741],{"type":48,"value":1742},"    human_decision = interrupt({\n",{"type":43,"tag":293,"props":1744,"children":1745},{"class":295,"line":439},[1746],{"type":43,"tag":293,"props":1747,"children":1748},{},[1749],{"type":48,"value":1750},"        \"email_id\": state.get(\"email_content\", \"\"),\n",{"type":43,"tag":293,"props":1752,"children":1753},{"class":295,"line":448},[1754],{"type":43,"tag":293,"props":1755,"children":1756},{},[1757],{"type":48,"value":1758},"        \"draft_response\": state.get(\"draft_response\", \"\"),\n",{"type":43,"tag":293,"props":1760,"children":1761},{"class":295,"line":457},[1762],{"type":43,"tag":293,"props":1763,"children":1764},{},[1765],{"type":48,"value":1766},"        \"urgency\": classification.get(\"urgency\"),\n",{"type":43,"tag":293,"props":1768,"children":1769},{"class":295,"line":466},[1770],{"type":43,"tag":293,"props":1771,"children":1772},{},[1773],{"type":48,"value":1774},"        \"action\": \"Please review and approve\u002Fedit this response\"\n",{"type":43,"tag":293,"props":1776,"children":1777},{"class":295,"line":475},[1778],{"type":43,"tag":293,"props":1779,"children":1780},{},[1781],{"type":48,"value":1782},"    })\n",{"type":43,"tag":293,"props":1784,"children":1785},{"class":295,"line":484},[1786],{"type":43,"tag":293,"props":1787,"children":1788},{"emptyLinePlaceholder":336},[1789],{"type":48,"value":339},{"type":43,"tag":293,"props":1791,"children":1792},{"class":295,"line":493},[1793],{"type":43,"tag":293,"props":1794,"children":1795},{},[1796],{"type":48,"value":1797},"    # Process the human's decision\n",{"type":43,"tag":293,"props":1799,"children":1800},{"class":295,"line":501},[1801],{"type":43,"tag":293,"props":1802,"children":1803},{},[1804],{"type":48,"value":1805},"    if human_decision.get(\"approved\"):\n",{"type":43,"tag":293,"props":1807,"children":1808},{"class":295,"line":510},[1809],{"type":43,"tag":293,"props":1810,"children":1811},{},[1812],{"type":48,"value":1813},"        return Command(\n",{"type":43,"tag":293,"props":1815,"children":1816},{"class":295,"line":518},[1817],{"type":43,"tag":293,"props":1818,"children":1819},{},[1820],{"type":48,"value":1821},"            update={\"draft_response\": human_decision.get(\"edited_response\", state.get(\"draft_response\", \"\"))},\n",{"type":43,"tag":293,"props":1823,"children":1824},{"class":295,"line":527},[1825],{"type":43,"tag":293,"props":1826,"children":1827},{},[1828],{"type":48,"value":1829},"            goto=\"send_reply\"\n",{"type":43,"tag":293,"props":1831,"children":1832},{"class":295,"line":536},[1833],{"type":43,"tag":293,"props":1834,"children":1835},{},[1836],{"type":48,"value":1837},"        )\n",{"type":43,"tag":293,"props":1839,"children":1840},{"class":295,"line":545},[1841],{"type":43,"tag":293,"props":1842,"children":1843},{},[1844],{"type":48,"value":1845},"    else:\n",{"type":43,"tag":293,"props":1847,"children":1848},{"class":295,"line":554},[1849],{"type":43,"tag":293,"props":1850,"children":1851},{},[1852],{"type":48,"value":1853},"        # Rejection — human will handle directly\n",{"type":43,"tag":293,"props":1855,"children":1856},{"class":295,"line":562},[1857],{"type":43,"tag":293,"props":1858,"children":1859},{},[1860],{"type":48,"value":1861},"        return Command(update={}, goto=END)\n",{"type":43,"tag":588,"props":1863,"children":1864},{},[1865,1866],{"type":48,"value":1613},{"type":43,"tag":283,"props":1867,"children":1869},{"className":594,"code":1868,"language":588,"meta":287,"style":287},"import { interrupt, Command, END, GraphNode } from \"@langchain\u002Flanggraph\";\n\nconst humanReview: GraphNode\u003Ctypeof EmailAgentState> = async (state) => {\n  const classification = state.classification!;\n\n  \u002F\u002F interrupt() must come first — any code before it will re-run on resume\n  const humanDecision = interrupt({\n    emailId: state.emailContent,\n    draftResponse: state.responseText,\n    urgency: classification.urgency,\n    action: \"Please review and approve\u002Fedit this response\",\n  });\n\n  \u002F\u002F Process the human's decision\n  if (humanDecision.approved) {\n    return new Command({\n      update: { responseText: humanDecision.editedResponse || state.responseText },\n      goto: \"sendReply\",\n    });\n  } else {\n    return new Command({ update: {}, goto: END });\n  }\n};\n",[1870],{"type":43,"tag":63,"props":1871,"children":1872},{"__ignoreMap":287},[1873,1937,1944,2008,2043,2050,2058,2086,2115,2144,2173,2202,2218,2225,2233,2268,2292,2352,2381,2397,2413,2475,2483],{"type":43,"tag":293,"props":1874,"children":1875},{"class":295,"line":296},[1876,1880,1884,1888,1892,1896,1900,1904,1908,1913,1917,1921,1925,1929,1933],{"type":43,"tag":293,"props":1877,"children":1878},{"style":605},[1879],{"type":48,"value":608},{"type":43,"tag":293,"props":1881,"children":1882},{"style":611},[1883],{"type":48,"value":614},{"type":43,"tag":293,"props":1885,"children":1886},{"style":617},[1887],{"type":48,"value":620},{"type":43,"tag":293,"props":1889,"children":1890},{"style":611},[1891],{"type":48,"value":625},{"type":43,"tag":293,"props":1893,"children":1894},{"style":617},[1895],{"type":48,"value":630},{"type":43,"tag":293,"props":1897,"children":1898},{"style":611},[1899],{"type":48,"value":625},{"type":43,"tag":293,"props":1901,"children":1902},{"style":617},[1903],{"type":48,"value":675},{"type":43,"tag":293,"props":1905,"children":1906},{"style":611},[1907],{"type":48,"value":625},{"type":43,"tag":293,"props":1909,"children":1910},{"style":617},[1911],{"type":48,"value":1912}," GraphNode",{"type":43,"tag":293,"props":1914,"children":1915},{"style":611},[1916],{"type":48,"value":680},{"type":43,"tag":293,"props":1918,"children":1919},{"style":605},[1920],{"type":48,"value":685},{"type":43,"tag":293,"props":1922,"children":1923},{"style":611},[1924],{"type":48,"value":690},{"type":43,"tag":293,"props":1926,"children":1927},{"style":693},[1928],{"type":48,"value":696},{"type":43,"tag":293,"props":1930,"children":1931},{"style":611},[1932],{"type":48,"value":701},{"type":43,"tag":293,"props":1934,"children":1935},{"style":611},[1936],{"type":48,"value":706},{"type":43,"tag":293,"props":1938,"children":1939},{"class":295,"line":305},[1940],{"type":43,"tag":293,"props":1941,"children":1942},{"emptyLinePlaceholder":336},[1943],{"type":48,"value":339},{"type":43,"tag":293,"props":1945,"children":1946},{"class":295,"line":314},[1947,1951,1956,1960,1965,1970,1975,1980,1984,1988,1992,1996,2000,2004],{"type":43,"tag":293,"props":1948,"children":1949},{"style":760},[1950],{"type":48,"value":763},{"type":43,"tag":293,"props":1952,"children":1953},{"style":617},[1954],{"type":48,"value":1955}," humanReview",{"type":43,"tag":293,"props":1957,"children":1958},{"style":611},[1959],{"type":48,"value":807},{"type":43,"tag":293,"props":1961,"children":1963},{"style":1962},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1964],{"type":48,"value":1912},{"type":43,"tag":293,"props":1966,"children":1967},{"style":611},[1968],{"type":48,"value":1969},"\u003Ctypeof",{"type":43,"tag":293,"props":1971,"children":1972},{"style":617},[1973],{"type":48,"value":1974}," EmailAgentState",{"type":43,"tag":293,"props":1976,"children":1977},{"style":611},[1978],{"type":48,"value":1979},">",{"type":43,"tag":293,"props":1981,"children":1982},{"style":611},[1983],{"type":48,"value":973},{"type":43,"tag":293,"props":1985,"children":1986},{"style":760},[1987],{"type":48,"value":898},{"type":43,"tag":293,"props":1989,"children":1990},{"style":611},[1991],{"type":48,"value":903},{"type":43,"tag":293,"props":1993,"children":1994},{"style":906},[1995],{"type":48,"value":909},{"type":43,"tag":293,"props":1997,"children":1998},{"style":611},[1999],{"type":48,"value":849},{"type":43,"tag":293,"props":2001,"children":2002},{"style":760},[2003],{"type":48,"value":941},{"type":43,"tag":293,"props":2005,"children":2006},{"style":611},[2007],{"type":48,"value":946},{"type":43,"tag":293,"props":2009,"children":2010},{"class":295,"line":323},[2011,2015,2020,2024,2029,2033,2038],{"type":43,"tag":293,"props":2012,"children":2013},{"style":760},[2014],{"type":48,"value":963},{"type":43,"tag":293,"props":2016,"children":2017},{"style":617},[2018],{"type":48,"value":2019}," classification",{"type":43,"tag":293,"props":2021,"children":2022},{"style":611},[2023],{"type":48,"value":973},{"type":43,"tag":293,"props":2025,"children":2026},{"style":617},[2027],{"type":48,"value":2028}," state",{"type":43,"tag":293,"props":2030,"children":2031},{"style":611},[2032],{"type":48,"value":247},{"type":43,"tag":293,"props":2034,"children":2035},{"style":617},[2036],{"type":48,"value":2037},"classification",{"type":43,"tag":293,"props":2039,"children":2040},{"style":611},[2041],{"type":48,"value":2042},"!;\n",{"type":43,"tag":293,"props":2044,"children":2045},{"class":295,"line":332},[2046],{"type":43,"tag":293,"props":2047,"children":2048},{"emptyLinePlaceholder":336},[2049],{"type":48,"value":339},{"type":43,"tag":293,"props":2051,"children":2052},{"class":295,"line":342},[2053],{"type":43,"tag":293,"props":2054,"children":2055},{"style":952},[2056],{"type":48,"value":2057},"  \u002F\u002F interrupt() must come first — any code before it will re-run on resume\n",{"type":43,"tag":293,"props":2059,"children":2060},{"class":295,"line":351},[2061,2065,2070,2074,2078,2082],{"type":43,"tag":293,"props":2062,"children":2063},{"style":760},[2064],{"type":48,"value":963},{"type":43,"tag":293,"props":2066,"children":2067},{"style":617},[2068],{"type":48,"value":2069}," humanDecision",{"type":43,"tag":293,"props":2071,"children":2072},{"style":611},[2073],{"type":48,"value":973},{"type":43,"tag":293,"props":2075,"children":2076},{"style":781},[2077],{"type":48,"value":620},{"type":43,"tag":293,"props":2079,"children":2080},{"style":799},[2081],{"type":48,"value":788},{"type":43,"tag":293,"props":2083,"children":2084},{"style":611},[2085],{"type":48,"value":793},{"type":43,"tag":293,"props":2087,"children":2088},{"class":295,"line":360},[2089,2094,2098,2102,2106,2111],{"type":43,"tag":293,"props":2090,"children":2091},{"style":799},[2092],{"type":48,"value":2093},"    emailId",{"type":43,"tag":293,"props":2095,"children":2096},{"style":611},[2097],{"type":48,"value":807},{"type":43,"tag":293,"props":2099,"children":2100},{"style":617},[2101],{"type":48,"value":2028},{"type":43,"tag":293,"props":2103,"children":2104},{"style":611},[2105],{"type":48,"value":247},{"type":43,"tag":293,"props":2107,"children":2108},{"style":617},[2109],{"type":48,"value":2110},"emailContent",{"type":43,"tag":293,"props":2112,"children":2113},{"style":611},[2114],{"type":48,"value":854},{"type":43,"tag":293,"props":2116,"children":2117},{"class":295,"line":368},[2118,2123,2127,2131,2135,2140],{"type":43,"tag":293,"props":2119,"children":2120},{"style":799},[2121],{"type":48,"value":2122},"    draftResponse",{"type":43,"tag":293,"props":2124,"children":2125},{"style":611},[2126],{"type":48,"value":807},{"type":43,"tag":293,"props":2128,"children":2129},{"style":617},[2130],{"type":48,"value":2028},{"type":43,"tag":293,"props":2132,"children":2133},{"style":611},[2134],{"type":48,"value":247},{"type":43,"tag":293,"props":2136,"children":2137},{"style":617},[2138],{"type":48,"value":2139},"responseText",{"type":43,"tag":293,"props":2141,"children":2142},{"style":611},[2143],{"type":48,"value":854},{"type":43,"tag":293,"props":2145,"children":2146},{"class":295,"line":377},[2147,2152,2156,2160,2164,2169],{"type":43,"tag":293,"props":2148,"children":2149},{"style":799},[2150],{"type":48,"value":2151},"    urgency",{"type":43,"tag":293,"props":2153,"children":2154},{"style":611},[2155],{"type":48,"value":807},{"type":43,"tag":293,"props":2157,"children":2158},{"style":617},[2159],{"type":48,"value":2019},{"type":43,"tag":293,"props":2161,"children":2162},{"style":611},[2163],{"type":48,"value":247},{"type":43,"tag":293,"props":2165,"children":2166},{"style":617},[2167],{"type":48,"value":2168},"urgency",{"type":43,"tag":293,"props":2170,"children":2171},{"style":611},[2172],{"type":48,"value":854},{"type":43,"tag":293,"props":2174,"children":2175},{"class":295,"line":386},[2176,2181,2185,2189,2194,2198],{"type":43,"tag":293,"props":2177,"children":2178},{"style":799},[2179],{"type":48,"value":2180},"    action",{"type":43,"tag":293,"props":2182,"children":2183},{"style":611},[2184],{"type":48,"value":807},{"type":43,"tag":293,"props":2186,"children":2187},{"style":611},[2188],{"type":48,"value":690},{"type":43,"tag":293,"props":2190,"children":2191},{"style":693},[2192],{"type":48,"value":2193},"Please review and approve\u002Fedit this response",{"type":43,"tag":293,"props":2195,"children":2196},{"style":611},[2197],{"type":48,"value":701},{"type":43,"tag":293,"props":2199,"children":2200},{"style":611},[2201],{"type":48,"value":854},{"type":43,"tag":293,"props":2203,"children":2204},{"class":295,"line":395},[2205,2210,2214],{"type":43,"tag":293,"props":2206,"children":2207},{"style":611},[2208],{"type":48,"value":2209},"  }",{"type":43,"tag":293,"props":2211,"children":2212},{"style":799},[2213],{"type":48,"value":849},{"type":43,"tag":293,"props":2215,"children":2216},{"style":611},[2217],{"type":48,"value":706},{"type":43,"tag":293,"props":2219,"children":2220},{"class":295,"line":404},[2221],{"type":43,"tag":293,"props":2222,"children":2223},{"emptyLinePlaceholder":336},[2224],{"type":48,"value":339},{"type":43,"tag":293,"props":2226,"children":2227},{"class":295,"line":413},[2228],{"type":43,"tag":293,"props":2229,"children":2230},{"style":952},[2231],{"type":48,"value":2232},"  \u002F\u002F Process the human's decision\n",{"type":43,"tag":293,"props":2234,"children":2235},{"class":295,"line":421},[2236,2241,2245,2250,2254,2259,2264],{"type":43,"tag":293,"props":2237,"children":2238},{"style":605},[2239],{"type":48,"value":2240},"  if",{"type":43,"tag":293,"props":2242,"children":2243},{"style":799},[2244],{"type":48,"value":903},{"type":43,"tag":293,"props":2246,"children":2247},{"style":617},[2248],{"type":48,"value":2249},"humanDecision",{"type":43,"tag":293,"props":2251,"children":2252},{"style":611},[2253],{"type":48,"value":247},{"type":43,"tag":293,"props":2255,"children":2256},{"style":617},[2257],{"type":48,"value":2258},"approved",{"type":43,"tag":293,"props":2260,"children":2261},{"style":799},[2262],{"type":48,"value":2263},") ",{"type":43,"tag":293,"props":2265,"children":2266},{"style":611},[2267],{"type":48,"value":793},{"type":43,"tag":293,"props":2269,"children":2270},{"class":295,"line":430},[2271,2276,2280,2284,2288],{"type":43,"tag":293,"props":2272,"children":2273},{"style":605},[2274],{"type":48,"value":2275},"    return",{"type":43,"tag":293,"props":2277,"children":2278},{"style":611},[2279],{"type":48,"value":778},{"type":43,"tag":293,"props":2281,"children":2282},{"style":781},[2283],{"type":48,"value":630},{"type":43,"tag":293,"props":2285,"children":2286},{"style":799},[2287],{"type":48,"value":788},{"type":43,"tag":293,"props":2289,"children":2290},{"style":611},[2291],{"type":48,"value":793},{"type":43,"tag":293,"props":2293,"children":2294},{"class":295,"line":439},[2295,2300,2304,2308,2313,2317,2321,2325,2330,2335,2339,2343,2347],{"type":43,"tag":293,"props":2296,"children":2297},{"style":799},[2298],{"type":48,"value":2299},"      update",{"type":43,"tag":293,"props":2301,"children":2302},{"style":611},[2303],{"type":48,"value":807},{"type":43,"tag":293,"props":2305,"children":2306},{"style":611},[2307],{"type":48,"value":614},{"type":43,"tag":293,"props":2309,"children":2310},{"style":799},[2311],{"type":48,"value":2312}," responseText",{"type":43,"tag":293,"props":2314,"children":2315},{"style":611},[2316],{"type":48,"value":807},{"type":43,"tag":293,"props":2318,"children":2319},{"style":617},[2320],{"type":48,"value":2069},{"type":43,"tag":293,"props":2322,"children":2323},{"style":611},[2324],{"type":48,"value":247},{"type":43,"tag":293,"props":2326,"children":2327},{"style":617},[2328],{"type":48,"value":2329},"editedResponse",{"type":43,"tag":293,"props":2331,"children":2332},{"style":611},[2333],{"type":48,"value":2334}," ||",{"type":43,"tag":293,"props":2336,"children":2337},{"style":617},[2338],{"type":48,"value":2028},{"type":43,"tag":293,"props":2340,"children":2341},{"style":611},[2342],{"type":48,"value":247},{"type":43,"tag":293,"props":2344,"children":2345},{"style":617},[2346],{"type":48,"value":2139},{"type":43,"tag":293,"props":2348,"children":2349},{"style":611},[2350],{"type":48,"value":2351}," },\n",{"type":43,"tag":293,"props":2353,"children":2354},{"class":295,"line":448},[2355,2360,2364,2368,2373,2377],{"type":43,"tag":293,"props":2356,"children":2357},{"style":799},[2358],{"type":48,"value":2359},"      goto",{"type":43,"tag":293,"props":2361,"children":2362},{"style":611},[2363],{"type":48,"value":807},{"type":43,"tag":293,"props":2365,"children":2366},{"style":611},[2367],{"type":48,"value":690},{"type":43,"tag":293,"props":2369,"children":2370},{"style":693},[2371],{"type":48,"value":2372},"sendReply",{"type":43,"tag":293,"props":2374,"children":2375},{"style":611},[2376],{"type":48,"value":701},{"type":43,"tag":293,"props":2378,"children":2379},{"style":611},[2380],{"type":48,"value":854},{"type":43,"tag":293,"props":2382,"children":2383},{"class":295,"line":457},[2384,2389,2393],{"type":43,"tag":293,"props":2385,"children":2386},{"style":611},[2387],{"type":48,"value":2388},"    }",{"type":43,"tag":293,"props":2390,"children":2391},{"style":799},[2392],{"type":48,"value":849},{"type":43,"tag":293,"props":2394,"children":2395},{"style":611},[2396],{"type":48,"value":706},{"type":43,"tag":293,"props":2398,"children":2399},{"class":295,"line":466},[2400,2404,2409],{"type":43,"tag":293,"props":2401,"children":2402},{"style":611},[2403],{"type":48,"value":2209},{"type":43,"tag":293,"props":2405,"children":2406},{"style":605},[2407],{"type":48,"value":2408}," else",{"type":43,"tag":293,"props":2410,"children":2411},{"style":611},[2412],{"type":48,"value":946},{"type":43,"tag":293,"props":2414,"children":2415},{"class":295,"line":475},[2416,2420,2424,2428,2432,2436,2441,2445,2450,2455,2459,2463,2467,2471],{"type":43,"tag":293,"props":2417,"children":2418},{"style":605},[2419],{"type":48,"value":2275},{"type":43,"tag":293,"props":2421,"children":2422},{"style":611},[2423],{"type":48,"value":778},{"type":43,"tag":293,"props":2425,"children":2426},{"style":781},[2427],{"type":48,"value":630},{"type":43,"tag":293,"props":2429,"children":2430},{"style":799},[2431],{"type":48,"value":788},{"type":43,"tag":293,"props":2433,"children":2434},{"style":611},[2435],{"type":48,"value":1240},{"type":43,"tag":293,"props":2437,"children":2438},{"style":799},[2439],{"type":48,"value":2440}," update",{"type":43,"tag":293,"props":2442,"children":2443},{"style":611},[2444],{"type":48,"value":807},{"type":43,"tag":293,"props":2446,"children":2447},{"style":611},[2448],{"type":48,"value":2449}," {},",{"type":43,"tag":293,"props":2451,"children":2452},{"style":799},[2453],{"type":48,"value":2454}," goto",{"type":43,"tag":293,"props":2456,"children":2457},{"style":611},[2458],{"type":48,"value":807},{"type":43,"tag":293,"props":2460,"children":2461},{"style":617},[2462],{"type":48,"value":675},{"type":43,"tag":293,"props":2464,"children":2465},{"style":611},[2466],{"type":48,"value":680},{"type":43,"tag":293,"props":2468,"children":2469},{"style":799},[2470],{"type":48,"value":849},{"type":43,"tag":293,"props":2472,"children":2473},{"style":611},[2474],{"type":48,"value":706},{"type":43,"tag":293,"props":2476,"children":2477},{"class":295,"line":484},[2478],{"type":43,"tag":293,"props":2479,"children":2480},{"style":611},[2481],{"type":48,"value":2482},"  }\n",{"type":43,"tag":293,"props":2484,"children":2485},{"class":295,"line":493},[2486],{"type":43,"tag":293,"props":2487,"children":2488},{"style":611},[2489],{"type":48,"value":1039},{"type":43,"tag":112,"props":2491,"children":2492},{},[],{"type":43,"tag":116,"props":2494,"children":2496},{"id":2495},"validation-loop",[2497],{"type":48,"value":2498},"Validation Loop",{"type":43,"tag":123,"props":2500,"children":2501},{},[2502,2504,2509],{"type":48,"value":2503},"Use ",{"type":43,"tag":63,"props":2505,"children":2507},{"className":2506},[],[2508],{"type":48,"value":90},{"type":48,"value":2510}," in a loop to validate human input and re-prompt if invalid.",{"type":43,"tag":2512,"props":2513,"children":2514},"ex-validation-loop",{},[2515,2741],{"type":43,"tag":277,"props":2516,"children":2517},{},[2518,2520,2651,2664],{"type":48,"value":2519},"\nValidate human input in a loop, re-prompting until valid.\n",{"type":43,"tag":283,"props":2521,"children":2523},{"className":285,"code":2522,"language":277,"meta":287,"style":287},"from langgraph.types import interrupt\n\ndef get_age_node(state):\n    prompt = \"What is your age?\"\n\n    while True:\n        answer = interrupt(prompt)\n\n        # Validate the input\n        if isinstance(answer, int) and answer > 0:\n            break\n        else:\n            # Invalid input — ask again with a more specific prompt\n            prompt = f\"'{answer}' is not a valid age. Please enter a positive number.\"\n\n    return {\"age\": answer}\n",[2524],{"type":43,"tag":63,"props":2525,"children":2526},{"__ignoreMap":287},[2527,2535,2542,2550,2558,2565,2573,2581,2588,2596,2604,2612,2620,2628,2636,2643],{"type":43,"tag":293,"props":2528,"children":2529},{"class":295,"line":296},[2530],{"type":43,"tag":293,"props":2531,"children":2532},{},[2533],{"type":48,"value":2534},"from langgraph.types import interrupt\n",{"type":43,"tag":293,"props":2536,"children":2537},{"class":295,"line":305},[2538],{"type":43,"tag":293,"props":2539,"children":2540},{"emptyLinePlaceholder":336},[2541],{"type":48,"value":339},{"type":43,"tag":293,"props":2543,"children":2544},{"class":295,"line":314},[2545],{"type":43,"tag":293,"props":2546,"children":2547},{},[2548],{"type":48,"value":2549},"def get_age_node(state):\n",{"type":43,"tag":293,"props":2551,"children":2552},{"class":295,"line":323},[2553],{"type":43,"tag":293,"props":2554,"children":2555},{},[2556],{"type":48,"value":2557},"    prompt = \"What is your age?\"\n",{"type":43,"tag":293,"props":2559,"children":2560},{"class":295,"line":332},[2561],{"type":43,"tag":293,"props":2562,"children":2563},{"emptyLinePlaceholder":336},[2564],{"type":48,"value":339},{"type":43,"tag":293,"props":2566,"children":2567},{"class":295,"line":342},[2568],{"type":43,"tag":293,"props":2569,"children":2570},{},[2571],{"type":48,"value":2572},"    while True:\n",{"type":43,"tag":293,"props":2574,"children":2575},{"class":295,"line":351},[2576],{"type":43,"tag":293,"props":2577,"children":2578},{},[2579],{"type":48,"value":2580},"        answer = interrupt(prompt)\n",{"type":43,"tag":293,"props":2582,"children":2583},{"class":295,"line":360},[2584],{"type":43,"tag":293,"props":2585,"children":2586},{"emptyLinePlaceholder":336},[2587],{"type":48,"value":339},{"type":43,"tag":293,"props":2589,"children":2590},{"class":295,"line":368},[2591],{"type":43,"tag":293,"props":2592,"children":2593},{},[2594],{"type":48,"value":2595},"        # Validate the input\n",{"type":43,"tag":293,"props":2597,"children":2598},{"class":295,"line":377},[2599],{"type":43,"tag":293,"props":2600,"children":2601},{},[2602],{"type":48,"value":2603},"        if isinstance(answer, int) and answer > 0:\n",{"type":43,"tag":293,"props":2605,"children":2606},{"class":295,"line":386},[2607],{"type":43,"tag":293,"props":2608,"children":2609},{},[2610],{"type":48,"value":2611},"            break\n",{"type":43,"tag":293,"props":2613,"children":2614},{"class":295,"line":395},[2615],{"type":43,"tag":293,"props":2616,"children":2617},{},[2618],{"type":48,"value":2619},"        else:\n",{"type":43,"tag":293,"props":2621,"children":2622},{"class":295,"line":404},[2623],{"type":43,"tag":293,"props":2624,"children":2625},{},[2626],{"type":48,"value":2627},"            # Invalid input — ask again with a more specific prompt\n",{"type":43,"tag":293,"props":2629,"children":2630},{"class":295,"line":413},[2631],{"type":43,"tag":293,"props":2632,"children":2633},{},[2634],{"type":48,"value":2635},"            prompt = f\"'{answer}' is not a valid age. Please enter a positive number.\"\n",{"type":43,"tag":293,"props":2637,"children":2638},{"class":295,"line":421},[2639],{"type":43,"tag":293,"props":2640,"children":2641},{"emptyLinePlaceholder":336},[2642],{"type":48,"value":339},{"type":43,"tag":293,"props":2644,"children":2645},{"class":295,"line":430},[2646],{"type":43,"tag":293,"props":2647,"children":2648},{},[2649],{"type":48,"value":2650},"    return {\"age\": answer}\n",{"type":43,"tag":123,"props":2652,"children":2653},{},[2654,2656,2662],{"type":48,"value":2655},"Each ",{"type":43,"tag":63,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":48,"value":2661},"Command(resume=...)",{"type":48,"value":2663}," call provides the next answer. If invalid, the loop re-interrupts with a clearer message.",{"type":43,"tag":283,"props":2665,"children":2667},{"className":285,"code":2666,"language":277,"meta":287,"style":287},"config = {\"configurable\": {\"thread_id\": \"form-1\"}}\nfirst = graph.invoke({\"age\": None}, config)\n# __interrupt__: \"What is your age?\"\n\nretry = graph.invoke(Command(resume=\"thirty\"), config)\n# __interrupt__: \"'thirty' is not a valid age...\"\n\nfinal = graph.invoke(Command(resume=30), config)\nprint(final[\"age\"])  # 30\n",[2668],{"type":43,"tag":63,"props":2669,"children":2670},{"__ignoreMap":287},[2671,2679,2687,2695,2702,2710,2718,2725,2733],{"type":43,"tag":293,"props":2672,"children":2673},{"class":295,"line":296},[2674],{"type":43,"tag":293,"props":2675,"children":2676},{},[2677],{"type":48,"value":2678},"config = {\"configurable\": {\"thread_id\": \"form-1\"}}\n",{"type":43,"tag":293,"props":2680,"children":2681},{"class":295,"line":305},[2682],{"type":43,"tag":293,"props":2683,"children":2684},{},[2685],{"type":48,"value":2686},"first = graph.invoke({\"age\": None}, config)\n",{"type":43,"tag":293,"props":2688,"children":2689},{"class":295,"line":314},[2690],{"type":43,"tag":293,"props":2691,"children":2692},{},[2693],{"type":48,"value":2694},"# __interrupt__: \"What is your age?\"\n",{"type":43,"tag":293,"props":2696,"children":2697},{"class":295,"line":323},[2698],{"type":43,"tag":293,"props":2699,"children":2700},{"emptyLinePlaceholder":336},[2701],{"type":48,"value":339},{"type":43,"tag":293,"props":2703,"children":2704},{"class":295,"line":332},[2705],{"type":43,"tag":293,"props":2706,"children":2707},{},[2708],{"type":48,"value":2709},"retry = graph.invoke(Command(resume=\"thirty\"), config)\n",{"type":43,"tag":293,"props":2711,"children":2712},{"class":295,"line":342},[2713],{"type":43,"tag":293,"props":2714,"children":2715},{},[2716],{"type":48,"value":2717},"# __interrupt__: \"'thirty' is not a valid age...\"\n",{"type":43,"tag":293,"props":2719,"children":2720},{"class":295,"line":351},[2721],{"type":43,"tag":293,"props":2722,"children":2723},{"emptyLinePlaceholder":336},[2724],{"type":48,"value":339},{"type":43,"tag":293,"props":2726,"children":2727},{"class":295,"line":360},[2728],{"type":43,"tag":293,"props":2729,"children":2730},{},[2731],{"type":48,"value":2732},"final = graph.invoke(Command(resume=30), config)\n",{"type":43,"tag":293,"props":2734,"children":2735},{"class":295,"line":368},[2736],{"type":43,"tag":293,"props":2737,"children":2738},{},[2739],{"type":48,"value":2740},"print(final[\"age\"])  # 30\n",{"type":43,"tag":588,"props":2742,"children":2743},{},[2744,2745],{"type":48,"value":2519},{"type":43,"tag":283,"props":2746,"children":2748},{"className":594,"code":2747,"language":588,"meta":287,"style":287},"import { interrupt } from \"@langchain\u002Flanggraph\";\n\nconst getAgeNode = (state: typeof State.State) => {\n  let prompt = \"What is your age?\";\n\n  while (true) {\n    const answer = interrupt(prompt);\n\n    \u002F\u002F Validate the input\n    if (typeof answer === \"number\" && answer > 0) {\n      return { age: answer };\n    } else {\n      \u002F\u002F Invalid input — ask again with a more specific prompt\n      prompt = `'${answer}' is not a valid age. Please enter a positive number.`;\n    }\n  }\n};\n",[2749],{"type":43,"tag":63,"props":2750,"children":2751},{"__ignoreMap":287},[2752,2791,2798,2854,2888,2895,2920,2958,2965,2973,3040,3069,3084,3092,3142,3150,3157],{"type":43,"tag":293,"props":2753,"children":2754},{"class":295,"line":296},[2755,2759,2763,2767,2771,2775,2779,2783,2787],{"type":43,"tag":293,"props":2756,"children":2757},{"style":605},[2758],{"type":48,"value":608},{"type":43,"tag":293,"props":2760,"children":2761},{"style":611},[2762],{"type":48,"value":614},{"type":43,"tag":293,"props":2764,"children":2765},{"style":617},[2766],{"type":48,"value":620},{"type":43,"tag":293,"props":2768,"children":2769},{"style":611},[2770],{"type":48,"value":680},{"type":43,"tag":293,"props":2772,"children":2773},{"style":605},[2774],{"type":48,"value":685},{"type":43,"tag":293,"props":2776,"children":2777},{"style":611},[2778],{"type":48,"value":690},{"type":43,"tag":293,"props":2780,"children":2781},{"style":693},[2782],{"type":48,"value":696},{"type":43,"tag":293,"props":2784,"children":2785},{"style":611},[2786],{"type":48,"value":701},{"type":43,"tag":293,"props":2788,"children":2789},{"style":611},[2790],{"type":48,"value":706},{"type":43,"tag":293,"props":2792,"children":2793},{"class":295,"line":305},[2794],{"type":43,"tag":293,"props":2795,"children":2796},{"emptyLinePlaceholder":336},[2797],{"type":48,"value":339},{"type":43,"tag":293,"props":2799,"children":2800},{"class":295,"line":314},[2801,2805,2810,2814,2818,2822,2826,2830,2834,2838,2842,2846,2850],{"type":43,"tag":293,"props":2802,"children":2803},{"style":760},[2804],{"type":48,"value":763},{"type":43,"tag":293,"props":2806,"children":2807},{"style":617},[2808],{"type":48,"value":2809}," getAgeNode ",{"type":43,"tag":293,"props":2811,"children":2812},{"style":611},[2813],{"type":48,"value":773},{"type":43,"tag":293,"props":2815,"children":2816},{"style":611},[2817],{"type":48,"value":903},{"type":43,"tag":293,"props":2819,"children":2820},{"style":906},[2821],{"type":48,"value":909},{"type":43,"tag":293,"props":2823,"children":2824},{"style":611},[2825],{"type":48,"value":807},{"type":43,"tag":293,"props":2827,"children":2828},{"style":611},[2829],{"type":48,"value":918},{"type":43,"tag":293,"props":2831,"children":2832},{"style":617},[2833],{"type":48,"value":923},{"type":43,"tag":293,"props":2835,"children":2836},{"style":611},[2837],{"type":48,"value":247},{"type":43,"tag":293,"props":2839,"children":2840},{"style":617},[2841],{"type":48,"value":932},{"type":43,"tag":293,"props":2843,"children":2844},{"style":611},[2845],{"type":48,"value":849},{"type":43,"tag":293,"props":2847,"children":2848},{"style":760},[2849],{"type":48,"value":941},{"type":43,"tag":293,"props":2851,"children":2852},{"style":611},[2853],{"type":48,"value":946},{"type":43,"tag":293,"props":2855,"children":2856},{"class":295,"line":323},[2857,2862,2867,2871,2875,2880,2884],{"type":43,"tag":293,"props":2858,"children":2859},{"style":760},[2860],{"type":48,"value":2861},"  let",{"type":43,"tag":293,"props":2863,"children":2864},{"style":617},[2865],{"type":48,"value":2866}," prompt",{"type":43,"tag":293,"props":2868,"children":2869},{"style":611},[2870],{"type":48,"value":973},{"type":43,"tag":293,"props":2872,"children":2873},{"style":611},[2874],{"type":48,"value":690},{"type":43,"tag":293,"props":2876,"children":2877},{"style":693},[2878],{"type":48,"value":2879},"What is your age?",{"type":43,"tag":293,"props":2881,"children":2882},{"style":611},[2883],{"type":48,"value":701},{"type":43,"tag":293,"props":2885,"children":2886},{"style":611},[2887],{"type":48,"value":706},{"type":43,"tag":293,"props":2889,"children":2890},{"class":295,"line":332},[2891],{"type":43,"tag":293,"props":2892,"children":2893},{"emptyLinePlaceholder":336},[2894],{"type":48,"value":339},{"type":43,"tag":293,"props":2896,"children":2897},{"class":295,"line":342},[2898,2903,2907,2912,2916],{"type":43,"tag":293,"props":2899,"children":2900},{"style":605},[2901],{"type":48,"value":2902},"  while",{"type":43,"tag":293,"props":2904,"children":2905},{"style":799},[2906],{"type":48,"value":903},{"type":43,"tag":293,"props":2908,"children":2909},{"style":841},[2910],{"type":48,"value":2911},"true",{"type":43,"tag":293,"props":2913,"children":2914},{"style":799},[2915],{"type":48,"value":2263},{"type":43,"tag":293,"props":2917,"children":2918},{"style":611},[2919],{"type":48,"value":793},{"type":43,"tag":293,"props":2921,"children":2922},{"class":295,"line":351},[2923,2928,2933,2937,2941,2945,2950,2954],{"type":43,"tag":293,"props":2924,"children":2925},{"style":760},[2926],{"type":48,"value":2927},"    const",{"type":43,"tag":293,"props":2929,"children":2930},{"style":617},[2931],{"type":48,"value":2932}," answer",{"type":43,"tag":293,"props":2934,"children":2935},{"style":611},[2936],{"type":48,"value":973},{"type":43,"tag":293,"props":2938,"children":2939},{"style":781},[2940],{"type":48,"value":620},{"type":43,"tag":293,"props":2942,"children":2943},{"style":799},[2944],{"type":48,"value":788},{"type":43,"tag":293,"props":2946,"children":2947},{"style":617},[2948],{"type":48,"value":2949},"prompt",{"type":43,"tag":293,"props":2951,"children":2952},{"style":799},[2953],{"type":48,"value":849},{"type":43,"tag":293,"props":2955,"children":2956},{"style":611},[2957],{"type":48,"value":706},{"type":43,"tag":293,"props":2959,"children":2960},{"class":295,"line":360},[2961],{"type":43,"tag":293,"props":2962,"children":2963},{"emptyLinePlaceholder":336},[2964],{"type":48,"value":339},{"type":43,"tag":293,"props":2966,"children":2967},{"class":295,"line":368},[2968],{"type":43,"tag":293,"props":2969,"children":2970},{"style":952},[2971],{"type":48,"value":2972},"    \u002F\u002F Validate the input\n",{"type":43,"tag":293,"props":2974,"children":2975},{"class":295,"line":377},[2976,2981,2985,2990,2994,2999,3003,3008,3012,3017,3021,3026,3032,3036],{"type":43,"tag":293,"props":2977,"children":2978},{"style":605},[2979],{"type":48,"value":2980},"    if",{"type":43,"tag":293,"props":2982,"children":2983},{"style":799},[2984],{"type":48,"value":903},{"type":43,"tag":293,"props":2986,"children":2987},{"style":611},[2988],{"type":48,"value":2989},"typeof",{"type":43,"tag":293,"props":2991,"children":2992},{"style":617},[2993],{"type":48,"value":2932},{"type":43,"tag":293,"props":2995,"children":2996},{"style":611},[2997],{"type":48,"value":2998}," ===",{"type":43,"tag":293,"props":3000,"children":3001},{"style":611},[3002],{"type":48,"value":690},{"type":43,"tag":293,"props":3004,"children":3005},{"style":693},[3006],{"type":48,"value":3007},"number",{"type":43,"tag":293,"props":3009,"children":3010},{"style":611},[3011],{"type":48,"value":701},{"type":43,"tag":293,"props":3013,"children":3014},{"style":611},[3015],{"type":48,"value":3016}," &&",{"type":43,"tag":293,"props":3018,"children":3019},{"style":617},[3020],{"type":48,"value":2932},{"type":43,"tag":293,"props":3022,"children":3023},{"style":611},[3024],{"type":48,"value":3025}," >",{"type":43,"tag":293,"props":3027,"children":3029},{"style":3028},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3030],{"type":48,"value":3031}," 0",{"type":43,"tag":293,"props":3033,"children":3034},{"style":799},[3035],{"type":48,"value":2263},{"type":43,"tag":293,"props":3037,"children":3038},{"style":611},[3039],{"type":48,"value":793},{"type":43,"tag":293,"props":3041,"children":3042},{"class":295,"line":386},[3043,3048,3052,3057,3061,3065],{"type":43,"tag":293,"props":3044,"children":3045},{"style":605},[3046],{"type":48,"value":3047},"      return",{"type":43,"tag":293,"props":3049,"children":3050},{"style":611},[3051],{"type":48,"value":614},{"type":43,"tag":293,"props":3053,"children":3054},{"style":799},[3055],{"type":48,"value":3056}," age",{"type":43,"tag":293,"props":3058,"children":3059},{"style":611},[3060],{"type":48,"value":807},{"type":43,"tag":293,"props":3062,"children":3063},{"style":617},[3064],{"type":48,"value":2932},{"type":43,"tag":293,"props":3066,"children":3067},{"style":611},[3068],{"type":48,"value":1031},{"type":43,"tag":293,"props":3070,"children":3071},{"class":295,"line":395},[3072,3076,3080],{"type":43,"tag":293,"props":3073,"children":3074},{"style":611},[3075],{"type":48,"value":2388},{"type":43,"tag":293,"props":3077,"children":3078},{"style":605},[3079],{"type":48,"value":2408},{"type":43,"tag":293,"props":3081,"children":3082},{"style":611},[3083],{"type":48,"value":946},{"type":43,"tag":293,"props":3085,"children":3086},{"class":295,"line":404},[3087],{"type":43,"tag":293,"props":3088,"children":3089},{"style":952},[3090],{"type":48,"value":3091},"      \u002F\u002F Invalid input — ask again with a more specific prompt\n",{"type":43,"tag":293,"props":3093,"children":3094},{"class":295,"line":413},[3095,3100,3104,3109,3114,3119,3124,3128,3133,3138],{"type":43,"tag":293,"props":3096,"children":3097},{"style":617},[3098],{"type":48,"value":3099},"      prompt",{"type":43,"tag":293,"props":3101,"children":3102},{"style":611},[3103],{"type":48,"value":973},{"type":43,"tag":293,"props":3105,"children":3106},{"style":611},[3107],{"type":48,"value":3108}," `",{"type":43,"tag":293,"props":3110,"children":3111},{"style":693},[3112],{"type":48,"value":3113},"'",{"type":43,"tag":293,"props":3115,"children":3116},{"style":611},[3117],{"type":48,"value":3118},"${",{"type":43,"tag":293,"props":3120,"children":3121},{"style":617},[3122],{"type":48,"value":3123},"answer",{"type":43,"tag":293,"props":3125,"children":3126},{"style":611},[3127],{"type":48,"value":862},{"type":43,"tag":293,"props":3129,"children":3130},{"style":693},[3131],{"type":48,"value":3132},"' is not a valid age. Please enter a positive number.",{"type":43,"tag":293,"props":3134,"children":3135},{"style":611},[3136],{"type":48,"value":3137},"`",{"type":43,"tag":293,"props":3139,"children":3140},{"style":611},[3141],{"type":48,"value":706},{"type":43,"tag":293,"props":3143,"children":3144},{"class":295,"line":421},[3145],{"type":43,"tag":293,"props":3146,"children":3147},{"style":611},[3148],{"type":48,"value":3149},"    }\n",{"type":43,"tag":293,"props":3151,"children":3152},{"class":295,"line":430},[3153],{"type":43,"tag":293,"props":3154,"children":3155},{"style":611},[3156],{"type":48,"value":2482},{"type":43,"tag":293,"props":3158,"children":3159},{"class":295,"line":439},[3160],{"type":43,"tag":293,"props":3161,"children":3162},{"style":611},[3163],{"type":48,"value":1039},{"type":43,"tag":112,"props":3165,"children":3166},{},[],{"type":43,"tag":116,"props":3168,"children":3170},{"id":3169},"multiple-interrupts",[3171],{"type":48,"value":3172},"Multiple Interrupts",{"type":43,"tag":123,"props":3174,"children":3175},{},[3176,3178,3183],{"type":48,"value":3177},"When parallel branches each call ",{"type":43,"tag":63,"props":3179,"children":3181},{"className":3180},[],[3182],{"type":48,"value":90},{"type":48,"value":3184},", resume all of them in a single invocation by mapping each interrupt ID to its resume value.",{"type":43,"tag":3186,"props":3187,"children":3188},"ex-multiple-interrupts",{},[3189,3525],{"type":43,"tag":277,"props":3190,"children":3191},{},[3192,3194],{"type":48,"value":3193},"\nResume multiple parallel interrupts by mapping interrupt IDs to values.\n",{"type":43,"tag":283,"props":3195,"children":3197},{"className":285,"code":3196,"language":277,"meta":287,"style":287},"from typing import Annotated, TypedDict\nimport operator\nfrom langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import START, END, StateGraph\nfrom langgraph.types import Command, interrupt\n\nclass State(TypedDict):\n    vals: Annotated[list[str], operator.add]\n\ndef node_a(state):\n    answer = interrupt(\"question_a\")\n    return {\"vals\": [f\"a:{answer}\"]}\n\ndef node_b(state):\n    answer = interrupt(\"question_b\")\n    return {\"vals\": [f\"b:{answer}\"]}\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"a\", node_a)\n    .add_node(\"b\", node_b)\n    .add_edge(START, \"a\")\n    .add_edge(START, \"b\")\n    .add_edge(\"a\", END)\n    .add_edge(\"b\", END)\n    .compile(checkpointer=InMemorySaver())\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"1\"}}\n\n# Both parallel nodes hit interrupt() and pause\nresult = graph.invoke({\"vals\": []}, config)\n# result[\"__interrupt__\"] contains both Interrupt objects with IDs\n\n# Resume all pending interrupts at once using a map of id -> value\nresume_map = {\n    i.id: f\"answer for {i.value}\"\n    for i in result[\"__interrupt__\"]\n}\nresult = graph.invoke(Command(resume=resume_map), config)\n# result[\"vals\"] = [\"a:answer for question_a\", \"b:answer for question_b\"]\n",[3198],{"type":43,"tag":63,"props":3199,"children":3200},{"__ignoreMap":287},[3201,3209,3217,3224,3232,3240,3247,3254,3262,3269,3277,3285,3293,3300,3308,3316,3324,3331,3338,3345,3353,3361,3369,3377,3385,3393,3401,3408,3415,3423,3430,3438,3446,3454,3462,3471,3480,3489,3498,3507,3516],{"type":43,"tag":293,"props":3202,"children":3203},{"class":295,"line":296},[3204],{"type":43,"tag":293,"props":3205,"children":3206},{},[3207],{"type":48,"value":3208},"from typing import Annotated, TypedDict\n",{"type":43,"tag":293,"props":3210,"children":3211},{"class":295,"line":305},[3212],{"type":43,"tag":293,"props":3213,"children":3214},{},[3215],{"type":48,"value":3216},"import operator\n",{"type":43,"tag":293,"props":3218,"children":3219},{"class":295,"line":314},[3220],{"type":43,"tag":293,"props":3221,"children":3222},{},[3223],{"type":48,"value":311},{"type":43,"tag":293,"props":3225,"children":3226},{"class":295,"line":323},[3227],{"type":43,"tag":293,"props":3228,"children":3229},{},[3230],{"type":48,"value":3231},"from langgraph.graph import START, END, StateGraph\n",{"type":43,"tag":293,"props":3233,"children":3234},{"class":295,"line":332},[3235],{"type":43,"tag":293,"props":3236,"children":3237},{},[3238],{"type":48,"value":3239},"from langgraph.types import Command, interrupt\n",{"type":43,"tag":293,"props":3241,"children":3242},{"class":295,"line":342},[3243],{"type":43,"tag":293,"props":3244,"children":3245},{"emptyLinePlaceholder":336},[3246],{"type":48,"value":339},{"type":43,"tag":293,"props":3248,"children":3249},{"class":295,"line":351},[3250],{"type":43,"tag":293,"props":3251,"children":3252},{},[3253],{"type":48,"value":348},{"type":43,"tag":293,"props":3255,"children":3256},{"class":295,"line":360},[3257],{"type":43,"tag":293,"props":3258,"children":3259},{},[3260],{"type":48,"value":3261},"    vals: Annotated[list[str], operator.add]\n",{"type":43,"tag":293,"props":3263,"children":3264},{"class":295,"line":368},[3265],{"type":43,"tag":293,"props":3266,"children":3267},{"emptyLinePlaceholder":336},[3268],{"type":48,"value":339},{"type":43,"tag":293,"props":3270,"children":3271},{"class":295,"line":377},[3272],{"type":43,"tag":293,"props":3273,"children":3274},{},[3275],{"type":48,"value":3276},"def node_a(state):\n",{"type":43,"tag":293,"props":3278,"children":3279},{"class":295,"line":386},[3280],{"type":43,"tag":293,"props":3281,"children":3282},{},[3283],{"type":48,"value":3284},"    answer = interrupt(\"question_a\")\n",{"type":43,"tag":293,"props":3286,"children":3287},{"class":295,"line":395},[3288],{"type":43,"tag":293,"props":3289,"children":3290},{},[3291],{"type":48,"value":3292},"    return {\"vals\": [f\"a:{answer}\"]}\n",{"type":43,"tag":293,"props":3294,"children":3295},{"class":295,"line":404},[3296],{"type":43,"tag":293,"props":3297,"children":3298},{"emptyLinePlaceholder":336},[3299],{"type":48,"value":339},{"type":43,"tag":293,"props":3301,"children":3302},{"class":295,"line":413},[3303],{"type":43,"tag":293,"props":3304,"children":3305},{},[3306],{"type":48,"value":3307},"def node_b(state):\n",{"type":43,"tag":293,"props":3309,"children":3310},{"class":295,"line":421},[3311],{"type":43,"tag":293,"props":3312,"children":3313},{},[3314],{"type":48,"value":3315},"    answer = interrupt(\"question_b\")\n",{"type":43,"tag":293,"props":3317,"children":3318},{"class":295,"line":430},[3319],{"type":43,"tag":293,"props":3320,"children":3321},{},[3322],{"type":48,"value":3323},"    return {\"vals\": [f\"b:{answer}\"]}\n",{"type":43,"tag":293,"props":3325,"children":3326},{"class":295,"line":439},[3327],{"type":43,"tag":293,"props":3328,"children":3329},{"emptyLinePlaceholder":336},[3330],{"type":48,"value":339},{"type":43,"tag":293,"props":3332,"children":3333},{"class":295,"line":448},[3334],{"type":43,"tag":293,"props":3335,"children":3336},{},[3337],{"type":48,"value":436},{"type":43,"tag":293,"props":3339,"children":3340},{"class":295,"line":457},[3341],{"type":43,"tag":293,"props":3342,"children":3343},{},[3344],{"type":48,"value":445},{"type":43,"tag":293,"props":3346,"children":3347},{"class":295,"line":466},[3348],{"type":43,"tag":293,"props":3349,"children":3350},{},[3351],{"type":48,"value":3352},"    .add_node(\"a\", node_a)\n",{"type":43,"tag":293,"props":3354,"children":3355},{"class":295,"line":475},[3356],{"type":43,"tag":293,"props":3357,"children":3358},{},[3359],{"type":48,"value":3360},"    .add_node(\"b\", node_b)\n",{"type":43,"tag":293,"props":3362,"children":3363},{"class":295,"line":484},[3364],{"type":43,"tag":293,"props":3365,"children":3366},{},[3367],{"type":48,"value":3368},"    .add_edge(START, \"a\")\n",{"type":43,"tag":293,"props":3370,"children":3371},{"class":295,"line":493},[3372],{"type":43,"tag":293,"props":3373,"children":3374},{},[3375],{"type":48,"value":3376},"    .add_edge(START, \"b\")\n",{"type":43,"tag":293,"props":3378,"children":3379},{"class":295,"line":501},[3380],{"type":43,"tag":293,"props":3381,"children":3382},{},[3383],{"type":48,"value":3384},"    .add_edge(\"a\", END)\n",{"type":43,"tag":293,"props":3386,"children":3387},{"class":295,"line":510},[3388],{"type":43,"tag":293,"props":3389,"children":3390},{},[3391],{"type":48,"value":3392},"    .add_edge(\"b\", END)\n",{"type":43,"tag":293,"props":3394,"children":3395},{"class":295,"line":518},[3396],{"type":43,"tag":293,"props":3397,"children":3398},{},[3399],{"type":48,"value":3400},"    .compile(checkpointer=InMemorySaver())\n",{"type":43,"tag":293,"props":3402,"children":3403},{"class":295,"line":527},[3404],{"type":43,"tag":293,"props":3405,"children":3406},{},[3407],{"type":48,"value":490},{"type":43,"tag":293,"props":3409,"children":3410},{"class":295,"line":536},[3411],{"type":43,"tag":293,"props":3412,"children":3413},{"emptyLinePlaceholder":336},[3414],{"type":48,"value":339},{"type":43,"tag":293,"props":3416,"children":3417},{"class":295,"line":545},[3418],{"type":43,"tag":293,"props":3419,"children":3420},{},[3421],{"type":48,"value":3422},"config = {\"configurable\": {\"thread_id\": \"1\"}}\n",{"type":43,"tag":293,"props":3424,"children":3425},{"class":295,"line":554},[3426],{"type":43,"tag":293,"props":3427,"children":3428},{"emptyLinePlaceholder":336},[3429],{"type":48,"value":339},{"type":43,"tag":293,"props":3431,"children":3432},{"class":295,"line":562},[3433],{"type":43,"tag":293,"props":3434,"children":3435},{},[3436],{"type":48,"value":3437},"# Both parallel nodes hit interrupt() and pause\n",{"type":43,"tag":293,"props":3439,"children":3440},{"class":295,"line":571},[3441],{"type":43,"tag":293,"props":3442,"children":3443},{},[3444],{"type":48,"value":3445},"result = graph.invoke({\"vals\": []}, config)\n",{"type":43,"tag":293,"props":3447,"children":3448},{"class":295,"line":580},[3449],{"type":43,"tag":293,"props":3450,"children":3451},{},[3452],{"type":48,"value":3453},"# result[\"__interrupt__\"] contains both Interrupt objects with IDs\n",{"type":43,"tag":293,"props":3455,"children":3457},{"class":295,"line":3456},34,[3458],{"type":43,"tag":293,"props":3459,"children":3460},{"emptyLinePlaceholder":336},[3461],{"type":48,"value":339},{"type":43,"tag":293,"props":3463,"children":3465},{"class":295,"line":3464},35,[3466],{"type":43,"tag":293,"props":3467,"children":3468},{},[3469],{"type":48,"value":3470},"# Resume all pending interrupts at once using a map of id -> value\n",{"type":43,"tag":293,"props":3472,"children":3474},{"class":295,"line":3473},36,[3475],{"type":43,"tag":293,"props":3476,"children":3477},{},[3478],{"type":48,"value":3479},"resume_map = {\n",{"type":43,"tag":293,"props":3481,"children":3483},{"class":295,"line":3482},37,[3484],{"type":43,"tag":293,"props":3485,"children":3486},{},[3487],{"type":48,"value":3488},"    i.id: f\"answer for {i.value}\"\n",{"type":43,"tag":293,"props":3490,"children":3492},{"class":295,"line":3491},38,[3493],{"type":43,"tag":293,"props":3494,"children":3495},{},[3496],{"type":48,"value":3497},"    for i in result[\"__interrupt__\"]\n",{"type":43,"tag":293,"props":3499,"children":3501},{"class":295,"line":3500},39,[3502],{"type":43,"tag":293,"props":3503,"children":3504},{},[3505],{"type":48,"value":3506},"}\n",{"type":43,"tag":293,"props":3508,"children":3510},{"class":295,"line":3509},40,[3511],{"type":43,"tag":293,"props":3512,"children":3513},{},[3514],{"type":48,"value":3515},"result = graph.invoke(Command(resume=resume_map), config)\n",{"type":43,"tag":293,"props":3517,"children":3519},{"class":295,"line":3518},41,[3520],{"type":43,"tag":293,"props":3521,"children":3522},{},[3523],{"type":48,"value":3524},"# result[\"vals\"] = [\"a:answer for question_a\", \"b:answer for question_b\"]\n",{"type":43,"tag":588,"props":3526,"children":3527},{},[3528,3529],{"type":48,"value":3193},{"type":43,"tag":283,"props":3530,"children":3532},{"className":594,"code":3531,"language":588,"meta":287,"style":287},"import { Command, END, MemorySaver, START, StateGraph, interrupt, isInterrupted, INTERRUPT, Annotation } from \"@langchain\u002Flanggraph\";\n\nconst State = Annotation.Root({\n  vals: Annotation\u003Cstring[]>({\n    reducer: (left, right) => left.concat(Array.isArray(right) ? right : [right]),\n    default: () => [],\n  }),\n});\n\nfunction nodeA(_state: typeof State.State) {\n  const answer = interrupt(\"question_a\") as string;\n  return { vals: [`a:${answer}`] };\n}\n\nfunction nodeB(_state: typeof State.State) {\n  const answer = interrupt(\"question_b\") as string;\n  return { vals: [`b:${answer}`] };\n}\n\nconst graph = new StateGraph(State)\n  .addNode(\"a\", nodeA)\n  .addNode(\"b\", nodeB)\n  .addEdge(START, \"a\")\n  .addEdge(START, \"b\")\n  .addEdge(\"a\", END)\n  .addEdge(\"b\", END)\n  .compile({ checkpointer: new MemorySaver() });\n\nconst config = { configurable: { thread_id: \"1\" } };\n\nconst interruptedResult = await graph.invoke({ vals: [] }, config);\n\n\u002F\u002F Resume all pending interrupts at once\nconst resumeMap: Record\u003Cstring, string> = {};\nif (isInterrupted(interruptedResult)) {\n  for (const i of interruptedResult[INTERRUPT]) {\n    if (i.id != null) {\n      resumeMap[i.id] = `answer for ${i.value}`;\n    }\n  }\n}\nconst result = await graph.invoke(new Command({ resume: resumeMap }), config);\n\u002F\u002F result.vals = [\"a:answer for question_a\", \"b:answer for question_b\"]\n",[3533],{"type":43,"tag":63,"props":3534,"children":3535},{"__ignoreMap":287},[3536,3642,3649,3685,3728,3822,3852,3867,3882,3889,3939,3993,4049,4056,4063,4111,4163,4215,4222,4229,4256,4293,4330,4365,4400,4435,4470,4523,4530,4590,4597,4663,4670,4678,4728,4754,4804,4847,4913,4920,4927,4934,5019],{"type":43,"tag":293,"props":3537,"children":3538},{"class":295,"line":296},[3539,3543,3547,3551,3555,3559,3563,3567,3571,3575,3579,3583,3587,3591,3595,3600,3604,3609,3613,3618,3622,3626,3630,3634,3638],{"type":43,"tag":293,"props":3540,"children":3541},{"style":605},[3542],{"type":48,"value":608},{"type":43,"tag":293,"props":3544,"children":3545},{"style":611},[3546],{"type":48,"value":614},{"type":43,"tag":293,"props":3548,"children":3549},{"style":617},[3550],{"type":48,"value":630},{"type":43,"tag":293,"props":3552,"children":3553},{"style":611},[3554],{"type":48,"value":625},{"type":43,"tag":293,"props":3556,"children":3557},{"style":617},[3558],{"type":48,"value":675},{"type":43,"tag":293,"props":3560,"children":3561},{"style":611},[3562],{"type":48,"value":625},{"type":43,"tag":293,"props":3564,"children":3565},{"style":617},[3566],{"type":48,"value":639},{"type":43,"tag":293,"props":3568,"children":3569},{"style":611},[3570],{"type":48,"value":625},{"type":43,"tag":293,"props":3572,"children":3573},{"style":617},[3574],{"type":48,"value":666},{"type":43,"tag":293,"props":3576,"children":3577},{"style":611},[3578],{"type":48,"value":625},{"type":43,"tag":293,"props":3580,"children":3581},{"style":617},[3582],{"type":48,"value":648},{"type":43,"tag":293,"props":3584,"children":3585},{"style":611},[3586],{"type":48,"value":625},{"type":43,"tag":293,"props":3588,"children":3589},{"style":617},[3590],{"type":48,"value":620},{"type":43,"tag":293,"props":3592,"children":3593},{"style":611},[3594],{"type":48,"value":625},{"type":43,"tag":293,"props":3596,"children":3597},{"style":617},[3598],{"type":48,"value":3599}," isInterrupted",{"type":43,"tag":293,"props":3601,"children":3602},{"style":611},[3603],{"type":48,"value":625},{"type":43,"tag":293,"props":3605,"children":3606},{"style":617},[3607],{"type":48,"value":3608}," INTERRUPT",{"type":43,"tag":293,"props":3610,"children":3611},{"style":611},[3612],{"type":48,"value":625},{"type":43,"tag":293,"props":3614,"children":3615},{"style":617},[3616],{"type":48,"value":3617}," Annotation",{"type":43,"tag":293,"props":3619,"children":3620},{"style":611},[3621],{"type":48,"value":680},{"type":43,"tag":293,"props":3623,"children":3624},{"style":605},[3625],{"type":48,"value":685},{"type":43,"tag":293,"props":3627,"children":3628},{"style":611},[3629],{"type":48,"value":690},{"type":43,"tag":293,"props":3631,"children":3632},{"style":693},[3633],{"type":48,"value":696},{"type":43,"tag":293,"props":3635,"children":3636},{"style":611},[3637],{"type":48,"value":701},{"type":43,"tag":293,"props":3639,"children":3640},{"style":611},[3641],{"type":48,"value":706},{"type":43,"tag":293,"props":3643,"children":3644},{"class":295,"line":305},[3645],{"type":43,"tag":293,"props":3646,"children":3647},{"emptyLinePlaceholder":336},[3648],{"type":48,"value":339},{"type":43,"tag":293,"props":3650,"children":3651},{"class":295,"line":314},[3652,3656,3660,3664,3668,3672,3677,3681],{"type":43,"tag":293,"props":3653,"children":3654},{"style":760},[3655],{"type":48,"value":763},{"type":43,"tag":293,"props":3657,"children":3658},{"style":617},[3659],{"type":48,"value":768},{"type":43,"tag":293,"props":3661,"children":3662},{"style":611},[3663],{"type":48,"value":773},{"type":43,"tag":293,"props":3665,"children":3666},{"style":617},[3667],{"type":48,"value":3617},{"type":43,"tag":293,"props":3669,"children":3670},{"style":611},[3671],{"type":48,"value":247},{"type":43,"tag":293,"props":3673,"children":3674},{"style":781},[3675],{"type":48,"value":3676},"Root",{"type":43,"tag":293,"props":3678,"children":3679},{"style":617},[3680],{"type":48,"value":788},{"type":43,"tag":293,"props":3682,"children":3683},{"style":611},[3684],{"type":48,"value":793},{"type":43,"tag":293,"props":3686,"children":3687},{"class":295,"line":323},[3688,3693,3697,3701,3706,3711,3716,3720,3724],{"type":43,"tag":293,"props":3689,"children":3690},{"style":799},[3691],{"type":48,"value":3692},"  vals",{"type":43,"tag":293,"props":3694,"children":3695},{"style":611},[3696],{"type":48,"value":807},{"type":43,"tag":293,"props":3698,"children":3699},{"style":781},[3700],{"type":48,"value":3617},{"type":43,"tag":293,"props":3702,"children":3703},{"style":611},[3704],{"type":48,"value":3705},"\u003C",{"type":43,"tag":293,"props":3707,"children":3708},{"style":1962},[3709],{"type":48,"value":3710},"string",{"type":43,"tag":293,"props":3712,"children":3713},{"style":617},[3714],{"type":48,"value":3715},"[]",{"type":43,"tag":293,"props":3717,"children":3718},{"style":611},[3719],{"type":48,"value":1979},{"type":43,"tag":293,"props":3721,"children":3722},{"style":617},[3723],{"type":48,"value":788},{"type":43,"tag":293,"props":3725,"children":3726},{"style":611},[3727],{"type":48,"value":793},{"type":43,"tag":293,"props":3729,"children":3730},{"class":295,"line":332},[3731,3736,3740,3744,3749,3753,3758,3762,3766,3771,3775,3780,3785,3789,3794,3799,3804,3809,3813,3818],{"type":43,"tag":293,"props":3732,"children":3733},{"style":781},[3734],{"type":48,"value":3735},"    reducer",{"type":43,"tag":293,"props":3737,"children":3738},{"style":611},[3739],{"type":48,"value":807},{"type":43,"tag":293,"props":3741,"children":3742},{"style":611},[3743],{"type":48,"value":903},{"type":43,"tag":293,"props":3745,"children":3746},{"style":906},[3747],{"type":48,"value":3748},"left",{"type":43,"tag":293,"props":3750,"children":3751},{"style":611},[3752],{"type":48,"value":625},{"type":43,"tag":293,"props":3754,"children":3755},{"style":906},[3756],{"type":48,"value":3757}," right",{"type":43,"tag":293,"props":3759,"children":3760},{"style":611},[3761],{"type":48,"value":849},{"type":43,"tag":293,"props":3763,"children":3764},{"style":760},[3765],{"type":48,"value":941},{"type":43,"tag":293,"props":3767,"children":3768},{"style":617},[3769],{"type":48,"value":3770}," left",{"type":43,"tag":293,"props":3772,"children":3773},{"style":611},[3774],{"type":48,"value":247},{"type":43,"tag":293,"props":3776,"children":3777},{"style":781},[3778],{"type":48,"value":3779},"concat",{"type":43,"tag":293,"props":3781,"children":3782},{"style":617},[3783],{"type":48,"value":3784},"(Array",{"type":43,"tag":293,"props":3786,"children":3787},{"style":611},[3788],{"type":48,"value":247},{"type":43,"tag":293,"props":3790,"children":3791},{"style":781},[3792],{"type":48,"value":3793},"isArray",{"type":43,"tag":293,"props":3795,"children":3796},{"style":617},[3797],{"type":48,"value":3798},"(right) ",{"type":43,"tag":293,"props":3800,"children":3801},{"style":611},[3802],{"type":48,"value":3803},"?",{"type":43,"tag":293,"props":3805,"children":3806},{"style":617},[3807],{"type":48,"value":3808}," right ",{"type":43,"tag":293,"props":3810,"children":3811},{"style":611},[3812],{"type":48,"value":807},{"type":43,"tag":293,"props":3814,"children":3815},{"style":617},[3816],{"type":48,"value":3817}," [right])",{"type":43,"tag":293,"props":3819,"children":3820},{"style":611},[3821],{"type":48,"value":854},{"type":43,"tag":293,"props":3823,"children":3824},{"class":295,"line":342},[3825,3830,3834,3839,3843,3848],{"type":43,"tag":293,"props":3826,"children":3827},{"style":781},[3828],{"type":48,"value":3829},"    default",{"type":43,"tag":293,"props":3831,"children":3832},{"style":611},[3833],{"type":48,"value":807},{"type":43,"tag":293,"props":3835,"children":3836},{"style":611},[3837],{"type":48,"value":3838}," ()",{"type":43,"tag":293,"props":3840,"children":3841},{"style":760},[3842],{"type":48,"value":941},{"type":43,"tag":293,"props":3844,"children":3845},{"style":617},[3846],{"type":48,"value":3847}," []",{"type":43,"tag":293,"props":3849,"children":3850},{"style":611},[3851],{"type":48,"value":854},{"type":43,"tag":293,"props":3853,"children":3854},{"class":295,"line":351},[3855,3859,3863],{"type":43,"tag":293,"props":3856,"children":3857},{"style":611},[3858],{"type":48,"value":2209},{"type":43,"tag":293,"props":3860,"children":3861},{"style":617},[3862],{"type":48,"value":849},{"type":43,"tag":293,"props":3864,"children":3865},{"style":611},[3866],{"type":48,"value":854},{"type":43,"tag":293,"props":3868,"children":3869},{"class":295,"line":360},[3870,3874,3878],{"type":43,"tag":293,"props":3871,"children":3872},{"style":611},[3873],{"type":48,"value":862},{"type":43,"tag":293,"props":3875,"children":3876},{"style":617},[3877],{"type":48,"value":849},{"type":43,"tag":293,"props":3879,"children":3880},{"style":611},[3881],{"type":48,"value":706},{"type":43,"tag":293,"props":3883,"children":3884},{"class":295,"line":368},[3885],{"type":43,"tag":293,"props":3886,"children":3887},{"emptyLinePlaceholder":336},[3888],{"type":48,"value":339},{"type":43,"tag":293,"props":3890,"children":3891},{"class":295,"line":377},[3892,3897,3902,3906,3911,3915,3919,3923,3927,3931,3935],{"type":43,"tag":293,"props":3893,"children":3894},{"style":760},[3895],{"type":48,"value":3896},"function",{"type":43,"tag":293,"props":3898,"children":3899},{"style":781},[3900],{"type":48,"value":3901}," nodeA",{"type":43,"tag":293,"props":3903,"children":3904},{"style":611},[3905],{"type":48,"value":788},{"type":43,"tag":293,"props":3907,"children":3908},{"style":906},[3909],{"type":48,"value":3910},"_state",{"type":43,"tag":293,"props":3912,"children":3913},{"style":611},[3914],{"type":48,"value":807},{"type":43,"tag":293,"props":3916,"children":3917},{"style":611},[3918],{"type":48,"value":918},{"type":43,"tag":293,"props":3920,"children":3921},{"style":617},[3922],{"type":48,"value":923},{"type":43,"tag":293,"props":3924,"children":3925},{"style":611},[3926],{"type":48,"value":247},{"type":43,"tag":293,"props":3928,"children":3929},{"style":617},[3930],{"type":48,"value":932},{"type":43,"tag":293,"props":3932,"children":3933},{"style":611},[3934],{"type":48,"value":849},{"type":43,"tag":293,"props":3936,"children":3937},{"style":611},[3938],{"type":48,"value":946},{"type":43,"tag":293,"props":3940,"children":3941},{"class":295,"line":386},[3942,3946,3950,3954,3958,3962,3966,3971,3975,3979,3984,3989],{"type":43,"tag":293,"props":3943,"children":3944},{"style":760},[3945],{"type":48,"value":963},{"type":43,"tag":293,"props":3947,"children":3948},{"style":617},[3949],{"type":48,"value":2932},{"type":43,"tag":293,"props":3951,"children":3952},{"style":611},[3953],{"type":48,"value":973},{"type":43,"tag":293,"props":3955,"children":3956},{"style":781},[3957],{"type":48,"value":620},{"type":43,"tag":293,"props":3959,"children":3960},{"style":799},[3961],{"type":48,"value":788},{"type":43,"tag":293,"props":3963,"children":3964},{"style":611},[3965],{"type":48,"value":701},{"type":43,"tag":293,"props":3967,"children":3968},{"style":693},[3969],{"type":48,"value":3970},"question_a",{"type":43,"tag":293,"props":3972,"children":3973},{"style":611},[3974],{"type":48,"value":701},{"type":43,"tag":293,"props":3976,"children":3977},{"style":799},[3978],{"type":48,"value":2263},{"type":43,"tag":293,"props":3980,"children":3981},{"style":605},[3982],{"type":48,"value":3983},"as",{"type":43,"tag":293,"props":3985,"children":3986},{"style":1962},[3987],{"type":48,"value":3988}," string",{"type":43,"tag":293,"props":3990,"children":3991},{"style":611},[3992],{"type":48,"value":706},{"type":43,"tag":293,"props":3994,"children":3995},{"class":295,"line":395},[3996,4000,4004,4009,4013,4018,4022,4027,4031,4035,4040,4045],{"type":43,"tag":293,"props":3997,"children":3998},{"style":605},[3999],{"type":48,"value":1018},{"type":43,"tag":293,"props":4001,"children":4002},{"style":611},[4003],{"type":48,"value":614},{"type":43,"tag":293,"props":4005,"children":4006},{"style":799},[4007],{"type":48,"value":4008}," vals",{"type":43,"tag":293,"props":4010,"children":4011},{"style":611},[4012],{"type":48,"value":807},{"type":43,"tag":293,"props":4014,"children":4015},{"style":799},[4016],{"type":48,"value":4017}," [",{"type":43,"tag":293,"props":4019,"children":4020},{"style":611},[4021],{"type":48,"value":3137},{"type":43,"tag":293,"props":4023,"children":4024},{"style":693},[4025],{"type":48,"value":4026},"a:",{"type":43,"tag":293,"props":4028,"children":4029},{"style":611},[4030],{"type":48,"value":3118},{"type":43,"tag":293,"props":4032,"children":4033},{"style":617},[4034],{"type":48,"value":3123},{"type":43,"tag":293,"props":4036,"children":4037},{"style":611},[4038],{"type":48,"value":4039},"}`",{"type":43,"tag":293,"props":4041,"children":4042},{"style":799},[4043],{"type":48,"value":4044},"] ",{"type":43,"tag":293,"props":4046,"children":4047},{"style":611},[4048],{"type":48,"value":1039},{"type":43,"tag":293,"props":4050,"children":4051},{"class":295,"line":404},[4052],{"type":43,"tag":293,"props":4053,"children":4054},{"style":611},[4055],{"type":48,"value":3506},{"type":43,"tag":293,"props":4057,"children":4058},{"class":295,"line":413},[4059],{"type":43,"tag":293,"props":4060,"children":4061},{"emptyLinePlaceholder":336},[4062],{"type":48,"value":339},{"type":43,"tag":293,"props":4064,"children":4065},{"class":295,"line":421},[4066,4070,4075,4079,4083,4087,4091,4095,4099,4103,4107],{"type":43,"tag":293,"props":4067,"children":4068},{"style":760},[4069],{"type":48,"value":3896},{"type":43,"tag":293,"props":4071,"children":4072},{"style":781},[4073],{"type":48,"value":4074}," nodeB",{"type":43,"tag":293,"props":4076,"children":4077},{"style":611},[4078],{"type":48,"value":788},{"type":43,"tag":293,"props":4080,"children":4081},{"style":906},[4082],{"type":48,"value":3910},{"type":43,"tag":293,"props":4084,"children":4085},{"style":611},[4086],{"type":48,"value":807},{"type":43,"tag":293,"props":4088,"children":4089},{"style":611},[4090],{"type":48,"value":918},{"type":43,"tag":293,"props":4092,"children":4093},{"style":617},[4094],{"type":48,"value":923},{"type":43,"tag":293,"props":4096,"children":4097},{"style":611},[4098],{"type":48,"value":247},{"type":43,"tag":293,"props":4100,"children":4101},{"style":617},[4102],{"type":48,"value":932},{"type":43,"tag":293,"props":4104,"children":4105},{"style":611},[4106],{"type":48,"value":849},{"type":43,"tag":293,"props":4108,"children":4109},{"style":611},[4110],{"type":48,"value":946},{"type":43,"tag":293,"props":4112,"children":4113},{"class":295,"line":430},[4114,4118,4122,4126,4130,4134,4138,4143,4147,4151,4155,4159],{"type":43,"tag":293,"props":4115,"children":4116},{"style":760},[4117],{"type":48,"value":963},{"type":43,"tag":293,"props":4119,"children":4120},{"style":617},[4121],{"type":48,"value":2932},{"type":43,"tag":293,"props":4123,"children":4124},{"style":611},[4125],{"type":48,"value":973},{"type":43,"tag":293,"props":4127,"children":4128},{"style":781},[4129],{"type":48,"value":620},{"type":43,"tag":293,"props":4131,"children":4132},{"style":799},[4133],{"type":48,"value":788},{"type":43,"tag":293,"props":4135,"children":4136},{"style":611},[4137],{"type":48,"value":701},{"type":43,"tag":293,"props":4139,"children":4140},{"style":693},[4141],{"type":48,"value":4142},"question_b",{"type":43,"tag":293,"props":4144,"children":4145},{"style":611},[4146],{"type":48,"value":701},{"type":43,"tag":293,"props":4148,"children":4149},{"style":799},[4150],{"type":48,"value":2263},{"type":43,"tag":293,"props":4152,"children":4153},{"style":605},[4154],{"type":48,"value":3983},{"type":43,"tag":293,"props":4156,"children":4157},{"style":1962},[4158],{"type":48,"value":3988},{"type":43,"tag":293,"props":4160,"children":4161},{"style":611},[4162],{"type":48,"value":706},{"type":43,"tag":293,"props":4164,"children":4165},{"class":295,"line":439},[4166,4170,4174,4178,4182,4186,4190,4195,4199,4203,4207,4211],{"type":43,"tag":293,"props":4167,"children":4168},{"style":605},[4169],{"type":48,"value":1018},{"type":43,"tag":293,"props":4171,"children":4172},{"style":611},[4173],{"type":48,"value":614},{"type":43,"tag":293,"props":4175,"children":4176},{"style":799},[4177],{"type":48,"value":4008},{"type":43,"tag":293,"props":4179,"children":4180},{"style":611},[4181],{"type":48,"value":807},{"type":43,"tag":293,"props":4183,"children":4184},{"style":799},[4185],{"type":48,"value":4017},{"type":43,"tag":293,"props":4187,"children":4188},{"style":611},[4189],{"type":48,"value":3137},{"type":43,"tag":293,"props":4191,"children":4192},{"style":693},[4193],{"type":48,"value":4194},"b:",{"type":43,"tag":293,"props":4196,"children":4197},{"style":611},[4198],{"type":48,"value":3118},{"type":43,"tag":293,"props":4200,"children":4201},{"style":617},[4202],{"type":48,"value":3123},{"type":43,"tag":293,"props":4204,"children":4205},{"style":611},[4206],{"type":48,"value":4039},{"type":43,"tag":293,"props":4208,"children":4209},{"style":799},[4210],{"type":48,"value":4044},{"type":43,"tag":293,"props":4212,"children":4213},{"style":611},[4214],{"type":48,"value":1039},{"type":43,"tag":293,"props":4216,"children":4217},{"class":295,"line":448},[4218],{"type":43,"tag":293,"props":4219,"children":4220},{"style":611},[4221],{"type":48,"value":3506},{"type":43,"tag":293,"props":4223,"children":4224},{"class":295,"line":457},[4225],{"type":43,"tag":293,"props":4226,"children":4227},{"emptyLinePlaceholder":336},[4228],{"type":48,"value":339},{"type":43,"tag":293,"props":4230,"children":4231},{"class":295,"line":466},[4232,4236,4240,4244,4248,4252],{"type":43,"tag":293,"props":4233,"children":4234},{"style":760},[4235],{"type":48,"value":763},{"type":43,"tag":293,"props":4237,"children":4238},{"style":617},[4239],{"type":48,"value":1090},{"type":43,"tag":293,"props":4241,"children":4242},{"style":611},[4243],{"type":48,"value":773},{"type":43,"tag":293,"props":4245,"children":4246},{"style":611},[4247],{"type":48,"value":778},{"type":43,"tag":293,"props":4249,"children":4250},{"style":781},[4251],{"type":48,"value":648},{"type":43,"tag":293,"props":4253,"children":4254},{"style":617},[4255],{"type":48,"value":1107},{"type":43,"tag":293,"props":4257,"children":4258},{"class":295,"line":475},[4259,4263,4267,4271,4275,4280,4284,4288],{"type":43,"tag":293,"props":4260,"children":4261},{"style":611},[4262],{"type":48,"value":1115},{"type":43,"tag":293,"props":4264,"children":4265},{"style":781},[4266],{"type":48,"value":1120},{"type":43,"tag":293,"props":4268,"children":4269},{"style":617},[4270],{"type":48,"value":788},{"type":43,"tag":293,"props":4272,"children":4273},{"style":611},[4274],{"type":48,"value":701},{"type":43,"tag":293,"props":4276,"children":4277},{"style":693},[4278],{"type":48,"value":4279},"a",{"type":43,"tag":293,"props":4281,"children":4282},{"style":611},[4283],{"type":48,"value":701},{"type":43,"tag":293,"props":4285,"children":4286},{"style":611},[4287],{"type":48,"value":625},{"type":43,"tag":293,"props":4289,"children":4290},{"style":617},[4291],{"type":48,"value":4292}," nodeA)\n",{"type":43,"tag":293,"props":4294,"children":4295},{"class":295,"line":484},[4296,4300,4304,4308,4312,4317,4321,4325],{"type":43,"tag":293,"props":4297,"children":4298},{"style":611},[4299],{"type":48,"value":1115},{"type":43,"tag":293,"props":4301,"children":4302},{"style":781},[4303],{"type":48,"value":1120},{"type":43,"tag":293,"props":4305,"children":4306},{"style":617},[4307],{"type":48,"value":788},{"type":43,"tag":293,"props":4309,"children":4310},{"style":611},[4311],{"type":48,"value":701},{"type":43,"tag":293,"props":4313,"children":4314},{"style":693},[4315],{"type":48,"value":4316},"b",{"type":43,"tag":293,"props":4318,"children":4319},{"style":611},[4320],{"type":48,"value":701},{"type":43,"tag":293,"props":4322,"children":4323},{"style":611},[4324],{"type":48,"value":625},{"type":43,"tag":293,"props":4326,"children":4327},{"style":617},[4328],{"type":48,"value":4329}," nodeB)\n",{"type":43,"tag":293,"props":4331,"children":4332},{"class":295,"line":493},[4333,4337,4341,4345,4349,4353,4357,4361],{"type":43,"tag":293,"props":4334,"children":4335},{"style":611},[4336],{"type":48,"value":1115},{"type":43,"tag":293,"props":4338,"children":4339},{"style":781},[4340],{"type":48,"value":1158},{"type":43,"tag":293,"props":4342,"children":4343},{"style":617},[4344],{"type":48,"value":1163},{"type":43,"tag":293,"props":4346,"children":4347},{"style":611},[4348],{"type":48,"value":625},{"type":43,"tag":293,"props":4350,"children":4351},{"style":611},[4352],{"type":48,"value":690},{"type":43,"tag":293,"props":4354,"children":4355},{"style":693},[4356],{"type":48,"value":4279},{"type":43,"tag":293,"props":4358,"children":4359},{"style":611},[4360],{"type":48,"value":701},{"type":43,"tag":293,"props":4362,"children":4363},{"style":617},[4364],{"type":48,"value":490},{"type":43,"tag":293,"props":4366,"children":4367},{"class":295,"line":501},[4368,4372,4376,4380,4384,4388,4392,4396],{"type":43,"tag":293,"props":4369,"children":4370},{"style":611},[4371],{"type":48,"value":1115},{"type":43,"tag":293,"props":4373,"children":4374},{"style":781},[4375],{"type":48,"value":1158},{"type":43,"tag":293,"props":4377,"children":4378},{"style":617},[4379],{"type":48,"value":1163},{"type":43,"tag":293,"props":4381,"children":4382},{"style":611},[4383],{"type":48,"value":625},{"type":43,"tag":293,"props":4385,"children":4386},{"style":611},[4387],{"type":48,"value":690},{"type":43,"tag":293,"props":4389,"children":4390},{"style":693},[4391],{"type":48,"value":4316},{"type":43,"tag":293,"props":4393,"children":4394},{"style":611},[4395],{"type":48,"value":701},{"type":43,"tag":293,"props":4397,"children":4398},{"style":617},[4399],{"type":48,"value":490},{"type":43,"tag":293,"props":4401,"children":4402},{"class":295,"line":510},[4403,4407,4411,4415,4419,4423,4427,4431],{"type":43,"tag":293,"props":4404,"children":4405},{"style":611},[4406],{"type":48,"value":1115},{"type":43,"tag":293,"props":4408,"children":4409},{"style":781},[4410],{"type":48,"value":1158},{"type":43,"tag":293,"props":4412,"children":4413},{"style":617},[4414],{"type":48,"value":788},{"type":43,"tag":293,"props":4416,"children":4417},{"style":611},[4418],{"type":48,"value":701},{"type":43,"tag":293,"props":4420,"children":4421},{"style":693},[4422],{"type":48,"value":4279},{"type":43,"tag":293,"props":4424,"children":4425},{"style":611},[4426],{"type":48,"value":701},{"type":43,"tag":293,"props":4428,"children":4429},{"style":611},[4430],{"type":48,"value":625},{"type":43,"tag":293,"props":4432,"children":4433},{"style":617},[4434],{"type":48,"value":1219},{"type":43,"tag":293,"props":4436,"children":4437},{"class":295,"line":518},[4438,4442,4446,4450,4454,4458,4462,4466],{"type":43,"tag":293,"props":4439,"children":4440},{"style":611},[4441],{"type":48,"value":1115},{"type":43,"tag":293,"props":4443,"children":4444},{"style":781},[4445],{"type":48,"value":1158},{"type":43,"tag":293,"props":4447,"children":4448},{"style":617},[4449],{"type":48,"value":788},{"type":43,"tag":293,"props":4451,"children":4452},{"style":611},[4453],{"type":48,"value":701},{"type":43,"tag":293,"props":4455,"children":4456},{"style":693},[4457],{"type":48,"value":4316},{"type":43,"tag":293,"props":4459,"children":4460},{"style":611},[4461],{"type":48,"value":701},{"type":43,"tag":293,"props":4463,"children":4464},{"style":611},[4465],{"type":48,"value":625},{"type":43,"tag":293,"props":4467,"children":4468},{"style":617},[4469],{"type":48,"value":1219},{"type":43,"tag":293,"props":4471,"children":4472},{"class":295,"line":527},[4473,4477,4481,4485,4489,4494,4498,4502,4506,4511,4515,4519],{"type":43,"tag":293,"props":4474,"children":4475},{"style":611},[4476],{"type":48,"value":1115},{"type":43,"tag":293,"props":4478,"children":4479},{"style":781},[4480],{"type":48,"value":1231},{"type":43,"tag":293,"props":4482,"children":4483},{"style":617},[4484],{"type":48,"value":788},{"type":43,"tag":293,"props":4486,"children":4487},{"style":611},[4488],{"type":48,"value":1240},{"type":43,"tag":293,"props":4490,"children":4491},{"style":799},[4492],{"type":48,"value":4493}," checkpointer",{"type":43,"tag":293,"props":4495,"children":4496},{"style":611},[4497],{"type":48,"value":807},{"type":43,"tag":293,"props":4499,"children":4500},{"style":611},[4501],{"type":48,"value":778},{"type":43,"tag":293,"props":4503,"children":4504},{"style":781},[4505],{"type":48,"value":639},{"type":43,"tag":293,"props":4507,"children":4508},{"style":617},[4509],{"type":48,"value":4510},"() ",{"type":43,"tag":293,"props":4512,"children":4513},{"style":611},[4514],{"type":48,"value":862},{"type":43,"tag":293,"props":4516,"children":4517},{"style":617},[4518],{"type":48,"value":849},{"type":43,"tag":293,"props":4520,"children":4521},{"style":611},[4522],{"type":48,"value":706},{"type":43,"tag":293,"props":4524,"children":4525},{"class":295,"line":536},[4526],{"type":43,"tag":293,"props":4527,"children":4528},{"emptyLinePlaceholder":336},[4529],{"type":48,"value":339},{"type":43,"tag":293,"props":4531,"children":4532},{"class":295,"line":545},[4533,4537,4541,4545,4549,4553,4557,4561,4565,4569,4573,4578,4582,4586],{"type":43,"tag":293,"props":4534,"children":4535},{"style":760},[4536],{"type":48,"value":763},{"type":43,"tag":293,"props":4538,"children":4539},{"style":617},[4540],{"type":48,"value":1275},{"type":43,"tag":293,"props":4542,"children":4543},{"style":611},[4544],{"type":48,"value":773},{"type":43,"tag":293,"props":4546,"children":4547},{"style":611},[4548],{"type":48,"value":614},{"type":43,"tag":293,"props":4550,"children":4551},{"style":799},[4552],{"type":48,"value":1288},{"type":43,"tag":293,"props":4554,"children":4555},{"style":611},[4556],{"type":48,"value":807},{"type":43,"tag":293,"props":4558,"children":4559},{"style":611},[4560],{"type":48,"value":614},{"type":43,"tag":293,"props":4562,"children":4563},{"style":799},[4564],{"type":48,"value":1301},{"type":43,"tag":293,"props":4566,"children":4567},{"style":611},[4568],{"type":48,"value":807},{"type":43,"tag":293,"props":4570,"children":4571},{"style":611},[4572],{"type":48,"value":690},{"type":43,"tag":293,"props":4574,"children":4575},{"style":693},[4576],{"type":48,"value":4577},"1",{"type":43,"tag":293,"props":4579,"children":4580},{"style":611},[4581],{"type":48,"value":701},{"type":43,"tag":293,"props":4583,"children":4584},{"style":611},[4585],{"type":48,"value":680},{"type":43,"tag":293,"props":4587,"children":4588},{"style":611},[4589],{"type":48,"value":1031},{"type":43,"tag":293,"props":4591,"children":4592},{"class":295,"line":554},[4593],{"type":43,"tag":293,"props":4594,"children":4595},{"emptyLinePlaceholder":336},[4596],{"type":48,"value":339},{"type":43,"tag":293,"props":4598,"children":4599},{"class":295,"line":562},[4600,4604,4609,4613,4617,4621,4625,4629,4633,4637,4641,4645,4650,4655,4659],{"type":43,"tag":293,"props":4601,"children":4602},{"style":760},[4603],{"type":48,"value":763},{"type":43,"tag":293,"props":4605,"children":4606},{"style":617},[4607],{"type":48,"value":4608}," interruptedResult ",{"type":43,"tag":293,"props":4610,"children":4611},{"style":611},[4612],{"type":48,"value":773},{"type":43,"tag":293,"props":4614,"children":4615},{"style":605},[4616],{"type":48,"value":1363},{"type":43,"tag":293,"props":4618,"children":4619},{"style":617},[4620],{"type":48,"value":1368},{"type":43,"tag":293,"props":4622,"children":4623},{"style":611},[4624],{"type":48,"value":247},{"type":43,"tag":293,"props":4626,"children":4627},{"style":781},[4628],{"type":48,"value":179},{"type":43,"tag":293,"props":4630,"children":4631},{"style":617},[4632],{"type":48,"value":788},{"type":43,"tag":293,"props":4634,"children":4635},{"style":611},[4636],{"type":48,"value":1240},{"type":43,"tag":293,"props":4638,"children":4639},{"style":799},[4640],{"type":48,"value":4008},{"type":43,"tag":293,"props":4642,"children":4643},{"style":611},[4644],{"type":48,"value":807},{"type":43,"tag":293,"props":4646,"children":4647},{"style":617},[4648],{"type":48,"value":4649}," [] ",{"type":43,"tag":293,"props":4651,"children":4652},{"style":611},[4653],{"type":48,"value":4654},"},",{"type":43,"tag":293,"props":4656,"children":4657},{"style":617},[4658],{"type":48,"value":1407},{"type":43,"tag":293,"props":4660,"children":4661},{"style":611},[4662],{"type":48,"value":706},{"type":43,"tag":293,"props":4664,"children":4665},{"class":295,"line":571},[4666],{"type":43,"tag":293,"props":4667,"children":4668},{"emptyLinePlaceholder":336},[4669],{"type":48,"value":339},{"type":43,"tag":293,"props":4671,"children":4672},{"class":295,"line":580},[4673],{"type":43,"tag":293,"props":4674,"children":4675},{"style":952},[4676],{"type":48,"value":4677},"\u002F\u002F Resume all pending interrupts at once\n",{"type":43,"tag":293,"props":4679,"children":4680},{"class":295,"line":3456},[4681,4685,4690,4694,4699,4703,4707,4711,4715,4719,4723],{"type":43,"tag":293,"props":4682,"children":4683},{"style":760},[4684],{"type":48,"value":763},{"type":43,"tag":293,"props":4686,"children":4687},{"style":617},[4688],{"type":48,"value":4689}," resumeMap",{"type":43,"tag":293,"props":4691,"children":4692},{"style":611},[4693],{"type":48,"value":807},{"type":43,"tag":293,"props":4695,"children":4696},{"style":1962},[4697],{"type":48,"value":4698}," Record",{"type":43,"tag":293,"props":4700,"children":4701},{"style":611},[4702],{"type":48,"value":3705},{"type":43,"tag":293,"props":4704,"children":4705},{"style":1962},[4706],{"type":48,"value":3710},{"type":43,"tag":293,"props":4708,"children":4709},{"style":611},[4710],{"type":48,"value":625},{"type":43,"tag":293,"props":4712,"children":4713},{"style":1962},[4714],{"type":48,"value":3988},{"type":43,"tag":293,"props":4716,"children":4717},{"style":611},[4718],{"type":48,"value":1979},{"type":43,"tag":293,"props":4720,"children":4721},{"style":611},[4722],{"type":48,"value":973},{"type":43,"tag":293,"props":4724,"children":4725},{"style":611},[4726],{"type":48,"value":4727}," {};\n",{"type":43,"tag":293,"props":4729,"children":4730},{"class":295,"line":3464},[4731,4736,4740,4745,4750],{"type":43,"tag":293,"props":4732,"children":4733},{"style":605},[4734],{"type":48,"value":4735},"if",{"type":43,"tag":293,"props":4737,"children":4738},{"style":617},[4739],{"type":48,"value":903},{"type":43,"tag":293,"props":4741,"children":4742},{"style":781},[4743],{"type":48,"value":4744},"isInterrupted",{"type":43,"tag":293,"props":4746,"children":4747},{"style":617},[4748],{"type":48,"value":4749},"(interruptedResult)) ",{"type":43,"tag":293,"props":4751,"children":4752},{"style":611},[4753],{"type":48,"value":793},{"type":43,"tag":293,"props":4755,"children":4756},{"class":295,"line":3473},[4757,4762,4766,4770,4775,4780,4785,4790,4795,4800],{"type":43,"tag":293,"props":4758,"children":4759},{"style":605},[4760],{"type":48,"value":4761},"  for",{"type":43,"tag":293,"props":4763,"children":4764},{"style":799},[4765],{"type":48,"value":903},{"type":43,"tag":293,"props":4767,"children":4768},{"style":760},[4769],{"type":48,"value":763},{"type":43,"tag":293,"props":4771,"children":4772},{"style":617},[4773],{"type":48,"value":4774}," i",{"type":43,"tag":293,"props":4776,"children":4777},{"style":611},[4778],{"type":48,"value":4779}," of",{"type":43,"tag":293,"props":4781,"children":4782},{"style":617},[4783],{"type":48,"value":4784}," interruptedResult",{"type":43,"tag":293,"props":4786,"children":4787},{"style":799},[4788],{"type":48,"value":4789},"[",{"type":43,"tag":293,"props":4791,"children":4792},{"style":617},[4793],{"type":48,"value":4794},"INTERRUPT",{"type":43,"tag":293,"props":4796,"children":4797},{"style":799},[4798],{"type":48,"value":4799},"]) ",{"type":43,"tag":293,"props":4801,"children":4802},{"style":611},[4803],{"type":48,"value":793},{"type":43,"tag":293,"props":4805,"children":4806},{"class":295,"line":3482},[4807,4811,4815,4820,4824,4829,4834,4839,4843],{"type":43,"tag":293,"props":4808,"children":4809},{"style":605},[4810],{"type":48,"value":2980},{"type":43,"tag":293,"props":4812,"children":4813},{"style":799},[4814],{"type":48,"value":903},{"type":43,"tag":293,"props":4816,"children":4817},{"style":617},[4818],{"type":48,"value":4819},"i",{"type":43,"tag":293,"props":4821,"children":4822},{"style":611},[4823],{"type":48,"value":247},{"type":43,"tag":293,"props":4825,"children":4826},{"style":617},[4827],{"type":48,"value":4828},"id",{"type":43,"tag":293,"props":4830,"children":4831},{"style":611},[4832],{"type":48,"value":4833}," !=",{"type":43,"tag":293,"props":4835,"children":4836},{"style":611},[4837],{"type":48,"value":4838}," null",{"type":43,"tag":293,"props":4840,"children":4841},{"style":799},[4842],{"type":48,"value":2263},{"type":43,"tag":293,"props":4844,"children":4845},{"style":611},[4846],{"type":48,"value":793},{"type":43,"tag":293,"props":4848,"children":4849},{"class":295,"line":3491},[4850,4855,4859,4863,4867,4871,4875,4879,4883,4888,4892,4896,4900,4905,4909],{"type":43,"tag":293,"props":4851,"children":4852},{"style":617},[4853],{"type":48,"value":4854},"      resumeMap",{"type":43,"tag":293,"props":4856,"children":4857},{"style":799},[4858],{"type":48,"value":4789},{"type":43,"tag":293,"props":4860,"children":4861},{"style":617},[4862],{"type":48,"value":4819},{"type":43,"tag":293,"props":4864,"children":4865},{"style":611},[4866],{"type":48,"value":247},{"type":43,"tag":293,"props":4868,"children":4869},{"style":617},[4870],{"type":48,"value":4828},{"type":43,"tag":293,"props":4872,"children":4873},{"style":799},[4874],{"type":48,"value":4044},{"type":43,"tag":293,"props":4876,"children":4877},{"style":611},[4878],{"type":48,"value":773},{"type":43,"tag":293,"props":4880,"children":4881},{"style":611},[4882],{"type":48,"value":3108},{"type":43,"tag":293,"props":4884,"children":4885},{"style":693},[4886],{"type":48,"value":4887},"answer for ",{"type":43,"tag":293,"props":4889,"children":4890},{"style":611},[4891],{"type":48,"value":3118},{"type":43,"tag":293,"props":4893,"children":4894},{"style":617},[4895],{"type":48,"value":4819},{"type":43,"tag":293,"props":4897,"children":4898},{"style":611},[4899],{"type":48,"value":247},{"type":43,"tag":293,"props":4901,"children":4902},{"style":617},[4903],{"type":48,"value":4904},"value",{"type":43,"tag":293,"props":4906,"children":4907},{"style":611},[4908],{"type":48,"value":4039},{"type":43,"tag":293,"props":4910,"children":4911},{"style":611},[4912],{"type":48,"value":706},{"type":43,"tag":293,"props":4914,"children":4915},{"class":295,"line":3500},[4916],{"type":43,"tag":293,"props":4917,"children":4918},{"style":611},[4919],{"type":48,"value":3149},{"type":43,"tag":293,"props":4921,"children":4922},{"class":295,"line":3509},[4923],{"type":43,"tag":293,"props":4924,"children":4925},{"style":611},[4926],{"type":48,"value":2482},{"type":43,"tag":293,"props":4928,"children":4929},{"class":295,"line":3518},[4930],{"type":43,"tag":293,"props":4931,"children":4932},{"style":611},[4933],{"type":48,"value":3506},{"type":43,"tag":293,"props":4935,"children":4937},{"class":295,"line":4936},42,[4938,4942,4946,4950,4954,4958,4962,4966,4970,4974,4978,4982,4986,4990,4994,4999,5003,5007,5011,5015],{"type":43,"tag":293,"props":4939,"children":4940},{"style":760},[4941],{"type":48,"value":763},{"type":43,"tag":293,"props":4943,"children":4944},{"style":617},[4945],{"type":48,"value":1354},{"type":43,"tag":293,"props":4947,"children":4948},{"style":611},[4949],{"type":48,"value":773},{"type":43,"tag":293,"props":4951,"children":4952},{"style":605},[4953],{"type":48,"value":1363},{"type":43,"tag":293,"props":4955,"children":4956},{"style":617},[4957],{"type":48,"value":1368},{"type":43,"tag":293,"props":4959,"children":4960},{"style":611},[4961],{"type":48,"value":247},{"type":43,"tag":293,"props":4963,"children":4964},{"style":781},[4965],{"type":48,"value":179},{"type":43,"tag":293,"props":4967,"children":4968},{"style":617},[4969],{"type":48,"value":788},{"type":43,"tag":293,"props":4971,"children":4972},{"style":611},[4973],{"type":48,"value":1506},{"type":43,"tag":293,"props":4975,"children":4976},{"style":781},[4977],{"type":48,"value":630},{"type":43,"tag":293,"props":4979,"children":4980},{"style":617},[4981],{"type":48,"value":788},{"type":43,"tag":293,"props":4983,"children":4984},{"style":611},[4985],{"type":48,"value":1240},{"type":43,"tag":293,"props":4987,"children":4988},{"style":799},[4989],{"type":48,"value":1523},{"type":43,"tag":293,"props":4991,"children":4992},{"style":611},[4993],{"type":48,"value":807},{"type":43,"tag":293,"props":4995,"children":4996},{"style":617},[4997],{"type":48,"value":4998}," resumeMap ",{"type":43,"tag":293,"props":5000,"children":5001},{"style":611},[5002],{"type":48,"value":862},{"type":43,"tag":293,"props":5004,"children":5005},{"style":617},[5006],{"type":48,"value":849},{"type":43,"tag":293,"props":5008,"children":5009},{"style":611},[5010],{"type":48,"value":625},{"type":43,"tag":293,"props":5012,"children":5013},{"style":617},[5014],{"type":48,"value":1407},{"type":43,"tag":293,"props":5016,"children":5017},{"style":611},[5018],{"type":48,"value":706},{"type":43,"tag":293,"props":5020,"children":5022},{"class":295,"line":5021},43,[5023],{"type":43,"tag":293,"props":5024,"children":5025},{"style":952},[5026],{"type":48,"value":5027},"\u002F\u002F result.vals = [\"a:answer for question_a\", \"b:answer for question_b\"]\n",{"type":43,"tag":123,"props":5029,"children":5030},{},[5031,5033,5038,5040,5045],{"type":48,"value":5032},"User-fixable errors use ",{"type":43,"tag":63,"props":5034,"children":5036},{"className":5035},[],[5037],{"type":48,"value":90},{"type":48,"value":5039}," to pause and collect missing data — that's the pattern covered by this skill. For the full 4-tier error handling strategy (RetryPolicy, Command error loops, etc.), see the ",{"type":43,"tag":59,"props":5041,"children":5042},{},[5043],{"type":48,"value":5044},"fundamentals",{"type":48,"value":5046}," skill.",{"type":43,"tag":112,"props":5048,"children":5049},{},[],{"type":43,"tag":116,"props":5051,"children":5053},{"id":5052},"side-effects-before-interrupt-must-be-idempotent",[5054],{"type":48,"value":5055},"Side Effects Before Interrupt Must Be Idempotent",{"type":43,"tag":123,"props":5057,"children":5058},{},[5059,5061,5065,5067,5072],{"type":48,"value":5060},"When the graph resumes, the node restarts from the ",{"type":43,"tag":59,"props":5062,"children":5063},{},[5064],{"type":48,"value":262},{"type":48,"value":5066}," — ALL code before ",{"type":43,"tag":63,"props":5068,"children":5070},{"className":5069},[],[5071],{"type":48,"value":90},{"type":48,"value":5073}," re-runs. In subgraphs, BOTH the parent node and the subgraph node re-execute.",{"type":43,"tag":5075,"props":5076,"children":5077},"idempotency-rules",{},[5078,5086,5140,5148],{"type":43,"tag":123,"props":5079,"children":5080},{},[5081],{"type":43,"tag":59,"props":5082,"children":5083},{},[5084],{"type":48,"value":5085},"Do:",{"type":43,"tag":51,"props":5087,"children":5088},{},[5089,5105,5116,5135],{"type":43,"tag":55,"props":5090,"children":5091},{},[5092,5093,5098,5100],{"type":48,"value":2503},{"type":43,"tag":59,"props":5094,"children":5095},{},[5096],{"type":48,"value":5097},"upsert",{"type":48,"value":5099}," (not insert) operations before ",{"type":43,"tag":63,"props":5101,"children":5103},{"className":5102},[],[5104],{"type":48,"value":90},{"type":43,"tag":55,"props":5106,"children":5107},{},[5108,5109,5114],{"type":48,"value":2503},{"type":43,"tag":59,"props":5110,"children":5111},{},[5112],{"type":48,"value":5113},"check-before-create",{"type":48,"value":5115}," patterns",{"type":43,"tag":55,"props":5117,"children":5118},{},[5119,5121,5126,5128,5133],{"type":48,"value":5120},"Place side effects ",{"type":43,"tag":59,"props":5122,"children":5123},{},[5124],{"type":48,"value":5125},"after",{"type":48,"value":5127}," ",{"type":43,"tag":63,"props":5129,"children":5131},{"className":5130},[],[5132],{"type":48,"value":90},{"type":48,"value":5134}," when possible",{"type":43,"tag":55,"props":5136,"children":5137},{},[5138],{"type":48,"value":5139},"Separate side effects into their own nodes",{"type":43,"tag":123,"props":5141,"children":5142},{},[5143],{"type":43,"tag":59,"props":5144,"children":5145},{},[5146],{"type":48,"value":5147},"Don't:",{"type":43,"tag":51,"props":5149,"children":5150},{},[5151,5163],{"type":43,"tag":55,"props":5152,"children":5153},{},[5154,5156,5161],{"type":48,"value":5155},"Create new records before ",{"type":43,"tag":63,"props":5157,"children":5159},{"className":5158},[],[5160],{"type":48,"value":90},{"type":48,"value":5162}," — duplicates on each resume",{"type":43,"tag":55,"props":5164,"children":5165},{},[5166,5168,5173],{"type":48,"value":5167},"Append to lists before ",{"type":43,"tag":63,"props":5169,"children":5171},{"className":5170},[],[5172],{"type":48,"value":90},{"type":48,"value":5174}," — duplicate entries on each resume",{"type":43,"tag":5176,"props":5177,"children":5178},"ex-idempotent-patterns",{},[5179,5349],{"type":43,"tag":277,"props":5180,"children":5181},{},[5182,5184],{"type":48,"value":5183},"\nIdempotent operations before interrupt vs non-idempotent (wrong).\n",{"type":43,"tag":283,"props":5185,"children":5187},{"className":285,"code":5186,"language":277,"meta":287,"style":287},"# GOOD: Upsert is idempotent — safe before interrupt\ndef node_a(state: State):\n    db.upsert_user(user_id=state[\"user_id\"], status=\"pending_approval\")\n    approved = interrupt(\"Approve this change?\")\n    return {\"approved\": approved}\n\n# GOOD: Side effect AFTER interrupt — only runs once\ndef node_a(state: State):\n    approved = interrupt(\"Approve this change?\")\n    if approved:\n        db.create_audit_log(user_id=state[\"user_id\"], action=\"approved\")\n    return {\"approved\": approved}\n\n# BAD: Insert creates duplicates on each resume!\ndef node_a(state: State):\n    audit_id = db.create_audit_log({  # Runs again on resume!\n        \"user_id\": state[\"user_id\"],\n        \"action\": \"pending_approval\",\n    })\n    approved = interrupt(\"Approve this change?\")\n    return {\"approved\": approved}\n",[5188],{"type":43,"tag":63,"props":5189,"children":5190},{"__ignoreMap":287},[5191,5199,5207,5215,5223,5230,5237,5245,5252,5259,5267,5275,5282,5289,5297,5304,5312,5320,5328,5335,5342],{"type":43,"tag":293,"props":5192,"children":5193},{"class":295,"line":296},[5194],{"type":43,"tag":293,"props":5195,"children":5196},{},[5197],{"type":48,"value":5198},"# GOOD: Upsert is idempotent — safe before interrupt\n",{"type":43,"tag":293,"props":5200,"children":5201},{"class":295,"line":305},[5202],{"type":43,"tag":293,"props":5203,"children":5204},{},[5205],{"type":48,"value":5206},"def node_a(state: State):\n",{"type":43,"tag":293,"props":5208,"children":5209},{"class":295,"line":314},[5210],{"type":43,"tag":293,"props":5211,"children":5212},{},[5213],{"type":48,"value":5214},"    db.upsert_user(user_id=state[\"user_id\"], status=\"pending_approval\")\n",{"type":43,"tag":293,"props":5216,"children":5217},{"class":295,"line":323},[5218],{"type":43,"tag":293,"props":5219,"children":5220},{},[5221],{"type":48,"value":5222},"    approved = interrupt(\"Approve this change?\")\n",{"type":43,"tag":293,"props":5224,"children":5225},{"class":295,"line":332},[5226],{"type":43,"tag":293,"props":5227,"children":5228},{},[5229],{"type":48,"value":410},{"type":43,"tag":293,"props":5231,"children":5232},{"class":295,"line":342},[5233],{"type":43,"tag":293,"props":5234,"children":5235},{"emptyLinePlaceholder":336},[5236],{"type":48,"value":339},{"type":43,"tag":293,"props":5238,"children":5239},{"class":295,"line":351},[5240],{"type":43,"tag":293,"props":5241,"children":5242},{},[5243],{"type":48,"value":5244},"# GOOD: Side effect AFTER interrupt — only runs once\n",{"type":43,"tag":293,"props":5246,"children":5247},{"class":295,"line":360},[5248],{"type":43,"tag":293,"props":5249,"children":5250},{},[5251],{"type":48,"value":5206},{"type":43,"tag":293,"props":5253,"children":5254},{"class":295,"line":368},[5255],{"type":43,"tag":293,"props":5256,"children":5257},{},[5258],{"type":48,"value":5222},{"type":43,"tag":293,"props":5260,"children":5261},{"class":295,"line":377},[5262],{"type":43,"tag":293,"props":5263,"children":5264},{},[5265],{"type":48,"value":5266},"    if approved:\n",{"type":43,"tag":293,"props":5268,"children":5269},{"class":295,"line":386},[5270],{"type":43,"tag":293,"props":5271,"children":5272},{},[5273],{"type":48,"value":5274},"        db.create_audit_log(user_id=state[\"user_id\"], action=\"approved\")\n",{"type":43,"tag":293,"props":5276,"children":5277},{"class":295,"line":395},[5278],{"type":43,"tag":293,"props":5279,"children":5280},{},[5281],{"type":48,"value":410},{"type":43,"tag":293,"props":5283,"children":5284},{"class":295,"line":404},[5285],{"type":43,"tag":293,"props":5286,"children":5287},{"emptyLinePlaceholder":336},[5288],{"type":48,"value":339},{"type":43,"tag":293,"props":5290,"children":5291},{"class":295,"line":413},[5292],{"type":43,"tag":293,"props":5293,"children":5294},{},[5295],{"type":48,"value":5296},"# BAD: Insert creates duplicates on each resume!\n",{"type":43,"tag":293,"props":5298,"children":5299},{"class":295,"line":421},[5300],{"type":43,"tag":293,"props":5301,"children":5302},{},[5303],{"type":48,"value":5206},{"type":43,"tag":293,"props":5305,"children":5306},{"class":295,"line":430},[5307],{"type":43,"tag":293,"props":5308,"children":5309},{},[5310],{"type":48,"value":5311},"    audit_id = db.create_audit_log({  # Runs again on resume!\n",{"type":43,"tag":293,"props":5313,"children":5314},{"class":295,"line":439},[5315],{"type":43,"tag":293,"props":5316,"children":5317},{},[5318],{"type":48,"value":5319},"        \"user_id\": state[\"user_id\"],\n",{"type":43,"tag":293,"props":5321,"children":5322},{"class":295,"line":448},[5323],{"type":43,"tag":293,"props":5324,"children":5325},{},[5326],{"type":48,"value":5327},"        \"action\": \"pending_approval\",\n",{"type":43,"tag":293,"props":5329,"children":5330},{"class":295,"line":457},[5331],{"type":43,"tag":293,"props":5332,"children":5333},{},[5334],{"type":48,"value":1782},{"type":43,"tag":293,"props":5336,"children":5337},{"class":295,"line":466},[5338],{"type":43,"tag":293,"props":5339,"children":5340},{},[5341],{"type":48,"value":5222},{"type":43,"tag":293,"props":5343,"children":5344},{"class":295,"line":475},[5345],{"type":43,"tag":293,"props":5346,"children":5347},{},[5348],{"type":48,"value":410},{"type":43,"tag":588,"props":5350,"children":5351},{},[5352,5353],{"type":48,"value":5183},{"type":43,"tag":283,"props":5354,"children":5356},{"className":594,"code":5355,"language":588,"meta":287,"style":287},"\u002F\u002F GOOD: Upsert is idempotent — safe before interrupt\nconst nodeA = async (state: typeof State.State) => {\n  await db.upsertUser({ userId: state.userId, status: \"pending_approval\" });\n  const approved = interrupt(\"Approve this change?\");\n  return { approved };\n};\n\n\u002F\u002F GOOD: Side effect AFTER interrupt — only runs once\nconst nodeA = async (state: typeof State.State) => {\n  const approved = interrupt(\"Approve this change?\");\n  if (approved) {\n    await db.createAuditLog({ userId: state.userId, action: \"approved\" });\n  }\n  return { approved };\n};\n\n\u002F\u002F BAD: Insert creates duplicates on each resume!\nconst nodeA = async (state: typeof State.State) => {\n  await db.createAuditLog({  \u002F\u002F Runs again on resume!\n    userId: state.userId,\n    action: \"pending_approval\",\n  });\n  const approved = interrupt(\"Approve this change?\");\n  return { approved };\n};\n",[5357],{"type":43,"tag":63,"props":5358,"children":5359},{"__ignoreMap":287},[5360,5368,5428,5518,5562,5581,5588,5595,5603,5662,5705,5728,5814,5821,5840,5847,5854,5862,5921,5953,5981,6008,6023,6066,6085],{"type":43,"tag":293,"props":5361,"children":5362},{"class":295,"line":296},[5363],{"type":43,"tag":293,"props":5364,"children":5365},{"style":952},[5366],{"type":48,"value":5367},"\u002F\u002F GOOD: Upsert is idempotent — safe before interrupt\n",{"type":43,"tag":293,"props":5369,"children":5370},{"class":295,"line":305},[5371,5375,5380,5384,5388,5392,5396,5400,5404,5408,5412,5416,5420,5424],{"type":43,"tag":293,"props":5372,"children":5373},{"style":760},[5374],{"type":48,"value":763},{"type":43,"tag":293,"props":5376,"children":5377},{"style":617},[5378],{"type":48,"value":5379}," nodeA ",{"type":43,"tag":293,"props":5381,"children":5382},{"style":611},[5383],{"type":48,"value":773},{"type":43,"tag":293,"props":5385,"children":5386},{"style":760},[5387],{"type":48,"value":898},{"type":43,"tag":293,"props":5389,"children":5390},{"style":611},[5391],{"type":48,"value":903},{"type":43,"tag":293,"props":5393,"children":5394},{"style":906},[5395],{"type":48,"value":909},{"type":43,"tag":293,"props":5397,"children":5398},{"style":611},[5399],{"type":48,"value":807},{"type":43,"tag":293,"props":5401,"children":5402},{"style":611},[5403],{"type":48,"value":918},{"type":43,"tag":293,"props":5405,"children":5406},{"style":617},[5407],{"type":48,"value":923},{"type":43,"tag":293,"props":5409,"children":5410},{"style":611},[5411],{"type":48,"value":247},{"type":43,"tag":293,"props":5413,"children":5414},{"style":617},[5415],{"type":48,"value":932},{"type":43,"tag":293,"props":5417,"children":5418},{"style":611},[5419],{"type":48,"value":849},{"type":43,"tag":293,"props":5421,"children":5422},{"style":760},[5423],{"type":48,"value":941},{"type":43,"tag":293,"props":5425,"children":5426},{"style":611},[5427],{"type":48,"value":946},{"type":43,"tag":293,"props":5429,"children":5430},{"class":295,"line":314},[5431,5436,5441,5445,5450,5454,5458,5463,5467,5471,5475,5480,5484,5489,5493,5497,5502,5506,5510,5514],{"type":43,"tag":293,"props":5432,"children":5433},{"style":605},[5434],{"type":48,"value":5435},"  await",{"type":43,"tag":293,"props":5437,"children":5438},{"style":617},[5439],{"type":48,"value":5440}," db",{"type":43,"tag":293,"props":5442,"children":5443},{"style":611},[5444],{"type":48,"value":247},{"type":43,"tag":293,"props":5446,"children":5447},{"style":781},[5448],{"type":48,"value":5449},"upsertUser",{"type":43,"tag":293,"props":5451,"children":5452},{"style":799},[5453],{"type":48,"value":788},{"type":43,"tag":293,"props":5455,"children":5456},{"style":611},[5457],{"type":48,"value":1240},{"type":43,"tag":293,"props":5459,"children":5460},{"style":799},[5461],{"type":48,"value":5462}," userId",{"type":43,"tag":293,"props":5464,"children":5465},{"style":611},[5466],{"type":48,"value":807},{"type":43,"tag":293,"props":5468,"children":5469},{"style":617},[5470],{"type":48,"value":2028},{"type":43,"tag":293,"props":5472,"children":5473},{"style":611},[5474],{"type":48,"value":247},{"type":43,"tag":293,"props":5476,"children":5477},{"style":617},[5478],{"type":48,"value":5479},"userId",{"type":43,"tag":293,"props":5481,"children":5482},{"style":611},[5483],{"type":48,"value":625},{"type":43,"tag":293,"props":5485,"children":5486},{"style":799},[5487],{"type":48,"value":5488}," status",{"type":43,"tag":293,"props":5490,"children":5491},{"style":611},[5492],{"type":48,"value":807},{"type":43,"tag":293,"props":5494,"children":5495},{"style":611},[5496],{"type":48,"value":690},{"type":43,"tag":293,"props":5498,"children":5499},{"style":693},[5500],{"type":48,"value":5501},"pending_approval",{"type":43,"tag":293,"props":5503,"children":5504},{"style":611},[5505],{"type":48,"value":701},{"type":43,"tag":293,"props":5507,"children":5508},{"style":611},[5509],{"type":48,"value":680},{"type":43,"tag":293,"props":5511,"children":5512},{"style":799},[5513],{"type":48,"value":849},{"type":43,"tag":293,"props":5515,"children":5516},{"style":611},[5517],{"type":48,"value":706},{"type":43,"tag":293,"props":5519,"children":5520},{"class":295,"line":323},[5521,5525,5529,5533,5537,5541,5545,5550,5554,5558],{"type":43,"tag":293,"props":5522,"children":5523},{"style":760},[5524],{"type":48,"value":963},{"type":43,"tag":293,"props":5526,"children":5527},{"style":617},[5528],{"type":48,"value":968},{"type":43,"tag":293,"props":5530,"children":5531},{"style":611},[5532],{"type":48,"value":973},{"type":43,"tag":293,"props":5534,"children":5535},{"style":781},[5536],{"type":48,"value":620},{"type":43,"tag":293,"props":5538,"children":5539},{"style":799},[5540],{"type":48,"value":788},{"type":43,"tag":293,"props":5542,"children":5543},{"style":611},[5544],{"type":48,"value":701},{"type":43,"tag":293,"props":5546,"children":5547},{"style":693},[5548],{"type":48,"value":5549},"Approve this change?",{"type":43,"tag":293,"props":5551,"children":5552},{"style":611},[5553],{"type":48,"value":701},{"type":43,"tag":293,"props":5555,"children":5556},{"style":799},[5557],{"type":48,"value":849},{"type":43,"tag":293,"props":5559,"children":5560},{"style":611},[5561],{"type":48,"value":706},{"type":43,"tag":293,"props":5563,"children":5564},{"class":295,"line":332},[5565,5569,5573,5577],{"type":43,"tag":293,"props":5566,"children":5567},{"style":605},[5568],{"type":48,"value":1018},{"type":43,"tag":293,"props":5570,"children":5571},{"style":611},[5572],{"type":48,"value":614},{"type":43,"tag":293,"props":5574,"children":5575},{"style":617},[5576],{"type":48,"value":968},{"type":43,"tag":293,"props":5578,"children":5579},{"style":611},[5580],{"type":48,"value":1031},{"type":43,"tag":293,"props":5582,"children":5583},{"class":295,"line":342},[5584],{"type":43,"tag":293,"props":5585,"children":5586},{"style":611},[5587],{"type":48,"value":1039},{"type":43,"tag":293,"props":5589,"children":5590},{"class":295,"line":351},[5591],{"type":43,"tag":293,"props":5592,"children":5593},{"emptyLinePlaceholder":336},[5594],{"type":48,"value":339},{"type":43,"tag":293,"props":5596,"children":5597},{"class":295,"line":360},[5598],{"type":43,"tag":293,"props":5599,"children":5600},{"style":952},[5601],{"type":48,"value":5602},"\u002F\u002F GOOD: Side effect AFTER interrupt — only runs once\n",{"type":43,"tag":293,"props":5604,"children":5605},{"class":295,"line":368},[5606,5610,5614,5618,5622,5626,5630,5634,5638,5642,5646,5650,5654,5658],{"type":43,"tag":293,"props":5607,"children":5608},{"style":760},[5609],{"type":48,"value":763},{"type":43,"tag":293,"props":5611,"children":5612},{"style":617},[5613],{"type":48,"value":5379},{"type":43,"tag":293,"props":5615,"children":5616},{"style":611},[5617],{"type":48,"value":773},{"type":43,"tag":293,"props":5619,"children":5620},{"style":760},[5621],{"type":48,"value":898},{"type":43,"tag":293,"props":5623,"children":5624},{"style":611},[5625],{"type":48,"value":903},{"type":43,"tag":293,"props":5627,"children":5628},{"style":906},[5629],{"type":48,"value":909},{"type":43,"tag":293,"props":5631,"children":5632},{"style":611},[5633],{"type":48,"value":807},{"type":43,"tag":293,"props":5635,"children":5636},{"style":611},[5637],{"type":48,"value":918},{"type":43,"tag":293,"props":5639,"children":5640},{"style":617},[5641],{"type":48,"value":923},{"type":43,"tag":293,"props":5643,"children":5644},{"style":611},[5645],{"type":48,"value":247},{"type":43,"tag":293,"props":5647,"children":5648},{"style":617},[5649],{"type":48,"value":932},{"type":43,"tag":293,"props":5651,"children":5652},{"style":611},[5653],{"type":48,"value":849},{"type":43,"tag":293,"props":5655,"children":5656},{"style":760},[5657],{"type":48,"value":941},{"type":43,"tag":293,"props":5659,"children":5660},{"style":611},[5661],{"type":48,"value":946},{"type":43,"tag":293,"props":5663,"children":5664},{"class":295,"line":377},[5665,5669,5673,5677,5681,5685,5689,5693,5697,5701],{"type":43,"tag":293,"props":5666,"children":5667},{"style":760},[5668],{"type":48,"value":963},{"type":43,"tag":293,"props":5670,"children":5671},{"style":617},[5672],{"type":48,"value":968},{"type":43,"tag":293,"props":5674,"children":5675},{"style":611},[5676],{"type":48,"value":973},{"type":43,"tag":293,"props":5678,"children":5679},{"style":781},[5680],{"type":48,"value":620},{"type":43,"tag":293,"props":5682,"children":5683},{"style":799},[5684],{"type":48,"value":788},{"type":43,"tag":293,"props":5686,"children":5687},{"style":611},[5688],{"type":48,"value":701},{"type":43,"tag":293,"props":5690,"children":5691},{"style":693},[5692],{"type":48,"value":5549},{"type":43,"tag":293,"props":5694,"children":5695},{"style":611},[5696],{"type":48,"value":701},{"type":43,"tag":293,"props":5698,"children":5699},{"style":799},[5700],{"type":48,"value":849},{"type":43,"tag":293,"props":5702,"children":5703},{"style":611},[5704],{"type":48,"value":706},{"type":43,"tag":293,"props":5706,"children":5707},{"class":295,"line":386},[5708,5712,5716,5720,5724],{"type":43,"tag":293,"props":5709,"children":5710},{"style":605},[5711],{"type":48,"value":2240},{"type":43,"tag":293,"props":5713,"children":5714},{"style":799},[5715],{"type":48,"value":903},{"type":43,"tag":293,"props":5717,"children":5718},{"style":617},[5719],{"type":48,"value":2258},{"type":43,"tag":293,"props":5721,"children":5722},{"style":799},[5723],{"type":48,"value":2263},{"type":43,"tag":293,"props":5725,"children":5726},{"style":611},[5727],{"type":48,"value":793},{"type":43,"tag":293,"props":5729,"children":5730},{"class":295,"line":395},[5731,5736,5740,5744,5749,5753,5757,5761,5765,5769,5773,5777,5781,5786,5790,5794,5798,5802,5806,5810],{"type":43,"tag":293,"props":5732,"children":5733},{"style":605},[5734],{"type":48,"value":5735},"    await",{"type":43,"tag":293,"props":5737,"children":5738},{"style":617},[5739],{"type":48,"value":5440},{"type":43,"tag":293,"props":5741,"children":5742},{"style":611},[5743],{"type":48,"value":247},{"type":43,"tag":293,"props":5745,"children":5746},{"style":781},[5747],{"type":48,"value":5748},"createAuditLog",{"type":43,"tag":293,"props":5750,"children":5751},{"style":799},[5752],{"type":48,"value":788},{"type":43,"tag":293,"props":5754,"children":5755},{"style":611},[5756],{"type":48,"value":1240},{"type":43,"tag":293,"props":5758,"children":5759},{"style":799},[5760],{"type":48,"value":5462},{"type":43,"tag":293,"props":5762,"children":5763},{"style":611},[5764],{"type":48,"value":807},{"type":43,"tag":293,"props":5766,"children":5767},{"style":617},[5768],{"type":48,"value":2028},{"type":43,"tag":293,"props":5770,"children":5771},{"style":611},[5772],{"type":48,"value":247},{"type":43,"tag":293,"props":5774,"children":5775},{"style":617},[5776],{"type":48,"value":5479},{"type":43,"tag":293,"props":5778,"children":5779},{"style":611},[5780],{"type":48,"value":625},{"type":43,"tag":293,"props":5782,"children":5783},{"style":799},[5784],{"type":48,"value":5785}," action",{"type":43,"tag":293,"props":5787,"children":5788},{"style":611},[5789],{"type":48,"value":807},{"type":43,"tag":293,"props":5791,"children":5792},{"style":611},[5793],{"type":48,"value":690},{"type":43,"tag":293,"props":5795,"children":5796},{"style":693},[5797],{"type":48,"value":2258},{"type":43,"tag":293,"props":5799,"children":5800},{"style":611},[5801],{"type":48,"value":701},{"type":43,"tag":293,"props":5803,"children":5804},{"style":611},[5805],{"type":48,"value":680},{"type":43,"tag":293,"props":5807,"children":5808},{"style":799},[5809],{"type":48,"value":849},{"type":43,"tag":293,"props":5811,"children":5812},{"style":611},[5813],{"type":48,"value":706},{"type":43,"tag":293,"props":5815,"children":5816},{"class":295,"line":404},[5817],{"type":43,"tag":293,"props":5818,"children":5819},{"style":611},[5820],{"type":48,"value":2482},{"type":43,"tag":293,"props":5822,"children":5823},{"class":295,"line":413},[5824,5828,5832,5836],{"type":43,"tag":293,"props":5825,"children":5826},{"style":605},[5827],{"type":48,"value":1018},{"type":43,"tag":293,"props":5829,"children":5830},{"style":611},[5831],{"type":48,"value":614},{"type":43,"tag":293,"props":5833,"children":5834},{"style":617},[5835],{"type":48,"value":968},{"type":43,"tag":293,"props":5837,"children":5838},{"style":611},[5839],{"type":48,"value":1031},{"type":43,"tag":293,"props":5841,"children":5842},{"class":295,"line":421},[5843],{"type":43,"tag":293,"props":5844,"children":5845},{"style":611},[5846],{"type":48,"value":1039},{"type":43,"tag":293,"props":5848,"children":5849},{"class":295,"line":430},[5850],{"type":43,"tag":293,"props":5851,"children":5852},{"emptyLinePlaceholder":336},[5853],{"type":48,"value":339},{"type":43,"tag":293,"props":5855,"children":5856},{"class":295,"line":439},[5857],{"type":43,"tag":293,"props":5858,"children":5859},{"style":952},[5860],{"type":48,"value":5861},"\u002F\u002F BAD: Insert creates duplicates on each resume!\n",{"type":43,"tag":293,"props":5863,"children":5864},{"class":295,"line":448},[5865,5869,5873,5877,5881,5885,5889,5893,5897,5901,5905,5909,5913,5917],{"type":43,"tag":293,"props":5866,"children":5867},{"style":760},[5868],{"type":48,"value":763},{"type":43,"tag":293,"props":5870,"children":5871},{"style":617},[5872],{"type":48,"value":5379},{"type":43,"tag":293,"props":5874,"children":5875},{"style":611},[5876],{"type":48,"value":773},{"type":43,"tag":293,"props":5878,"children":5879},{"style":760},[5880],{"type":48,"value":898},{"type":43,"tag":293,"props":5882,"children":5883},{"style":611},[5884],{"type":48,"value":903},{"type":43,"tag":293,"props":5886,"children":5887},{"style":906},[5888],{"type":48,"value":909},{"type":43,"tag":293,"props":5890,"children":5891},{"style":611},[5892],{"type":48,"value":807},{"type":43,"tag":293,"props":5894,"children":5895},{"style":611},[5896],{"type":48,"value":918},{"type":43,"tag":293,"props":5898,"children":5899},{"style":617},[5900],{"type":48,"value":923},{"type":43,"tag":293,"props":5902,"children":5903},{"style":611},[5904],{"type":48,"value":247},{"type":43,"tag":293,"props":5906,"children":5907},{"style":617},[5908],{"type":48,"value":932},{"type":43,"tag":293,"props":5910,"children":5911},{"style":611},[5912],{"type":48,"value":849},{"type":43,"tag":293,"props":5914,"children":5915},{"style":760},[5916],{"type":48,"value":941},{"type":43,"tag":293,"props":5918,"children":5919},{"style":611},[5920],{"type":48,"value":946},{"type":43,"tag":293,"props":5922,"children":5923},{"class":295,"line":457},[5924,5928,5932,5936,5940,5944,5948],{"type":43,"tag":293,"props":5925,"children":5926},{"style":605},[5927],{"type":48,"value":5435},{"type":43,"tag":293,"props":5929,"children":5930},{"style":617},[5931],{"type":48,"value":5440},{"type":43,"tag":293,"props":5933,"children":5934},{"style":611},[5935],{"type":48,"value":247},{"type":43,"tag":293,"props":5937,"children":5938},{"style":781},[5939],{"type":48,"value":5748},{"type":43,"tag":293,"props":5941,"children":5942},{"style":799},[5943],{"type":48,"value":788},{"type":43,"tag":293,"props":5945,"children":5946},{"style":611},[5947],{"type":48,"value":1240},{"type":43,"tag":293,"props":5949,"children":5950},{"style":952},[5951],{"type":48,"value":5952},"  \u002F\u002F Runs again on resume!\n",{"type":43,"tag":293,"props":5954,"children":5955},{"class":295,"line":466},[5956,5961,5965,5969,5973,5977],{"type":43,"tag":293,"props":5957,"children":5958},{"style":799},[5959],{"type":48,"value":5960},"    userId",{"type":43,"tag":293,"props":5962,"children":5963},{"style":611},[5964],{"type":48,"value":807},{"type":43,"tag":293,"props":5966,"children":5967},{"style":617},[5968],{"type":48,"value":2028},{"type":43,"tag":293,"props":5970,"children":5971},{"style":611},[5972],{"type":48,"value":247},{"type":43,"tag":293,"props":5974,"children":5975},{"style":617},[5976],{"type":48,"value":5479},{"type":43,"tag":293,"props":5978,"children":5979},{"style":611},[5980],{"type":48,"value":854},{"type":43,"tag":293,"props":5982,"children":5983},{"class":295,"line":475},[5984,5988,5992,5996,6000,6004],{"type":43,"tag":293,"props":5985,"children":5986},{"style":799},[5987],{"type":48,"value":2180},{"type":43,"tag":293,"props":5989,"children":5990},{"style":611},[5991],{"type":48,"value":807},{"type":43,"tag":293,"props":5993,"children":5994},{"style":611},[5995],{"type":48,"value":690},{"type":43,"tag":293,"props":5997,"children":5998},{"style":693},[5999],{"type":48,"value":5501},{"type":43,"tag":293,"props":6001,"children":6002},{"style":611},[6003],{"type":48,"value":701},{"type":43,"tag":293,"props":6005,"children":6006},{"style":611},[6007],{"type":48,"value":854},{"type":43,"tag":293,"props":6009,"children":6010},{"class":295,"line":484},[6011,6015,6019],{"type":43,"tag":293,"props":6012,"children":6013},{"style":611},[6014],{"type":48,"value":2209},{"type":43,"tag":293,"props":6016,"children":6017},{"style":799},[6018],{"type":48,"value":849},{"type":43,"tag":293,"props":6020,"children":6021},{"style":611},[6022],{"type":48,"value":706},{"type":43,"tag":293,"props":6024,"children":6025},{"class":295,"line":493},[6026,6030,6034,6038,6042,6046,6050,6054,6058,6062],{"type":43,"tag":293,"props":6027,"children":6028},{"style":760},[6029],{"type":48,"value":963},{"type":43,"tag":293,"props":6031,"children":6032},{"style":617},[6033],{"type":48,"value":968},{"type":43,"tag":293,"props":6035,"children":6036},{"style":611},[6037],{"type":48,"value":973},{"type":43,"tag":293,"props":6039,"children":6040},{"style":781},[6041],{"type":48,"value":620},{"type":43,"tag":293,"props":6043,"children":6044},{"style":799},[6045],{"type":48,"value":788},{"type":43,"tag":293,"props":6047,"children":6048},{"style":611},[6049],{"type":48,"value":701},{"type":43,"tag":293,"props":6051,"children":6052},{"style":693},[6053],{"type":48,"value":5549},{"type":43,"tag":293,"props":6055,"children":6056},{"style":611},[6057],{"type":48,"value":701},{"type":43,"tag":293,"props":6059,"children":6060},{"style":799},[6061],{"type":48,"value":849},{"type":43,"tag":293,"props":6063,"children":6064},{"style":611},[6065],{"type":48,"value":706},{"type":43,"tag":293,"props":6067,"children":6068},{"class":295,"line":501},[6069,6073,6077,6081],{"type":43,"tag":293,"props":6070,"children":6071},{"style":605},[6072],{"type":48,"value":1018},{"type":43,"tag":293,"props":6074,"children":6075},{"style":611},[6076],{"type":48,"value":614},{"type":43,"tag":293,"props":6078,"children":6079},{"style":617},[6080],{"type":48,"value":968},{"type":43,"tag":293,"props":6082,"children":6083},{"style":611},[6084],{"type":48,"value":1031},{"type":43,"tag":293,"props":6086,"children":6087},{"class":295,"line":510},[6088],{"type":43,"tag":293,"props":6089,"children":6090},{"style":611},[6091],{"type":48,"value":1039},{"type":43,"tag":6093,"props":6094,"children":6095},"subgraph-interrupt-re-execution",{},[6096,6103,6122,6202],{"type":43,"tag":6097,"props":6098,"children":6100},"h3",{"id":6099},"subgraph-re-execution-on-resume",[6101],{"type":48,"value":6102},"Subgraph re-execution on resume",{"type":43,"tag":123,"props":6104,"children":6105},{},[6106,6108,6113,6115,6120],{"type":48,"value":6107},"When a subgraph contains an ",{"type":43,"tag":63,"props":6109,"children":6111},{"className":6110},[],[6112],{"type":48,"value":90},{"type":48,"value":6114},", resuming re-executes BOTH the parent node (that invoked the subgraph) AND the subgraph node (that called ",{"type":43,"tag":63,"props":6116,"children":6118},{"className":6117},[],[6119],{"type":48,"value":90},{"type":48,"value":6121},"):",{"type":43,"tag":277,"props":6123,"children":6124},{},[6125],{"type":43,"tag":283,"props":6126,"children":6128},{"className":285,"code":6127,"language":277,"meta":287,"style":287},"def node_in_parent_graph(state: State):\n    some_code()  # \u003C-- Re-executes on resume\n    subgraph_result = subgraph.invoke(some_input)\n    # ...\n\ndef node_in_subgraph(state: State):\n    some_other_code()  # \u003C-- Also re-executes on resume\n    result = interrupt(\"What's your name?\")\n    # ...\n",[6129],{"type":43,"tag":63,"props":6130,"children":6131},{"__ignoreMap":287},[6132,6140,6148,6156,6164,6171,6179,6187,6195],{"type":43,"tag":293,"props":6133,"children":6134},{"class":295,"line":296},[6135],{"type":43,"tag":293,"props":6136,"children":6137},{},[6138],{"type":48,"value":6139},"def node_in_parent_graph(state: State):\n",{"type":43,"tag":293,"props":6141,"children":6142},{"class":295,"line":305},[6143],{"type":43,"tag":293,"props":6144,"children":6145},{},[6146],{"type":48,"value":6147},"    some_code()  # \u003C-- Re-executes on resume\n",{"type":43,"tag":293,"props":6149,"children":6150},{"class":295,"line":314},[6151],{"type":43,"tag":293,"props":6152,"children":6153},{},[6154],{"type":48,"value":6155},"    subgraph_result = subgraph.invoke(some_input)\n",{"type":43,"tag":293,"props":6157,"children":6158},{"class":295,"line":323},[6159],{"type":43,"tag":293,"props":6160,"children":6161},{},[6162],{"type":48,"value":6163},"    # ...\n",{"type":43,"tag":293,"props":6165,"children":6166},{"class":295,"line":332},[6167],{"type":43,"tag":293,"props":6168,"children":6169},{"emptyLinePlaceholder":336},[6170],{"type":48,"value":339},{"type":43,"tag":293,"props":6172,"children":6173},{"class":295,"line":342},[6174],{"type":43,"tag":293,"props":6175,"children":6176},{},[6177],{"type":48,"value":6178},"def node_in_subgraph(state: State):\n",{"type":43,"tag":293,"props":6180,"children":6181},{"class":295,"line":351},[6182],{"type":43,"tag":293,"props":6183,"children":6184},{},[6185],{"type":48,"value":6186},"    some_other_code()  # \u003C-- Also re-executes on resume\n",{"type":43,"tag":293,"props":6188,"children":6189},{"class":295,"line":360},[6190],{"type":43,"tag":293,"props":6191,"children":6192},{},[6193],{"type":48,"value":6194},"    result = interrupt(\"What's your name?\")\n",{"type":43,"tag":293,"props":6196,"children":6197},{"class":295,"line":368},[6198],{"type":43,"tag":293,"props":6199,"children":6200},{},[6201],{"type":48,"value":6163},{"type":43,"tag":588,"props":6203,"children":6204},{},[6205],{"type":43,"tag":283,"props":6206,"children":6208},{"className":594,"code":6207,"language":588,"meta":287,"style":287},"async function nodeInParentGraph(state: State) {\n  someCode();  \u002F\u002F \u003C-- Re-executes on resume\n  const subgraphResult = await subgraph.invoke(someInput);\n  \u002F\u002F ...\n}\n\nasync function nodeInSubgraph(state: State) {\n  someOtherCode();  \u002F\u002F \u003C-- Also re-executes on resume\n  const result = interrupt(\"What's your name?\");\n  \u002F\u002F ...\n}\n",[6209],{"type":43,"tag":63,"props":6210,"children":6211},{"__ignoreMap":287},[6212,6254,6275,6325,6333,6340,6347,6387,6408,6453,6460],{"type":43,"tag":293,"props":6213,"children":6214},{"class":295,"line":296},[6215,6220,6225,6230,6234,6238,6242,6246,6250],{"type":43,"tag":293,"props":6216,"children":6217},{"style":760},[6218],{"type":48,"value":6219},"async",{"type":43,"tag":293,"props":6221,"children":6222},{"style":760},[6223],{"type":48,"value":6224}," function",{"type":43,"tag":293,"props":6226,"children":6227},{"style":781},[6228],{"type":48,"value":6229}," nodeInParentGraph",{"type":43,"tag":293,"props":6231,"children":6232},{"style":611},[6233],{"type":48,"value":788},{"type":43,"tag":293,"props":6235,"children":6236},{"style":906},[6237],{"type":48,"value":909},{"type":43,"tag":293,"props":6239,"children":6240},{"style":611},[6241],{"type":48,"value":807},{"type":43,"tag":293,"props":6243,"children":6244},{"style":1962},[6245],{"type":48,"value":923},{"type":43,"tag":293,"props":6247,"children":6248},{"style":611},[6249],{"type":48,"value":849},{"type":43,"tag":293,"props":6251,"children":6252},{"style":611},[6253],{"type":48,"value":946},{"type":43,"tag":293,"props":6255,"children":6256},{"class":295,"line":305},[6257,6262,6266,6270],{"type":43,"tag":293,"props":6258,"children":6259},{"style":781},[6260],{"type":48,"value":6261},"  someCode",{"type":43,"tag":293,"props":6263,"children":6264},{"style":799},[6265],{"type":48,"value":825},{"type":43,"tag":293,"props":6267,"children":6268},{"style":611},[6269],{"type":48,"value":1585},{"type":43,"tag":293,"props":6271,"children":6272},{"style":952},[6273],{"type":48,"value":6274},"  \u002F\u002F \u003C-- Re-executes on resume\n",{"type":43,"tag":293,"props":6276,"children":6277},{"class":295,"line":314},[6278,6282,6287,6291,6295,6300,6304,6308,6312,6317,6321],{"type":43,"tag":293,"props":6279,"children":6280},{"style":760},[6281],{"type":48,"value":963},{"type":43,"tag":293,"props":6283,"children":6284},{"style":617},[6285],{"type":48,"value":6286}," subgraphResult",{"type":43,"tag":293,"props":6288,"children":6289},{"style":611},[6290],{"type":48,"value":973},{"type":43,"tag":293,"props":6292,"children":6293},{"style":605},[6294],{"type":48,"value":1363},{"type":43,"tag":293,"props":6296,"children":6297},{"style":617},[6298],{"type":48,"value":6299}," subgraph",{"type":43,"tag":293,"props":6301,"children":6302},{"style":611},[6303],{"type":48,"value":247},{"type":43,"tag":293,"props":6305,"children":6306},{"style":781},[6307],{"type":48,"value":179},{"type":43,"tag":293,"props":6309,"children":6310},{"style":799},[6311],{"type":48,"value":788},{"type":43,"tag":293,"props":6313,"children":6314},{"style":617},[6315],{"type":48,"value":6316},"someInput",{"type":43,"tag":293,"props":6318,"children":6319},{"style":799},[6320],{"type":48,"value":849},{"type":43,"tag":293,"props":6322,"children":6323},{"style":611},[6324],{"type":48,"value":706},{"type":43,"tag":293,"props":6326,"children":6327},{"class":295,"line":323},[6328],{"type":43,"tag":293,"props":6329,"children":6330},{"style":952},[6331],{"type":48,"value":6332},"  \u002F\u002F ...\n",{"type":43,"tag":293,"props":6334,"children":6335},{"class":295,"line":332},[6336],{"type":43,"tag":293,"props":6337,"children":6338},{"style":611},[6339],{"type":48,"value":3506},{"type":43,"tag":293,"props":6341,"children":6342},{"class":295,"line":342},[6343],{"type":43,"tag":293,"props":6344,"children":6345},{"emptyLinePlaceholder":336},[6346],{"type":48,"value":339},{"type":43,"tag":293,"props":6348,"children":6349},{"class":295,"line":351},[6350,6354,6358,6363,6367,6371,6375,6379,6383],{"type":43,"tag":293,"props":6351,"children":6352},{"style":760},[6353],{"type":48,"value":6219},{"type":43,"tag":293,"props":6355,"children":6356},{"style":760},[6357],{"type":48,"value":6224},{"type":43,"tag":293,"props":6359,"children":6360},{"style":781},[6361],{"type":48,"value":6362}," nodeInSubgraph",{"type":43,"tag":293,"props":6364,"children":6365},{"style":611},[6366],{"type":48,"value":788},{"type":43,"tag":293,"props":6368,"children":6369},{"style":906},[6370],{"type":48,"value":909},{"type":43,"tag":293,"props":6372,"children":6373},{"style":611},[6374],{"type":48,"value":807},{"type":43,"tag":293,"props":6376,"children":6377},{"style":1962},[6378],{"type":48,"value":923},{"type":43,"tag":293,"props":6380,"children":6381},{"style":611},[6382],{"type":48,"value":849},{"type":43,"tag":293,"props":6384,"children":6385},{"style":611},[6386],{"type":48,"value":946},{"type":43,"tag":293,"props":6388,"children":6389},{"class":295,"line":360},[6390,6395,6399,6403],{"type":43,"tag":293,"props":6391,"children":6392},{"style":781},[6393],{"type":48,"value":6394},"  someOtherCode",{"type":43,"tag":293,"props":6396,"children":6397},{"style":799},[6398],{"type":48,"value":825},{"type":43,"tag":293,"props":6400,"children":6401},{"style":611},[6402],{"type":48,"value":1585},{"type":43,"tag":293,"props":6404,"children":6405},{"style":952},[6406],{"type":48,"value":6407},"  \u002F\u002F \u003C-- Also re-executes on resume\n",{"type":43,"tag":293,"props":6409,"children":6410},{"class":295,"line":368},[6411,6415,6420,6424,6428,6432,6436,6441,6445,6449],{"type":43,"tag":293,"props":6412,"children":6413},{"style":760},[6414],{"type":48,"value":963},{"type":43,"tag":293,"props":6416,"children":6417},{"style":617},[6418],{"type":48,"value":6419}," result",{"type":43,"tag":293,"props":6421,"children":6422},{"style":611},[6423],{"type":48,"value":973},{"type":43,"tag":293,"props":6425,"children":6426},{"style":781},[6427],{"type":48,"value":620},{"type":43,"tag":293,"props":6429,"children":6430},{"style":799},[6431],{"type":48,"value":788},{"type":43,"tag":293,"props":6433,"children":6434},{"style":611},[6435],{"type":48,"value":701},{"type":43,"tag":293,"props":6437,"children":6438},{"style":693},[6439],{"type":48,"value":6440},"What's your name?",{"type":43,"tag":293,"props":6442,"children":6443},{"style":611},[6444],{"type":48,"value":701},{"type":43,"tag":293,"props":6446,"children":6447},{"style":799},[6448],{"type":48,"value":849},{"type":43,"tag":293,"props":6450,"children":6451},{"style":611},[6452],{"type":48,"value":706},{"type":43,"tag":293,"props":6454,"children":6455},{"class":295,"line":377},[6456],{"type":43,"tag":293,"props":6457,"children":6458},{"style":952},[6459],{"type":48,"value":6332},{"type":43,"tag":293,"props":6461,"children":6462},{"class":295,"line":386},[6463],{"type":43,"tag":293,"props":6464,"children":6465},{"style":611},[6466],{"type":48,"value":3506},{"type":43,"tag":112,"props":6468,"children":6469},{},[],{"type":43,"tag":116,"props":6471,"children":6473},{"id":6472},"commandresume-warning",[6474],{"type":48,"value":6475},"Command(resume) Warning",{"type":43,"tag":123,"props":6477,"children":6478},{},[6479,6484,6486,6491,6493,6499,6500,6506,6508,6514],{"type":43,"tag":63,"props":6480,"children":6482},{"className":6481},[],[6483],{"type":48,"value":2661},{"type":48,"value":6485}," is the ",{"type":43,"tag":59,"props":6487,"children":6488},{},[6489],{"type":48,"value":6490},"only",{"type":48,"value":6492}," Command pattern intended as input to ",{"type":43,"tag":63,"props":6494,"children":6496},{"className":6495},[],[6497],{"type":48,"value":6498},"invoke()",{"type":48,"value":181},{"type":43,"tag":63,"props":6501,"children":6503},{"className":6502},[],[6504],{"type":48,"value":6505},"stream()",{"type":48,"value":6507},". Do NOT pass ",{"type":43,"tag":63,"props":6509,"children":6511},{"className":6510},[],[6512],{"type":48,"value":6513},"Command(update=...)",{"type":48,"value":6515}," as input — it resumes from the latest checkpoint and the graph appears stuck. See the fundamentals skill for the full antipattern explanation.",{"type":43,"tag":112,"props":6517,"children":6518},{},[],{"type":43,"tag":116,"props":6520,"children":6522},{"id":6521},"fixes",[6523],{"type":48,"value":6524},"Fixes",{"type":43,"tag":6526,"props":6527,"children":6528},"fix-checkpointer-required-for-interrupts",{},[6529,6580],{"type":43,"tag":277,"props":6530,"children":6531},{},[6532,6534],{"type":48,"value":6533},"\nCheckpointer required for interrupt functionality.\n",{"type":43,"tag":283,"props":6535,"children":6537},{"className":285,"code":6536,"language":277,"meta":287,"style":287},"# WRONG\ngraph = builder.compile()\n\n# CORRECT\ngraph = builder.compile(checkpointer=InMemorySaver())\n",[6538],{"type":43,"tag":63,"props":6539,"children":6540},{"__ignoreMap":287},[6541,6549,6557,6564,6572],{"type":43,"tag":293,"props":6542,"children":6543},{"class":295,"line":296},[6544],{"type":43,"tag":293,"props":6545,"children":6546},{},[6547],{"type":48,"value":6548},"# WRONG\n",{"type":43,"tag":293,"props":6550,"children":6551},{"class":295,"line":305},[6552],{"type":43,"tag":293,"props":6553,"children":6554},{},[6555],{"type":48,"value":6556},"graph = builder.compile()\n",{"type":43,"tag":293,"props":6558,"children":6559},{"class":295,"line":314},[6560],{"type":43,"tag":293,"props":6561,"children":6562},{"emptyLinePlaceholder":336},[6563],{"type":48,"value":339},{"type":43,"tag":293,"props":6565,"children":6566},{"class":295,"line":323},[6567],{"type":43,"tag":293,"props":6568,"children":6569},{},[6570],{"type":48,"value":6571},"# CORRECT\n",{"type":43,"tag":293,"props":6573,"children":6574},{"class":295,"line":332},[6575],{"type":43,"tag":293,"props":6576,"children":6577},{},[6578],{"type":48,"value":6579},"graph = builder.compile(checkpointer=InMemorySaver())\n",{"type":43,"tag":588,"props":6581,"children":6582},{},[6583,6584],{"type":48,"value":6533},{"type":43,"tag":283,"props":6585,"children":6587},{"className":594,"code":6586,"language":588,"meta":287,"style":287},"\u002F\u002F WRONG\nconst graph = builder.compile();\n\n\u002F\u002F CORRECT\nconst graph = builder.compile({ checkpointer: new MemorySaver() });\n",[6588],{"type":43,"tag":63,"props":6589,"children":6590},{"__ignoreMap":287},[6591,6599,6635,6642,6650],{"type":43,"tag":293,"props":6592,"children":6593},{"class":295,"line":296},[6594],{"type":43,"tag":293,"props":6595,"children":6596},{"style":952},[6597],{"type":48,"value":6598},"\u002F\u002F WRONG\n",{"type":43,"tag":293,"props":6600,"children":6601},{"class":295,"line":305},[6602,6606,6610,6614,6619,6623,6627,6631],{"type":43,"tag":293,"props":6603,"children":6604},{"style":760},[6605],{"type":48,"value":763},{"type":43,"tag":293,"props":6607,"children":6608},{"style":617},[6609],{"type":48,"value":1090},{"type":43,"tag":293,"props":6611,"children":6612},{"style":611},[6613],{"type":48,"value":773},{"type":43,"tag":293,"props":6615,"children":6616},{"style":617},[6617],{"type":48,"value":6618}," builder",{"type":43,"tag":293,"props":6620,"children":6621},{"style":611},[6622],{"type":48,"value":247},{"type":43,"tag":293,"props":6624,"children":6625},{"style":781},[6626],{"type":48,"value":1231},{"type":43,"tag":293,"props":6628,"children":6629},{"style":617},[6630],{"type":48,"value":825},{"type":43,"tag":293,"props":6632,"children":6633},{"style":611},[6634],{"type":48,"value":706},{"type":43,"tag":293,"props":6636,"children":6637},{"class":295,"line":314},[6638],{"type":43,"tag":293,"props":6639,"children":6640},{"emptyLinePlaceholder":336},[6641],{"type":48,"value":339},{"type":43,"tag":293,"props":6643,"children":6644},{"class":295,"line":323},[6645],{"type":43,"tag":293,"props":6646,"children":6647},{"style":952},[6648],{"type":48,"value":6649},"\u002F\u002F CORRECT\n",{"type":43,"tag":293,"props":6651,"children":6652},{"class":295,"line":332},[6653,6657,6661,6665,6669,6673,6677,6681,6685,6689,6693,6697,6701,6705,6709,6713],{"type":43,"tag":293,"props":6654,"children":6655},{"style":760},[6656],{"type":48,"value":763},{"type":43,"tag":293,"props":6658,"children":6659},{"style":617},[6660],{"type":48,"value":1090},{"type":43,"tag":293,"props":6662,"children":6663},{"style":611},[6664],{"type":48,"value":773},{"type":43,"tag":293,"props":6666,"children":6667},{"style":617},[6668],{"type":48,"value":6618},{"type":43,"tag":293,"props":6670,"children":6671},{"style":611},[6672],{"type":48,"value":247},{"type":43,"tag":293,"props":6674,"children":6675},{"style":781},[6676],{"type":48,"value":1231},{"type":43,"tag":293,"props":6678,"children":6679},{"style":617},[6680],{"type":48,"value":788},{"type":43,"tag":293,"props":6682,"children":6683},{"style":611},[6684],{"type":48,"value":1240},{"type":43,"tag":293,"props":6686,"children":6687},{"style":799},[6688],{"type":48,"value":4493},{"type":43,"tag":293,"props":6690,"children":6691},{"style":611},[6692],{"type":48,"value":807},{"type":43,"tag":293,"props":6694,"children":6695},{"style":611},[6696],{"type":48,"value":778},{"type":43,"tag":293,"props":6698,"children":6699},{"style":781},[6700],{"type":48,"value":639},{"type":43,"tag":293,"props":6702,"children":6703},{"style":617},[6704],{"type":48,"value":4510},{"type":43,"tag":293,"props":6706,"children":6707},{"style":611},[6708],{"type":48,"value":862},{"type":43,"tag":293,"props":6710,"children":6711},{"style":617},[6712],{"type":48,"value":849},{"type":43,"tag":293,"props":6714,"children":6715},{"style":611},[6716],{"type":48,"value":706},{"type":43,"tag":6718,"props":6719,"children":6720},"fix-resume-with-command",{},[6721,6770],{"type":43,"tag":277,"props":6722,"children":6723},{},[6724,6726],{"type":48,"value":6725},"\nUse Command to resume from an interrupt (regular dict restarts graph).\n",{"type":43,"tag":283,"props":6727,"children":6729},{"className":285,"code":6728,"language":277,"meta":287,"style":287},"# WRONG\ngraph.invoke({\"resume_data\": \"approve\"}, config)\n\n# CORRECT\ngraph.invoke(Command(resume=\"approve\"), config)\n",[6730],{"type":43,"tag":63,"props":6731,"children":6732},{"__ignoreMap":287},[6733,6740,6748,6755,6762],{"type":43,"tag":293,"props":6734,"children":6735},{"class":295,"line":296},[6736],{"type":43,"tag":293,"props":6737,"children":6738},{},[6739],{"type":48,"value":6548},{"type":43,"tag":293,"props":6741,"children":6742},{"class":295,"line":305},[6743],{"type":43,"tag":293,"props":6744,"children":6745},{},[6746],{"type":48,"value":6747},"graph.invoke({\"resume_data\": \"approve\"}, config)\n",{"type":43,"tag":293,"props":6749,"children":6750},{"class":295,"line":314},[6751],{"type":43,"tag":293,"props":6752,"children":6753},{"emptyLinePlaceholder":336},[6754],{"type":48,"value":339},{"type":43,"tag":293,"props":6756,"children":6757},{"class":295,"line":323},[6758],{"type":43,"tag":293,"props":6759,"children":6760},{},[6761],{"type":48,"value":6571},{"type":43,"tag":293,"props":6763,"children":6764},{"class":295,"line":332},[6765],{"type":43,"tag":293,"props":6766,"children":6767},{},[6768],{"type":48,"value":6769},"graph.invoke(Command(resume=\"approve\"), config)\n",{"type":43,"tag":588,"props":6771,"children":6772},{},[6773,6775],{"type":48,"value":6774},"\nUse Command to resume from an interrupt (regular object restarts graph).\n",{"type":43,"tag":283,"props":6776,"children":6778},{"className":594,"code":6777,"language":588,"meta":287,"style":287},"\u002F\u002F WRONG\nawait graph.invoke({ resumeData: \"approve\" }, config);\n\n\u002F\u002F CORRECT\nawait graph.invoke(new Command({ resume: \"approve\" }), config);\n",[6779],{"type":43,"tag":63,"props":6780,"children":6781},{"__ignoreMap":287},[6782,6789,6851,6858,6865],{"type":43,"tag":293,"props":6783,"children":6784},{"class":295,"line":296},[6785],{"type":43,"tag":293,"props":6786,"children":6787},{"style":952},[6788],{"type":48,"value":6598},{"type":43,"tag":293,"props":6790,"children":6791},{"class":295,"line":305},[6792,6797,6801,6805,6809,6813,6817,6822,6826,6830,6835,6839,6843,6847],{"type":43,"tag":293,"props":6793,"children":6794},{"style":605},[6795],{"type":48,"value":6796},"await",{"type":43,"tag":293,"props":6798,"children":6799},{"style":617},[6800],{"type":48,"value":1368},{"type":43,"tag":293,"props":6802,"children":6803},{"style":611},[6804],{"type":48,"value":247},{"type":43,"tag":293,"props":6806,"children":6807},{"style":781},[6808],{"type":48,"value":179},{"type":43,"tag":293,"props":6810,"children":6811},{"style":617},[6812],{"type":48,"value":788},{"type":43,"tag":293,"props":6814,"children":6815},{"style":611},[6816],{"type":48,"value":1240},{"type":43,"tag":293,"props":6818,"children":6819},{"style":799},[6820],{"type":48,"value":6821}," resumeData",{"type":43,"tag":293,"props":6823,"children":6824},{"style":611},[6825],{"type":48,"value":807},{"type":43,"tag":293,"props":6827,"children":6828},{"style":611},[6829],{"type":48,"value":690},{"type":43,"tag":293,"props":6831,"children":6832},{"style":693},[6833],{"type":48,"value":6834},"approve",{"type":43,"tag":293,"props":6836,"children":6837},{"style":611},[6838],{"type":48,"value":701},{"type":43,"tag":293,"props":6840,"children":6841},{"style":611},[6842],{"type":48,"value":1402},{"type":43,"tag":293,"props":6844,"children":6845},{"style":617},[6846],{"type":48,"value":1407},{"type":43,"tag":293,"props":6848,"children":6849},{"style":611},[6850],{"type":48,"value":706},{"type":43,"tag":293,"props":6852,"children":6853},{"class":295,"line":314},[6854],{"type":43,"tag":293,"props":6855,"children":6856},{"emptyLinePlaceholder":336},[6857],{"type":48,"value":339},{"type":43,"tag":293,"props":6859,"children":6860},{"class":295,"line":323},[6861],{"type":43,"tag":293,"props":6862,"children":6863},{"style":952},[6864],{"type":48,"value":6649},{"type":43,"tag":293,"props":6866,"children":6867},{"class":295,"line":332},[6868,6872,6876,6880,6884,6888,6892,6896,6900,6904,6908,6912,6916,6920,6924,6928,6932,6936,6940],{"type":43,"tag":293,"props":6869,"children":6870},{"style":605},[6871],{"type":48,"value":6796},{"type":43,"tag":293,"props":6873,"children":6874},{"style":617},[6875],{"type":48,"value":1368},{"type":43,"tag":293,"props":6877,"children":6878},{"style":611},[6879],{"type":48,"value":247},{"type":43,"tag":293,"props":6881,"children":6882},{"style":781},[6883],{"type":48,"value":179},{"type":43,"tag":293,"props":6885,"children":6886},{"style":617},[6887],{"type":48,"value":788},{"type":43,"tag":293,"props":6889,"children":6890},{"style":611},[6891],{"type":48,"value":1506},{"type":43,"tag":293,"props":6893,"children":6894},{"style":781},[6895],{"type":48,"value":630},{"type":43,"tag":293,"props":6897,"children":6898},{"style":617},[6899],{"type":48,"value":788},{"type":43,"tag":293,"props":6901,"children":6902},{"style":611},[6903],{"type":48,"value":1240},{"type":43,"tag":293,"props":6905,"children":6906},{"style":799},[6907],{"type":48,"value":1523},{"type":43,"tag":293,"props":6909,"children":6910},{"style":611},[6911],{"type":48,"value":807},{"type":43,"tag":293,"props":6913,"children":6914},{"style":611},[6915],{"type":48,"value":690},{"type":43,"tag":293,"props":6917,"children":6918},{"style":693},[6919],{"type":48,"value":6834},{"type":43,"tag":293,"props":6921,"children":6922},{"style":611},[6923],{"type":48,"value":701},{"type":43,"tag":293,"props":6925,"children":6926},{"style":611},[6927],{"type":48,"value":680},{"type":43,"tag":293,"props":6929,"children":6930},{"style":617},[6931],{"type":48,"value":849},{"type":43,"tag":293,"props":6933,"children":6934},{"style":611},[6935],{"type":48,"value":625},{"type":43,"tag":293,"props":6937,"children":6938},{"style":617},[6939],{"type":48,"value":1407},{"type":43,"tag":293,"props":6941,"children":6942},{"style":611},[6943],{"type":48,"value":706},{"type":43,"tag":6945,"props":6946,"children":6947},"boundaries",{},[6948,6950],{"type":48,"value":6949},"\n### What You Should NOT Do\n",{"type":43,"tag":51,"props":6951,"children":6952},{},[6953,6958,6963,6975,6987],{"type":43,"tag":55,"props":6954,"children":6955},{},[6956],{"type":48,"value":6957},"Use interrupts without a checkpointer — will fail",{"type":43,"tag":55,"props":6959,"children":6960},{},[6961],{"type":48,"value":6962},"Resume without the same thread_id — creates a new thread instead of resuming",{"type":43,"tag":55,"props":6964,"children":6965},{},[6966,6968,6973],{"type":48,"value":6967},"Pass ",{"type":43,"tag":63,"props":6969,"children":6971},{"className":6970},[],[6972],{"type":48,"value":6513},{"type":48,"value":6974}," as invoke input — graph appears stuck (use plain dict)",{"type":43,"tag":55,"props":6976,"children":6977},{},[6978,6980,6985],{"type":48,"value":6979},"Perform non-idempotent side effects before ",{"type":43,"tag":63,"props":6981,"children":6983},{"className":6982},[],[6984],{"type":48,"value":90},{"type":48,"value":6986}," — creates duplicates on resume",{"type":43,"tag":55,"props":6988,"children":6989},{},[6990,6992,6997],{"type":48,"value":6991},"Assume code before ",{"type":43,"tag":63,"props":6993,"children":6995},{"className":6994},[],[6996],{"type":48,"value":90},{"type":48,"value":6998}," only runs once — it re-runs every resume\n\n",{"type":43,"tag":7000,"props":7001,"children":7002},"style",{},[7003],{"type":48,"value":7004},"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":7006,"total":3518},[7007,7028,7039,7056,7069,7084,7099,7114,7128,7138,7149,7168],{"slug":7008,"name":7008,"fn":7009,"description":7010,"org":7011,"tags":7012,"stars":7025,"repoUrl":7026,"updatedAt":7027},"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},[7013,7016,7019,7022],{"name":7014,"slug":7015,"type":14},"Marketing","marketing",{"name":7017,"slug":7018,"type":14},"Research","research",{"name":7020,"slug":7021,"type":14},"Sales","sales",{"name":7023,"slug":7024,"type":14},"Strategy","strategy",26592,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fdeepagents","2026-04-18T04:46:54.557115",{"slug":7029,"name":7029,"fn":7030,"description":7031,"org":7032,"tags":7033,"stars":7025,"repoUrl":7026,"updatedAt":7038},"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},[7034,7035],{"name":7017,"slug":7018,"type":14},{"name":7036,"slug":7037,"type":14},"Search","search","2026-05-13T06:11:01.203061",{"slug":7040,"name":7040,"fn":7041,"description":7042,"org":7043,"tags":7044,"stars":7025,"repoUrl":7026,"updatedAt":7055},"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},[7045,7048,7049,7052],{"name":7046,"slug":7047,"type":14},"Content Creation","content-creation",{"name":7014,"slug":7015,"type":14},{"name":7050,"slug":7051,"type":14},"SEO","seo",{"name":7053,"slug":7054,"type":14},"Writing","writing","2026-04-15T05:00:54.149813",{"slug":7057,"name":7057,"fn":7058,"description":7059,"org":7060,"tags":7061,"stars":7025,"repoUrl":7026,"updatedAt":7068},"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},[7062,7065,7066,7067],{"name":7063,"slug":7064,"type":14},"Competitive Intelligence","competitive-intelligence",{"name":7014,"slug":7015,"type":14},{"name":7017,"slug":7018,"type":14},{"name":7023,"slug":7024,"type":14},"2026-04-18T04:46:55.79306",{"slug":7070,"name":7070,"fn":7071,"description":7072,"org":7073,"tags":7074,"stars":7025,"repoUrl":7026,"updatedAt":7083},"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},[7075,7076,7079,7080],{"name":19,"slug":20,"type":14},{"name":7077,"slug":7078,"type":14},"Debugging","debugging",{"name":9,"slug":8,"type":14},{"name":7081,"slug":7082,"type":14},"SQLite","sqlite","2026-07-24T06:08:57.102689",{"slug":7085,"name":7085,"fn":7086,"description":7087,"org":7088,"tags":7089,"stars":7025,"repoUrl":7026,"updatedAt":7098},"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},[7090,7091,7094,7095],{"name":19,"slug":20,"type":14},{"name":7092,"slug":7093,"type":14},"Documentation","documentation",{"name":16,"slug":17,"type":14},{"name":7096,"slug":7097,"type":14},"Multi-Agent","multi-agent","2026-05-13T06:11:03.650877",{"slug":7100,"name":7100,"fn":7101,"description":7102,"org":7103,"tags":7104,"stars":7025,"repoUrl":7026,"updatedAt":7113},"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},[7105,7106,7107,7110],{"name":19,"slug":20,"type":14},{"name":7092,"slug":7093,"type":14},{"name":7108,"slug":7109,"type":14},"Knowledge Management","knowledge-management",{"name":7111,"slug":7112,"type":14},"Memory","memory","2026-05-13T06:10:58.510037",{"slug":7115,"name":7115,"fn":7116,"description":7117,"org":7118,"tags":7119,"stars":7025,"repoUrl":7026,"updatedAt":7127},"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},[7120,7121,7124],{"name":19,"slug":20,"type":14},{"name":7122,"slug":7123,"type":14},"Engineering","engineering",{"name":7125,"slug":7126,"type":14},"Plugin Development","plugin-development","2026-05-13T06:10:59.88449",{"slug":7129,"name":7129,"fn":7130,"description":7131,"org":7132,"tags":7133,"stars":7025,"repoUrl":7026,"updatedAt":7137},"social-media","create optimized social media posts","Create social media posts optimized for engagement across platforms.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7134,7135,7136],{"name":7046,"slug":7047,"type":14},{"name":7014,"slug":7015,"type":14},{"name":7053,"slug":7054,"type":14},"2026-04-15T05:00:55.37452",{"slug":7139,"name":7139,"fn":7140,"description":7141,"org":7142,"tags":7143,"stars":7025,"repoUrl":7026,"updatedAt":7148},"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},[7144,7145,7146,7147],{"name":19,"slug":20,"type":14},{"name":7096,"slug":7097,"type":14},{"name":7017,"slug":7018,"type":14},{"name":7036,"slug":7037,"type":14},"2026-05-13T06:11:04.930044",{"slug":7150,"name":7150,"fn":7151,"description":7152,"org":7153,"tags":7154,"stars":7165,"repoUrl":7166,"updatedAt":7167},"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},[7155,7158,7159,7162],{"name":7156,"slug":7157,"type":14},"Diagrams","diagrams",{"name":7092,"slug":7093,"type":14},{"name":7160,"slug":7161,"type":14},"Markdown","markdown",{"name":7163,"slug":7164,"type":14},"Technical Writing","technical-writing",12181,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fopenwiki","2026-07-24T06:09:01.089597",{"slug":7169,"name":7169,"fn":7170,"description":7171,"org":7172,"tags":7173,"stars":7165,"repoUrl":7166,"updatedAt":7180},"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},[7174,7177],{"name":7175,"slug":7176,"type":14},"API Development","api-development",{"name":7178,"slug":7179,"type":14},"Integrations","integrations","2026-07-18T05:48:23.961804",{"items":7182,"total":484},[7183,7198,7211,7223,7234,7245,7259],{"slug":7184,"name":7184,"fn":7185,"description":7186,"org":7187,"tags":7188,"stars":27,"repoUrl":28,"updatedAt":7197},"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},[7189,7190,7193,7194],{"name":19,"slug":20,"type":14},{"name":7191,"slug":7192,"type":14},"Architecture","architecture",{"name":9,"slug":8,"type":14},{"name":7195,"slug":7196,"type":14},"LLM","llm","2026-04-06T18:26:24.822592",{"slug":7199,"name":7199,"fn":7200,"description":7201,"org":7202,"tags":7203,"stars":27,"repoUrl":28,"updatedAt":7210},"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},[7204,7205,7206,7207],{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":7111,"slug":7112,"type":14},{"name":7208,"slug":7209,"type":14},"Storage","storage","2026-04-06T18:26:26.065654",{"slug":7212,"name":7212,"fn":7213,"description":7214,"org":7215,"tags":7216,"stars":27,"repoUrl":28,"updatedAt":7222},"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},[7217,7218,7219,7220,7221],{"name":19,"slug":20,"type":14},{"name":22,"slug":23,"type":14},{"name":9,"slug":8,"type":14},{"name":7096,"slug":7097,"type":14},{"name":25,"slug":26,"type":14},"2026-04-06T18:26:32.280463",{"slug":7224,"name":7224,"fn":7225,"description":7226,"org":7227,"tags":7228,"stars":27,"repoUrl":28,"updatedAt":7233},"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},[7229,7230,7231],{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":7232,"slug":277,"type":14},"Python","2026-07-24T06:09:00.291108",{"slug":7235,"name":7235,"fn":7236,"description":7237,"org":7238,"tags":7239,"stars":27,"repoUrl":28,"updatedAt":7244},"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},[7240,7241,7242],{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":7243,"slug":588,"type":14},"TypeScript","2026-07-24T06:09:00.673714",{"slug":7246,"name":7246,"fn":7247,"description":7248,"org":7249,"tags":7250,"stars":27,"repoUrl":28,"updatedAt":7258},"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},[7251,7252,7255,7256,7257],{"name":19,"slug":20,"type":14},{"name":7253,"slug":7254,"type":14},"AI Infrastructure","ai-infrastructure",{"name":7191,"slug":7192,"type":14},{"name":9,"slug":8,"type":14},{"name":16,"slug":17,"type":14},"2026-07-24T05:42:48.348966",{"slug":7260,"name":7260,"fn":7261,"description":7262,"org":7263,"tags":7264,"stars":27,"repoUrl":28,"updatedAt":7276},"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},[7265,7266,7269,7272,7273],{"name":19,"slug":20,"type":14},{"name":7267,"slug":7268,"type":14},"Code Analysis","code-analysis",{"name":7270,"slug":7271,"type":14},"Evals","evals",{"name":9,"slug":8,"type":14},{"name":7274,"slug":7275,"type":14},"Testing","testing","2026-07-31T05:53:29.552458"]