[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-langchain-langgraph-fundamentals":3,"mdc--gzfjse-key":34,"related-org-langchain-langgraph-fundamentals":10847,"related-repo-langchain-langgraph-fundamentals":11022},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":32,"mdContent":33},"langgraph-fundamentals","build stateful agents with LangGraph","INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"langchain","LangChain","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Flangchain.png","langchain-ai",[13,17,18,21],{"name":14,"slug":15,"type":16},"LLM","llm","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"LangGraph","langgraph",{"name":22,"slug":23,"type":16},"Agents","agents",877,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills","2026-04-06T18:26:37.326665",null,77,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":27},[],"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills\u002Ftree\u002FHEAD\u002Fconfig\u002Fskills\u002Flanggraph-fundamentals","---\nname: langgraph-fundamentals\ndescription: \"INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.\"\n---\n\n\u003Coverview>\nLangGraph models agent workflows as **directed graphs**:\n\n- **StateGraph**: Main class for building stateful graphs\n- **Nodes**: Functions that perform work and update state\n- **Edges**: Define execution order (static or conditional)\n- **START\u002FEND**: Special nodes marking entry and exit points\n- **State with Reducers**: Control how state updates are merged\n\nGraphs must be `compile()`d before execution.\n\u003C\u002Foverview>\n\n\u003Cdesign-methodology>\n\n### Designing a LangGraph application\n\nFollow these 5 steps when building a new graph:\n\n1. **Map out discrete steps** — sketch a flowchart of your workflow. Each step becomes a node.\n2. **Identify what each step does** — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context (prompt), dynamic context (from state), retry strategy, and desired outcome.\n3. **Design your state** — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.\n4. **Build your nodes** — implement each step as a function that takes state and returns partial updates.\n5. **Wire it together** — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.\n\n\u003C\u002Fdesign-methodology>\n\n\u003Cwhen-to-use-langgraph>\n\n| Use LangGraph When | Use Alternatives When |\n|-------------------|----------------------|\n| Need fine-grained control over agent orchestration | Quick prototyping → LangChain agents |\n| Building complex workflows with branching\u002Floops | Simple stateless workflows → LangChain direct |\n| Require human-in-the-loop, persistence | Batteries-included features → Deep Agents |\n\n\u003C\u002Fwhen-to-use-langgraph>\n\n---\n\n## State Management\n\n\u003Cstate-update-strategies>\n\n| Need | Solution | Example |\n|------|----------|---------|\n| Overwrite value | No reducer (default) | Simple fields like counters |\n| Append to list | Reducer (operator.add \u002F concat) | Message history, logs |\n| Custom logic | Custom reducer function | Complex merging |\n\n\u003C\u002Fstate-update-strategies>\n\n\u003Cex-state-with-reducer>\n\u003Cpython>\nDefine state schema with reducers for accumulating lists and summing integers.\n\n```python\nfrom typing_extensions import TypedDict, Annotated\nimport operator\n\nclass State(TypedDict):\n    name: str  # Default: overwrites on update\n    messages: Annotated[list, operator.add]  # Appends to list\n    total: Annotated[int, operator.add]  # Sums integers\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse StateSchema with ReducedValue for accumulating arrays.\n\n```typescript\nimport { StateSchema, ReducedValue, MessagesValue } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  name: z.string(),  \u002F\u002F Default: overwrites\n  messages: MessagesValue,  \u002F\u002F Built-in for messages\n  items: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (current, update) => current.concat(update) }\n  ),\n});\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-state-with-reducer>\n\n\u003Cfix-forgot-reducer-for-list>\n\u003Cpython>\nWithout a reducer, returning a list overwrites previous values.\n\n```python\n# WRONG: List will be OVERWRITTEN\nclass State(TypedDict):\n    messages: list  # No reducer!\n\n# Node 1 returns: {\"messages\": [\"A\"]}\n# Node 2 returns: {\"messages\": [\"B\"]}\n# Final: {\"messages\": [\"B\"]}  # \"A\" is LOST!\n\n# CORRECT: Use Annotated with operator.add\nfrom typing import Annotated\nimport operator\n\nclass State(TypedDict):\n    messages: Annotated[list, operator.add]\n# Final: {\"messages\": [\"A\", \"B\"]}\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nWithout ReducedValue, arrays are overwritten not appended.\n\n```typescript\n\u002F\u002F WRONG: Array will be overwritten\nconst State = new StateSchema({\n  items: z.array(z.string()),  \u002F\u002F No reducer!\n});\n\u002F\u002F Node 1: { items: [\"A\"] }, Node 2: { items: [\"B\"] }\n\u002F\u002F Final: { items: [\"B\"] }  \u002F\u002F A is lost!\n\n\u002F\u002F CORRECT: Use ReducedValue\nconst State = new StateSchema({\n  items: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (current, update) => current.concat(update) }\n  ),\n});\n\u002F\u002F Final: { items: [\"A\", \"B\"] }\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-forgot-reducer-for-list>\n\n\u003Cfix-state-must-return-dict>\n\u003Cpython>\nNodes must return partial updates, not mutate and return full state.\n\n```python\n# WRONG: Returning entire state object\ndef my_node(state: State) -> State:\n    state[\"field\"] = \"updated\"\n    return state  # Don't mutate and return!\n\n# CORRECT: Return dict with only the updates\ndef my_node(state: State) -> dict:\n    return {\"field\": \"updated\"}\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nReturn partial updates only, not the full state object.\n\n```typescript\n\u002F\u002F WRONG: Returning entire state\nconst myNode = async (state: typeof State.State) => {\n  state.field = \"updated\";\n  return state;  \u002F\u002F Don't do this!\n};\n\n\u002F\u002F CORRECT: Return partial updates\nconst myNode = async (state: typeof State.State) => {\n  return { field: \"updated\" };\n};\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-state-must-return-dict>\n\n---\n\n## Nodes\n\n\u003Cnode-function-signatures>\n\nNode functions accept these arguments:\n\n\u003Cpython>\n\n| Signature | When to Use |\n|-----------|-------------|\n| `def node(state: State)` | Simple nodes that only need state |\n| `def node(state: State, config: RunnableConfig)` | Need thread_id, tags, or configurable values |\n| `def node(state: State, runtime: Runtime[Context])` | Need runtime context, store, or stream_writer |\n\n```python\nfrom langchain_core.runnables import RunnableConfig\nfrom langgraph.runtime import Runtime\n\ndef plain_node(state: State):\n    return {\"results\": \"done\"}\n\ndef node_with_config(state: State, config: RunnableConfig):\n    thread_id = config[\"configurable\"][\"thread_id\"]\n    return {\"results\": f\"Thread: {thread_id}\"}\n\ndef node_with_runtime(state: State, runtime: Runtime[Context]):\n    user_id = runtime.context.user_id\n    return {\"results\": f\"User: {user_id}\"}\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\n\n| Signature | When to Use |\n|-----------|-------------|\n| `(state) => {...}` | Simple nodes that only need state |\n| `(state, config) => {...}` | Need thread_id, tags, or configurable values |\n\n```typescript\nimport { GraphNode, StateSchema } from \"@langchain\u002Flanggraph\";\n\nconst plainNode: GraphNode\u003Ctypeof State> = (state) => {\n  return { results: \"done\" };\n};\n\nconst nodeWithConfig: GraphNode\u003Ctypeof State> = (state, config) => {\n  const threadId = config?.configurable?.thread_id;\n  return { results: `Thread: ${threadId}` };\n};\n```\n\u003C\u002Ftypescript>\n\n\u003C\u002Fnode-function-signatures>\n\n---\n\n## Edges\n\n\u003Cedge-type-selection>\n\n| Need | Edge Type | When to Use |\n|------|-----------|-------------|\n| Always go to same node | `add_edge()` | Fixed, deterministic flow |\n| Route based on state | `add_conditional_edges()` | Dynamic branching |\n| Update state AND route | `Command` | Combine logic in single node |\n| Fan-out to multiple nodes | `Send` | Parallel processing with dynamic inputs |\n\n\u003C\u002Fedge-type-selection>\n\n\u003Cex-basic-graph>\n\u003Cpython>\nSimple two-node graph with linear edges.\n\n```python\nfrom langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict\n\nclass State(TypedDict):\n    input: str\n    output: str\n\ndef process_input(state: State) -> dict:\n    return {\"output\": f\"Processed: {state['input']}\"}\n\ndef finalize(state: State) -> dict:\n    return {\"output\": state[\"output\"].upper()}\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"process\", process_input)\n    .add_node(\"finalize\", finalize)\n    .add_edge(START, \"process\")\n    .add_edge(\"process\", \"finalize\")\n    .add_edge(\"finalize\", END)\n    .compile()\n)\n\nresult = graph.invoke({\"input\": \"hello\"})\nprint(result[\"output\"])  # \"PROCESSED: HELLO\"\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nChain nodes with addEdge and compile before invoking.\n\n```typescript\nimport { StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  input: z.string(),\n  output: z.string().default(\"\"),\n});\n\nconst processInput = async (state: typeof State.State) => {\n  return { output: `Processed: ${state.input}` };\n};\n\nconst finalize = async (state: typeof State.State) => {\n  return { output: state.output.toUpperCase() };\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"process\", processInput)\n  .addNode(\"finalize\", finalize)\n  .addEdge(START, \"process\")\n  .addEdge(\"process\", \"finalize\")\n  .addEdge(\"finalize\", END)\n  .compile();\n\nconst result = await graph.invoke({ input: \"hello\" });\nconsole.log(result.output);  \u002F\u002F \"PROCESSED: HELLO\"\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-basic-graph>\n\n\u003Cex-conditional-edges>\n\u003Cpython>\nRoute to different nodes based on state with conditional edges.\n\n```python\nfrom typing import Literal\nfrom langgraph.graph import StateGraph, START, END\n\nclass State(TypedDict):\n    query: str\n    route: str\n    result: str\n\ndef classify(state: State) -> dict:\n    if \"weather\" in state[\"query\"].lower():\n        return {\"route\": \"weather\"}\n    return {\"route\": \"general\"}\n\ndef route_query(state: State) -> Literal[\"weather\", \"general\"]:\n    return state[\"route\"]\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"classify\", classify)\n    .add_node(\"weather\", lambda s: {\"result\": \"Sunny, 72F\"})\n    .add_node(\"general\", lambda s: {\"result\": \"General response\"})\n    .add_edge(START, \"classify\")\n    .add_conditional_edges(\"classify\", route_query, [\"weather\", \"general\"])\n    .add_edge(\"weather\", END)\n    .add_edge(\"general\", END)\n    .compile()\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\naddConditionalEdges routes based on function return value.\n\n```typescript\nimport { StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  query: z.string(),\n  route: z.string().default(\"\"),\n  result: z.string().default(\"\"),\n});\n\nconst classify = async (state: typeof State.State) => {\n  if (state.query.toLowerCase().includes(\"weather\")) {\n    return { route: \"weather\" };\n  }\n  return { route: \"general\" };\n};\n\nconst routeQuery = (state: typeof State.State) => state.route;\n\nconst graph = new StateGraph(State)\n  .addNode(\"classify\", classify)\n  .addNode(\"weather\", async () => ({ result: \"Sunny, 72F\" }))\n  .addNode(\"general\", async () => ({ result: \"General response\" }))\n  .addEdge(START, \"classify\")\n  .addConditionalEdges(\"classify\", routeQuery, [\"weather\", \"general\"])\n  .addEdge(\"weather\", END)\n  .addEdge(\"general\", END)\n  .compile();\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-conditional-edges>\n\n---\n\n## Command\n\nCommand combines state updates and routing in a single return value. Fields:\n- **`update`**: State updates to apply (like returning a dict from a node)\n- **`goto`**: Node name(s) to navigate to next\n- **`resume`**: Value to resume after `interrupt()` — see human-in-the-loop skill\n\n\u003Cex-command-state-and-routing>\n\u003Cpython>\nCommand lets you update state AND choose next node in one return.\n\n```python\nfrom langgraph.types import Command\nfrom typing import Literal\n\nclass State(TypedDict):\n    count: int\n    result: str\n\ndef node_a(state: State) -> Command[Literal[\"node_b\", \"node_c\"]]:\n    \"\"\"Update state AND decide next node in one return.\"\"\"\n    new_count = state[\"count\"] + 1\n    if new_count > 5:\n        return Command(update={\"count\": new_count}, goto=\"node_c\")\n    return Command(update={\"count\": new_count}, goto=\"node_b\")\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"node_a\", node_a)\n    .add_node(\"node_b\", lambda s: {\"result\": \"B\"})\n    .add_node(\"node_c\", lambda s: {\"result\": \"C\"})\n    .add_edge(START, \"node_a\")\n    .add_edge(\"node_b\", END)\n    .add_edge(\"node_c\", END)\n    .compile()\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nReturn Command with update and goto to combine state change with routing.\n\n```typescript\nimport { StateGraph, StateSchema, START, END, Command } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  count: z.number().default(0),\n  result: z.string().default(\"\"),\n});\n\nconst nodeA = async (state: typeof State.State) => {\n  const newCount = state.count + 1;\n  if (newCount > 5) {\n    return new Command({ update: { count: newCount }, goto: \"node_c\" });\n  }\n  return new Command({ update: { count: newCount }, goto: \"node_b\" });\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"node_a\", nodeA, { ends: [\"node_b\", \"node_c\"] })\n  .addNode(\"node_b\", async () => ({ result: \"B\" }))\n  .addNode(\"node_c\", async () => ({ result: \"C\" }))\n  .addEdge(START, \"node_a\")\n  .addEdge(\"node_b\", END)\n  .addEdge(\"node_c\", END)\n  .compile();\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-command-state-and-routing>\n\n\u003Ccommand-return-type-annotations>\n\n**Python**: Use `Command[Literal[\"node_a\", \"node_b\"]]` as the return type annotation to declare valid goto destinations.\n\n**TypeScript**: Pass `{ ends: [\"node_a\", \"node_b\"] }` as the third argument to `addNode` to declare valid goto destinations.\n\n\u003C\u002Fcommand-return-type-annotations>\n\n\u003Cwarning-command-static-edges>\n\n**Warning**: `Command` only adds **dynamic** edges — static edges defined with `add_edge` \u002F `addEdge` still execute. If `node_a` returns `Command(goto=\"node_c\")` and you also have `graph.add_edge(\"node_a\", \"node_b\")`, **both** `node_b` and `node_c` will run.\n\n\u003C\u002Fwarning-command-static-edges>\n\n---\n\n## Send API\n\nFan-out with `Send`: return `[Send(\"worker\", {...})]` from a conditional edge to spawn parallel workers. Requires a reducer on the results field.\n\n\u003Cex-orchestrator-worker>\n\u003Cpython>\nFan out tasks to parallel workers using the Send API and aggregate results.\n\n```python\nfrom langgraph.types import Send\nfrom typing import Annotated\nimport operator\n\nclass OrchestratorState(TypedDict):\n    tasks: list[str]\n    results: Annotated[list, operator.add]\n    summary: str\n\ndef orchestrator(state: OrchestratorState):\n    \"\"\"Fan out tasks to workers.\"\"\"\n    return [Send(\"worker\", {\"task\": task}) for task in state[\"tasks\"]]\n\ndef worker(state: dict) -> dict:\n    return {\"results\": [f\"Completed: {state['task']}\"]}\n\ndef synthesize(state: OrchestratorState) -> dict:\n    return {\"summary\": f\"Processed {len(state['results'])} tasks\"}\n\ngraph = (\n    StateGraph(OrchestratorState)\n    .add_node(\"worker\", worker)\n    .add_node(\"synthesize\", synthesize)\n    .add_conditional_edges(START, orchestrator, [\"worker\"])\n    .add_edge(\"worker\", \"synthesize\")\n    .add_edge(\"synthesize\", END)\n    .compile()\n)\n\nresult = graph.invoke({\"tasks\": [\"Task A\", \"Task B\", \"Task C\"]})\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nFan out tasks to parallel workers using the Send API and aggregate results.\n\n```typescript\nimport { Send, StateGraph, StateSchema, ReducedValue, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  tasks: z.array(z.string()),\n  results: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (curr, upd) => curr.concat(upd) }\n  ),\n  summary: z.string().default(\"\"),\n});\n\nconst orchestrator = (state: typeof State.State) => {\n  return state.tasks.map((task) => new Send(\"worker\", { task }));\n};\n\nconst worker = async (state: { task: string }) => {\n  return { results: [`Completed: ${state.task}`] };\n};\n\nconst synthesize = async (state: typeof State.State) => {\n  return { summary: `Processed ${state.results.length} tasks` };\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"worker\", worker)\n  .addNode(\"synthesize\", synthesize)\n  .addConditionalEdges(START, orchestrator, [\"worker\"])\n  .addEdge(\"worker\", \"synthesize\")\n  .addEdge(\"synthesize\", END)\n  .compile();\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-orchestrator-worker>\n\n\u003Cfix-send-accumulator>\n\u003Cpython>\nUse a reducer to accumulate parallel worker results (otherwise last worker overwrites).\n\n```python\n# WRONG: No reducer - last worker overwrites\nclass State(TypedDict):\n    results: list\n\n# CORRECT\nclass State(TypedDict):\n    results: Annotated[list, operator.add]  # Accumulates\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse ReducedValue to accumulate parallel worker results.\n\n```typescript\n\u002F\u002F WRONG: No reducer\nconst State = new StateSchema({ results: z.array(z.string()) });\n\n\u002F\u002F CORRECT\nconst State = new StateSchema({\n  results: new ReducedValue(z.array(z.string()).default(() => []), { reducer: (curr, upd) => curr.concat(upd) }),\n});\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-send-accumulator>\n\n---\n\n## Running Graphs: Invoke and Stream\n\n\u003Cinvoke-basics>\n\nCall `graph.invoke(input, config)` to run a graph to completion and return the final state.\n\n\u003Cpython>\n\n```python\nresult = graph.invoke({\"input\": \"hello\"})\n# With config (for persistence, tags, etc.)\nresult = graph.invoke({\"input\": \"hello\"}, {\"configurable\": {\"thread_id\": \"1\"}})\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\n\n```typescript\nconst result = await graph.invoke({ input: \"hello\" });\n\u002F\u002F With config\nconst result = await graph.invoke({ input: \"hello\" }, { configurable: { thread_id: \"1\" } });\n```\n\u003C\u002Ftypescript>\n\n\u003C\u002Finvoke-basics>\n\n\u003Cstream-mode-selection>\n\n| Mode | What it Streams | Use Case |\n|------|----------------|----------|\n| `values` | Full state after each step | Monitor complete state |\n| `updates` | State deltas | Track incremental updates |\n| `messages` | LLM tokens + metadata | Chat UIs |\n| `custom` | User-defined data | Progress indicators |\n\n\u003C\u002Fstream-mode-selection>\n\n\u003Cex-stream-llm-tokens>\n\u003Cpython>\nStream LLM tokens in real-time for chat UI display.\n\n```python\nfor chunk in graph.stream(\n    {\"messages\": [HumanMessage(\"Hello\")]},\n    stream_mode=\"messages\"\n):\n    token, metadata = chunk\n    if hasattr(token, \"content\"):\n        print(token.content, end=\"\", flush=True)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nStream LLM tokens in real-time for chat UI display.\n\n```typescript\nfor await (const chunk of graph.stream(\n  { messages: [new HumanMessage(\"Hello\")] },\n  { streamMode: \"messages\" }\n)) {\n  const [token, metadata] = chunk;\n  if (token.content) {\n    process.stdout.write(token.content);\n  }\n}\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-stream-llm-tokens>\n\n\u003Cex-stream-custom-data>\n\u003Cpython>\nEmit custom progress updates from within nodes using the stream writer.\n\n```python\nfrom langgraph.config import get_stream_writer\n\ndef my_node(state):\n    writer = get_stream_writer()\n    writer(\"Processing step 1...\")\n    # Do work\n    writer(\"Complete!\")\n    return {\"result\": \"done\"}\n\nfor chunk in graph.stream({\"data\": \"test\"}, stream_mode=\"custom\"):\n    print(chunk)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nEmit custom progress updates from within nodes using the stream writer.\n\n```typescript\nimport { getWriter } from \"@langchain\u002Flanggraph\";\n\nconst myNode = async (state: typeof State.State) => {\n  const writer = getWriter();\n  writer(\"Processing step 1...\");\n  \u002F\u002F Do work\n  writer(\"Complete!\");\n  return { result: \"done\" };\n};\n\nfor await (const chunk of graph.stream({ data: \"test\" }, { streamMode: \"custom\" })) {\n  console.log(chunk);\n}\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-stream-custom-data>\n\n---\n\n## Error Handling\n\nMatch the error type to the right handler:\n\n\u003Cerror-handling-table>\n\n| Error Type | Who Fixes | Strategy | Example |\n|---|---|---|---|\n| Transient (network, rate limits) | System | `RetryPolicy(max_attempts=3)` | `add_node(..., retry_policy=...)` |\n| LLM-recoverable (tool failures) | LLM | `ToolNode(tools, handle_tool_errors=True)` | Error returned as ToolMessage |\n| User-fixable (missing info) | Human | `interrupt({\"message\": ...})` | Collect missing data (see HITL skill) |\n| Unexpected | Developer | Let bubble up | `raise` |\n\n\u003C\u002Ferror-handling-table>\n\n\u003Cex-retry-policy>\n\u003Cpython>\nUse RetryPolicy for transient errors (network issues, rate limits).\n\n```python\nfrom langgraph.types import RetryPolicy\n\nworkflow.add_node(\n    \"search_documentation\",\n    search_documentation,\n    retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0)\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse retryPolicy for transient errors.\n\n```typescript\nworkflow.addNode(\n  \"searchDocumentation\",\n  searchDocumentation,\n  {\n    retryPolicy: { maxAttempts: 3, initialInterval: 1.0 },\n  },\n);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-retry-policy>\n\n\u003Cex-tool-node-error-handling>\n\u003Cpython>\nUse ToolNode from langgraph.prebuilt to handle tool execution and errors. When handle_tool_errors=True, errors are returned as ToolMessages so the LLM can recover.\n\n```python\nfrom langgraph.prebuilt import ToolNode\n\ntool_node = ToolNode(tools, handle_tool_errors=True)\n\nworkflow.add_node(\"tools\", tool_node)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse ToolNode from @langchain\u002Flanggraph\u002Fprebuilt to handle tool execution and errors. When handleToolErrors is true, errors are returned as ToolMessages so the LLM can recover.\n\n```typescript\nimport { ToolNode } from \"@langchain\u002Flanggraph\u002Fprebuilt\";\n\nconst toolNode = new ToolNode(tools, { handleToolErrors: true });\n\nworkflow.addNode(\"tools\", toolNode);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-tool-node-error-handling>\n\n---\n\n## Common Fixes\n\n\u003Cfix-compile-before-execution>\n\u003Cpython>\nMust compile() to get executable graph.\n\n```python\n# WRONG\nbuilder.invoke({\"input\": \"test\"})  # AttributeError!\n\n# CORRECT\ngraph = builder.compile()\ngraph.invoke({\"input\": \"test\"})\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nMust compile() to get executable graph.\n\n```typescript\n\u002F\u002F WRONG\nawait builder.invoke({ input: \"test\" });\n\n\u002F\u002F CORRECT\nconst graph = builder.compile();\nawait graph.invoke({ input: \"test\" });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-compile-before-execution>\n\n\u003Cfix-infinite-loop-needs-exit>\n\u003Cpython>\nProvide conditional path to END to avoid infinite loops.\n\n```python\n# WRONG: Loops forever\nbuilder.add_edge(\"node_a\", \"node_b\")\nbuilder.add_edge(\"node_b\", \"node_a\")\n\n# CORRECT\ndef should_continue(state):\n    return END if state[\"count\"] > 10 else \"node_b\"\nbuilder.add_conditional_edges(\"node_a\", should_continue)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse conditional edges with END return to break loops.\n\n```typescript\n\u002F\u002F WRONG: Loops forever\nbuilder.addEdge(\"node_a\", \"node_b\").addEdge(\"node_b\", \"node_a\");\n\n\u002F\u002F CORRECT\nbuilder.addConditionalEdges(\"node_a\", (state) => state.count > 10 ? END : \"node_b\");\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-infinite-loop-needs-exit>\n\n\u003Cfix-common-mistakes>\nOther common mistakes:\n\n```python\n# Router must return names of nodes that exist in the graph\nbuilder.add_node(\"my_node\", func)  # Add node BEFORE referencing in edges\nbuilder.add_conditional_edges(\"node_a\", router, [\"my_node\"])\n\n# Command return type needs Literal for routing destinations (Python)\ndef node_a(state) -> Command[Literal[\"node_b\", \"node_c\"]]:\n    return Command(goto=\"node_b\")\n\n# START is entry-only - cannot route back to it\nbuilder.add_edge(\"node_a\", START)  # WRONG!\nbuilder.add_edge(\"node_a\", \"entry\")  # Use a named entry node instead\n\n# Reducer expects matching types\nreturn {\"items\": [\"item\"]}  # List for list reducer, not a string\n```\n\n```typescript\n\u002F\u002F Always await graph.invoke() - it returns a Promise\nconst result = await graph.invoke({ input: \"test\" });\n\n\u002F\u002F TS Command nodes need { ends } to declare routing destinations\nbuilder.addNode(\"router\", routerFn, { ends: [\"node_b\", \"node_c\"] });\n```\n\u003C\u002Ffix-common-mistakes>\n\n\u003Cboundaries>\n### What You Should NOT Do\n\n- Mutate state directly — always return partial update dicts from nodes\n- Route back to START — it's entry-only; use a named node instead\n- Forget reducers on list fields — without one, last write wins\n- Mix static edges with Command goto without understanding both will execute\n\u003C\u002Fboundaries>\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,10841],{"type":40,"tag":41,"props":42,"children":43},"element","overview",{},[44,47,103,118,188,259,263,270,355,875,1365,1718,1721,1726,2310,2313,2318,2435,3540,4807,4810,4815,4820,4873,6100,6147,6234,6237,6243,6263,7658,8027,8030,8036,8293,8412,8783,9301,9304,9310,9315,9461,9676,9906,9909,9915,10165,10484,10812],{"type":45,"value":46},"text","\nLangGraph models agent workflows as **directed graphs**:\n",{"type":40,"tag":48,"props":49,"children":50},"ul",{},[51,63,73,83,93],{"type":40,"tag":52,"props":53,"children":54},"li",{},[55,61],{"type":40,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":45,"value":60},"StateGraph",{"type":45,"value":62},": Main class for building stateful graphs",{"type":40,"tag":52,"props":64,"children":65},{},[66,71],{"type":40,"tag":56,"props":67,"children":68},{},[69],{"type":45,"value":70},"Nodes",{"type":45,"value":72},": Functions that perform work and update state",{"type":40,"tag":52,"props":74,"children":75},{},[76,81],{"type":40,"tag":56,"props":77,"children":78},{},[79],{"type":45,"value":80},"Edges",{"type":45,"value":82},": Define execution order (static or conditional)",{"type":40,"tag":52,"props":84,"children":85},{},[86,91],{"type":40,"tag":56,"props":87,"children":88},{},[89],{"type":45,"value":90},"START\u002FEND",{"type":45,"value":92},": Special nodes marking entry and exit points",{"type":40,"tag":52,"props":94,"children":95},{},[96,101],{"type":40,"tag":56,"props":97,"children":98},{},[99],{"type":45,"value":100},"State with Reducers",{"type":45,"value":102},": Control how state updates are merged",{"type":40,"tag":104,"props":105,"children":106},"p",{},[107,109,116],{"type":45,"value":108},"Graphs must be ",{"type":40,"tag":110,"props":111,"children":113},"code",{"className":112},[],[114],{"type":45,"value":115},"compile()",{"type":45,"value":117},"d before execution.\n",{"type":40,"tag":119,"props":120,"children":121},"design-methodology",{},[122,129,134],{"type":40,"tag":123,"props":124,"children":126},"h3",{"id":125},"designing-a-langgraph-application",[127],{"type":45,"value":128},"Designing a LangGraph application",{"type":40,"tag":104,"props":130,"children":131},{},[132],{"type":45,"value":133},"Follow these 5 steps when building a new graph:",{"type":40,"tag":135,"props":136,"children":137},"ol",{},[138,148,158,168,178],{"type":40,"tag":52,"props":139,"children":140},{},[141,146],{"type":40,"tag":56,"props":142,"children":143},{},[144],{"type":45,"value":145},"Map out discrete steps",{"type":45,"value":147}," — sketch a flowchart of your workflow. Each step becomes a node.",{"type":40,"tag":52,"props":149,"children":150},{},[151,156],{"type":40,"tag":56,"props":152,"children":153},{},[154],{"type":45,"value":155},"Identify what each step does",{"type":45,"value":157}," — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context (prompt), dynamic context (from state), retry strategy, and desired outcome.",{"type":40,"tag":52,"props":159,"children":160},{},[161,166],{"type":40,"tag":56,"props":162,"children":163},{},[164],{"type":45,"value":165},"Design your state",{"type":45,"value":167}," — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.",{"type":40,"tag":52,"props":169,"children":170},{},[171,176],{"type":40,"tag":56,"props":172,"children":173},{},[174],{"type":45,"value":175},"Build your nodes",{"type":45,"value":177}," — implement each step as a function that takes state and returns partial updates.",{"type":40,"tag":52,"props":179,"children":180},{},[181,186],{"type":40,"tag":56,"props":182,"children":183},{},[184],{"type":45,"value":185},"Wire it together",{"type":45,"value":187}," — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.",{"type":40,"tag":189,"props":190,"children":191},"when-to-use-langgraph",{},[192],{"type":40,"tag":193,"props":194,"children":195},"table",{},[196,215],{"type":40,"tag":197,"props":198,"children":199},"thead",{},[200],{"type":40,"tag":201,"props":202,"children":203},"tr",{},[204,210],{"type":40,"tag":205,"props":206,"children":207},"th",{},[208],{"type":45,"value":209},"Use LangGraph When",{"type":40,"tag":205,"props":211,"children":212},{},[213],{"type":45,"value":214},"Use Alternatives When",{"type":40,"tag":216,"props":217,"children":218},"tbody",{},[219,233,246],{"type":40,"tag":201,"props":220,"children":221},{},[222,228],{"type":40,"tag":223,"props":224,"children":225},"td",{},[226],{"type":45,"value":227},"Need fine-grained control over agent orchestration",{"type":40,"tag":223,"props":229,"children":230},{},[231],{"type":45,"value":232},"Quick prototyping → LangChain agents",{"type":40,"tag":201,"props":234,"children":235},{},[236,241],{"type":40,"tag":223,"props":237,"children":238},{},[239],{"type":45,"value":240},"Building complex workflows with branching\u002Floops",{"type":40,"tag":223,"props":242,"children":243},{},[244],{"type":45,"value":245},"Simple stateless workflows → LangChain direct",{"type":40,"tag":201,"props":247,"children":248},{},[249,254],{"type":40,"tag":223,"props":250,"children":251},{},[252],{"type":45,"value":253},"Require human-in-the-loop, persistence",{"type":40,"tag":223,"props":255,"children":256},{},[257],{"type":45,"value":258},"Batteries-included features → Deep Agents",{"type":40,"tag":260,"props":261,"children":262},"hr",{},[],{"type":40,"tag":264,"props":265,"children":267},"h2",{"id":266},"state-management",[268],{"type":45,"value":269},"State Management",{"type":40,"tag":271,"props":272,"children":273},"state-update-strategies",{},[274],{"type":40,"tag":193,"props":275,"children":276},{},[277,298],{"type":40,"tag":197,"props":278,"children":279},{},[280],{"type":40,"tag":201,"props":281,"children":282},{},[283,288,293],{"type":40,"tag":205,"props":284,"children":285},{},[286],{"type":45,"value":287},"Need",{"type":40,"tag":205,"props":289,"children":290},{},[291],{"type":45,"value":292},"Solution",{"type":40,"tag":205,"props":294,"children":295},{},[296],{"type":45,"value":297},"Example",{"type":40,"tag":216,"props":299,"children":300},{},[301,319,337],{"type":40,"tag":201,"props":302,"children":303},{},[304,309,314],{"type":40,"tag":223,"props":305,"children":306},{},[307],{"type":45,"value":308},"Overwrite value",{"type":40,"tag":223,"props":310,"children":311},{},[312],{"type":45,"value":313},"No reducer (default)",{"type":40,"tag":223,"props":315,"children":316},{},[317],{"type":45,"value":318},"Simple fields like counters",{"type":40,"tag":201,"props":320,"children":321},{},[322,327,332],{"type":40,"tag":223,"props":323,"children":324},{},[325],{"type":45,"value":326},"Append to list",{"type":40,"tag":223,"props":328,"children":329},{},[330],{"type":45,"value":331},"Reducer (operator.add \u002F concat)",{"type":40,"tag":223,"props":333,"children":334},{},[335],{"type":45,"value":336},"Message history, logs",{"type":40,"tag":201,"props":338,"children":339},{},[340,345,350],{"type":40,"tag":223,"props":341,"children":342},{},[343],{"type":45,"value":344},"Custom logic",{"type":40,"tag":223,"props":346,"children":347},{},[348],{"type":45,"value":349},"Custom reducer function",{"type":40,"tag":223,"props":351,"children":352},{},[353],{"type":45,"value":354},"Complex merging",{"type":40,"tag":356,"props":357,"children":358},"ex-state-with-reducer",{},[359,441],{"type":40,"tag":360,"props":361,"children":362},"python",{},[363,365],{"type":45,"value":364},"\nDefine state schema with reducers for accumulating lists and summing integers.\n",{"type":40,"tag":366,"props":367,"children":371},"pre",{"className":368,"code":369,"language":360,"meta":370,"style":370},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from typing_extensions import TypedDict, Annotated\nimport operator\n\nclass State(TypedDict):\n    name: str  # Default: overwrites on update\n    messages: Annotated[list, operator.add]  # Appends to list\n    total: Annotated[int, operator.add]  # Sums integers\n","",[372],{"type":40,"tag":110,"props":373,"children":374},{"__ignoreMap":370},[375,386,395,405,414,423,432],{"type":40,"tag":376,"props":377,"children":380},"span",{"class":378,"line":379},"line",1,[381],{"type":40,"tag":376,"props":382,"children":383},{},[384],{"type":45,"value":385},"from typing_extensions import TypedDict, Annotated\n",{"type":40,"tag":376,"props":387,"children":389},{"class":378,"line":388},2,[390],{"type":40,"tag":376,"props":391,"children":392},{},[393],{"type":45,"value":394},"import operator\n",{"type":40,"tag":376,"props":396,"children":398},{"class":378,"line":397},3,[399],{"type":40,"tag":376,"props":400,"children":402},{"emptyLinePlaceholder":401},true,[403],{"type":45,"value":404},"\n",{"type":40,"tag":376,"props":406,"children":408},{"class":378,"line":407},4,[409],{"type":40,"tag":376,"props":410,"children":411},{},[412],{"type":45,"value":413},"class State(TypedDict):\n",{"type":40,"tag":376,"props":415,"children":417},{"class":378,"line":416},5,[418],{"type":40,"tag":376,"props":419,"children":420},{},[421],{"type":45,"value":422},"    name: str  # Default: overwrites on update\n",{"type":40,"tag":376,"props":424,"children":426},{"class":378,"line":425},6,[427],{"type":40,"tag":376,"props":428,"children":429},{},[430],{"type":45,"value":431},"    messages: Annotated[list, operator.add]  # Appends to list\n",{"type":40,"tag":376,"props":433,"children":435},{"class":378,"line":434},7,[436],{"type":40,"tag":376,"props":437,"children":438},{},[439],{"type":45,"value":440},"    total: Annotated[int, operator.add]  # Sums integers\n",{"type":40,"tag":442,"props":443,"children":444},"typescript",{},[445,447],{"type":45,"value":446},"\nUse StateSchema with ReducedValue for accumulating arrays.\n",{"type":40,"tag":366,"props":448,"children":451},{"className":449,"code":450,"language":442,"meta":370,"style":370},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { StateSchema, ReducedValue, MessagesValue } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  name: z.string(),  \u002F\u002F Default: overwrites\n  messages: MessagesValue,  \u002F\u002F Built-in for messages\n  items: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (current, update) => current.concat(update) }\n  ),\n});\n",[452],{"type":40,"tag":110,"props":453,"children":454},{"__ignoreMap":370},[455,526,567,574,613,656,681,706,774,845,858],{"type":40,"tag":376,"props":456,"children":457},{"class":378,"line":379},[458,464,470,476,481,486,490,495,500,505,510,516,521],{"type":40,"tag":376,"props":459,"children":461},{"style":460},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[462],{"type":45,"value":463},"import",{"type":40,"tag":376,"props":465,"children":467},{"style":466},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[468],{"type":45,"value":469}," {",{"type":40,"tag":376,"props":471,"children":473},{"style":472},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[474],{"type":45,"value":475}," StateSchema",{"type":40,"tag":376,"props":477,"children":478},{"style":466},[479],{"type":45,"value":480},",",{"type":40,"tag":376,"props":482,"children":483},{"style":472},[484],{"type":45,"value":485}," ReducedValue",{"type":40,"tag":376,"props":487,"children":488},{"style":466},[489],{"type":45,"value":480},{"type":40,"tag":376,"props":491,"children":492},{"style":472},[493],{"type":45,"value":494}," MessagesValue",{"type":40,"tag":376,"props":496,"children":497},{"style":466},[498],{"type":45,"value":499}," }",{"type":40,"tag":376,"props":501,"children":502},{"style":460},[503],{"type":45,"value":504}," from",{"type":40,"tag":376,"props":506,"children":507},{"style":466},[508],{"type":45,"value":509}," \"",{"type":40,"tag":376,"props":511,"children":513},{"style":512},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[514],{"type":45,"value":515},"@langchain\u002Flanggraph",{"type":40,"tag":376,"props":517,"children":518},{"style":466},[519],{"type":45,"value":520},"\"",{"type":40,"tag":376,"props":522,"children":523},{"style":466},[524],{"type":45,"value":525},";\n",{"type":40,"tag":376,"props":527,"children":528},{"class":378,"line":388},[529,533,537,542,546,550,554,559,563],{"type":40,"tag":376,"props":530,"children":531},{"style":460},[532],{"type":45,"value":463},{"type":40,"tag":376,"props":534,"children":535},{"style":466},[536],{"type":45,"value":469},{"type":40,"tag":376,"props":538,"children":539},{"style":472},[540],{"type":45,"value":541}," z",{"type":40,"tag":376,"props":543,"children":544},{"style":466},[545],{"type":45,"value":499},{"type":40,"tag":376,"props":547,"children":548},{"style":460},[549],{"type":45,"value":504},{"type":40,"tag":376,"props":551,"children":552},{"style":466},[553],{"type":45,"value":509},{"type":40,"tag":376,"props":555,"children":556},{"style":512},[557],{"type":45,"value":558},"zod",{"type":40,"tag":376,"props":560,"children":561},{"style":466},[562],{"type":45,"value":520},{"type":40,"tag":376,"props":564,"children":565},{"style":466},[566],{"type":45,"value":525},{"type":40,"tag":376,"props":568,"children":569},{"class":378,"line":397},[570],{"type":40,"tag":376,"props":571,"children":572},{"emptyLinePlaceholder":401},[573],{"type":45,"value":404},{"type":40,"tag":376,"props":575,"children":576},{"class":378,"line":407},[577,583,588,593,598,603,608],{"type":40,"tag":376,"props":578,"children":580},{"style":579},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[581],{"type":45,"value":582},"const",{"type":40,"tag":376,"props":584,"children":585},{"style":472},[586],{"type":45,"value":587}," State ",{"type":40,"tag":376,"props":589,"children":590},{"style":466},[591],{"type":45,"value":592},"=",{"type":40,"tag":376,"props":594,"children":595},{"style":466},[596],{"type":45,"value":597}," new",{"type":40,"tag":376,"props":599,"children":601},{"style":600},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[602],{"type":45,"value":475},{"type":40,"tag":376,"props":604,"children":605},{"style":472},[606],{"type":45,"value":607},"(",{"type":40,"tag":376,"props":609,"children":610},{"style":466},[611],{"type":45,"value":612},"{\n",{"type":40,"tag":376,"props":614,"children":615},{"class":378,"line":416},[616,622,627,631,636,641,646,650],{"type":40,"tag":376,"props":617,"children":619},{"style":618},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[620],{"type":45,"value":621},"  name",{"type":40,"tag":376,"props":623,"children":624},{"style":466},[625],{"type":45,"value":626},":",{"type":40,"tag":376,"props":628,"children":629},{"style":472},[630],{"type":45,"value":541},{"type":40,"tag":376,"props":632,"children":633},{"style":466},[634],{"type":45,"value":635},".",{"type":40,"tag":376,"props":637,"children":638},{"style":600},[639],{"type":45,"value":640},"string",{"type":40,"tag":376,"props":642,"children":643},{"style":472},[644],{"type":45,"value":645},"()",{"type":40,"tag":376,"props":647,"children":648},{"style":466},[649],{"type":45,"value":480},{"type":40,"tag":376,"props":651,"children":653},{"style":652},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[654],{"type":45,"value":655},"  \u002F\u002F Default: overwrites\n",{"type":40,"tag":376,"props":657,"children":658},{"class":378,"line":425},[659,664,668,672,676],{"type":40,"tag":376,"props":660,"children":661},{"style":618},[662],{"type":45,"value":663},"  messages",{"type":40,"tag":376,"props":665,"children":666},{"style":466},[667],{"type":45,"value":626},{"type":40,"tag":376,"props":669,"children":670},{"style":472},[671],{"type":45,"value":494},{"type":40,"tag":376,"props":673,"children":674},{"style":466},[675],{"type":45,"value":480},{"type":40,"tag":376,"props":677,"children":678},{"style":652},[679],{"type":45,"value":680},"  \u002F\u002F Built-in for messages\n",{"type":40,"tag":376,"props":682,"children":683},{"class":378,"line":434},[684,689,693,697,701],{"type":40,"tag":376,"props":685,"children":686},{"style":618},[687],{"type":45,"value":688},"  items",{"type":40,"tag":376,"props":690,"children":691},{"style":466},[692],{"type":45,"value":626},{"type":40,"tag":376,"props":694,"children":695},{"style":466},[696],{"type":45,"value":597},{"type":40,"tag":376,"props":698,"children":699},{"style":600},[700],{"type":45,"value":485},{"type":40,"tag":376,"props":702,"children":703},{"style":472},[704],{"type":45,"value":705},"(\n",{"type":40,"tag":376,"props":707,"children":709},{"class":378,"line":708},8,[710,715,719,724,729,733,737,742,746,751,755,759,764,769],{"type":40,"tag":376,"props":711,"children":712},{"style":472},[713],{"type":45,"value":714},"    z",{"type":40,"tag":376,"props":716,"children":717},{"style":466},[718],{"type":45,"value":635},{"type":40,"tag":376,"props":720,"children":721},{"style":600},[722],{"type":45,"value":723},"array",{"type":40,"tag":376,"props":725,"children":726},{"style":472},[727],{"type":45,"value":728},"(z",{"type":40,"tag":376,"props":730,"children":731},{"style":466},[732],{"type":45,"value":635},{"type":40,"tag":376,"props":734,"children":735},{"style":600},[736],{"type":45,"value":640},{"type":40,"tag":376,"props":738,"children":739},{"style":472},[740],{"type":45,"value":741},"())",{"type":40,"tag":376,"props":743,"children":744},{"style":466},[745],{"type":45,"value":635},{"type":40,"tag":376,"props":747,"children":748},{"style":600},[749],{"type":45,"value":750},"default",{"type":40,"tag":376,"props":752,"children":753},{"style":472},[754],{"type":45,"value":607},{"type":40,"tag":376,"props":756,"children":757},{"style":466},[758],{"type":45,"value":645},{"type":40,"tag":376,"props":760,"children":761},{"style":579},[762],{"type":45,"value":763}," =>",{"type":40,"tag":376,"props":765,"children":766},{"style":472},[767],{"type":45,"value":768}," [])",{"type":40,"tag":376,"props":770,"children":771},{"style":466},[772],{"type":45,"value":773},",\n",{"type":40,"tag":376,"props":775,"children":777},{"class":378,"line":776},9,[778,783,788,792,797,803,807,812,817,821,826,830,835,840],{"type":40,"tag":376,"props":779,"children":780},{"style":466},[781],{"type":45,"value":782},"    {",{"type":40,"tag":376,"props":784,"children":785},{"style":600},[786],{"type":45,"value":787}," reducer",{"type":40,"tag":376,"props":789,"children":790},{"style":466},[791],{"type":45,"value":626},{"type":40,"tag":376,"props":793,"children":794},{"style":466},[795],{"type":45,"value":796}," (",{"type":40,"tag":376,"props":798,"children":800},{"style":799},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[801],{"type":45,"value":802},"current",{"type":40,"tag":376,"props":804,"children":805},{"style":466},[806],{"type":45,"value":480},{"type":40,"tag":376,"props":808,"children":809},{"style":799},[810],{"type":45,"value":811}," update",{"type":40,"tag":376,"props":813,"children":814},{"style":466},[815],{"type":45,"value":816},")",{"type":40,"tag":376,"props":818,"children":819},{"style":579},[820],{"type":45,"value":763},{"type":40,"tag":376,"props":822,"children":823},{"style":472},[824],{"type":45,"value":825}," current",{"type":40,"tag":376,"props":827,"children":828},{"style":466},[829],{"type":45,"value":635},{"type":40,"tag":376,"props":831,"children":832},{"style":600},[833],{"type":45,"value":834},"concat",{"type":40,"tag":376,"props":836,"children":837},{"style":472},[838],{"type":45,"value":839},"(update) ",{"type":40,"tag":376,"props":841,"children":842},{"style":466},[843],{"type":45,"value":844},"}\n",{"type":40,"tag":376,"props":846,"children":848},{"class":378,"line":847},10,[849,854],{"type":40,"tag":376,"props":850,"children":851},{"style":472},[852],{"type":45,"value":853},"  )",{"type":40,"tag":376,"props":855,"children":856},{"style":466},[857],{"type":45,"value":773},{"type":40,"tag":376,"props":859,"children":861},{"class":378,"line":860},11,[862,867,871],{"type":40,"tag":376,"props":863,"children":864},{"style":466},[865],{"type":45,"value":866},"}",{"type":40,"tag":376,"props":868,"children":869},{"style":472},[870],{"type":45,"value":816},{"type":40,"tag":376,"props":872,"children":873},{"style":466},[874],{"type":45,"value":525},{"type":40,"tag":876,"props":877,"children":878},"fix-forgot-reducer-for-list",{},[879,1009],{"type":40,"tag":360,"props":880,"children":881},{},[882,884],{"type":45,"value":883},"\nWithout a reducer, returning a list overwrites previous values.\n",{"type":40,"tag":366,"props":885,"children":887},{"className":368,"code":886,"language":360,"meta":370,"style":370},"# WRONG: List will be OVERWRITTEN\nclass State(TypedDict):\n    messages: list  # No reducer!\n\n# Node 1 returns: {\"messages\": [\"A\"]}\n# Node 2 returns: {\"messages\": [\"B\"]}\n# Final: {\"messages\": [\"B\"]}  # \"A\" is LOST!\n\n# CORRECT: Use Annotated with operator.add\nfrom typing import Annotated\nimport operator\n\nclass State(TypedDict):\n    messages: Annotated[list, operator.add]\n# Final: {\"messages\": [\"A\", \"B\"]}\n",[888],{"type":40,"tag":110,"props":889,"children":890},{"__ignoreMap":370},[891,899,906,914,921,929,937,945,952,960,968,975,983,991,1000],{"type":40,"tag":376,"props":892,"children":893},{"class":378,"line":379},[894],{"type":40,"tag":376,"props":895,"children":896},{},[897],{"type":45,"value":898},"# WRONG: List will be OVERWRITTEN\n",{"type":40,"tag":376,"props":900,"children":901},{"class":378,"line":388},[902],{"type":40,"tag":376,"props":903,"children":904},{},[905],{"type":45,"value":413},{"type":40,"tag":376,"props":907,"children":908},{"class":378,"line":397},[909],{"type":40,"tag":376,"props":910,"children":911},{},[912],{"type":45,"value":913},"    messages: list  # No reducer!\n",{"type":40,"tag":376,"props":915,"children":916},{"class":378,"line":407},[917],{"type":40,"tag":376,"props":918,"children":919},{"emptyLinePlaceholder":401},[920],{"type":45,"value":404},{"type":40,"tag":376,"props":922,"children":923},{"class":378,"line":416},[924],{"type":40,"tag":376,"props":925,"children":926},{},[927],{"type":45,"value":928},"# Node 1 returns: {\"messages\": [\"A\"]}\n",{"type":40,"tag":376,"props":930,"children":931},{"class":378,"line":425},[932],{"type":40,"tag":376,"props":933,"children":934},{},[935],{"type":45,"value":936},"# Node 2 returns: {\"messages\": [\"B\"]}\n",{"type":40,"tag":376,"props":938,"children":939},{"class":378,"line":434},[940],{"type":40,"tag":376,"props":941,"children":942},{},[943],{"type":45,"value":944},"# Final: {\"messages\": [\"B\"]}  # \"A\" is LOST!\n",{"type":40,"tag":376,"props":946,"children":947},{"class":378,"line":708},[948],{"type":40,"tag":376,"props":949,"children":950},{"emptyLinePlaceholder":401},[951],{"type":45,"value":404},{"type":40,"tag":376,"props":953,"children":954},{"class":378,"line":776},[955],{"type":40,"tag":376,"props":956,"children":957},{},[958],{"type":45,"value":959},"# CORRECT: Use Annotated with operator.add\n",{"type":40,"tag":376,"props":961,"children":962},{"class":378,"line":847},[963],{"type":40,"tag":376,"props":964,"children":965},{},[966],{"type":45,"value":967},"from typing import Annotated\n",{"type":40,"tag":376,"props":969,"children":970},{"class":378,"line":860},[971],{"type":40,"tag":376,"props":972,"children":973},{},[974],{"type":45,"value":394},{"type":40,"tag":376,"props":976,"children":978},{"class":378,"line":977},12,[979],{"type":40,"tag":376,"props":980,"children":981},{"emptyLinePlaceholder":401},[982],{"type":45,"value":404},{"type":40,"tag":376,"props":984,"children":986},{"class":378,"line":985},13,[987],{"type":40,"tag":376,"props":988,"children":989},{},[990],{"type":45,"value":413},{"type":40,"tag":376,"props":992,"children":994},{"class":378,"line":993},14,[995],{"type":40,"tag":376,"props":996,"children":997},{},[998],{"type":45,"value":999},"    messages: Annotated[list, operator.add]\n",{"type":40,"tag":376,"props":1001,"children":1003},{"class":378,"line":1002},15,[1004],{"type":40,"tag":376,"props":1005,"children":1006},{},[1007],{"type":45,"value":1008},"# Final: {\"messages\": [\"A\", \"B\"]}\n",{"type":40,"tag":442,"props":1010,"children":1011},{},[1012,1014],{"type":45,"value":1013},"\nWithout ReducedValue, arrays are overwritten not appended.\n",{"type":40,"tag":366,"props":1015,"children":1017},{"className":449,"code":1016,"language":442,"meta":370,"style":370},"\u002F\u002F WRONG: Array will be overwritten\nconst State = new StateSchema({\n  items: z.array(z.string()),  \u002F\u002F No reducer!\n});\n\u002F\u002F Node 1: { items: [\"A\"] }, Node 2: { items: [\"B\"] }\n\u002F\u002F Final: { items: [\"B\"] }  \u002F\u002F A is lost!\n\n\u002F\u002F CORRECT: Use ReducedValue\nconst State = new StateSchema({\n  items: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (current, update) => current.concat(update) }\n  ),\n});\n\u002F\u002F Final: { items: [\"A\", \"B\"] }\n",[1018],{"type":40,"tag":110,"props":1019,"children":1020},{"__ignoreMap":370},[1021,1029,1060,1108,1123,1131,1144,1151,1159,1190,1213,1272,1331,1342,1357],{"type":40,"tag":376,"props":1022,"children":1023},{"class":378,"line":379},[1024],{"type":40,"tag":376,"props":1025,"children":1026},{"style":652},[1027],{"type":45,"value":1028},"\u002F\u002F WRONG: Array will be overwritten\n",{"type":40,"tag":376,"props":1030,"children":1031},{"class":378,"line":388},[1032,1036,1040,1044,1048,1052,1056],{"type":40,"tag":376,"props":1033,"children":1034},{"style":579},[1035],{"type":45,"value":582},{"type":40,"tag":376,"props":1037,"children":1038},{"style":472},[1039],{"type":45,"value":587},{"type":40,"tag":376,"props":1041,"children":1042},{"style":466},[1043],{"type":45,"value":592},{"type":40,"tag":376,"props":1045,"children":1046},{"style":466},[1047],{"type":45,"value":597},{"type":40,"tag":376,"props":1049,"children":1050},{"style":600},[1051],{"type":45,"value":475},{"type":40,"tag":376,"props":1053,"children":1054},{"style":472},[1055],{"type":45,"value":607},{"type":40,"tag":376,"props":1057,"children":1058},{"style":466},[1059],{"type":45,"value":612},{"type":40,"tag":376,"props":1061,"children":1062},{"class":378,"line":397},[1063,1067,1071,1075,1079,1083,1087,1091,1095,1099,1103],{"type":40,"tag":376,"props":1064,"children":1065},{"style":618},[1066],{"type":45,"value":688},{"type":40,"tag":376,"props":1068,"children":1069},{"style":466},[1070],{"type":45,"value":626},{"type":40,"tag":376,"props":1072,"children":1073},{"style":472},[1074],{"type":45,"value":541},{"type":40,"tag":376,"props":1076,"children":1077},{"style":466},[1078],{"type":45,"value":635},{"type":40,"tag":376,"props":1080,"children":1081},{"style":600},[1082],{"type":45,"value":723},{"type":40,"tag":376,"props":1084,"children":1085},{"style":472},[1086],{"type":45,"value":728},{"type":40,"tag":376,"props":1088,"children":1089},{"style":466},[1090],{"type":45,"value":635},{"type":40,"tag":376,"props":1092,"children":1093},{"style":600},[1094],{"type":45,"value":640},{"type":40,"tag":376,"props":1096,"children":1097},{"style":472},[1098],{"type":45,"value":741},{"type":40,"tag":376,"props":1100,"children":1101},{"style":466},[1102],{"type":45,"value":480},{"type":40,"tag":376,"props":1104,"children":1105},{"style":652},[1106],{"type":45,"value":1107},"  \u002F\u002F No reducer!\n",{"type":40,"tag":376,"props":1109,"children":1110},{"class":378,"line":407},[1111,1115,1119],{"type":40,"tag":376,"props":1112,"children":1113},{"style":466},[1114],{"type":45,"value":866},{"type":40,"tag":376,"props":1116,"children":1117},{"style":472},[1118],{"type":45,"value":816},{"type":40,"tag":376,"props":1120,"children":1121},{"style":466},[1122],{"type":45,"value":525},{"type":40,"tag":376,"props":1124,"children":1125},{"class":378,"line":416},[1126],{"type":40,"tag":376,"props":1127,"children":1128},{"style":652},[1129],{"type":45,"value":1130},"\u002F\u002F Node 1: { items: [\"A\"] }, Node 2: { items: [\"B\"] }\n",{"type":40,"tag":376,"props":1132,"children":1133},{"class":378,"line":425},[1134,1139],{"type":40,"tag":376,"props":1135,"children":1136},{"style":652},[1137],{"type":45,"value":1138},"\u002F\u002F Final: { items: [\"B\"] }",{"type":40,"tag":376,"props":1140,"children":1141},{"style":652},[1142],{"type":45,"value":1143},"  \u002F\u002F A is lost!\n",{"type":40,"tag":376,"props":1145,"children":1146},{"class":378,"line":434},[1147],{"type":40,"tag":376,"props":1148,"children":1149},{"emptyLinePlaceholder":401},[1150],{"type":45,"value":404},{"type":40,"tag":376,"props":1152,"children":1153},{"class":378,"line":708},[1154],{"type":40,"tag":376,"props":1155,"children":1156},{"style":652},[1157],{"type":45,"value":1158},"\u002F\u002F CORRECT: Use ReducedValue\n",{"type":40,"tag":376,"props":1160,"children":1161},{"class":378,"line":776},[1162,1166,1170,1174,1178,1182,1186],{"type":40,"tag":376,"props":1163,"children":1164},{"style":579},[1165],{"type":45,"value":582},{"type":40,"tag":376,"props":1167,"children":1168},{"style":472},[1169],{"type":45,"value":587},{"type":40,"tag":376,"props":1171,"children":1172},{"style":466},[1173],{"type":45,"value":592},{"type":40,"tag":376,"props":1175,"children":1176},{"style":466},[1177],{"type":45,"value":597},{"type":40,"tag":376,"props":1179,"children":1180},{"style":600},[1181],{"type":45,"value":475},{"type":40,"tag":376,"props":1183,"children":1184},{"style":472},[1185],{"type":45,"value":607},{"type":40,"tag":376,"props":1187,"children":1188},{"style":466},[1189],{"type":45,"value":612},{"type":40,"tag":376,"props":1191,"children":1192},{"class":378,"line":847},[1193,1197,1201,1205,1209],{"type":40,"tag":376,"props":1194,"children":1195},{"style":618},[1196],{"type":45,"value":688},{"type":40,"tag":376,"props":1198,"children":1199},{"style":466},[1200],{"type":45,"value":626},{"type":40,"tag":376,"props":1202,"children":1203},{"style":466},[1204],{"type":45,"value":597},{"type":40,"tag":376,"props":1206,"children":1207},{"style":600},[1208],{"type":45,"value":485},{"type":40,"tag":376,"props":1210,"children":1211},{"style":472},[1212],{"type":45,"value":705},{"type":40,"tag":376,"props":1214,"children":1215},{"class":378,"line":860},[1216,1220,1224,1228,1232,1236,1240,1244,1248,1252,1256,1260,1264,1268],{"type":40,"tag":376,"props":1217,"children":1218},{"style":472},[1219],{"type":45,"value":714},{"type":40,"tag":376,"props":1221,"children":1222},{"style":466},[1223],{"type":45,"value":635},{"type":40,"tag":376,"props":1225,"children":1226},{"style":600},[1227],{"type":45,"value":723},{"type":40,"tag":376,"props":1229,"children":1230},{"style":472},[1231],{"type":45,"value":728},{"type":40,"tag":376,"props":1233,"children":1234},{"style":466},[1235],{"type":45,"value":635},{"type":40,"tag":376,"props":1237,"children":1238},{"style":600},[1239],{"type":45,"value":640},{"type":40,"tag":376,"props":1241,"children":1242},{"style":472},[1243],{"type":45,"value":741},{"type":40,"tag":376,"props":1245,"children":1246},{"style":466},[1247],{"type":45,"value":635},{"type":40,"tag":376,"props":1249,"children":1250},{"style":600},[1251],{"type":45,"value":750},{"type":40,"tag":376,"props":1253,"children":1254},{"style":472},[1255],{"type":45,"value":607},{"type":40,"tag":376,"props":1257,"children":1258},{"style":466},[1259],{"type":45,"value":645},{"type":40,"tag":376,"props":1261,"children":1262},{"style":579},[1263],{"type":45,"value":763},{"type":40,"tag":376,"props":1265,"children":1266},{"style":472},[1267],{"type":45,"value":768},{"type":40,"tag":376,"props":1269,"children":1270},{"style":466},[1271],{"type":45,"value":773},{"type":40,"tag":376,"props":1273,"children":1274},{"class":378,"line":977},[1275,1279,1283,1287,1291,1295,1299,1303,1307,1311,1315,1319,1323,1327],{"type":40,"tag":376,"props":1276,"children":1277},{"style":466},[1278],{"type":45,"value":782},{"type":40,"tag":376,"props":1280,"children":1281},{"style":600},[1282],{"type":45,"value":787},{"type":40,"tag":376,"props":1284,"children":1285},{"style":466},[1286],{"type":45,"value":626},{"type":40,"tag":376,"props":1288,"children":1289},{"style":466},[1290],{"type":45,"value":796},{"type":40,"tag":376,"props":1292,"children":1293},{"style":799},[1294],{"type":45,"value":802},{"type":40,"tag":376,"props":1296,"children":1297},{"style":466},[1298],{"type":45,"value":480},{"type":40,"tag":376,"props":1300,"children":1301},{"style":799},[1302],{"type":45,"value":811},{"type":40,"tag":376,"props":1304,"children":1305},{"style":466},[1306],{"type":45,"value":816},{"type":40,"tag":376,"props":1308,"children":1309},{"style":579},[1310],{"type":45,"value":763},{"type":40,"tag":376,"props":1312,"children":1313},{"style":472},[1314],{"type":45,"value":825},{"type":40,"tag":376,"props":1316,"children":1317},{"style":466},[1318],{"type":45,"value":635},{"type":40,"tag":376,"props":1320,"children":1321},{"style":600},[1322],{"type":45,"value":834},{"type":40,"tag":376,"props":1324,"children":1325},{"style":472},[1326],{"type":45,"value":839},{"type":40,"tag":376,"props":1328,"children":1329},{"style":466},[1330],{"type":45,"value":844},{"type":40,"tag":376,"props":1332,"children":1333},{"class":378,"line":985},[1334,1338],{"type":40,"tag":376,"props":1335,"children":1336},{"style":472},[1337],{"type":45,"value":853},{"type":40,"tag":376,"props":1339,"children":1340},{"style":466},[1341],{"type":45,"value":773},{"type":40,"tag":376,"props":1343,"children":1344},{"class":378,"line":993},[1345,1349,1353],{"type":40,"tag":376,"props":1346,"children":1347},{"style":466},[1348],{"type":45,"value":866},{"type":40,"tag":376,"props":1350,"children":1351},{"style":472},[1352],{"type":45,"value":816},{"type":40,"tag":376,"props":1354,"children":1355},{"style":466},[1356],{"type":45,"value":525},{"type":40,"tag":376,"props":1358,"children":1359},{"class":378,"line":1002},[1360],{"type":40,"tag":376,"props":1361,"children":1362},{"style":652},[1363],{"type":45,"value":1364},"\u002F\u002F Final: { items: [\"A\", \"B\"] }\n",{"type":40,"tag":1366,"props":1367,"children":1368},"fix-state-must-return-dict",{},[1369,1444],{"type":40,"tag":360,"props":1370,"children":1371},{},[1372,1374],{"type":45,"value":1373},"\nNodes must return partial updates, not mutate and return full state.\n",{"type":40,"tag":366,"props":1375,"children":1377},{"className":368,"code":1376,"language":360,"meta":370,"style":370},"# WRONG: Returning entire state object\ndef my_node(state: State) -> State:\n    state[\"field\"] = \"updated\"\n    return state  # Don't mutate and return!\n\n# CORRECT: Return dict with only the updates\ndef my_node(state: State) -> dict:\n    return {\"field\": \"updated\"}\n",[1378],{"type":40,"tag":110,"props":1379,"children":1380},{"__ignoreMap":370},[1381,1389,1397,1405,1413,1420,1428,1436],{"type":40,"tag":376,"props":1382,"children":1383},{"class":378,"line":379},[1384],{"type":40,"tag":376,"props":1385,"children":1386},{},[1387],{"type":45,"value":1388},"# WRONG: Returning entire state object\n",{"type":40,"tag":376,"props":1390,"children":1391},{"class":378,"line":388},[1392],{"type":40,"tag":376,"props":1393,"children":1394},{},[1395],{"type":45,"value":1396},"def my_node(state: State) -> State:\n",{"type":40,"tag":376,"props":1398,"children":1399},{"class":378,"line":397},[1400],{"type":40,"tag":376,"props":1401,"children":1402},{},[1403],{"type":45,"value":1404},"    state[\"field\"] = \"updated\"\n",{"type":40,"tag":376,"props":1406,"children":1407},{"class":378,"line":407},[1408],{"type":40,"tag":376,"props":1409,"children":1410},{},[1411],{"type":45,"value":1412},"    return state  # Don't mutate and return!\n",{"type":40,"tag":376,"props":1414,"children":1415},{"class":378,"line":416},[1416],{"type":40,"tag":376,"props":1417,"children":1418},{"emptyLinePlaceholder":401},[1419],{"type":45,"value":404},{"type":40,"tag":376,"props":1421,"children":1422},{"class":378,"line":425},[1423],{"type":40,"tag":376,"props":1424,"children":1425},{},[1426],{"type":45,"value":1427},"# CORRECT: Return dict with only the updates\n",{"type":40,"tag":376,"props":1429,"children":1430},{"class":378,"line":434},[1431],{"type":40,"tag":376,"props":1432,"children":1433},{},[1434],{"type":45,"value":1435},"def my_node(state: State) -> dict:\n",{"type":40,"tag":376,"props":1437,"children":1438},{"class":378,"line":708},[1439],{"type":40,"tag":376,"props":1440,"children":1441},{},[1442],{"type":45,"value":1443},"    return {\"field\": \"updated\"}\n",{"type":40,"tag":442,"props":1445,"children":1446},{},[1447,1449],{"type":45,"value":1448},"\nReturn partial updates only, not the full state object.\n",{"type":40,"tag":366,"props":1450,"children":1452},{"className":449,"code":1451,"language":442,"meta":370,"style":370},"\u002F\u002F WRONG: Returning entire state\nconst myNode = async (state: typeof State.State) => {\n  state.field = \"updated\";\n  return state;  \u002F\u002F Don't do this!\n};\n\n\u002F\u002F CORRECT: Return partial updates\nconst myNode = async (state: typeof State.State) => {\n  return { field: \"updated\" };\n};\n",[1453],{"type":40,"tag":110,"props":1454,"children":1455},{"__ignoreMap":370},[1456,1464,1530,1569,1592,1600,1607,1615,1674,1711],{"type":40,"tag":376,"props":1457,"children":1458},{"class":378,"line":379},[1459],{"type":40,"tag":376,"props":1460,"children":1461},{"style":652},[1462],{"type":45,"value":1463},"\u002F\u002F WRONG: Returning entire state\n",{"type":40,"tag":376,"props":1465,"children":1466},{"class":378,"line":388},[1467,1471,1476,1480,1485,1489,1494,1498,1503,1508,1512,1517,1521,1525],{"type":40,"tag":376,"props":1468,"children":1469},{"style":579},[1470],{"type":45,"value":582},{"type":40,"tag":376,"props":1472,"children":1473},{"style":472},[1474],{"type":45,"value":1475}," myNode ",{"type":40,"tag":376,"props":1477,"children":1478},{"style":466},[1479],{"type":45,"value":592},{"type":40,"tag":376,"props":1481,"children":1482},{"style":579},[1483],{"type":45,"value":1484}," async",{"type":40,"tag":376,"props":1486,"children":1487},{"style":466},[1488],{"type":45,"value":796},{"type":40,"tag":376,"props":1490,"children":1491},{"style":799},[1492],{"type":45,"value":1493},"state",{"type":40,"tag":376,"props":1495,"children":1496},{"style":466},[1497],{"type":45,"value":626},{"type":40,"tag":376,"props":1499,"children":1500},{"style":466},[1501],{"type":45,"value":1502}," typeof",{"type":40,"tag":376,"props":1504,"children":1505},{"style":472},[1506],{"type":45,"value":1507}," State",{"type":40,"tag":376,"props":1509,"children":1510},{"style":466},[1511],{"type":45,"value":635},{"type":40,"tag":376,"props":1513,"children":1514},{"style":472},[1515],{"type":45,"value":1516},"State",{"type":40,"tag":376,"props":1518,"children":1519},{"style":466},[1520],{"type":45,"value":816},{"type":40,"tag":376,"props":1522,"children":1523},{"style":579},[1524],{"type":45,"value":763},{"type":40,"tag":376,"props":1526,"children":1527},{"style":466},[1528],{"type":45,"value":1529}," {\n",{"type":40,"tag":376,"props":1531,"children":1532},{"class":378,"line":397},[1533,1538,1542,1547,1552,1556,1561,1565],{"type":40,"tag":376,"props":1534,"children":1535},{"style":472},[1536],{"type":45,"value":1537},"  state",{"type":40,"tag":376,"props":1539,"children":1540},{"style":466},[1541],{"type":45,"value":635},{"type":40,"tag":376,"props":1543,"children":1544},{"style":472},[1545],{"type":45,"value":1546},"field",{"type":40,"tag":376,"props":1548,"children":1549},{"style":466},[1550],{"type":45,"value":1551}," =",{"type":40,"tag":376,"props":1553,"children":1554},{"style":466},[1555],{"type":45,"value":509},{"type":40,"tag":376,"props":1557,"children":1558},{"style":512},[1559],{"type":45,"value":1560},"updated",{"type":40,"tag":376,"props":1562,"children":1563},{"style":466},[1564],{"type":45,"value":520},{"type":40,"tag":376,"props":1566,"children":1567},{"style":466},[1568],{"type":45,"value":525},{"type":40,"tag":376,"props":1570,"children":1571},{"class":378,"line":407},[1572,1577,1582,1587],{"type":40,"tag":376,"props":1573,"children":1574},{"style":460},[1575],{"type":45,"value":1576},"  return",{"type":40,"tag":376,"props":1578,"children":1579},{"style":472},[1580],{"type":45,"value":1581}," state",{"type":40,"tag":376,"props":1583,"children":1584},{"style":466},[1585],{"type":45,"value":1586},";",{"type":40,"tag":376,"props":1588,"children":1589},{"style":652},[1590],{"type":45,"value":1591},"  \u002F\u002F Don't do this!\n",{"type":40,"tag":376,"props":1593,"children":1594},{"class":378,"line":416},[1595],{"type":40,"tag":376,"props":1596,"children":1597},{"style":466},[1598],{"type":45,"value":1599},"};\n",{"type":40,"tag":376,"props":1601,"children":1602},{"class":378,"line":425},[1603],{"type":40,"tag":376,"props":1604,"children":1605},{"emptyLinePlaceholder":401},[1606],{"type":45,"value":404},{"type":40,"tag":376,"props":1608,"children":1609},{"class":378,"line":434},[1610],{"type":40,"tag":376,"props":1611,"children":1612},{"style":652},[1613],{"type":45,"value":1614},"\u002F\u002F CORRECT: Return partial updates\n",{"type":40,"tag":376,"props":1616,"children":1617},{"class":378,"line":708},[1618,1622,1626,1630,1634,1638,1642,1646,1650,1654,1658,1662,1666,1670],{"type":40,"tag":376,"props":1619,"children":1620},{"style":579},[1621],{"type":45,"value":582},{"type":40,"tag":376,"props":1623,"children":1624},{"style":472},[1625],{"type":45,"value":1475},{"type":40,"tag":376,"props":1627,"children":1628},{"style":466},[1629],{"type":45,"value":592},{"type":40,"tag":376,"props":1631,"children":1632},{"style":579},[1633],{"type":45,"value":1484},{"type":40,"tag":376,"props":1635,"children":1636},{"style":466},[1637],{"type":45,"value":796},{"type":40,"tag":376,"props":1639,"children":1640},{"style":799},[1641],{"type":45,"value":1493},{"type":40,"tag":376,"props":1643,"children":1644},{"style":466},[1645],{"type":45,"value":626},{"type":40,"tag":376,"props":1647,"children":1648},{"style":466},[1649],{"type":45,"value":1502},{"type":40,"tag":376,"props":1651,"children":1652},{"style":472},[1653],{"type":45,"value":1507},{"type":40,"tag":376,"props":1655,"children":1656},{"style":466},[1657],{"type":45,"value":635},{"type":40,"tag":376,"props":1659,"children":1660},{"style":472},[1661],{"type":45,"value":1516},{"type":40,"tag":376,"props":1663,"children":1664},{"style":466},[1665],{"type":45,"value":816},{"type":40,"tag":376,"props":1667,"children":1668},{"style":579},[1669],{"type":45,"value":763},{"type":40,"tag":376,"props":1671,"children":1672},{"style":466},[1673],{"type":45,"value":1529},{"type":40,"tag":376,"props":1675,"children":1676},{"class":378,"line":776},[1677,1681,1685,1690,1694,1698,1702,1706],{"type":40,"tag":376,"props":1678,"children":1679},{"style":460},[1680],{"type":45,"value":1576},{"type":40,"tag":376,"props":1682,"children":1683},{"style":466},[1684],{"type":45,"value":469},{"type":40,"tag":376,"props":1686,"children":1687},{"style":618},[1688],{"type":45,"value":1689}," field",{"type":40,"tag":376,"props":1691,"children":1692},{"style":466},[1693],{"type":45,"value":626},{"type":40,"tag":376,"props":1695,"children":1696},{"style":466},[1697],{"type":45,"value":509},{"type":40,"tag":376,"props":1699,"children":1700},{"style":512},[1701],{"type":45,"value":1560},{"type":40,"tag":376,"props":1703,"children":1704},{"style":466},[1705],{"type":45,"value":520},{"type":40,"tag":376,"props":1707,"children":1708},{"style":466},[1709],{"type":45,"value":1710}," };\n",{"type":40,"tag":376,"props":1712,"children":1713},{"class":378,"line":847},[1714],{"type":40,"tag":376,"props":1715,"children":1716},{"style":466},[1717],{"type":45,"value":1599},{"type":40,"tag":260,"props":1719,"children":1720},{},[],{"type":40,"tag":264,"props":1722,"children":1724},{"id":1723},"nodes",[1725],{"type":45,"value":70},{"type":40,"tag":1727,"props":1728,"children":1729},"node-function-signatures",{},[1730,1735,1919],{"type":40,"tag":104,"props":1731,"children":1732},{},[1733],{"type":45,"value":1734},"Node functions accept these arguments:",{"type":40,"tag":360,"props":1736,"children":1737},{},[1738,1811],{"type":40,"tag":193,"props":1739,"children":1740},{},[1741,1757],{"type":40,"tag":197,"props":1742,"children":1743},{},[1744],{"type":40,"tag":201,"props":1745,"children":1746},{},[1747,1752],{"type":40,"tag":205,"props":1748,"children":1749},{},[1750],{"type":45,"value":1751},"Signature",{"type":40,"tag":205,"props":1753,"children":1754},{},[1755],{"type":45,"value":1756},"When to Use",{"type":40,"tag":216,"props":1758,"children":1759},{},[1760,1777,1794],{"type":40,"tag":201,"props":1761,"children":1762},{},[1763,1772],{"type":40,"tag":223,"props":1764,"children":1765},{},[1766],{"type":40,"tag":110,"props":1767,"children":1769},{"className":1768},[],[1770],{"type":45,"value":1771},"def node(state: State)",{"type":40,"tag":223,"props":1773,"children":1774},{},[1775],{"type":45,"value":1776},"Simple nodes that only need state",{"type":40,"tag":201,"props":1778,"children":1779},{},[1780,1789],{"type":40,"tag":223,"props":1781,"children":1782},{},[1783],{"type":40,"tag":110,"props":1784,"children":1786},{"className":1785},[],[1787],{"type":45,"value":1788},"def node(state: State, config: RunnableConfig)",{"type":40,"tag":223,"props":1790,"children":1791},{},[1792],{"type":45,"value":1793},"Need thread_id, tags, or configurable values",{"type":40,"tag":201,"props":1795,"children":1796},{},[1797,1806],{"type":40,"tag":223,"props":1798,"children":1799},{},[1800],{"type":40,"tag":110,"props":1801,"children":1803},{"className":1802},[],[1804],{"type":45,"value":1805},"def node(state: State, runtime: Runtime[Context])",{"type":40,"tag":223,"props":1807,"children":1808},{},[1809],{"type":45,"value":1810},"Need runtime context, store, or stream_writer",{"type":40,"tag":366,"props":1812,"children":1814},{"className":368,"code":1813,"language":360,"meta":370,"style":370},"from langchain_core.runnables import RunnableConfig\nfrom langgraph.runtime import Runtime\n\ndef plain_node(state: State):\n    return {\"results\": \"done\"}\n\ndef node_with_config(state: State, config: RunnableConfig):\n    thread_id = config[\"configurable\"][\"thread_id\"]\n    return {\"results\": f\"Thread: {thread_id}\"}\n\ndef node_with_runtime(state: State, runtime: Runtime[Context]):\n    user_id = runtime.context.user_id\n    return {\"results\": f\"User: {user_id}\"}\n",[1815],{"type":40,"tag":110,"props":1816,"children":1817},{"__ignoreMap":370},[1818,1826,1834,1841,1849,1857,1864,1872,1880,1888,1895,1903,1911],{"type":40,"tag":376,"props":1819,"children":1820},{"class":378,"line":379},[1821],{"type":40,"tag":376,"props":1822,"children":1823},{},[1824],{"type":45,"value":1825},"from langchain_core.runnables import RunnableConfig\n",{"type":40,"tag":376,"props":1827,"children":1828},{"class":378,"line":388},[1829],{"type":40,"tag":376,"props":1830,"children":1831},{},[1832],{"type":45,"value":1833},"from langgraph.runtime import Runtime\n",{"type":40,"tag":376,"props":1835,"children":1836},{"class":378,"line":397},[1837],{"type":40,"tag":376,"props":1838,"children":1839},{"emptyLinePlaceholder":401},[1840],{"type":45,"value":404},{"type":40,"tag":376,"props":1842,"children":1843},{"class":378,"line":407},[1844],{"type":40,"tag":376,"props":1845,"children":1846},{},[1847],{"type":45,"value":1848},"def plain_node(state: State):\n",{"type":40,"tag":376,"props":1850,"children":1851},{"class":378,"line":416},[1852],{"type":40,"tag":376,"props":1853,"children":1854},{},[1855],{"type":45,"value":1856},"    return {\"results\": \"done\"}\n",{"type":40,"tag":376,"props":1858,"children":1859},{"class":378,"line":425},[1860],{"type":40,"tag":376,"props":1861,"children":1862},{"emptyLinePlaceholder":401},[1863],{"type":45,"value":404},{"type":40,"tag":376,"props":1865,"children":1866},{"class":378,"line":434},[1867],{"type":40,"tag":376,"props":1868,"children":1869},{},[1870],{"type":45,"value":1871},"def node_with_config(state: State, config: RunnableConfig):\n",{"type":40,"tag":376,"props":1873,"children":1874},{"class":378,"line":708},[1875],{"type":40,"tag":376,"props":1876,"children":1877},{},[1878],{"type":45,"value":1879},"    thread_id = config[\"configurable\"][\"thread_id\"]\n",{"type":40,"tag":376,"props":1881,"children":1882},{"class":378,"line":776},[1883],{"type":40,"tag":376,"props":1884,"children":1885},{},[1886],{"type":45,"value":1887},"    return {\"results\": f\"Thread: {thread_id}\"}\n",{"type":40,"tag":376,"props":1889,"children":1890},{"class":378,"line":847},[1891],{"type":40,"tag":376,"props":1892,"children":1893},{"emptyLinePlaceholder":401},[1894],{"type":45,"value":404},{"type":40,"tag":376,"props":1896,"children":1897},{"class":378,"line":860},[1898],{"type":40,"tag":376,"props":1899,"children":1900},{},[1901],{"type":45,"value":1902},"def node_with_runtime(state: State, runtime: Runtime[Context]):\n",{"type":40,"tag":376,"props":1904,"children":1905},{"class":378,"line":977},[1906],{"type":40,"tag":376,"props":1907,"children":1908},{},[1909],{"type":45,"value":1910},"    user_id = runtime.context.user_id\n",{"type":40,"tag":376,"props":1912,"children":1913},{"class":378,"line":985},[1914],{"type":40,"tag":376,"props":1915,"children":1916},{},[1917],{"type":45,"value":1918},"    return {\"results\": f\"User: {user_id}\"}\n",{"type":40,"tag":442,"props":1920,"children":1921},{},[1922,1974],{"type":40,"tag":193,"props":1923,"children":1924},{},[1925,1939],{"type":40,"tag":197,"props":1926,"children":1927},{},[1928],{"type":40,"tag":201,"props":1929,"children":1930},{},[1931,1935],{"type":40,"tag":205,"props":1932,"children":1933},{},[1934],{"type":45,"value":1751},{"type":40,"tag":205,"props":1936,"children":1937},{},[1938],{"type":45,"value":1756},{"type":40,"tag":216,"props":1940,"children":1941},{},[1942,1958],{"type":40,"tag":201,"props":1943,"children":1944},{},[1945,1954],{"type":40,"tag":223,"props":1946,"children":1947},{},[1948],{"type":40,"tag":110,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":45,"value":1953},"(state) => {...}",{"type":40,"tag":223,"props":1955,"children":1956},{},[1957],{"type":45,"value":1776},{"type":40,"tag":201,"props":1959,"children":1960},{},[1961,1970],{"type":40,"tag":223,"props":1962,"children":1963},{},[1964],{"type":40,"tag":110,"props":1965,"children":1967},{"className":1966},[],[1968],{"type":45,"value":1969},"(state, config) => {...}",{"type":40,"tag":223,"props":1971,"children":1972},{},[1973],{"type":45,"value":1793},{"type":40,"tag":366,"props":1975,"children":1977},{"className":449,"code":1976,"language":442,"meta":370,"style":370},"import { GraphNode, StateSchema } from \"@langchain\u002Flanggraph\";\n\nconst plainNode: GraphNode\u003Ctypeof State> = (state) => {\n  return { results: \"done\" };\n};\n\nconst nodeWithConfig: GraphNode\u003Ctypeof State> = (state, config) => {\n  const threadId = config?.configurable?.thread_id;\n  return { results: `Thread: ${threadId}` };\n};\n",[1978],{"type":40,"tag":110,"props":1979,"children":1980},{"__ignoreMap":370},[1981,2029,2036,2095,2132,2139,2146,2211,2255,2303],{"type":40,"tag":376,"props":1982,"children":1983},{"class":378,"line":379},[1984,1988,1992,1997,2001,2005,2009,2013,2017,2021,2025],{"type":40,"tag":376,"props":1985,"children":1986},{"style":460},[1987],{"type":45,"value":463},{"type":40,"tag":376,"props":1989,"children":1990},{"style":466},[1991],{"type":45,"value":469},{"type":40,"tag":376,"props":1993,"children":1994},{"style":472},[1995],{"type":45,"value":1996}," GraphNode",{"type":40,"tag":376,"props":1998,"children":1999},{"style":466},[2000],{"type":45,"value":480},{"type":40,"tag":376,"props":2002,"children":2003},{"style":472},[2004],{"type":45,"value":475},{"type":40,"tag":376,"props":2006,"children":2007},{"style":466},[2008],{"type":45,"value":499},{"type":40,"tag":376,"props":2010,"children":2011},{"style":460},[2012],{"type":45,"value":504},{"type":40,"tag":376,"props":2014,"children":2015},{"style":466},[2016],{"type":45,"value":509},{"type":40,"tag":376,"props":2018,"children":2019},{"style":512},[2020],{"type":45,"value":515},{"type":40,"tag":376,"props":2022,"children":2023},{"style":466},[2024],{"type":45,"value":520},{"type":40,"tag":376,"props":2026,"children":2027},{"style":466},[2028],{"type":45,"value":525},{"type":40,"tag":376,"props":2030,"children":2031},{"class":378,"line":388},[2032],{"type":40,"tag":376,"props":2033,"children":2034},{"emptyLinePlaceholder":401},[2035],{"type":45,"value":404},{"type":40,"tag":376,"props":2037,"children":2038},{"class":378,"line":397},[2039,2043,2048,2052,2057,2062,2066,2071,2075,2079,2083,2087,2091],{"type":40,"tag":376,"props":2040,"children":2041},{"style":579},[2042],{"type":45,"value":582},{"type":40,"tag":376,"props":2044,"children":2045},{"style":472},[2046],{"type":45,"value":2047}," plainNode",{"type":40,"tag":376,"props":2049,"children":2050},{"style":466},[2051],{"type":45,"value":626},{"type":40,"tag":376,"props":2053,"children":2055},{"style":2054},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2056],{"type":45,"value":1996},{"type":40,"tag":376,"props":2058,"children":2059},{"style":466},[2060],{"type":45,"value":2061},"\u003Ctypeof",{"type":40,"tag":376,"props":2063,"children":2064},{"style":472},[2065],{"type":45,"value":1507},{"type":40,"tag":376,"props":2067,"children":2068},{"style":466},[2069],{"type":45,"value":2070},">",{"type":40,"tag":376,"props":2072,"children":2073},{"style":466},[2074],{"type":45,"value":1551},{"type":40,"tag":376,"props":2076,"children":2077},{"style":466},[2078],{"type":45,"value":796},{"type":40,"tag":376,"props":2080,"children":2081},{"style":799},[2082],{"type":45,"value":1493},{"type":40,"tag":376,"props":2084,"children":2085},{"style":466},[2086],{"type":45,"value":816},{"type":40,"tag":376,"props":2088,"children":2089},{"style":579},[2090],{"type":45,"value":763},{"type":40,"tag":376,"props":2092,"children":2093},{"style":466},[2094],{"type":45,"value":1529},{"type":40,"tag":376,"props":2096,"children":2097},{"class":378,"line":407},[2098,2102,2106,2111,2115,2119,2124,2128],{"type":40,"tag":376,"props":2099,"children":2100},{"style":460},[2101],{"type":45,"value":1576},{"type":40,"tag":376,"props":2103,"children":2104},{"style":466},[2105],{"type":45,"value":469},{"type":40,"tag":376,"props":2107,"children":2108},{"style":618},[2109],{"type":45,"value":2110}," results",{"type":40,"tag":376,"props":2112,"children":2113},{"style":466},[2114],{"type":45,"value":626},{"type":40,"tag":376,"props":2116,"children":2117},{"style":466},[2118],{"type":45,"value":509},{"type":40,"tag":376,"props":2120,"children":2121},{"style":512},[2122],{"type":45,"value":2123},"done",{"type":40,"tag":376,"props":2125,"children":2126},{"style":466},[2127],{"type":45,"value":520},{"type":40,"tag":376,"props":2129,"children":2130},{"style":466},[2131],{"type":45,"value":1710},{"type":40,"tag":376,"props":2133,"children":2134},{"class":378,"line":416},[2135],{"type":40,"tag":376,"props":2136,"children":2137},{"style":466},[2138],{"type":45,"value":1599},{"type":40,"tag":376,"props":2140,"children":2141},{"class":378,"line":425},[2142],{"type":40,"tag":376,"props":2143,"children":2144},{"emptyLinePlaceholder":401},[2145],{"type":45,"value":404},{"type":40,"tag":376,"props":2147,"children":2148},{"class":378,"line":434},[2149,2153,2158,2162,2166,2170,2174,2178,2182,2186,2190,2194,2199,2203,2207],{"type":40,"tag":376,"props":2150,"children":2151},{"style":579},[2152],{"type":45,"value":582},{"type":40,"tag":376,"props":2154,"children":2155},{"style":472},[2156],{"type":45,"value":2157}," nodeWithConfig",{"type":40,"tag":376,"props":2159,"children":2160},{"style":466},[2161],{"type":45,"value":626},{"type":40,"tag":376,"props":2163,"children":2164},{"style":2054},[2165],{"type":45,"value":1996},{"type":40,"tag":376,"props":2167,"children":2168},{"style":466},[2169],{"type":45,"value":2061},{"type":40,"tag":376,"props":2171,"children":2172},{"style":472},[2173],{"type":45,"value":1507},{"type":40,"tag":376,"props":2175,"children":2176},{"style":466},[2177],{"type":45,"value":2070},{"type":40,"tag":376,"props":2179,"children":2180},{"style":466},[2181],{"type":45,"value":1551},{"type":40,"tag":376,"props":2183,"children":2184},{"style":466},[2185],{"type":45,"value":796},{"type":40,"tag":376,"props":2187,"children":2188},{"style":799},[2189],{"type":45,"value":1493},{"type":40,"tag":376,"props":2191,"children":2192},{"style":466},[2193],{"type":45,"value":480},{"type":40,"tag":376,"props":2195,"children":2196},{"style":799},[2197],{"type":45,"value":2198}," config",{"type":40,"tag":376,"props":2200,"children":2201},{"style":466},[2202],{"type":45,"value":816},{"type":40,"tag":376,"props":2204,"children":2205},{"style":579},[2206],{"type":45,"value":763},{"type":40,"tag":376,"props":2208,"children":2209},{"style":466},[2210],{"type":45,"value":1529},{"type":40,"tag":376,"props":2212,"children":2213},{"class":378,"line":708},[2214,2219,2224,2228,2232,2237,2242,2246,2251],{"type":40,"tag":376,"props":2215,"children":2216},{"style":579},[2217],{"type":45,"value":2218},"  const",{"type":40,"tag":376,"props":2220,"children":2221},{"style":472},[2222],{"type":45,"value":2223}," threadId",{"type":40,"tag":376,"props":2225,"children":2226},{"style":466},[2227],{"type":45,"value":1551},{"type":40,"tag":376,"props":2229,"children":2230},{"style":472},[2231],{"type":45,"value":2198},{"type":40,"tag":376,"props":2233,"children":2234},{"style":466},[2235],{"type":45,"value":2236},"?.",{"type":40,"tag":376,"props":2238,"children":2239},{"style":472},[2240],{"type":45,"value":2241},"configurable",{"type":40,"tag":376,"props":2243,"children":2244},{"style":466},[2245],{"type":45,"value":2236},{"type":40,"tag":376,"props":2247,"children":2248},{"style":472},[2249],{"type":45,"value":2250},"thread_id",{"type":40,"tag":376,"props":2252,"children":2253},{"style":466},[2254],{"type":45,"value":525},{"type":40,"tag":376,"props":2256,"children":2257},{"class":378,"line":776},[2258,2262,2266,2270,2274,2279,2284,2289,2294,2299],{"type":40,"tag":376,"props":2259,"children":2260},{"style":460},[2261],{"type":45,"value":1576},{"type":40,"tag":376,"props":2263,"children":2264},{"style":466},[2265],{"type":45,"value":469},{"type":40,"tag":376,"props":2267,"children":2268},{"style":618},[2269],{"type":45,"value":2110},{"type":40,"tag":376,"props":2271,"children":2272},{"style":466},[2273],{"type":45,"value":626},{"type":40,"tag":376,"props":2275,"children":2276},{"style":466},[2277],{"type":45,"value":2278}," `",{"type":40,"tag":376,"props":2280,"children":2281},{"style":512},[2282],{"type":45,"value":2283},"Thread: ",{"type":40,"tag":376,"props":2285,"children":2286},{"style":466},[2287],{"type":45,"value":2288},"${",{"type":40,"tag":376,"props":2290,"children":2291},{"style":472},[2292],{"type":45,"value":2293},"threadId",{"type":40,"tag":376,"props":2295,"children":2296},{"style":466},[2297],{"type":45,"value":2298},"}`",{"type":40,"tag":376,"props":2300,"children":2301},{"style":466},[2302],{"type":45,"value":1710},{"type":40,"tag":376,"props":2304,"children":2305},{"class":378,"line":847},[2306],{"type":40,"tag":376,"props":2307,"children":2308},{"style":466},[2309],{"type":45,"value":1599},{"type":40,"tag":260,"props":2311,"children":2312},{},[],{"type":40,"tag":264,"props":2314,"children":2316},{"id":2315},"edges",[2317],{"type":45,"value":80},{"type":40,"tag":2319,"props":2320,"children":2321},"edge-type-selection",{},[2322],{"type":40,"tag":193,"props":2323,"children":2324},{},[2325,2344],{"type":40,"tag":197,"props":2326,"children":2327},{},[2328],{"type":40,"tag":201,"props":2329,"children":2330},{},[2331,2335,2340],{"type":40,"tag":205,"props":2332,"children":2333},{},[2334],{"type":45,"value":287},{"type":40,"tag":205,"props":2336,"children":2337},{},[2338],{"type":45,"value":2339},"Edge Type",{"type":40,"tag":205,"props":2341,"children":2342},{},[2343],{"type":45,"value":1756},{"type":40,"tag":216,"props":2345,"children":2346},{},[2347,2369,2391,2413],{"type":40,"tag":201,"props":2348,"children":2349},{},[2350,2355,2364],{"type":40,"tag":223,"props":2351,"children":2352},{},[2353],{"type":45,"value":2354},"Always go to same node",{"type":40,"tag":223,"props":2356,"children":2357},{},[2358],{"type":40,"tag":110,"props":2359,"children":2361},{"className":2360},[],[2362],{"type":45,"value":2363},"add_edge()",{"type":40,"tag":223,"props":2365,"children":2366},{},[2367],{"type":45,"value":2368},"Fixed, deterministic flow",{"type":40,"tag":201,"props":2370,"children":2371},{},[2372,2377,2386],{"type":40,"tag":223,"props":2373,"children":2374},{},[2375],{"type":45,"value":2376},"Route based on state",{"type":40,"tag":223,"props":2378,"children":2379},{},[2380],{"type":40,"tag":110,"props":2381,"children":2383},{"className":2382},[],[2384],{"type":45,"value":2385},"add_conditional_edges()",{"type":40,"tag":223,"props":2387,"children":2388},{},[2389],{"type":45,"value":2390},"Dynamic branching",{"type":40,"tag":201,"props":2392,"children":2393},{},[2394,2399,2408],{"type":40,"tag":223,"props":2395,"children":2396},{},[2397],{"type":45,"value":2398},"Update state AND route",{"type":40,"tag":223,"props":2400,"children":2401},{},[2402],{"type":40,"tag":110,"props":2403,"children":2405},{"className":2404},[],[2406],{"type":45,"value":2407},"Command",{"type":40,"tag":223,"props":2409,"children":2410},{},[2411],{"type":45,"value":2412},"Combine logic in single node",{"type":40,"tag":201,"props":2414,"children":2415},{},[2416,2421,2430],{"type":40,"tag":223,"props":2417,"children":2418},{},[2419],{"type":45,"value":2420},"Fan-out to multiple nodes",{"type":40,"tag":223,"props":2422,"children":2423},{},[2424],{"type":40,"tag":110,"props":2425,"children":2427},{"className":2426},[],[2428],{"type":45,"value":2429},"Send",{"type":40,"tag":223,"props":2431,"children":2432},{},[2433],{"type":45,"value":2434},"Parallel processing with dynamic inputs",{"type":40,"tag":2436,"props":2437,"children":2438},"ex-basic-graph",{},[2439,2655],{"type":40,"tag":360,"props":2440,"children":2441},{},[2442,2444],{"type":45,"value":2443},"\nSimple two-node graph with linear edges.\n",{"type":40,"tag":366,"props":2445,"children":2447},{"className":368,"code":2446,"language":360,"meta":370,"style":370},"from langgraph.graph import StateGraph, START, END\nfrom typing_extensions import TypedDict\n\nclass State(TypedDict):\n    input: str\n    output: str\n\ndef process_input(state: State) -> dict:\n    return {\"output\": f\"Processed: {state['input']}\"}\n\ndef finalize(state: State) -> dict:\n    return {\"output\": state[\"output\"].upper()}\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"process\", process_input)\n    .add_node(\"finalize\", finalize)\n    .add_edge(START, \"process\")\n    .add_edge(\"process\", \"finalize\")\n    .add_edge(\"finalize\", END)\n    .compile()\n)\n\nresult = graph.invoke({\"input\": \"hello\"})\nprint(result[\"output\"])  # \"PROCESSED: HELLO\"\n",[2448],{"type":40,"tag":110,"props":2449,"children":2450},{"__ignoreMap":370},[2451,2459,2467,2474,2481,2489,2497,2504,2512,2520,2527,2535,2543,2550,2558,2566,2575,2584,2593,2602,2611,2620,2629,2637,2646],{"type":40,"tag":376,"props":2452,"children":2453},{"class":378,"line":379},[2454],{"type":40,"tag":376,"props":2455,"children":2456},{},[2457],{"type":45,"value":2458},"from langgraph.graph import StateGraph, START, END\n",{"type":40,"tag":376,"props":2460,"children":2461},{"class":378,"line":388},[2462],{"type":40,"tag":376,"props":2463,"children":2464},{},[2465],{"type":45,"value":2466},"from typing_extensions import TypedDict\n",{"type":40,"tag":376,"props":2468,"children":2469},{"class":378,"line":397},[2470],{"type":40,"tag":376,"props":2471,"children":2472},{"emptyLinePlaceholder":401},[2473],{"type":45,"value":404},{"type":40,"tag":376,"props":2475,"children":2476},{"class":378,"line":407},[2477],{"type":40,"tag":376,"props":2478,"children":2479},{},[2480],{"type":45,"value":413},{"type":40,"tag":376,"props":2482,"children":2483},{"class":378,"line":416},[2484],{"type":40,"tag":376,"props":2485,"children":2486},{},[2487],{"type":45,"value":2488},"    input: str\n",{"type":40,"tag":376,"props":2490,"children":2491},{"class":378,"line":425},[2492],{"type":40,"tag":376,"props":2493,"children":2494},{},[2495],{"type":45,"value":2496},"    output: str\n",{"type":40,"tag":376,"props":2498,"children":2499},{"class":378,"line":434},[2500],{"type":40,"tag":376,"props":2501,"children":2502},{"emptyLinePlaceholder":401},[2503],{"type":45,"value":404},{"type":40,"tag":376,"props":2505,"children":2506},{"class":378,"line":708},[2507],{"type":40,"tag":376,"props":2508,"children":2509},{},[2510],{"type":45,"value":2511},"def process_input(state: State) -> dict:\n",{"type":40,"tag":376,"props":2513,"children":2514},{"class":378,"line":776},[2515],{"type":40,"tag":376,"props":2516,"children":2517},{},[2518],{"type":45,"value":2519},"    return {\"output\": f\"Processed: {state['input']}\"}\n",{"type":40,"tag":376,"props":2521,"children":2522},{"class":378,"line":847},[2523],{"type":40,"tag":376,"props":2524,"children":2525},{"emptyLinePlaceholder":401},[2526],{"type":45,"value":404},{"type":40,"tag":376,"props":2528,"children":2529},{"class":378,"line":860},[2530],{"type":40,"tag":376,"props":2531,"children":2532},{},[2533],{"type":45,"value":2534},"def finalize(state: State) -> dict:\n",{"type":40,"tag":376,"props":2536,"children":2537},{"class":378,"line":977},[2538],{"type":40,"tag":376,"props":2539,"children":2540},{},[2541],{"type":45,"value":2542},"    return {\"output\": state[\"output\"].upper()}\n",{"type":40,"tag":376,"props":2544,"children":2545},{"class":378,"line":985},[2546],{"type":40,"tag":376,"props":2547,"children":2548},{"emptyLinePlaceholder":401},[2549],{"type":45,"value":404},{"type":40,"tag":376,"props":2551,"children":2552},{"class":378,"line":993},[2553],{"type":40,"tag":376,"props":2554,"children":2555},{},[2556],{"type":45,"value":2557},"graph = (\n",{"type":40,"tag":376,"props":2559,"children":2560},{"class":378,"line":1002},[2561],{"type":40,"tag":376,"props":2562,"children":2563},{},[2564],{"type":45,"value":2565},"    StateGraph(State)\n",{"type":40,"tag":376,"props":2567,"children":2569},{"class":378,"line":2568},16,[2570],{"type":40,"tag":376,"props":2571,"children":2572},{},[2573],{"type":45,"value":2574},"    .add_node(\"process\", process_input)\n",{"type":40,"tag":376,"props":2576,"children":2578},{"class":378,"line":2577},17,[2579],{"type":40,"tag":376,"props":2580,"children":2581},{},[2582],{"type":45,"value":2583},"    .add_node(\"finalize\", finalize)\n",{"type":40,"tag":376,"props":2585,"children":2587},{"class":378,"line":2586},18,[2588],{"type":40,"tag":376,"props":2589,"children":2590},{},[2591],{"type":45,"value":2592},"    .add_edge(START, \"process\")\n",{"type":40,"tag":376,"props":2594,"children":2596},{"class":378,"line":2595},19,[2597],{"type":40,"tag":376,"props":2598,"children":2599},{},[2600],{"type":45,"value":2601},"    .add_edge(\"process\", \"finalize\")\n",{"type":40,"tag":376,"props":2603,"children":2605},{"class":378,"line":2604},20,[2606],{"type":40,"tag":376,"props":2607,"children":2608},{},[2609],{"type":45,"value":2610},"    .add_edge(\"finalize\", END)\n",{"type":40,"tag":376,"props":2612,"children":2614},{"class":378,"line":2613},21,[2615],{"type":40,"tag":376,"props":2616,"children":2617},{},[2618],{"type":45,"value":2619},"    .compile()\n",{"type":40,"tag":376,"props":2621,"children":2623},{"class":378,"line":2622},22,[2624],{"type":40,"tag":376,"props":2625,"children":2626},{},[2627],{"type":45,"value":2628},")\n",{"type":40,"tag":376,"props":2630,"children":2632},{"class":378,"line":2631},23,[2633],{"type":40,"tag":376,"props":2634,"children":2635},{"emptyLinePlaceholder":401},[2636],{"type":45,"value":404},{"type":40,"tag":376,"props":2638,"children":2640},{"class":378,"line":2639},24,[2641],{"type":40,"tag":376,"props":2642,"children":2643},{},[2644],{"type":45,"value":2645},"result = graph.invoke({\"input\": \"hello\"})\n",{"type":40,"tag":376,"props":2647,"children":2649},{"class":378,"line":2648},25,[2650],{"type":40,"tag":376,"props":2651,"children":2652},{},[2653],{"type":45,"value":2654},"print(result[\"output\"])  # \"PROCESSED: HELLO\"\n",{"type":40,"tag":442,"props":2656,"children":2657},{},[2658,2660],{"type":45,"value":2659},"\nChain nodes with addEdge and compile before invoking.\n",{"type":40,"tag":366,"props":2661,"children":2663},{"className":449,"code":2662,"language":442,"meta":370,"style":370},"import { StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  input: z.string(),\n  output: z.string().default(\"\"),\n});\n\nconst processInput = async (state: typeof State.State) => {\n  return { output: `Processed: ${state.input}` };\n};\n\nconst finalize = async (state: typeof State.State) => {\n  return { output: state.output.toUpperCase() };\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"process\", processInput)\n  .addNode(\"finalize\", finalize)\n  .addEdge(START, \"process\")\n  .addEdge(\"process\", \"finalize\")\n  .addEdge(\"finalize\", END)\n  .compile();\n\nconst result = await graph.invoke({ input: \"hello\" });\nconsole.log(result.output);  \u002F\u002F \"PROCESSED: HELLO\"\n",[2664],{"type":40,"tag":110,"props":2665,"children":2666},{"__ignoreMap":370},[2667,2733,2772,2779,2810,2842,2895,2910,2917,2977,3031,3038,3045,3105,3155,3162,3169,3198,3237,3274,3311,3358,3394,3414,3421,3499],{"type":40,"tag":376,"props":2668,"children":2669},{"class":378,"line":379},[2670,2674,2678,2683,2687,2691,2695,2700,2704,2709,2713,2717,2721,2725,2729],{"type":40,"tag":376,"props":2671,"children":2672},{"style":460},[2673],{"type":45,"value":463},{"type":40,"tag":376,"props":2675,"children":2676},{"style":466},[2677],{"type":45,"value":469},{"type":40,"tag":376,"props":2679,"children":2680},{"style":472},[2681],{"type":45,"value":2682}," StateGraph",{"type":40,"tag":376,"props":2684,"children":2685},{"style":466},[2686],{"type":45,"value":480},{"type":40,"tag":376,"props":2688,"children":2689},{"style":472},[2690],{"type":45,"value":475},{"type":40,"tag":376,"props":2692,"children":2693},{"style":466},[2694],{"type":45,"value":480},{"type":40,"tag":376,"props":2696,"children":2697},{"style":472},[2698],{"type":45,"value":2699}," START",{"type":40,"tag":376,"props":2701,"children":2702},{"style":466},[2703],{"type":45,"value":480},{"type":40,"tag":376,"props":2705,"children":2706},{"style":472},[2707],{"type":45,"value":2708}," END",{"type":40,"tag":376,"props":2710,"children":2711},{"style":466},[2712],{"type":45,"value":499},{"type":40,"tag":376,"props":2714,"children":2715},{"style":460},[2716],{"type":45,"value":504},{"type":40,"tag":376,"props":2718,"children":2719},{"style":466},[2720],{"type":45,"value":509},{"type":40,"tag":376,"props":2722,"children":2723},{"style":512},[2724],{"type":45,"value":515},{"type":40,"tag":376,"props":2726,"children":2727},{"style":466},[2728],{"type":45,"value":520},{"type":40,"tag":376,"props":2730,"children":2731},{"style":466},[2732],{"type":45,"value":525},{"type":40,"tag":376,"props":2734,"children":2735},{"class":378,"line":388},[2736,2740,2744,2748,2752,2756,2760,2764,2768],{"type":40,"tag":376,"props":2737,"children":2738},{"style":460},[2739],{"type":45,"value":463},{"type":40,"tag":376,"props":2741,"children":2742},{"style":466},[2743],{"type":45,"value":469},{"type":40,"tag":376,"props":2745,"children":2746},{"style":472},[2747],{"type":45,"value":541},{"type":40,"tag":376,"props":2749,"children":2750},{"style":466},[2751],{"type":45,"value":499},{"type":40,"tag":376,"props":2753,"children":2754},{"style":460},[2755],{"type":45,"value":504},{"type":40,"tag":376,"props":2757,"children":2758},{"style":466},[2759],{"type":45,"value":509},{"type":40,"tag":376,"props":2761,"children":2762},{"style":512},[2763],{"type":45,"value":558},{"type":40,"tag":376,"props":2765,"children":2766},{"style":466},[2767],{"type":45,"value":520},{"type":40,"tag":376,"props":2769,"children":2770},{"style":466},[2771],{"type":45,"value":525},{"type":40,"tag":376,"props":2773,"children":2774},{"class":378,"line":397},[2775],{"type":40,"tag":376,"props":2776,"children":2777},{"emptyLinePlaceholder":401},[2778],{"type":45,"value":404},{"type":40,"tag":376,"props":2780,"children":2781},{"class":378,"line":407},[2782,2786,2790,2794,2798,2802,2806],{"type":40,"tag":376,"props":2783,"children":2784},{"style":579},[2785],{"type":45,"value":582},{"type":40,"tag":376,"props":2787,"children":2788},{"style":472},[2789],{"type":45,"value":587},{"type":40,"tag":376,"props":2791,"children":2792},{"style":466},[2793],{"type":45,"value":592},{"type":40,"tag":376,"props":2795,"children":2796},{"style":466},[2797],{"type":45,"value":597},{"type":40,"tag":376,"props":2799,"children":2800},{"style":600},[2801],{"type":45,"value":475},{"type":40,"tag":376,"props":2803,"children":2804},{"style":472},[2805],{"type":45,"value":607},{"type":40,"tag":376,"props":2807,"children":2808},{"style":466},[2809],{"type":45,"value":612},{"type":40,"tag":376,"props":2811,"children":2812},{"class":378,"line":416},[2813,2818,2822,2826,2830,2834,2838],{"type":40,"tag":376,"props":2814,"children":2815},{"style":618},[2816],{"type":45,"value":2817},"  input",{"type":40,"tag":376,"props":2819,"children":2820},{"style":466},[2821],{"type":45,"value":626},{"type":40,"tag":376,"props":2823,"children":2824},{"style":472},[2825],{"type":45,"value":541},{"type":40,"tag":376,"props":2827,"children":2828},{"style":466},[2829],{"type":45,"value":635},{"type":40,"tag":376,"props":2831,"children":2832},{"style":600},[2833],{"type":45,"value":640},{"type":40,"tag":376,"props":2835,"children":2836},{"style":472},[2837],{"type":45,"value":645},{"type":40,"tag":376,"props":2839,"children":2840},{"style":466},[2841],{"type":45,"value":773},{"type":40,"tag":376,"props":2843,"children":2844},{"class":378,"line":425},[2845,2850,2854,2858,2862,2866,2870,2874,2878,2882,2887,2891],{"type":40,"tag":376,"props":2846,"children":2847},{"style":618},[2848],{"type":45,"value":2849},"  output",{"type":40,"tag":376,"props":2851,"children":2852},{"style":466},[2853],{"type":45,"value":626},{"type":40,"tag":376,"props":2855,"children":2856},{"style":472},[2857],{"type":45,"value":541},{"type":40,"tag":376,"props":2859,"children":2860},{"style":466},[2861],{"type":45,"value":635},{"type":40,"tag":376,"props":2863,"children":2864},{"style":600},[2865],{"type":45,"value":640},{"type":40,"tag":376,"props":2867,"children":2868},{"style":472},[2869],{"type":45,"value":645},{"type":40,"tag":376,"props":2871,"children":2872},{"style":466},[2873],{"type":45,"value":635},{"type":40,"tag":376,"props":2875,"children":2876},{"style":600},[2877],{"type":45,"value":750},{"type":40,"tag":376,"props":2879,"children":2880},{"style":472},[2881],{"type":45,"value":607},{"type":40,"tag":376,"props":2883,"children":2884},{"style":466},[2885],{"type":45,"value":2886},"\"\"",{"type":40,"tag":376,"props":2888,"children":2889},{"style":472},[2890],{"type":45,"value":816},{"type":40,"tag":376,"props":2892,"children":2893},{"style":466},[2894],{"type":45,"value":773},{"type":40,"tag":376,"props":2896,"children":2897},{"class":378,"line":434},[2898,2902,2906],{"type":40,"tag":376,"props":2899,"children":2900},{"style":466},[2901],{"type":45,"value":866},{"type":40,"tag":376,"props":2903,"children":2904},{"style":472},[2905],{"type":45,"value":816},{"type":40,"tag":376,"props":2907,"children":2908},{"style":466},[2909],{"type":45,"value":525},{"type":40,"tag":376,"props":2911,"children":2912},{"class":378,"line":708},[2913],{"type":40,"tag":376,"props":2914,"children":2915},{"emptyLinePlaceholder":401},[2916],{"type":45,"value":404},{"type":40,"tag":376,"props":2918,"children":2919},{"class":378,"line":776},[2920,2924,2929,2933,2937,2941,2945,2949,2953,2957,2961,2965,2969,2973],{"type":40,"tag":376,"props":2921,"children":2922},{"style":579},[2923],{"type":45,"value":582},{"type":40,"tag":376,"props":2925,"children":2926},{"style":472},[2927],{"type":45,"value":2928}," processInput ",{"type":40,"tag":376,"props":2930,"children":2931},{"style":466},[2932],{"type":45,"value":592},{"type":40,"tag":376,"props":2934,"children":2935},{"style":579},[2936],{"type":45,"value":1484},{"type":40,"tag":376,"props":2938,"children":2939},{"style":466},[2940],{"type":45,"value":796},{"type":40,"tag":376,"props":2942,"children":2943},{"style":799},[2944],{"type":45,"value":1493},{"type":40,"tag":376,"props":2946,"children":2947},{"style":466},[2948],{"type":45,"value":626},{"type":40,"tag":376,"props":2950,"children":2951},{"style":466},[2952],{"type":45,"value":1502},{"type":40,"tag":376,"props":2954,"children":2955},{"style":472},[2956],{"type":45,"value":1507},{"type":40,"tag":376,"props":2958,"children":2959},{"style":466},[2960],{"type":45,"value":635},{"type":40,"tag":376,"props":2962,"children":2963},{"style":472},[2964],{"type":45,"value":1516},{"type":40,"tag":376,"props":2966,"children":2967},{"style":466},[2968],{"type":45,"value":816},{"type":40,"tag":376,"props":2970,"children":2971},{"style":579},[2972],{"type":45,"value":763},{"type":40,"tag":376,"props":2974,"children":2975},{"style":466},[2976],{"type":45,"value":1529},{"type":40,"tag":376,"props":2978,"children":2979},{"class":378,"line":847},[2980,2984,2988,2993,2997,3001,3006,3010,3014,3018,3023,3027],{"type":40,"tag":376,"props":2981,"children":2982},{"style":460},[2983],{"type":45,"value":1576},{"type":40,"tag":376,"props":2985,"children":2986},{"style":466},[2987],{"type":45,"value":469},{"type":40,"tag":376,"props":2989,"children":2990},{"style":618},[2991],{"type":45,"value":2992}," output",{"type":40,"tag":376,"props":2994,"children":2995},{"style":466},[2996],{"type":45,"value":626},{"type":40,"tag":376,"props":2998,"children":2999},{"style":466},[3000],{"type":45,"value":2278},{"type":40,"tag":376,"props":3002,"children":3003},{"style":512},[3004],{"type":45,"value":3005},"Processed: ",{"type":40,"tag":376,"props":3007,"children":3008},{"style":466},[3009],{"type":45,"value":2288},{"type":40,"tag":376,"props":3011,"children":3012},{"style":472},[3013],{"type":45,"value":1493},{"type":40,"tag":376,"props":3015,"children":3016},{"style":466},[3017],{"type":45,"value":635},{"type":40,"tag":376,"props":3019,"children":3020},{"style":472},[3021],{"type":45,"value":3022},"input",{"type":40,"tag":376,"props":3024,"children":3025},{"style":466},[3026],{"type":45,"value":2298},{"type":40,"tag":376,"props":3028,"children":3029},{"style":466},[3030],{"type":45,"value":1710},{"type":40,"tag":376,"props":3032,"children":3033},{"class":378,"line":860},[3034],{"type":40,"tag":376,"props":3035,"children":3036},{"style":466},[3037],{"type":45,"value":1599},{"type":40,"tag":376,"props":3039,"children":3040},{"class":378,"line":977},[3041],{"type":40,"tag":376,"props":3042,"children":3043},{"emptyLinePlaceholder":401},[3044],{"type":45,"value":404},{"type":40,"tag":376,"props":3046,"children":3047},{"class":378,"line":985},[3048,3052,3057,3061,3065,3069,3073,3077,3081,3085,3089,3093,3097,3101],{"type":40,"tag":376,"props":3049,"children":3050},{"style":579},[3051],{"type":45,"value":582},{"type":40,"tag":376,"props":3053,"children":3054},{"style":472},[3055],{"type":45,"value":3056}," finalize ",{"type":40,"tag":376,"props":3058,"children":3059},{"style":466},[3060],{"type":45,"value":592},{"type":40,"tag":376,"props":3062,"children":3063},{"style":579},[3064],{"type":45,"value":1484},{"type":40,"tag":376,"props":3066,"children":3067},{"style":466},[3068],{"type":45,"value":796},{"type":40,"tag":376,"props":3070,"children":3071},{"style":799},[3072],{"type":45,"value":1493},{"type":40,"tag":376,"props":3074,"children":3075},{"style":466},[3076],{"type":45,"value":626},{"type":40,"tag":376,"props":3078,"children":3079},{"style":466},[3080],{"type":45,"value":1502},{"type":40,"tag":376,"props":3082,"children":3083},{"style":472},[3084],{"type":45,"value":1507},{"type":40,"tag":376,"props":3086,"children":3087},{"style":466},[3088],{"type":45,"value":635},{"type":40,"tag":376,"props":3090,"children":3091},{"style":472},[3092],{"type":45,"value":1516},{"type":40,"tag":376,"props":3094,"children":3095},{"style":466},[3096],{"type":45,"value":816},{"type":40,"tag":376,"props":3098,"children":3099},{"style":579},[3100],{"type":45,"value":763},{"type":40,"tag":376,"props":3102,"children":3103},{"style":466},[3104],{"type":45,"value":1529},{"type":40,"tag":376,"props":3106,"children":3107},{"class":378,"line":993},[3108,3112,3116,3120,3124,3128,3132,3137,3141,3146,3151],{"type":40,"tag":376,"props":3109,"children":3110},{"style":460},[3111],{"type":45,"value":1576},{"type":40,"tag":376,"props":3113,"children":3114},{"style":466},[3115],{"type":45,"value":469},{"type":40,"tag":376,"props":3117,"children":3118},{"style":618},[3119],{"type":45,"value":2992},{"type":40,"tag":376,"props":3121,"children":3122},{"style":466},[3123],{"type":45,"value":626},{"type":40,"tag":376,"props":3125,"children":3126},{"style":472},[3127],{"type":45,"value":1581},{"type":40,"tag":376,"props":3129,"children":3130},{"style":466},[3131],{"type":45,"value":635},{"type":40,"tag":376,"props":3133,"children":3134},{"style":472},[3135],{"type":45,"value":3136},"output",{"type":40,"tag":376,"props":3138,"children":3139},{"style":466},[3140],{"type":45,"value":635},{"type":40,"tag":376,"props":3142,"children":3143},{"style":600},[3144],{"type":45,"value":3145},"toUpperCase",{"type":40,"tag":376,"props":3147,"children":3148},{"style":618},[3149],{"type":45,"value":3150},"() ",{"type":40,"tag":376,"props":3152,"children":3153},{"style":466},[3154],{"type":45,"value":1599},{"type":40,"tag":376,"props":3156,"children":3157},{"class":378,"line":1002},[3158],{"type":40,"tag":376,"props":3159,"children":3160},{"style":466},[3161],{"type":45,"value":1599},{"type":40,"tag":376,"props":3163,"children":3164},{"class":378,"line":2568},[3165],{"type":40,"tag":376,"props":3166,"children":3167},{"emptyLinePlaceholder":401},[3168],{"type":45,"value":404},{"type":40,"tag":376,"props":3170,"children":3171},{"class":378,"line":2577},[3172,3176,3181,3185,3189,3193],{"type":40,"tag":376,"props":3173,"children":3174},{"style":579},[3175],{"type":45,"value":582},{"type":40,"tag":376,"props":3177,"children":3178},{"style":472},[3179],{"type":45,"value":3180}," graph ",{"type":40,"tag":376,"props":3182,"children":3183},{"style":466},[3184],{"type":45,"value":592},{"type":40,"tag":376,"props":3186,"children":3187},{"style":466},[3188],{"type":45,"value":597},{"type":40,"tag":376,"props":3190,"children":3191},{"style":600},[3192],{"type":45,"value":2682},{"type":40,"tag":376,"props":3194,"children":3195},{"style":472},[3196],{"type":45,"value":3197},"(State)\n",{"type":40,"tag":376,"props":3199,"children":3200},{"class":378,"line":2586},[3201,3206,3211,3215,3219,3224,3228,3232],{"type":40,"tag":376,"props":3202,"children":3203},{"style":466},[3204],{"type":45,"value":3205},"  .",{"type":40,"tag":376,"props":3207,"children":3208},{"style":600},[3209],{"type":45,"value":3210},"addNode",{"type":40,"tag":376,"props":3212,"children":3213},{"style":472},[3214],{"type":45,"value":607},{"type":40,"tag":376,"props":3216,"children":3217},{"style":466},[3218],{"type":45,"value":520},{"type":40,"tag":376,"props":3220,"children":3221},{"style":512},[3222],{"type":45,"value":3223},"process",{"type":40,"tag":376,"props":3225,"children":3226},{"style":466},[3227],{"type":45,"value":520},{"type":40,"tag":376,"props":3229,"children":3230},{"style":466},[3231],{"type":45,"value":480},{"type":40,"tag":376,"props":3233,"children":3234},{"style":472},[3235],{"type":45,"value":3236}," processInput)\n",{"type":40,"tag":376,"props":3238,"children":3239},{"class":378,"line":2595},[3240,3244,3248,3252,3256,3261,3265,3269],{"type":40,"tag":376,"props":3241,"children":3242},{"style":466},[3243],{"type":45,"value":3205},{"type":40,"tag":376,"props":3245,"children":3246},{"style":600},[3247],{"type":45,"value":3210},{"type":40,"tag":376,"props":3249,"children":3250},{"style":472},[3251],{"type":45,"value":607},{"type":40,"tag":376,"props":3253,"children":3254},{"style":466},[3255],{"type":45,"value":520},{"type":40,"tag":376,"props":3257,"children":3258},{"style":512},[3259],{"type":45,"value":3260},"finalize",{"type":40,"tag":376,"props":3262,"children":3263},{"style":466},[3264],{"type":45,"value":520},{"type":40,"tag":376,"props":3266,"children":3267},{"style":466},[3268],{"type":45,"value":480},{"type":40,"tag":376,"props":3270,"children":3271},{"style":472},[3272],{"type":45,"value":3273}," finalize)\n",{"type":40,"tag":376,"props":3275,"children":3276},{"class":378,"line":2604},[3277,3281,3286,3291,3295,3299,3303,3307],{"type":40,"tag":376,"props":3278,"children":3279},{"style":466},[3280],{"type":45,"value":3205},{"type":40,"tag":376,"props":3282,"children":3283},{"style":600},[3284],{"type":45,"value":3285},"addEdge",{"type":40,"tag":376,"props":3287,"children":3288},{"style":472},[3289],{"type":45,"value":3290},"(START",{"type":40,"tag":376,"props":3292,"children":3293},{"style":466},[3294],{"type":45,"value":480},{"type":40,"tag":376,"props":3296,"children":3297},{"style":466},[3298],{"type":45,"value":509},{"type":40,"tag":376,"props":3300,"children":3301},{"style":512},[3302],{"type":45,"value":3223},{"type":40,"tag":376,"props":3304,"children":3305},{"style":466},[3306],{"type":45,"value":520},{"type":40,"tag":376,"props":3308,"children":3309},{"style":472},[3310],{"type":45,"value":2628},{"type":40,"tag":376,"props":3312,"children":3313},{"class":378,"line":2613},[3314,3318,3322,3326,3330,3334,3338,3342,3346,3350,3354],{"type":40,"tag":376,"props":3315,"children":3316},{"style":466},[3317],{"type":45,"value":3205},{"type":40,"tag":376,"props":3319,"children":3320},{"style":600},[3321],{"type":45,"value":3285},{"type":40,"tag":376,"props":3323,"children":3324},{"style":472},[3325],{"type":45,"value":607},{"type":40,"tag":376,"props":3327,"children":3328},{"style":466},[3329],{"type":45,"value":520},{"type":40,"tag":376,"props":3331,"children":3332},{"style":512},[3333],{"type":45,"value":3223},{"type":40,"tag":376,"props":3335,"children":3336},{"style":466},[3337],{"type":45,"value":520},{"type":40,"tag":376,"props":3339,"children":3340},{"style":466},[3341],{"type":45,"value":480},{"type":40,"tag":376,"props":3343,"children":3344},{"style":466},[3345],{"type":45,"value":509},{"type":40,"tag":376,"props":3347,"children":3348},{"style":512},[3349],{"type":45,"value":3260},{"type":40,"tag":376,"props":3351,"children":3352},{"style":466},[3353],{"type":45,"value":520},{"type":40,"tag":376,"props":3355,"children":3356},{"style":472},[3357],{"type":45,"value":2628},{"type":40,"tag":376,"props":3359,"children":3360},{"class":378,"line":2622},[3361,3365,3369,3373,3377,3381,3385,3389],{"type":40,"tag":376,"props":3362,"children":3363},{"style":466},[3364],{"type":45,"value":3205},{"type":40,"tag":376,"props":3366,"children":3367},{"style":600},[3368],{"type":45,"value":3285},{"type":40,"tag":376,"props":3370,"children":3371},{"style":472},[3372],{"type":45,"value":607},{"type":40,"tag":376,"props":3374,"children":3375},{"style":466},[3376],{"type":45,"value":520},{"type":40,"tag":376,"props":3378,"children":3379},{"style":512},[3380],{"type":45,"value":3260},{"type":40,"tag":376,"props":3382,"children":3383},{"style":466},[3384],{"type":45,"value":520},{"type":40,"tag":376,"props":3386,"children":3387},{"style":466},[3388],{"type":45,"value":480},{"type":40,"tag":376,"props":3390,"children":3391},{"style":472},[3392],{"type":45,"value":3393}," END)\n",{"type":40,"tag":376,"props":3395,"children":3396},{"class":378,"line":2631},[3397,3401,3406,3410],{"type":40,"tag":376,"props":3398,"children":3399},{"style":466},[3400],{"type":45,"value":3205},{"type":40,"tag":376,"props":3402,"children":3403},{"style":600},[3404],{"type":45,"value":3405},"compile",{"type":40,"tag":376,"props":3407,"children":3408},{"style":472},[3409],{"type":45,"value":645},{"type":40,"tag":376,"props":3411,"children":3412},{"style":466},[3413],{"type":45,"value":525},{"type":40,"tag":376,"props":3415,"children":3416},{"class":378,"line":2639},[3417],{"type":40,"tag":376,"props":3418,"children":3419},{"emptyLinePlaceholder":401},[3420],{"type":45,"value":404},{"type":40,"tag":376,"props":3422,"children":3423},{"class":378,"line":2648},[3424,3428,3433,3437,3442,3447,3451,3456,3460,3465,3470,3474,3478,3483,3487,3491,3495],{"type":40,"tag":376,"props":3425,"children":3426},{"style":579},[3427],{"type":45,"value":582},{"type":40,"tag":376,"props":3429,"children":3430},{"style":472},[3431],{"type":45,"value":3432}," result ",{"type":40,"tag":376,"props":3434,"children":3435},{"style":466},[3436],{"type":45,"value":592},{"type":40,"tag":376,"props":3438,"children":3439},{"style":460},[3440],{"type":45,"value":3441}," await",{"type":40,"tag":376,"props":3443,"children":3444},{"style":472},[3445],{"type":45,"value":3446}," graph",{"type":40,"tag":376,"props":3448,"children":3449},{"style":466},[3450],{"type":45,"value":635},{"type":40,"tag":376,"props":3452,"children":3453},{"style":600},[3454],{"type":45,"value":3455},"invoke",{"type":40,"tag":376,"props":3457,"children":3458},{"style":472},[3459],{"type":45,"value":607},{"type":40,"tag":376,"props":3461,"children":3462},{"style":466},[3463],{"type":45,"value":3464},"{",{"type":40,"tag":376,"props":3466,"children":3467},{"style":618},[3468],{"type":45,"value":3469}," input",{"type":40,"tag":376,"props":3471,"children":3472},{"style":466},[3473],{"type":45,"value":626},{"type":40,"tag":376,"props":3475,"children":3476},{"style":466},[3477],{"type":45,"value":509},{"type":40,"tag":376,"props":3479,"children":3480},{"style":512},[3481],{"type":45,"value":3482},"hello",{"type":40,"tag":376,"props":3484,"children":3485},{"style":466},[3486],{"type":45,"value":520},{"type":40,"tag":376,"props":3488,"children":3489},{"style":466},[3490],{"type":45,"value":499},{"type":40,"tag":376,"props":3492,"children":3493},{"style":472},[3494],{"type":45,"value":816},{"type":40,"tag":376,"props":3496,"children":3497},{"style":466},[3498],{"type":45,"value":525},{"type":40,"tag":376,"props":3500,"children":3502},{"class":378,"line":3501},26,[3503,3508,3512,3517,3522,3526,3531,3535],{"type":40,"tag":376,"props":3504,"children":3505},{"style":472},[3506],{"type":45,"value":3507},"console",{"type":40,"tag":376,"props":3509,"children":3510},{"style":466},[3511],{"type":45,"value":635},{"type":40,"tag":376,"props":3513,"children":3514},{"style":600},[3515],{"type":45,"value":3516},"log",{"type":40,"tag":376,"props":3518,"children":3519},{"style":472},[3520],{"type":45,"value":3521},"(result",{"type":40,"tag":376,"props":3523,"children":3524},{"style":466},[3525],{"type":45,"value":635},{"type":40,"tag":376,"props":3527,"children":3528},{"style":472},[3529],{"type":45,"value":3530},"output)",{"type":40,"tag":376,"props":3532,"children":3533},{"style":466},[3534],{"type":45,"value":1586},{"type":40,"tag":376,"props":3536,"children":3537},{"style":652},[3538],{"type":45,"value":3539},"  \u002F\u002F \"PROCESSED: HELLO\"\n",{"type":40,"tag":3541,"props":3542,"children":3543},"ex-conditional-edges",{},[3544,3763],{"type":40,"tag":360,"props":3545,"children":3546},{},[3547,3549],{"type":45,"value":3548},"\nRoute to different nodes based on state with conditional edges.\n",{"type":40,"tag":366,"props":3550,"children":3552},{"className":368,"code":3551,"language":360,"meta":370,"style":370},"from typing import Literal\nfrom langgraph.graph import StateGraph, START, END\n\nclass State(TypedDict):\n    query: str\n    route: str\n    result: str\n\ndef classify(state: State) -> dict:\n    if \"weather\" in state[\"query\"].lower():\n        return {\"route\": \"weather\"}\n    return {\"route\": \"general\"}\n\ndef route_query(state: State) -> Literal[\"weather\", \"general\"]:\n    return state[\"route\"]\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"classify\", classify)\n    .add_node(\"weather\", lambda s: {\"result\": \"Sunny, 72F\"})\n    .add_node(\"general\", lambda s: {\"result\": \"General response\"})\n    .add_edge(START, \"classify\")\n    .add_conditional_edges(\"classify\", route_query, [\"weather\", \"general\"])\n    .add_edge(\"weather\", END)\n    .add_edge(\"general\", END)\n    .compile()\n)\n",[3553],{"type":40,"tag":110,"props":3554,"children":3555},{"__ignoreMap":370},[3556,3564,3571,3578,3585,3593,3601,3609,3616,3624,3632,3640,3648,3655,3663,3671,3678,3685,3692,3700,3708,3716,3724,3732,3740,3748,3755],{"type":40,"tag":376,"props":3557,"children":3558},{"class":378,"line":379},[3559],{"type":40,"tag":376,"props":3560,"children":3561},{},[3562],{"type":45,"value":3563},"from typing import Literal\n",{"type":40,"tag":376,"props":3565,"children":3566},{"class":378,"line":388},[3567],{"type":40,"tag":376,"props":3568,"children":3569},{},[3570],{"type":45,"value":2458},{"type":40,"tag":376,"props":3572,"children":3573},{"class":378,"line":397},[3574],{"type":40,"tag":376,"props":3575,"children":3576},{"emptyLinePlaceholder":401},[3577],{"type":45,"value":404},{"type":40,"tag":376,"props":3579,"children":3580},{"class":378,"line":407},[3581],{"type":40,"tag":376,"props":3582,"children":3583},{},[3584],{"type":45,"value":413},{"type":40,"tag":376,"props":3586,"children":3587},{"class":378,"line":416},[3588],{"type":40,"tag":376,"props":3589,"children":3590},{},[3591],{"type":45,"value":3592},"    query: str\n",{"type":40,"tag":376,"props":3594,"children":3595},{"class":378,"line":425},[3596],{"type":40,"tag":376,"props":3597,"children":3598},{},[3599],{"type":45,"value":3600},"    route: str\n",{"type":40,"tag":376,"props":3602,"children":3603},{"class":378,"line":434},[3604],{"type":40,"tag":376,"props":3605,"children":3606},{},[3607],{"type":45,"value":3608},"    result: str\n",{"type":40,"tag":376,"props":3610,"children":3611},{"class":378,"line":708},[3612],{"type":40,"tag":376,"props":3613,"children":3614},{"emptyLinePlaceholder":401},[3615],{"type":45,"value":404},{"type":40,"tag":376,"props":3617,"children":3618},{"class":378,"line":776},[3619],{"type":40,"tag":376,"props":3620,"children":3621},{},[3622],{"type":45,"value":3623},"def classify(state: State) -> dict:\n",{"type":40,"tag":376,"props":3625,"children":3626},{"class":378,"line":847},[3627],{"type":40,"tag":376,"props":3628,"children":3629},{},[3630],{"type":45,"value":3631},"    if \"weather\" in state[\"query\"].lower():\n",{"type":40,"tag":376,"props":3633,"children":3634},{"class":378,"line":860},[3635],{"type":40,"tag":376,"props":3636,"children":3637},{},[3638],{"type":45,"value":3639},"        return {\"route\": \"weather\"}\n",{"type":40,"tag":376,"props":3641,"children":3642},{"class":378,"line":977},[3643],{"type":40,"tag":376,"props":3644,"children":3645},{},[3646],{"type":45,"value":3647},"    return {\"route\": \"general\"}\n",{"type":40,"tag":376,"props":3649,"children":3650},{"class":378,"line":985},[3651],{"type":40,"tag":376,"props":3652,"children":3653},{"emptyLinePlaceholder":401},[3654],{"type":45,"value":404},{"type":40,"tag":376,"props":3656,"children":3657},{"class":378,"line":993},[3658],{"type":40,"tag":376,"props":3659,"children":3660},{},[3661],{"type":45,"value":3662},"def route_query(state: State) -> Literal[\"weather\", \"general\"]:\n",{"type":40,"tag":376,"props":3664,"children":3665},{"class":378,"line":1002},[3666],{"type":40,"tag":376,"props":3667,"children":3668},{},[3669],{"type":45,"value":3670},"    return state[\"route\"]\n",{"type":40,"tag":376,"props":3672,"children":3673},{"class":378,"line":2568},[3674],{"type":40,"tag":376,"props":3675,"children":3676},{"emptyLinePlaceholder":401},[3677],{"type":45,"value":404},{"type":40,"tag":376,"props":3679,"children":3680},{"class":378,"line":2577},[3681],{"type":40,"tag":376,"props":3682,"children":3683},{},[3684],{"type":45,"value":2557},{"type":40,"tag":376,"props":3686,"children":3687},{"class":378,"line":2586},[3688],{"type":40,"tag":376,"props":3689,"children":3690},{},[3691],{"type":45,"value":2565},{"type":40,"tag":376,"props":3693,"children":3694},{"class":378,"line":2595},[3695],{"type":40,"tag":376,"props":3696,"children":3697},{},[3698],{"type":45,"value":3699},"    .add_node(\"classify\", classify)\n",{"type":40,"tag":376,"props":3701,"children":3702},{"class":378,"line":2604},[3703],{"type":40,"tag":376,"props":3704,"children":3705},{},[3706],{"type":45,"value":3707},"    .add_node(\"weather\", lambda s: {\"result\": \"Sunny, 72F\"})\n",{"type":40,"tag":376,"props":3709,"children":3710},{"class":378,"line":2613},[3711],{"type":40,"tag":376,"props":3712,"children":3713},{},[3714],{"type":45,"value":3715},"    .add_node(\"general\", lambda s: {\"result\": \"General response\"})\n",{"type":40,"tag":376,"props":3717,"children":3718},{"class":378,"line":2622},[3719],{"type":40,"tag":376,"props":3720,"children":3721},{},[3722],{"type":45,"value":3723},"    .add_edge(START, \"classify\")\n",{"type":40,"tag":376,"props":3725,"children":3726},{"class":378,"line":2631},[3727],{"type":40,"tag":376,"props":3728,"children":3729},{},[3730],{"type":45,"value":3731},"    .add_conditional_edges(\"classify\", route_query, [\"weather\", \"general\"])\n",{"type":40,"tag":376,"props":3733,"children":3734},{"class":378,"line":2639},[3735],{"type":40,"tag":376,"props":3736,"children":3737},{},[3738],{"type":45,"value":3739},"    .add_edge(\"weather\", END)\n",{"type":40,"tag":376,"props":3741,"children":3742},{"class":378,"line":2648},[3743],{"type":40,"tag":376,"props":3744,"children":3745},{},[3746],{"type":45,"value":3747},"    .add_edge(\"general\", END)\n",{"type":40,"tag":376,"props":3749,"children":3750},{"class":378,"line":3501},[3751],{"type":40,"tag":376,"props":3752,"children":3753},{},[3754],{"type":45,"value":2619},{"type":40,"tag":376,"props":3756,"children":3758},{"class":378,"line":3757},27,[3759],{"type":40,"tag":376,"props":3760,"children":3761},{},[3762],{"type":45,"value":2628},{"type":40,"tag":442,"props":3764,"children":3765},{},[3766,3768],{"type":45,"value":3767},"\naddConditionalEdges routes based on function return value.\n",{"type":40,"tag":366,"props":3769,"children":3771},{"className":449,"code":3770,"language":442,"meta":370,"style":370},"import { StateGraph, StateSchema, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  query: z.string(),\n  route: z.string().default(\"\"),\n  result: z.string().default(\"\"),\n});\n\nconst classify = async (state: typeof State.State) => {\n  if (state.query.toLowerCase().includes(\"weather\")) {\n    return { route: \"weather\" };\n  }\n  return { route: \"general\" };\n};\n\nconst routeQuery = (state: typeof State.State) => state.route;\n\nconst graph = new StateGraph(State)\n  .addNode(\"classify\", classify)\n  .addNode(\"weather\", async () => ({ result: \"Sunny, 72F\" }))\n  .addNode(\"general\", async () => ({ result: \"General response\" }))\n  .addEdge(START, \"classify\")\n  .addConditionalEdges(\"classify\", routeQuery, [\"weather\", \"general\"])\n  .addEdge(\"weather\", END)\n  .addEdge(\"general\", END)\n  .compile();\n",[3772],{"type":40,"tag":110,"props":3773,"children":3774},{"__ignoreMap":370},[3775,3838,3877,3884,3915,3947,3999,4051,4066,4073,4133,4206,4243,4251,4287,4294,4301,4370,4377,4404,4441,4524,4604,4639,4718,4753,4788],{"type":40,"tag":376,"props":3776,"children":3777},{"class":378,"line":379},[3778,3782,3786,3790,3794,3798,3802,3806,3810,3814,3818,3822,3826,3830,3834],{"type":40,"tag":376,"props":3779,"children":3780},{"style":460},[3781],{"type":45,"value":463},{"type":40,"tag":376,"props":3783,"children":3784},{"style":466},[3785],{"type":45,"value":469},{"type":40,"tag":376,"props":3787,"children":3788},{"style":472},[3789],{"type":45,"value":2682},{"type":40,"tag":376,"props":3791,"children":3792},{"style":466},[3793],{"type":45,"value":480},{"type":40,"tag":376,"props":3795,"children":3796},{"style":472},[3797],{"type":45,"value":475},{"type":40,"tag":376,"props":3799,"children":3800},{"style":466},[3801],{"type":45,"value":480},{"type":40,"tag":376,"props":3803,"children":3804},{"style":472},[3805],{"type":45,"value":2699},{"type":40,"tag":376,"props":3807,"children":3808},{"style":466},[3809],{"type":45,"value":480},{"type":40,"tag":376,"props":3811,"children":3812},{"style":472},[3813],{"type":45,"value":2708},{"type":40,"tag":376,"props":3815,"children":3816},{"style":466},[3817],{"type":45,"value":499},{"type":40,"tag":376,"props":3819,"children":3820},{"style":460},[3821],{"type":45,"value":504},{"type":40,"tag":376,"props":3823,"children":3824},{"style":466},[3825],{"type":45,"value":509},{"type":40,"tag":376,"props":3827,"children":3828},{"style":512},[3829],{"type":45,"value":515},{"type":40,"tag":376,"props":3831,"children":3832},{"style":466},[3833],{"type":45,"value":520},{"type":40,"tag":376,"props":3835,"children":3836},{"style":466},[3837],{"type":45,"value":525},{"type":40,"tag":376,"props":3839,"children":3840},{"class":378,"line":388},[3841,3845,3849,3853,3857,3861,3865,3869,3873],{"type":40,"tag":376,"props":3842,"children":3843},{"style":460},[3844],{"type":45,"value":463},{"type":40,"tag":376,"props":3846,"children":3847},{"style":466},[3848],{"type":45,"value":469},{"type":40,"tag":376,"props":3850,"children":3851},{"style":472},[3852],{"type":45,"value":541},{"type":40,"tag":376,"props":3854,"children":3855},{"style":466},[3856],{"type":45,"value":499},{"type":40,"tag":376,"props":3858,"children":3859},{"style":460},[3860],{"type":45,"value":504},{"type":40,"tag":376,"props":3862,"children":3863},{"style":466},[3864],{"type":45,"value":509},{"type":40,"tag":376,"props":3866,"children":3867},{"style":512},[3868],{"type":45,"value":558},{"type":40,"tag":376,"props":3870,"children":3871},{"style":466},[3872],{"type":45,"value":520},{"type":40,"tag":376,"props":3874,"children":3875},{"style":466},[3876],{"type":45,"value":525},{"type":40,"tag":376,"props":3878,"children":3879},{"class":378,"line":397},[3880],{"type":40,"tag":376,"props":3881,"children":3882},{"emptyLinePlaceholder":401},[3883],{"type":45,"value":404},{"type":40,"tag":376,"props":3885,"children":3886},{"class":378,"line":407},[3887,3891,3895,3899,3903,3907,3911],{"type":40,"tag":376,"props":3888,"children":3889},{"style":579},[3890],{"type":45,"value":582},{"type":40,"tag":376,"props":3892,"children":3893},{"style":472},[3894],{"type":45,"value":587},{"type":40,"tag":376,"props":3896,"children":3897},{"style":466},[3898],{"type":45,"value":592},{"type":40,"tag":376,"props":3900,"children":3901},{"style":466},[3902],{"type":45,"value":597},{"type":40,"tag":376,"props":3904,"children":3905},{"style":600},[3906],{"type":45,"value":475},{"type":40,"tag":376,"props":3908,"children":3909},{"style":472},[3910],{"type":45,"value":607},{"type":40,"tag":376,"props":3912,"children":3913},{"style":466},[3914],{"type":45,"value":612},{"type":40,"tag":376,"props":3916,"children":3917},{"class":378,"line":416},[3918,3923,3927,3931,3935,3939,3943],{"type":40,"tag":376,"props":3919,"children":3920},{"style":618},[3921],{"type":45,"value":3922},"  query",{"type":40,"tag":376,"props":3924,"children":3925},{"style":466},[3926],{"type":45,"value":626},{"type":40,"tag":376,"props":3928,"children":3929},{"style":472},[3930],{"type":45,"value":541},{"type":40,"tag":376,"props":3932,"children":3933},{"style":466},[3934],{"type":45,"value":635},{"type":40,"tag":376,"props":3936,"children":3937},{"style":600},[3938],{"type":45,"value":640},{"type":40,"tag":376,"props":3940,"children":3941},{"style":472},[3942],{"type":45,"value":645},{"type":40,"tag":376,"props":3944,"children":3945},{"style":466},[3946],{"type":45,"value":773},{"type":40,"tag":376,"props":3948,"children":3949},{"class":378,"line":425},[3950,3955,3959,3963,3967,3971,3975,3979,3983,3987,3991,3995],{"type":40,"tag":376,"props":3951,"children":3952},{"style":618},[3953],{"type":45,"value":3954},"  route",{"type":40,"tag":376,"props":3956,"children":3957},{"style":466},[3958],{"type":45,"value":626},{"type":40,"tag":376,"props":3960,"children":3961},{"style":472},[3962],{"type":45,"value":541},{"type":40,"tag":376,"props":3964,"children":3965},{"style":466},[3966],{"type":45,"value":635},{"type":40,"tag":376,"props":3968,"children":3969},{"style":600},[3970],{"type":45,"value":640},{"type":40,"tag":376,"props":3972,"children":3973},{"style":472},[3974],{"type":45,"value":645},{"type":40,"tag":376,"props":3976,"children":3977},{"style":466},[3978],{"type":45,"value":635},{"type":40,"tag":376,"props":3980,"children":3981},{"style":600},[3982],{"type":45,"value":750},{"type":40,"tag":376,"props":3984,"children":3985},{"style":472},[3986],{"type":45,"value":607},{"type":40,"tag":376,"props":3988,"children":3989},{"style":466},[3990],{"type":45,"value":2886},{"type":40,"tag":376,"props":3992,"children":3993},{"style":472},[3994],{"type":45,"value":816},{"type":40,"tag":376,"props":3996,"children":3997},{"style":466},[3998],{"type":45,"value":773},{"type":40,"tag":376,"props":4000,"children":4001},{"class":378,"line":434},[4002,4007,4011,4015,4019,4023,4027,4031,4035,4039,4043,4047],{"type":40,"tag":376,"props":4003,"children":4004},{"style":618},[4005],{"type":45,"value":4006},"  result",{"type":40,"tag":376,"props":4008,"children":4009},{"style":466},[4010],{"type":45,"value":626},{"type":40,"tag":376,"props":4012,"children":4013},{"style":472},[4014],{"type":45,"value":541},{"type":40,"tag":376,"props":4016,"children":4017},{"style":466},[4018],{"type":45,"value":635},{"type":40,"tag":376,"props":4020,"children":4021},{"style":600},[4022],{"type":45,"value":640},{"type":40,"tag":376,"props":4024,"children":4025},{"style":472},[4026],{"type":45,"value":645},{"type":40,"tag":376,"props":4028,"children":4029},{"style":466},[4030],{"type":45,"value":635},{"type":40,"tag":376,"props":4032,"children":4033},{"style":600},[4034],{"type":45,"value":750},{"type":40,"tag":376,"props":4036,"children":4037},{"style":472},[4038],{"type":45,"value":607},{"type":40,"tag":376,"props":4040,"children":4041},{"style":466},[4042],{"type":45,"value":2886},{"type":40,"tag":376,"props":4044,"children":4045},{"style":472},[4046],{"type":45,"value":816},{"type":40,"tag":376,"props":4048,"children":4049},{"style":466},[4050],{"type":45,"value":773},{"type":40,"tag":376,"props":4052,"children":4053},{"class":378,"line":708},[4054,4058,4062],{"type":40,"tag":376,"props":4055,"children":4056},{"style":466},[4057],{"type":45,"value":866},{"type":40,"tag":376,"props":4059,"children":4060},{"style":472},[4061],{"type":45,"value":816},{"type":40,"tag":376,"props":4063,"children":4064},{"style":466},[4065],{"type":45,"value":525},{"type":40,"tag":376,"props":4067,"children":4068},{"class":378,"line":776},[4069],{"type":40,"tag":376,"props":4070,"children":4071},{"emptyLinePlaceholder":401},[4072],{"type":45,"value":404},{"type":40,"tag":376,"props":4074,"children":4075},{"class":378,"line":847},[4076,4080,4085,4089,4093,4097,4101,4105,4109,4113,4117,4121,4125,4129],{"type":40,"tag":376,"props":4077,"children":4078},{"style":579},[4079],{"type":45,"value":582},{"type":40,"tag":376,"props":4081,"children":4082},{"style":472},[4083],{"type":45,"value":4084}," classify ",{"type":40,"tag":376,"props":4086,"children":4087},{"style":466},[4088],{"type":45,"value":592},{"type":40,"tag":376,"props":4090,"children":4091},{"style":579},[4092],{"type":45,"value":1484},{"type":40,"tag":376,"props":4094,"children":4095},{"style":466},[4096],{"type":45,"value":796},{"type":40,"tag":376,"props":4098,"children":4099},{"style":799},[4100],{"type":45,"value":1493},{"type":40,"tag":376,"props":4102,"children":4103},{"style":466},[4104],{"type":45,"value":626},{"type":40,"tag":376,"props":4106,"children":4107},{"style":466},[4108],{"type":45,"value":1502},{"type":40,"tag":376,"props":4110,"children":4111},{"style":472},[4112],{"type":45,"value":1507},{"type":40,"tag":376,"props":4114,"children":4115},{"style":466},[4116],{"type":45,"value":635},{"type":40,"tag":376,"props":4118,"children":4119},{"style":472},[4120],{"type":45,"value":1516},{"type":40,"tag":376,"props":4122,"children":4123},{"style":466},[4124],{"type":45,"value":816},{"type":40,"tag":376,"props":4126,"children":4127},{"style":579},[4128],{"type":45,"value":763},{"type":40,"tag":376,"props":4130,"children":4131},{"style":466},[4132],{"type":45,"value":1529},{"type":40,"tag":376,"props":4134,"children":4135},{"class":378,"line":860},[4136,4141,4145,4149,4153,4158,4162,4167,4171,4175,4180,4184,4188,4193,4197,4202],{"type":40,"tag":376,"props":4137,"children":4138},{"style":460},[4139],{"type":45,"value":4140},"  if",{"type":40,"tag":376,"props":4142,"children":4143},{"style":618},[4144],{"type":45,"value":796},{"type":40,"tag":376,"props":4146,"children":4147},{"style":472},[4148],{"type":45,"value":1493},{"type":40,"tag":376,"props":4150,"children":4151},{"style":466},[4152],{"type":45,"value":635},{"type":40,"tag":376,"props":4154,"children":4155},{"style":472},[4156],{"type":45,"value":4157},"query",{"type":40,"tag":376,"props":4159,"children":4160},{"style":466},[4161],{"type":45,"value":635},{"type":40,"tag":376,"props":4163,"children":4164},{"style":600},[4165],{"type":45,"value":4166},"toLowerCase",{"type":40,"tag":376,"props":4168,"children":4169},{"style":618},[4170],{"type":45,"value":645},{"type":40,"tag":376,"props":4172,"children":4173},{"style":466},[4174],{"type":45,"value":635},{"type":40,"tag":376,"props":4176,"children":4177},{"style":600},[4178],{"type":45,"value":4179},"includes",{"type":40,"tag":376,"props":4181,"children":4182},{"style":618},[4183],{"type":45,"value":607},{"type":40,"tag":376,"props":4185,"children":4186},{"style":466},[4187],{"type":45,"value":520},{"type":40,"tag":376,"props":4189,"children":4190},{"style":512},[4191],{"type":45,"value":4192},"weather",{"type":40,"tag":376,"props":4194,"children":4195},{"style":466},[4196],{"type":45,"value":520},{"type":40,"tag":376,"props":4198,"children":4199},{"style":618},[4200],{"type":45,"value":4201},")) ",{"type":40,"tag":376,"props":4203,"children":4204},{"style":466},[4205],{"type":45,"value":612},{"type":40,"tag":376,"props":4207,"children":4208},{"class":378,"line":977},[4209,4214,4218,4223,4227,4231,4235,4239],{"type":40,"tag":376,"props":4210,"children":4211},{"style":460},[4212],{"type":45,"value":4213},"    return",{"type":40,"tag":376,"props":4215,"children":4216},{"style":466},[4217],{"type":45,"value":469},{"type":40,"tag":376,"props":4219,"children":4220},{"style":618},[4221],{"type":45,"value":4222}," route",{"type":40,"tag":376,"props":4224,"children":4225},{"style":466},[4226],{"type":45,"value":626},{"type":40,"tag":376,"props":4228,"children":4229},{"style":466},[4230],{"type":45,"value":509},{"type":40,"tag":376,"props":4232,"children":4233},{"style":512},[4234],{"type":45,"value":4192},{"type":40,"tag":376,"props":4236,"children":4237},{"style":466},[4238],{"type":45,"value":520},{"type":40,"tag":376,"props":4240,"children":4241},{"style":466},[4242],{"type":45,"value":1710},{"type":40,"tag":376,"props":4244,"children":4245},{"class":378,"line":985},[4246],{"type":40,"tag":376,"props":4247,"children":4248},{"style":466},[4249],{"type":45,"value":4250},"  }\n",{"type":40,"tag":376,"props":4252,"children":4253},{"class":378,"line":993},[4254,4258,4262,4266,4270,4274,4279,4283],{"type":40,"tag":376,"props":4255,"children":4256},{"style":460},[4257],{"type":45,"value":1576},{"type":40,"tag":376,"props":4259,"children":4260},{"style":466},[4261],{"type":45,"value":469},{"type":40,"tag":376,"props":4263,"children":4264},{"style":618},[4265],{"type":45,"value":4222},{"type":40,"tag":376,"props":4267,"children":4268},{"style":466},[4269],{"type":45,"value":626},{"type":40,"tag":376,"props":4271,"children":4272},{"style":466},[4273],{"type":45,"value":509},{"type":40,"tag":376,"props":4275,"children":4276},{"style":512},[4277],{"type":45,"value":4278},"general",{"type":40,"tag":376,"props":4280,"children":4281},{"style":466},[4282],{"type":45,"value":520},{"type":40,"tag":376,"props":4284,"children":4285},{"style":466},[4286],{"type":45,"value":1710},{"type":40,"tag":376,"props":4288,"children":4289},{"class":378,"line":1002},[4290],{"type":40,"tag":376,"props":4291,"children":4292},{"style":466},[4293],{"type":45,"value":1599},{"type":40,"tag":376,"props":4295,"children":4296},{"class":378,"line":2568},[4297],{"type":40,"tag":376,"props":4298,"children":4299},{"emptyLinePlaceholder":401},[4300],{"type":45,"value":404},{"type":40,"tag":376,"props":4302,"children":4303},{"class":378,"line":2577},[4304,4308,4313,4317,4321,4325,4329,4333,4337,4341,4345,4349,4353,4357,4361,4366],{"type":40,"tag":376,"props":4305,"children":4306},{"style":579},[4307],{"type":45,"value":582},{"type":40,"tag":376,"props":4309,"children":4310},{"style":472},[4311],{"type":45,"value":4312}," routeQuery ",{"type":40,"tag":376,"props":4314,"children":4315},{"style":466},[4316],{"type":45,"value":592},{"type":40,"tag":376,"props":4318,"children":4319},{"style":466},[4320],{"type":45,"value":796},{"type":40,"tag":376,"props":4322,"children":4323},{"style":799},[4324],{"type":45,"value":1493},{"type":40,"tag":376,"props":4326,"children":4327},{"style":466},[4328],{"type":45,"value":626},{"type":40,"tag":376,"props":4330,"children":4331},{"style":466},[4332],{"type":45,"value":1502},{"type":40,"tag":376,"props":4334,"children":4335},{"style":472},[4336],{"type":45,"value":1507},{"type":40,"tag":376,"props":4338,"children":4339},{"style":466},[4340],{"type":45,"value":635},{"type":40,"tag":376,"props":4342,"children":4343},{"style":472},[4344],{"type":45,"value":1516},{"type":40,"tag":376,"props":4346,"children":4347},{"style":466},[4348],{"type":45,"value":816},{"type":40,"tag":376,"props":4350,"children":4351},{"style":579},[4352],{"type":45,"value":763},{"type":40,"tag":376,"props":4354,"children":4355},{"style":472},[4356],{"type":45,"value":1581},{"type":40,"tag":376,"props":4358,"children":4359},{"style":466},[4360],{"type":45,"value":635},{"type":40,"tag":376,"props":4362,"children":4363},{"style":472},[4364],{"type":45,"value":4365},"route",{"type":40,"tag":376,"props":4367,"children":4368},{"style":466},[4369],{"type":45,"value":525},{"type":40,"tag":376,"props":4371,"children":4372},{"class":378,"line":2586},[4373],{"type":40,"tag":376,"props":4374,"children":4375},{"emptyLinePlaceholder":401},[4376],{"type":45,"value":404},{"type":40,"tag":376,"props":4378,"children":4379},{"class":378,"line":2595},[4380,4384,4388,4392,4396,4400],{"type":40,"tag":376,"props":4381,"children":4382},{"style":579},[4383],{"type":45,"value":582},{"type":40,"tag":376,"props":4385,"children":4386},{"style":472},[4387],{"type":45,"value":3180},{"type":40,"tag":376,"props":4389,"children":4390},{"style":466},[4391],{"type":45,"value":592},{"type":40,"tag":376,"props":4393,"children":4394},{"style":466},[4395],{"type":45,"value":597},{"type":40,"tag":376,"props":4397,"children":4398},{"style":600},[4399],{"type":45,"value":2682},{"type":40,"tag":376,"props":4401,"children":4402},{"style":472},[4403],{"type":45,"value":3197},{"type":40,"tag":376,"props":4405,"children":4406},{"class":378,"line":2604},[4407,4411,4415,4419,4423,4428,4432,4436],{"type":40,"tag":376,"props":4408,"children":4409},{"style":466},[4410],{"type":45,"value":3205},{"type":40,"tag":376,"props":4412,"children":4413},{"style":600},[4414],{"type":45,"value":3210},{"type":40,"tag":376,"props":4416,"children":4417},{"style":472},[4418],{"type":45,"value":607},{"type":40,"tag":376,"props":4420,"children":4421},{"style":466},[4422],{"type":45,"value":520},{"type":40,"tag":376,"props":4424,"children":4425},{"style":512},[4426],{"type":45,"value":4427},"classify",{"type":40,"tag":376,"props":4429,"children":4430},{"style":466},[4431],{"type":45,"value":520},{"type":40,"tag":376,"props":4433,"children":4434},{"style":466},[4435],{"type":45,"value":480},{"type":40,"tag":376,"props":4437,"children":4438},{"style":472},[4439],{"type":45,"value":4440}," classify)\n",{"type":40,"tag":376,"props":4442,"children":4443},{"class":378,"line":2613},[4444,4448,4452,4456,4460,4464,4468,4472,4476,4481,4485,4489,4493,4498,4502,4506,4511,4515,4519],{"type":40,"tag":376,"props":4445,"children":4446},{"style":466},[4447],{"type":45,"value":3205},{"type":40,"tag":376,"props":4449,"children":4450},{"style":600},[4451],{"type":45,"value":3210},{"type":40,"tag":376,"props":4453,"children":4454},{"style":472},[4455],{"type":45,"value":607},{"type":40,"tag":376,"props":4457,"children":4458},{"style":466},[4459],{"type":45,"value":520},{"type":40,"tag":376,"props":4461,"children":4462},{"style":512},[4463],{"type":45,"value":4192},{"type":40,"tag":376,"props":4465,"children":4466},{"style":466},[4467],{"type":45,"value":520},{"type":40,"tag":376,"props":4469,"children":4470},{"style":466},[4471],{"type":45,"value":480},{"type":40,"tag":376,"props":4473,"children":4474},{"style":579},[4475],{"type":45,"value":1484},{"type":40,"tag":376,"props":4477,"children":4478},{"style":466},[4479],{"type":45,"value":4480}," ()",{"type":40,"tag":376,"props":4482,"children":4483},{"style":579},[4484],{"type":45,"value":763},{"type":40,"tag":376,"props":4486,"children":4487},{"style":472},[4488],{"type":45,"value":796},{"type":40,"tag":376,"props":4490,"children":4491},{"style":466},[4492],{"type":45,"value":3464},{"type":40,"tag":376,"props":4494,"children":4495},{"style":618},[4496],{"type":45,"value":4497}," result",{"type":40,"tag":376,"props":4499,"children":4500},{"style":466},[4501],{"type":45,"value":626},{"type":40,"tag":376,"props":4503,"children":4504},{"style":466},[4505],{"type":45,"value":509},{"type":40,"tag":376,"props":4507,"children":4508},{"style":512},[4509],{"type":45,"value":4510},"Sunny, 72F",{"type":40,"tag":376,"props":4512,"children":4513},{"style":466},[4514],{"type":45,"value":520},{"type":40,"tag":376,"props":4516,"children":4517},{"style":466},[4518],{"type":45,"value":499},{"type":40,"tag":376,"props":4520,"children":4521},{"style":472},[4522],{"type":45,"value":4523},"))\n",{"type":40,"tag":376,"props":4525,"children":4526},{"class":378,"line":2622},[4527,4531,4535,4539,4543,4547,4551,4555,4559,4563,4567,4571,4575,4579,4583,4587,4592,4596,4600],{"type":40,"tag":376,"props":4528,"children":4529},{"style":466},[4530],{"type":45,"value":3205},{"type":40,"tag":376,"props":4532,"children":4533},{"style":600},[4534],{"type":45,"value":3210},{"type":40,"tag":376,"props":4536,"children":4537},{"style":472},[4538],{"type":45,"value":607},{"type":40,"tag":376,"props":4540,"children":4541},{"style":466},[4542],{"type":45,"value":520},{"type":40,"tag":376,"props":4544,"children":4545},{"style":512},[4546],{"type":45,"value":4278},{"type":40,"tag":376,"props":4548,"children":4549},{"style":466},[4550],{"type":45,"value":520},{"type":40,"tag":376,"props":4552,"children":4553},{"style":466},[4554],{"type":45,"value":480},{"type":40,"tag":376,"props":4556,"children":4557},{"style":579},[4558],{"type":45,"value":1484},{"type":40,"tag":376,"props":4560,"children":4561},{"style":466},[4562],{"type":45,"value":4480},{"type":40,"tag":376,"props":4564,"children":4565},{"style":579},[4566],{"type":45,"value":763},{"type":40,"tag":376,"props":4568,"children":4569},{"style":472},[4570],{"type":45,"value":796},{"type":40,"tag":376,"props":4572,"children":4573},{"style":466},[4574],{"type":45,"value":3464},{"type":40,"tag":376,"props":4576,"children":4577},{"style":618},[4578],{"type":45,"value":4497},{"type":40,"tag":376,"props":4580,"children":4581},{"style":466},[4582],{"type":45,"value":626},{"type":40,"tag":376,"props":4584,"children":4585},{"style":466},[4586],{"type":45,"value":509},{"type":40,"tag":376,"props":4588,"children":4589},{"style":512},[4590],{"type":45,"value":4591},"General response",{"type":40,"tag":376,"props":4593,"children":4594},{"style":466},[4595],{"type":45,"value":520},{"type":40,"tag":376,"props":4597,"children":4598},{"style":466},[4599],{"type":45,"value":499},{"type":40,"tag":376,"props":4601,"children":4602},{"style":472},[4603],{"type":45,"value":4523},{"type":40,"tag":376,"props":4605,"children":4606},{"class":378,"line":2631},[4607,4611,4615,4619,4623,4627,4631,4635],{"type":40,"tag":376,"props":4608,"children":4609},{"style":466},[4610],{"type":45,"value":3205},{"type":40,"tag":376,"props":4612,"children":4613},{"style":600},[4614],{"type":45,"value":3285},{"type":40,"tag":376,"props":4616,"children":4617},{"style":472},[4618],{"type":45,"value":3290},{"type":40,"tag":376,"props":4620,"children":4621},{"style":466},[4622],{"type":45,"value":480},{"type":40,"tag":376,"props":4624,"children":4625},{"style":466},[4626],{"type":45,"value":509},{"type":40,"tag":376,"props":4628,"children":4629},{"style":512},[4630],{"type":45,"value":4427},{"type":40,"tag":376,"props":4632,"children":4633},{"style":466},[4634],{"type":45,"value":520},{"type":40,"tag":376,"props":4636,"children":4637},{"style":472},[4638],{"type":45,"value":2628},{"type":40,"tag":376,"props":4640,"children":4641},{"class":378,"line":2639},[4642,4646,4651,4655,4659,4663,4667,4671,4676,4680,4685,4689,4693,4697,4701,4705,4709,4713],{"type":40,"tag":376,"props":4643,"children":4644},{"style":466},[4645],{"type":45,"value":3205},{"type":40,"tag":376,"props":4647,"children":4648},{"style":600},[4649],{"type":45,"value":4650},"addConditionalEdges",{"type":40,"tag":376,"props":4652,"children":4653},{"style":472},[4654],{"type":45,"value":607},{"type":40,"tag":376,"props":4656,"children":4657},{"style":466},[4658],{"type":45,"value":520},{"type":40,"tag":376,"props":4660,"children":4661},{"style":512},[4662],{"type":45,"value":4427},{"type":40,"tag":376,"props":4664,"children":4665},{"style":466},[4666],{"type":45,"value":520},{"type":40,"tag":376,"props":4668,"children":4669},{"style":466},[4670],{"type":45,"value":480},{"type":40,"tag":376,"props":4672,"children":4673},{"style":472},[4674],{"type":45,"value":4675}," routeQuery",{"type":40,"tag":376,"props":4677,"children":4678},{"style":466},[4679],{"type":45,"value":480},{"type":40,"tag":376,"props":4681,"children":4682},{"style":472},[4683],{"type":45,"value":4684}," [",{"type":40,"tag":376,"props":4686,"children":4687},{"style":466},[4688],{"type":45,"value":520},{"type":40,"tag":376,"props":4690,"children":4691},{"style":512},[4692],{"type":45,"value":4192},{"type":40,"tag":376,"props":4694,"children":4695},{"style":466},[4696],{"type":45,"value":520},{"type":40,"tag":376,"props":4698,"children":4699},{"style":466},[4700],{"type":45,"value":480},{"type":40,"tag":376,"props":4702,"children":4703},{"style":466},[4704],{"type":45,"value":509},{"type":40,"tag":376,"props":4706,"children":4707},{"style":512},[4708],{"type":45,"value":4278},{"type":40,"tag":376,"props":4710,"children":4711},{"style":466},[4712],{"type":45,"value":520},{"type":40,"tag":376,"props":4714,"children":4715},{"style":472},[4716],{"type":45,"value":4717},"])\n",{"type":40,"tag":376,"props":4719,"children":4720},{"class":378,"line":2648},[4721,4725,4729,4733,4737,4741,4745,4749],{"type":40,"tag":376,"props":4722,"children":4723},{"style":466},[4724],{"type":45,"value":3205},{"type":40,"tag":376,"props":4726,"children":4727},{"style":600},[4728],{"type":45,"value":3285},{"type":40,"tag":376,"props":4730,"children":4731},{"style":472},[4732],{"type":45,"value":607},{"type":40,"tag":376,"props":4734,"children":4735},{"style":466},[4736],{"type":45,"value":520},{"type":40,"tag":376,"props":4738,"children":4739},{"style":512},[4740],{"type":45,"value":4192},{"type":40,"tag":376,"props":4742,"children":4743},{"style":466},[4744],{"type":45,"value":520},{"type":40,"tag":376,"props":4746,"children":4747},{"style":466},[4748],{"type":45,"value":480},{"type":40,"tag":376,"props":4750,"children":4751},{"style":472},[4752],{"type":45,"value":3393},{"type":40,"tag":376,"props":4754,"children":4755},{"class":378,"line":3501},[4756,4760,4764,4768,4772,4776,4780,4784],{"type":40,"tag":376,"props":4757,"children":4758},{"style":466},[4759],{"type":45,"value":3205},{"type":40,"tag":376,"props":4761,"children":4762},{"style":600},[4763],{"type":45,"value":3285},{"type":40,"tag":376,"props":4765,"children":4766},{"style":472},[4767],{"type":45,"value":607},{"type":40,"tag":376,"props":4769,"children":4770},{"style":466},[4771],{"type":45,"value":520},{"type":40,"tag":376,"props":4773,"children":4774},{"style":512},[4775],{"type":45,"value":4278},{"type":40,"tag":376,"props":4777,"children":4778},{"style":466},[4779],{"type":45,"value":520},{"type":40,"tag":376,"props":4781,"children":4782},{"style":466},[4783],{"type":45,"value":480},{"type":40,"tag":376,"props":4785,"children":4786},{"style":472},[4787],{"type":45,"value":3393},{"type":40,"tag":376,"props":4789,"children":4790},{"class":378,"line":3757},[4791,4795,4799,4803],{"type":40,"tag":376,"props":4792,"children":4793},{"style":466},[4794],{"type":45,"value":3205},{"type":40,"tag":376,"props":4796,"children":4797},{"style":600},[4798],{"type":45,"value":3405},{"type":40,"tag":376,"props":4800,"children":4801},{"style":472},[4802],{"type":45,"value":645},{"type":40,"tag":376,"props":4804,"children":4805},{"style":466},[4806],{"type":45,"value":525},{"type":40,"tag":260,"props":4808,"children":4809},{},[],{"type":40,"tag":264,"props":4811,"children":4813},{"id":4812},"command",[4814],{"type":45,"value":2407},{"type":40,"tag":104,"props":4816,"children":4817},{},[4818],{"type":45,"value":4819},"Command combines state updates and routing in a single return value. Fields:",{"type":40,"tag":48,"props":4821,"children":4822},{},[4823,4837,4851],{"type":40,"tag":52,"props":4824,"children":4825},{},[4826,4835],{"type":40,"tag":56,"props":4827,"children":4828},{},[4829],{"type":40,"tag":110,"props":4830,"children":4832},{"className":4831},[],[4833],{"type":45,"value":4834},"update",{"type":45,"value":4836},": State updates to apply (like returning a dict from a node)",{"type":40,"tag":52,"props":4838,"children":4839},{},[4840,4849],{"type":40,"tag":56,"props":4841,"children":4842},{},[4843],{"type":40,"tag":110,"props":4844,"children":4846},{"className":4845},[],[4847],{"type":45,"value":4848},"goto",{"type":45,"value":4850},": Node name(s) to navigate to next",{"type":40,"tag":52,"props":4852,"children":4853},{},[4854,4863,4865,4871],{"type":40,"tag":56,"props":4855,"children":4856},{},[4857],{"type":40,"tag":110,"props":4858,"children":4860},{"className":4859},[],[4861],{"type":45,"value":4862},"resume",{"type":45,"value":4864},": Value to resume after ",{"type":40,"tag":110,"props":4866,"children":4868},{"className":4867},[],[4869],{"type":45,"value":4870},"interrupt()",{"type":45,"value":4872}," — see human-in-the-loop skill",{"type":40,"tag":4874,"props":4875,"children":4876},"ex-command-state-and-routing",{},[4877,5071],{"type":40,"tag":360,"props":4878,"children":4879},{},[4880,4882],{"type":45,"value":4881},"\nCommand lets you update state AND choose next node in one return.\n",{"type":40,"tag":366,"props":4883,"children":4885},{"className":368,"code":4884,"language":360,"meta":370,"style":370},"from langgraph.types import Command\nfrom typing import Literal\n\nclass State(TypedDict):\n    count: int\n    result: str\n\ndef node_a(state: State) -> Command[Literal[\"node_b\", \"node_c\"]]:\n    \"\"\"Update state AND decide next node in one return.\"\"\"\n    new_count = state[\"count\"] + 1\n    if new_count > 5:\n        return Command(update={\"count\": new_count}, goto=\"node_c\")\n    return Command(update={\"count\": new_count}, goto=\"node_b\")\n\ngraph = (\n    StateGraph(State)\n    .add_node(\"node_a\", node_a)\n    .add_node(\"node_b\", lambda s: {\"result\": \"B\"})\n    .add_node(\"node_c\", lambda s: {\"result\": \"C\"})\n    .add_edge(START, \"node_a\")\n    .add_edge(\"node_b\", END)\n    .add_edge(\"node_c\", END)\n    .compile()\n)\n",[4886],{"type":40,"tag":110,"props":4887,"children":4888},{"__ignoreMap":370},[4889,4897,4904,4911,4918,4926,4933,4940,4948,4956,4964,4972,4980,4988,4995,5002,5009,5017,5025,5033,5041,5049,5057,5064],{"type":40,"tag":376,"props":4890,"children":4891},{"class":378,"line":379},[4892],{"type":40,"tag":376,"props":4893,"children":4894},{},[4895],{"type":45,"value":4896},"from langgraph.types import Command\n",{"type":40,"tag":376,"props":4898,"children":4899},{"class":378,"line":388},[4900],{"type":40,"tag":376,"props":4901,"children":4902},{},[4903],{"type":45,"value":3563},{"type":40,"tag":376,"props":4905,"children":4906},{"class":378,"line":397},[4907],{"type":40,"tag":376,"props":4908,"children":4909},{"emptyLinePlaceholder":401},[4910],{"type":45,"value":404},{"type":40,"tag":376,"props":4912,"children":4913},{"class":378,"line":407},[4914],{"type":40,"tag":376,"props":4915,"children":4916},{},[4917],{"type":45,"value":413},{"type":40,"tag":376,"props":4919,"children":4920},{"class":378,"line":416},[4921],{"type":40,"tag":376,"props":4922,"children":4923},{},[4924],{"type":45,"value":4925},"    count: int\n",{"type":40,"tag":376,"props":4927,"children":4928},{"class":378,"line":425},[4929],{"type":40,"tag":376,"props":4930,"children":4931},{},[4932],{"type":45,"value":3608},{"type":40,"tag":376,"props":4934,"children":4935},{"class":378,"line":434},[4936],{"type":40,"tag":376,"props":4937,"children":4938},{"emptyLinePlaceholder":401},[4939],{"type":45,"value":404},{"type":40,"tag":376,"props":4941,"children":4942},{"class":378,"line":708},[4943],{"type":40,"tag":376,"props":4944,"children":4945},{},[4946],{"type":45,"value":4947},"def node_a(state: State) -> Command[Literal[\"node_b\", \"node_c\"]]:\n",{"type":40,"tag":376,"props":4949,"children":4950},{"class":378,"line":776},[4951],{"type":40,"tag":376,"props":4952,"children":4953},{},[4954],{"type":45,"value":4955},"    \"\"\"Update state AND decide next node in one return.\"\"\"\n",{"type":40,"tag":376,"props":4957,"children":4958},{"class":378,"line":847},[4959],{"type":40,"tag":376,"props":4960,"children":4961},{},[4962],{"type":45,"value":4963},"    new_count = state[\"count\"] + 1\n",{"type":40,"tag":376,"props":4965,"children":4966},{"class":378,"line":860},[4967],{"type":40,"tag":376,"props":4968,"children":4969},{},[4970],{"type":45,"value":4971},"    if new_count > 5:\n",{"type":40,"tag":376,"props":4973,"children":4974},{"class":378,"line":977},[4975],{"type":40,"tag":376,"props":4976,"children":4977},{},[4978],{"type":45,"value":4979},"        return Command(update={\"count\": new_count}, goto=\"node_c\")\n",{"type":40,"tag":376,"props":4981,"children":4982},{"class":378,"line":985},[4983],{"type":40,"tag":376,"props":4984,"children":4985},{},[4986],{"type":45,"value":4987},"    return Command(update={\"count\": new_count}, goto=\"node_b\")\n",{"type":40,"tag":376,"props":4989,"children":4990},{"class":378,"line":993},[4991],{"type":40,"tag":376,"props":4992,"children":4993},{"emptyLinePlaceholder":401},[4994],{"type":45,"value":404},{"type":40,"tag":376,"props":4996,"children":4997},{"class":378,"line":1002},[4998],{"type":40,"tag":376,"props":4999,"children":5000},{},[5001],{"type":45,"value":2557},{"type":40,"tag":376,"props":5003,"children":5004},{"class":378,"line":2568},[5005],{"type":40,"tag":376,"props":5006,"children":5007},{},[5008],{"type":45,"value":2565},{"type":40,"tag":376,"props":5010,"children":5011},{"class":378,"line":2577},[5012],{"type":40,"tag":376,"props":5013,"children":5014},{},[5015],{"type":45,"value":5016},"    .add_node(\"node_a\", node_a)\n",{"type":40,"tag":376,"props":5018,"children":5019},{"class":378,"line":2586},[5020],{"type":40,"tag":376,"props":5021,"children":5022},{},[5023],{"type":45,"value":5024},"    .add_node(\"node_b\", lambda s: {\"result\": \"B\"})\n",{"type":40,"tag":376,"props":5026,"children":5027},{"class":378,"line":2595},[5028],{"type":40,"tag":376,"props":5029,"children":5030},{},[5031],{"type":45,"value":5032},"    .add_node(\"node_c\", lambda s: {\"result\": \"C\"})\n",{"type":40,"tag":376,"props":5034,"children":5035},{"class":378,"line":2604},[5036],{"type":40,"tag":376,"props":5037,"children":5038},{},[5039],{"type":45,"value":5040},"    .add_edge(START, \"node_a\")\n",{"type":40,"tag":376,"props":5042,"children":5043},{"class":378,"line":2613},[5044],{"type":40,"tag":376,"props":5045,"children":5046},{},[5047],{"type":45,"value":5048},"    .add_edge(\"node_b\", END)\n",{"type":40,"tag":376,"props":5050,"children":5051},{"class":378,"line":2622},[5052],{"type":40,"tag":376,"props":5053,"children":5054},{},[5055],{"type":45,"value":5056},"    .add_edge(\"node_c\", END)\n",{"type":40,"tag":376,"props":5058,"children":5059},{"class":378,"line":2631},[5060],{"type":40,"tag":376,"props":5061,"children":5062},{},[5063],{"type":45,"value":2619},{"type":40,"tag":376,"props":5065,"children":5066},{"class":378,"line":2639},[5067],{"type":40,"tag":376,"props":5068,"children":5069},{},[5070],{"type":45,"value":2628},{"type":40,"tag":442,"props":5072,"children":5073},{},[5074,5076],{"type":45,"value":5075},"\nReturn Command with update and goto to combine state change with routing.\n",{"type":40,"tag":366,"props":5077,"children":5079},{"className":449,"code":5078,"language":442,"meta":370,"style":370},"import { StateGraph, StateSchema, START, END, Command } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  count: z.number().default(0),\n  result: z.string().default(\"\"),\n});\n\nconst nodeA = async (state: typeof State.State) => {\n  const newCount = state.count + 1;\n  if (newCount > 5) {\n    return new Command({ update: { count: newCount }, goto: \"node_c\" });\n  }\n  return new Command({ update: { count: newCount }, goto: \"node_b\" });\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"node_a\", nodeA, { ends: [\"node_b\", \"node_c\"] })\n  .addNode(\"node_b\", async () => ({ result: \"B\" }))\n  .addNode(\"node_c\", async () => ({ result: \"C\" }))\n  .addEdge(START, \"node_a\")\n  .addEdge(\"node_b\", END)\n  .addEdge(\"node_c\", END)\n  .compile();\n",[5080],{"type":40,"tag":110,"props":5081,"children":5082},{"__ignoreMap":370},[5083,5155,5194,5201,5232,5287,5338,5353,5360,5420,5463,5498,5585,5592,5676,5683,5690,5717,5816,5896,5976,6011,6046,6081],{"type":40,"tag":376,"props":5084,"children":5085},{"class":378,"line":379},[5086,5090,5094,5098,5102,5106,5110,5114,5118,5122,5126,5131,5135,5139,5143,5147,5151],{"type":40,"tag":376,"props":5087,"children":5088},{"style":460},[5089],{"type":45,"value":463},{"type":40,"tag":376,"props":5091,"children":5092},{"style":466},[5093],{"type":45,"value":469},{"type":40,"tag":376,"props":5095,"children":5096},{"style":472},[5097],{"type":45,"value":2682},{"type":40,"tag":376,"props":5099,"children":5100},{"style":466},[5101],{"type":45,"value":480},{"type":40,"tag":376,"props":5103,"children":5104},{"style":472},[5105],{"type":45,"value":475},{"type":40,"tag":376,"props":5107,"children":5108},{"style":466},[5109],{"type":45,"value":480},{"type":40,"tag":376,"props":5111,"children":5112},{"style":472},[5113],{"type":45,"value":2699},{"type":40,"tag":376,"props":5115,"children":5116},{"style":466},[5117],{"type":45,"value":480},{"type":40,"tag":376,"props":5119,"children":5120},{"style":472},[5121],{"type":45,"value":2708},{"type":40,"tag":376,"props":5123,"children":5124},{"style":466},[5125],{"type":45,"value":480},{"type":40,"tag":376,"props":5127,"children":5128},{"style":472},[5129],{"type":45,"value":5130}," Command",{"type":40,"tag":376,"props":5132,"children":5133},{"style":466},[5134],{"type":45,"value":499},{"type":40,"tag":376,"props":5136,"children":5137},{"style":460},[5138],{"type":45,"value":504},{"type":40,"tag":376,"props":5140,"children":5141},{"style":466},[5142],{"type":45,"value":509},{"type":40,"tag":376,"props":5144,"children":5145},{"style":512},[5146],{"type":45,"value":515},{"type":40,"tag":376,"props":5148,"children":5149},{"style":466},[5150],{"type":45,"value":520},{"type":40,"tag":376,"props":5152,"children":5153},{"style":466},[5154],{"type":45,"value":525},{"type":40,"tag":376,"props":5156,"children":5157},{"class":378,"line":388},[5158,5162,5166,5170,5174,5178,5182,5186,5190],{"type":40,"tag":376,"props":5159,"children":5160},{"style":460},[5161],{"type":45,"value":463},{"type":40,"tag":376,"props":5163,"children":5164},{"style":466},[5165],{"type":45,"value":469},{"type":40,"tag":376,"props":5167,"children":5168},{"style":472},[5169],{"type":45,"value":541},{"type":40,"tag":376,"props":5171,"children":5172},{"style":466},[5173],{"type":45,"value":499},{"type":40,"tag":376,"props":5175,"children":5176},{"style":460},[5177],{"type":45,"value":504},{"type":40,"tag":376,"props":5179,"children":5180},{"style":466},[5181],{"type":45,"value":509},{"type":40,"tag":376,"props":5183,"children":5184},{"style":512},[5185],{"type":45,"value":558},{"type":40,"tag":376,"props":5187,"children":5188},{"style":466},[5189],{"type":45,"value":520},{"type":40,"tag":376,"props":5191,"children":5192},{"style":466},[5193],{"type":45,"value":525},{"type":40,"tag":376,"props":5195,"children":5196},{"class":378,"line":397},[5197],{"type":40,"tag":376,"props":5198,"children":5199},{"emptyLinePlaceholder":401},[5200],{"type":45,"value":404},{"type":40,"tag":376,"props":5202,"children":5203},{"class":378,"line":407},[5204,5208,5212,5216,5220,5224,5228],{"type":40,"tag":376,"props":5205,"children":5206},{"style":579},[5207],{"type":45,"value":582},{"type":40,"tag":376,"props":5209,"children":5210},{"style":472},[5211],{"type":45,"value":587},{"type":40,"tag":376,"props":5213,"children":5214},{"style":466},[5215],{"type":45,"value":592},{"type":40,"tag":376,"props":5217,"children":5218},{"style":466},[5219],{"type":45,"value":597},{"type":40,"tag":376,"props":5221,"children":5222},{"style":600},[5223],{"type":45,"value":475},{"type":40,"tag":376,"props":5225,"children":5226},{"style":472},[5227],{"type":45,"value":607},{"type":40,"tag":376,"props":5229,"children":5230},{"style":466},[5231],{"type":45,"value":612},{"type":40,"tag":376,"props":5233,"children":5234},{"class":378,"line":416},[5235,5240,5244,5248,5252,5257,5261,5265,5269,5273,5279,5283],{"type":40,"tag":376,"props":5236,"children":5237},{"style":618},[5238],{"type":45,"value":5239},"  count",{"type":40,"tag":376,"props":5241,"children":5242},{"style":466},[5243],{"type":45,"value":626},{"type":40,"tag":376,"props":5245,"children":5246},{"style":472},[5247],{"type":45,"value":541},{"type":40,"tag":376,"props":5249,"children":5250},{"style":466},[5251],{"type":45,"value":635},{"type":40,"tag":376,"props":5253,"children":5254},{"style":600},[5255],{"type":45,"value":5256},"number",{"type":40,"tag":376,"props":5258,"children":5259},{"style":472},[5260],{"type":45,"value":645},{"type":40,"tag":376,"props":5262,"children":5263},{"style":466},[5264],{"type":45,"value":635},{"type":40,"tag":376,"props":5266,"children":5267},{"style":600},[5268],{"type":45,"value":750},{"type":40,"tag":376,"props":5270,"children":5271},{"style":472},[5272],{"type":45,"value":607},{"type":40,"tag":376,"props":5274,"children":5276},{"style":5275},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[5277],{"type":45,"value":5278},"0",{"type":40,"tag":376,"props":5280,"children":5281},{"style":472},[5282],{"type":45,"value":816},{"type":40,"tag":376,"props":5284,"children":5285},{"style":466},[5286],{"type":45,"value":773},{"type":40,"tag":376,"props":5288,"children":5289},{"class":378,"line":425},[5290,5294,5298,5302,5306,5310,5314,5318,5322,5326,5330,5334],{"type":40,"tag":376,"props":5291,"children":5292},{"style":618},[5293],{"type":45,"value":4006},{"type":40,"tag":376,"props":5295,"children":5296},{"style":466},[5297],{"type":45,"value":626},{"type":40,"tag":376,"props":5299,"children":5300},{"style":472},[5301],{"type":45,"value":541},{"type":40,"tag":376,"props":5303,"children":5304},{"style":466},[5305],{"type":45,"value":635},{"type":40,"tag":376,"props":5307,"children":5308},{"style":600},[5309],{"type":45,"value":640},{"type":40,"tag":376,"props":5311,"children":5312},{"style":472},[5313],{"type":45,"value":645},{"type":40,"tag":376,"props":5315,"children":5316},{"style":466},[5317],{"type":45,"value":635},{"type":40,"tag":376,"props":5319,"children":5320},{"style":600},[5321],{"type":45,"value":750},{"type":40,"tag":376,"props":5323,"children":5324},{"style":472},[5325],{"type":45,"value":607},{"type":40,"tag":376,"props":5327,"children":5328},{"style":466},[5329],{"type":45,"value":2886},{"type":40,"tag":376,"props":5331,"children":5332},{"style":472},[5333],{"type":45,"value":816},{"type":40,"tag":376,"props":5335,"children":5336},{"style":466},[5337],{"type":45,"value":773},{"type":40,"tag":376,"props":5339,"children":5340},{"class":378,"line":434},[5341,5345,5349],{"type":40,"tag":376,"props":5342,"children":5343},{"style":466},[5344],{"type":45,"value":866},{"type":40,"tag":376,"props":5346,"children":5347},{"style":472},[5348],{"type":45,"value":816},{"type":40,"tag":376,"props":5350,"children":5351},{"style":466},[5352],{"type":45,"value":525},{"type":40,"tag":376,"props":5354,"children":5355},{"class":378,"line":708},[5356],{"type":40,"tag":376,"props":5357,"children":5358},{"emptyLinePlaceholder":401},[5359],{"type":45,"value":404},{"type":40,"tag":376,"props":5361,"children":5362},{"class":378,"line":776},[5363,5367,5372,5376,5380,5384,5388,5392,5396,5400,5404,5408,5412,5416],{"type":40,"tag":376,"props":5364,"children":5365},{"style":579},[5366],{"type":45,"value":582},{"type":40,"tag":376,"props":5368,"children":5369},{"style":472},[5370],{"type":45,"value":5371}," nodeA ",{"type":40,"tag":376,"props":5373,"children":5374},{"style":466},[5375],{"type":45,"value":592},{"type":40,"tag":376,"props":5377,"children":5378},{"style":579},[5379],{"type":45,"value":1484},{"type":40,"tag":376,"props":5381,"children":5382},{"style":466},[5383],{"type":45,"value":796},{"type":40,"tag":376,"props":5385,"children":5386},{"style":799},[5387],{"type":45,"value":1493},{"type":40,"tag":376,"props":5389,"children":5390},{"style":466},[5391],{"type":45,"value":626},{"type":40,"tag":376,"props":5393,"children":5394},{"style":466},[5395],{"type":45,"value":1502},{"type":40,"tag":376,"props":5397,"children":5398},{"style":472},[5399],{"type":45,"value":1507},{"type":40,"tag":376,"props":5401,"children":5402},{"style":466},[5403],{"type":45,"value":635},{"type":40,"tag":376,"props":5405,"children":5406},{"style":472},[5407],{"type":45,"value":1516},{"type":40,"tag":376,"props":5409,"children":5410},{"style":466},[5411],{"type":45,"value":816},{"type":40,"tag":376,"props":5413,"children":5414},{"style":579},[5415],{"type":45,"value":763},{"type":40,"tag":376,"props":5417,"children":5418},{"style":466},[5419],{"type":45,"value":1529},{"type":40,"tag":376,"props":5421,"children":5422},{"class":378,"line":847},[5423,5427,5432,5436,5440,5444,5449,5454,5459],{"type":40,"tag":376,"props":5424,"children":5425},{"style":579},[5426],{"type":45,"value":2218},{"type":40,"tag":376,"props":5428,"children":5429},{"style":472},[5430],{"type":45,"value":5431}," newCount",{"type":40,"tag":376,"props":5433,"children":5434},{"style":466},[5435],{"type":45,"value":1551},{"type":40,"tag":376,"props":5437,"children":5438},{"style":472},[5439],{"type":45,"value":1581},{"type":40,"tag":376,"props":5441,"children":5442},{"style":466},[5443],{"type":45,"value":635},{"type":40,"tag":376,"props":5445,"children":5446},{"style":472},[5447],{"type":45,"value":5448},"count",{"type":40,"tag":376,"props":5450,"children":5451},{"style":466},[5452],{"type":45,"value":5453}," +",{"type":40,"tag":376,"props":5455,"children":5456},{"style":5275},[5457],{"type":45,"value":5458}," 1",{"type":40,"tag":376,"props":5460,"children":5461},{"style":466},[5462],{"type":45,"value":525},{"type":40,"tag":376,"props":5464,"children":5465},{"class":378,"line":860},[5466,5470,5474,5479,5484,5489,5494],{"type":40,"tag":376,"props":5467,"children":5468},{"style":460},[5469],{"type":45,"value":4140},{"type":40,"tag":376,"props":5471,"children":5472},{"style":618},[5473],{"type":45,"value":796},{"type":40,"tag":376,"props":5475,"children":5476},{"style":472},[5477],{"type":45,"value":5478},"newCount",{"type":40,"tag":376,"props":5480,"children":5481},{"style":466},[5482],{"type":45,"value":5483}," >",{"type":40,"tag":376,"props":5485,"children":5486},{"style":5275},[5487],{"type":45,"value":5488}," 5",{"type":40,"tag":376,"props":5490,"children":5491},{"style":618},[5492],{"type":45,"value":5493},") ",{"type":40,"tag":376,"props":5495,"children":5496},{"style":466},[5497],{"type":45,"value":612},{"type":40,"tag":376,"props":5499,"children":5500},{"class":378,"line":977},[5501,5505,5509,5513,5517,5521,5525,5529,5533,5538,5542,5546,5551,5556,5560,5564,5569,5573,5577,5581],{"type":40,"tag":376,"props":5502,"children":5503},{"style":460},[5504],{"type":45,"value":4213},{"type":40,"tag":376,"props":5506,"children":5507},{"style":466},[5508],{"type":45,"value":597},{"type":40,"tag":376,"props":5510,"children":5511},{"style":600},[5512],{"type":45,"value":5130},{"type":40,"tag":376,"props":5514,"children":5515},{"style":618},[5516],{"type":45,"value":607},{"type":40,"tag":376,"props":5518,"children":5519},{"style":466},[5520],{"type":45,"value":3464},{"type":40,"tag":376,"props":5522,"children":5523},{"style":618},[5524],{"type":45,"value":811},{"type":40,"tag":376,"props":5526,"children":5527},{"style":466},[5528],{"type":45,"value":626},{"type":40,"tag":376,"props":5530,"children":5531},{"style":466},[5532],{"type":45,"value":469},{"type":40,"tag":376,"props":5534,"children":5535},{"style":618},[5536],{"type":45,"value":5537}," count",{"type":40,"tag":376,"props":5539,"children":5540},{"style":466},[5541],{"type":45,"value":626},{"type":40,"tag":376,"props":5543,"children":5544},{"style":472},[5545],{"type":45,"value":5431},{"type":40,"tag":376,"props":5547,"children":5548},{"style":466},[5549],{"type":45,"value":5550}," },",{"type":40,"tag":376,"props":5552,"children":5553},{"style":618},[5554],{"type":45,"value":5555}," goto",{"type":40,"tag":376,"props":5557,"children":5558},{"style":466},[5559],{"type":45,"value":626},{"type":40,"tag":376,"props":5561,"children":5562},{"style":466},[5563],{"type":45,"value":509},{"type":40,"tag":376,"props":5565,"children":5566},{"style":512},[5567],{"type":45,"value":5568},"node_c",{"type":40,"tag":376,"props":5570,"children":5571},{"style":466},[5572],{"type":45,"value":520},{"type":40,"tag":376,"props":5574,"children":5575},{"style":466},[5576],{"type":45,"value":499},{"type":40,"tag":376,"props":5578,"children":5579},{"style":618},[5580],{"type":45,"value":816},{"type":40,"tag":376,"props":5582,"children":5583},{"style":466},[5584],{"type":45,"value":525},{"type":40,"tag":376,"props":5586,"children":5587},{"class":378,"line":985},[5588],{"type":40,"tag":376,"props":5589,"children":5590},{"style":466},[5591],{"type":45,"value":4250},{"type":40,"tag":376,"props":5593,"children":5594},{"class":378,"line":993},[5595,5599,5603,5607,5611,5615,5619,5623,5627,5631,5635,5639,5643,5647,5651,5655,5660,5664,5668,5672],{"type":40,"tag":376,"props":5596,"children":5597},{"style":460},[5598],{"type":45,"value":1576},{"type":40,"tag":376,"props":5600,"children":5601},{"style":466},[5602],{"type":45,"value":597},{"type":40,"tag":376,"props":5604,"children":5605},{"style":600},[5606],{"type":45,"value":5130},{"type":40,"tag":376,"props":5608,"children":5609},{"style":618},[5610],{"type":45,"value":607},{"type":40,"tag":376,"props":5612,"children":5613},{"style":466},[5614],{"type":45,"value":3464},{"type":40,"tag":376,"props":5616,"children":5617},{"style":618},[5618],{"type":45,"value":811},{"type":40,"tag":376,"props":5620,"children":5621},{"style":466},[5622],{"type":45,"value":626},{"type":40,"tag":376,"props":5624,"children":5625},{"style":466},[5626],{"type":45,"value":469},{"type":40,"tag":376,"props":5628,"children":5629},{"style":618},[5630],{"type":45,"value":5537},{"type":40,"tag":376,"props":5632,"children":5633},{"style":466},[5634],{"type":45,"value":626},{"type":40,"tag":376,"props":5636,"children":5637},{"style":472},[5638],{"type":45,"value":5431},{"type":40,"tag":376,"props":5640,"children":5641},{"style":466},[5642],{"type":45,"value":5550},{"type":40,"tag":376,"props":5644,"children":5645},{"style":618},[5646],{"type":45,"value":5555},{"type":40,"tag":376,"props":5648,"children":5649},{"style":466},[5650],{"type":45,"value":626},{"type":40,"tag":376,"props":5652,"children":5653},{"style":466},[5654],{"type":45,"value":509},{"type":40,"tag":376,"props":5656,"children":5657},{"style":512},[5658],{"type":45,"value":5659},"node_b",{"type":40,"tag":376,"props":5661,"children":5662},{"style":466},[5663],{"type":45,"value":520},{"type":40,"tag":376,"props":5665,"children":5666},{"style":466},[5667],{"type":45,"value":499},{"type":40,"tag":376,"props":5669,"children":5670},{"style":618},[5671],{"type":45,"value":816},{"type":40,"tag":376,"props":5673,"children":5674},{"style":466},[5675],{"type":45,"value":525},{"type":40,"tag":376,"props":5677,"children":5678},{"class":378,"line":1002},[5679],{"type":40,"tag":376,"props":5680,"children":5681},{"style":466},[5682],{"type":45,"value":1599},{"type":40,"tag":376,"props":5684,"children":5685},{"class":378,"line":2568},[5686],{"type":40,"tag":376,"props":5687,"children":5688},{"emptyLinePlaceholder":401},[5689],{"type":45,"value":404},{"type":40,"tag":376,"props":5691,"children":5692},{"class":378,"line":2577},[5693,5697,5701,5705,5709,5713],{"type":40,"tag":376,"props":5694,"children":5695},{"style":579},[5696],{"type":45,"value":582},{"type":40,"tag":376,"props":5698,"children":5699},{"style":472},[5700],{"type":45,"value":3180},{"type":40,"tag":376,"props":5702,"children":5703},{"style":466},[5704],{"type":45,"value":592},{"type":40,"tag":376,"props":5706,"children":5707},{"style":466},[5708],{"type":45,"value":597},{"type":40,"tag":376,"props":5710,"children":5711},{"style":600},[5712],{"type":45,"value":2682},{"type":40,"tag":376,"props":5714,"children":5715},{"style":472},[5716],{"type":45,"value":3197},{"type":40,"tag":376,"props":5718,"children":5719},{"class":378,"line":2586},[5720,5724,5728,5732,5736,5741,5745,5749,5754,5758,5762,5767,5771,5775,5779,5783,5787,5791,5795,5799,5803,5808,5812],{"type":40,"tag":376,"props":5721,"children":5722},{"style":466},[5723],{"type":45,"value":3205},{"type":40,"tag":376,"props":5725,"children":5726},{"style":600},[5727],{"type":45,"value":3210},{"type":40,"tag":376,"props":5729,"children":5730},{"style":472},[5731],{"type":45,"value":607},{"type":40,"tag":376,"props":5733,"children":5734},{"style":466},[5735],{"type":45,"value":520},{"type":40,"tag":376,"props":5737,"children":5738},{"style":512},[5739],{"type":45,"value":5740},"node_a",{"type":40,"tag":376,"props":5742,"children":5743},{"style":466},[5744],{"type":45,"value":520},{"type":40,"tag":376,"props":5746,"children":5747},{"style":466},[5748],{"type":45,"value":480},{"type":40,"tag":376,"props":5750,"children":5751},{"style":472},[5752],{"type":45,"value":5753}," nodeA",{"type":40,"tag":376,"props":5755,"children":5756},{"style":466},[5757],{"type":45,"value":480},{"type":40,"tag":376,"props":5759,"children":5760},{"style":466},[5761],{"type":45,"value":469},{"type":40,"tag":376,"props":5763,"children":5764},{"style":618},[5765],{"type":45,"value":5766}," ends",{"type":40,"tag":376,"props":5768,"children":5769},{"style":466},[5770],{"type":45,"value":626},{"type":40,"tag":376,"props":5772,"children":5773},{"style":472},[5774],{"type":45,"value":4684},{"type":40,"tag":376,"props":5776,"children":5777},{"style":466},[5778],{"type":45,"value":520},{"type":40,"tag":376,"props":5780,"children":5781},{"style":512},[5782],{"type":45,"value":5659},{"type":40,"tag":376,"props":5784,"children":5785},{"style":466},[5786],{"type":45,"value":520},{"type":40,"tag":376,"props":5788,"children":5789},{"style":466},[5790],{"type":45,"value":480},{"type":40,"tag":376,"props":5792,"children":5793},{"style":466},[5794],{"type":45,"value":509},{"type":40,"tag":376,"props":5796,"children":5797},{"style":512},[5798],{"type":45,"value":5568},{"type":40,"tag":376,"props":5800,"children":5801},{"style":466},[5802],{"type":45,"value":520},{"type":40,"tag":376,"props":5804,"children":5805},{"style":472},[5806],{"type":45,"value":5807},"] ",{"type":40,"tag":376,"props":5809,"children":5810},{"style":466},[5811],{"type":45,"value":866},{"type":40,"tag":376,"props":5813,"children":5814},{"style":472},[5815],{"type":45,"value":2628},{"type":40,"tag":376,"props":5817,"children":5818},{"class":378,"line":2595},[5819,5823,5827,5831,5835,5839,5843,5847,5851,5855,5859,5863,5867,5871,5875,5879,5884,5888,5892],{"type":40,"tag":376,"props":5820,"children":5821},{"style":466},[5822],{"type":45,"value":3205},{"type":40,"tag":376,"props":5824,"children":5825},{"style":600},[5826],{"type":45,"value":3210},{"type":40,"tag":376,"props":5828,"children":5829},{"style":472},[5830],{"type":45,"value":607},{"type":40,"tag":376,"props":5832,"children":5833},{"style":466},[5834],{"type":45,"value":520},{"type":40,"tag":376,"props":5836,"children":5837},{"style":512},[5838],{"type":45,"value":5659},{"type":40,"tag":376,"props":5840,"children":5841},{"style":466},[5842],{"type":45,"value":520},{"type":40,"tag":376,"props":5844,"children":5845},{"style":466},[5846],{"type":45,"value":480},{"type":40,"tag":376,"props":5848,"children":5849},{"style":579},[5850],{"type":45,"value":1484},{"type":40,"tag":376,"props":5852,"children":5853},{"style":466},[5854],{"type":45,"value":4480},{"type":40,"tag":376,"props":5856,"children":5857},{"style":579},[5858],{"type":45,"value":763},{"type":40,"tag":376,"props":5860,"children":5861},{"style":472},[5862],{"type":45,"value":796},{"type":40,"tag":376,"props":5864,"children":5865},{"style":466},[5866],{"type":45,"value":3464},{"type":40,"tag":376,"props":5868,"children":5869},{"style":618},[5870],{"type":45,"value":4497},{"type":40,"tag":376,"props":5872,"children":5873},{"style":466},[5874],{"type":45,"value":626},{"type":40,"tag":376,"props":5876,"children":5877},{"style":466},[5878],{"type":45,"value":509},{"type":40,"tag":376,"props":5880,"children":5881},{"style":512},[5882],{"type":45,"value":5883},"B",{"type":40,"tag":376,"props":5885,"children":5886},{"style":466},[5887],{"type":45,"value":520},{"type":40,"tag":376,"props":5889,"children":5890},{"style":466},[5891],{"type":45,"value":499},{"type":40,"tag":376,"props":5893,"children":5894},{"style":472},[5895],{"type":45,"value":4523},{"type":40,"tag":376,"props":5897,"children":5898},{"class":378,"line":2604},[5899,5903,5907,5911,5915,5919,5923,5927,5931,5935,5939,5943,5947,5951,5955,5959,5964,5968,5972],{"type":40,"tag":376,"props":5900,"children":5901},{"style":466},[5902],{"type":45,"value":3205},{"type":40,"tag":376,"props":5904,"children":5905},{"style":600},[5906],{"type":45,"value":3210},{"type":40,"tag":376,"props":5908,"children":5909},{"style":472},[5910],{"type":45,"value":607},{"type":40,"tag":376,"props":5912,"children":5913},{"style":466},[5914],{"type":45,"value":520},{"type":40,"tag":376,"props":5916,"children":5917},{"style":512},[5918],{"type":45,"value":5568},{"type":40,"tag":376,"props":5920,"children":5921},{"style":466},[5922],{"type":45,"value":520},{"type":40,"tag":376,"props":5924,"children":5925},{"style":466},[5926],{"type":45,"value":480},{"type":40,"tag":376,"props":5928,"children":5929},{"style":579},[5930],{"type":45,"value":1484},{"type":40,"tag":376,"props":5932,"children":5933},{"style":466},[5934],{"type":45,"value":4480},{"type":40,"tag":376,"props":5936,"children":5937},{"style":579},[5938],{"type":45,"value":763},{"type":40,"tag":376,"props":5940,"children":5941},{"style":472},[5942],{"type":45,"value":796},{"type":40,"tag":376,"props":5944,"children":5945},{"style":466},[5946],{"type":45,"value":3464},{"type":40,"tag":376,"props":5948,"children":5949},{"style":618},[5950],{"type":45,"value":4497},{"type":40,"tag":376,"props":5952,"children":5953},{"style":466},[5954],{"type":45,"value":626},{"type":40,"tag":376,"props":5956,"children":5957},{"style":466},[5958],{"type":45,"value":509},{"type":40,"tag":376,"props":5960,"children":5961},{"style":512},[5962],{"type":45,"value":5963},"C",{"type":40,"tag":376,"props":5965,"children":5966},{"style":466},[5967],{"type":45,"value":520},{"type":40,"tag":376,"props":5969,"children":5970},{"style":466},[5971],{"type":45,"value":499},{"type":40,"tag":376,"props":5973,"children":5974},{"style":472},[5975],{"type":45,"value":4523},{"type":40,"tag":376,"props":5977,"children":5978},{"class":378,"line":2613},[5979,5983,5987,5991,5995,5999,6003,6007],{"type":40,"tag":376,"props":5980,"children":5981},{"style":466},[5982],{"type":45,"value":3205},{"type":40,"tag":376,"props":5984,"children":5985},{"style":600},[5986],{"type":45,"value":3285},{"type":40,"tag":376,"props":5988,"children":5989},{"style":472},[5990],{"type":45,"value":3290},{"type":40,"tag":376,"props":5992,"children":5993},{"style":466},[5994],{"type":45,"value":480},{"type":40,"tag":376,"props":5996,"children":5997},{"style":466},[5998],{"type":45,"value":509},{"type":40,"tag":376,"props":6000,"children":6001},{"style":512},[6002],{"type":45,"value":5740},{"type":40,"tag":376,"props":6004,"children":6005},{"style":466},[6006],{"type":45,"value":520},{"type":40,"tag":376,"props":6008,"children":6009},{"style":472},[6010],{"type":45,"value":2628},{"type":40,"tag":376,"props":6012,"children":6013},{"class":378,"line":2622},[6014,6018,6022,6026,6030,6034,6038,6042],{"type":40,"tag":376,"props":6015,"children":6016},{"style":466},[6017],{"type":45,"value":3205},{"type":40,"tag":376,"props":6019,"children":6020},{"style":600},[6021],{"type":45,"value":3285},{"type":40,"tag":376,"props":6023,"children":6024},{"style":472},[6025],{"type":45,"value":607},{"type":40,"tag":376,"props":6027,"children":6028},{"style":466},[6029],{"type":45,"value":520},{"type":40,"tag":376,"props":6031,"children":6032},{"style":512},[6033],{"type":45,"value":5659},{"type":40,"tag":376,"props":6035,"children":6036},{"style":466},[6037],{"type":45,"value":520},{"type":40,"tag":376,"props":6039,"children":6040},{"style":466},[6041],{"type":45,"value":480},{"type":40,"tag":376,"props":6043,"children":6044},{"style":472},[6045],{"type":45,"value":3393},{"type":40,"tag":376,"props":6047,"children":6048},{"class":378,"line":2631},[6049,6053,6057,6061,6065,6069,6073,6077],{"type":40,"tag":376,"props":6050,"children":6051},{"style":466},[6052],{"type":45,"value":3205},{"type":40,"tag":376,"props":6054,"children":6055},{"style":600},[6056],{"type":45,"value":3285},{"type":40,"tag":376,"props":6058,"children":6059},{"style":472},[6060],{"type":45,"value":607},{"type":40,"tag":376,"props":6062,"children":6063},{"style":466},[6064],{"type":45,"value":520},{"type":40,"tag":376,"props":6066,"children":6067},{"style":512},[6068],{"type":45,"value":5568},{"type":40,"tag":376,"props":6070,"children":6071},{"style":466},[6072],{"type":45,"value":520},{"type":40,"tag":376,"props":6074,"children":6075},{"style":466},[6076],{"type":45,"value":480},{"type":40,"tag":376,"props":6078,"children":6079},{"style":472},[6080],{"type":45,"value":3393},{"type":40,"tag":376,"props":6082,"children":6083},{"class":378,"line":2639},[6084,6088,6092,6096],{"type":40,"tag":376,"props":6085,"children":6086},{"style":466},[6087],{"type":45,"value":3205},{"type":40,"tag":376,"props":6089,"children":6090},{"style":600},[6091],{"type":45,"value":3405},{"type":40,"tag":376,"props":6093,"children":6094},{"style":472},[6095],{"type":45,"value":645},{"type":40,"tag":376,"props":6097,"children":6098},{"style":466},[6099],{"type":45,"value":525},{"type":40,"tag":6101,"props":6102,"children":6103},"command-return-type-annotations",{},[6104,6122],{"type":40,"tag":104,"props":6105,"children":6106},{},[6107,6112,6114,6120],{"type":40,"tag":56,"props":6108,"children":6109},{},[6110],{"type":45,"value":6111},"Python",{"type":45,"value":6113},": Use ",{"type":40,"tag":110,"props":6115,"children":6117},{"className":6116},[],[6118],{"type":45,"value":6119},"Command[Literal[\"node_a\", \"node_b\"]]",{"type":45,"value":6121}," as the return type annotation to declare valid goto destinations.",{"type":40,"tag":104,"props":6123,"children":6124},{},[6125,6130,6132,6138,6140,6145],{"type":40,"tag":56,"props":6126,"children":6127},{},[6128],{"type":45,"value":6129},"TypeScript",{"type":45,"value":6131},": Pass ",{"type":40,"tag":110,"props":6133,"children":6135},{"className":6134},[],[6136],{"type":45,"value":6137},"{ ends: [\"node_a\", \"node_b\"] }",{"type":45,"value":6139}," as the third argument to ",{"type":40,"tag":110,"props":6141,"children":6143},{"className":6142},[],[6144],{"type":45,"value":3210},{"type":45,"value":6146}," to declare valid goto destinations.",{"type":40,"tag":6148,"props":6149,"children":6150},"warning-command-static-edges",{},[6151],{"type":40,"tag":104,"props":6152,"children":6153},{},[6154,6159,6161,6166,6168,6173,6175,6181,6183,6188,6190,6195,6197,6203,6205,6211,6213,6218,6220,6225,6227,6232],{"type":40,"tag":56,"props":6155,"children":6156},{},[6157],{"type":45,"value":6158},"Warning",{"type":45,"value":6160},": ",{"type":40,"tag":110,"props":6162,"children":6164},{"className":6163},[],[6165],{"type":45,"value":2407},{"type":45,"value":6167}," only adds ",{"type":40,"tag":56,"props":6169,"children":6170},{},[6171],{"type":45,"value":6172},"dynamic",{"type":45,"value":6174}," edges — static edges defined with ",{"type":40,"tag":110,"props":6176,"children":6178},{"className":6177},[],[6179],{"type":45,"value":6180},"add_edge",{"type":45,"value":6182}," \u002F ",{"type":40,"tag":110,"props":6184,"children":6186},{"className":6185},[],[6187],{"type":45,"value":3285},{"type":45,"value":6189}," still execute. If ",{"type":40,"tag":110,"props":6191,"children":6193},{"className":6192},[],[6194],{"type":45,"value":5740},{"type":45,"value":6196}," returns ",{"type":40,"tag":110,"props":6198,"children":6200},{"className":6199},[],[6201],{"type":45,"value":6202},"Command(goto=\"node_c\")",{"type":45,"value":6204}," and you also have ",{"type":40,"tag":110,"props":6206,"children":6208},{"className":6207},[],[6209],{"type":45,"value":6210},"graph.add_edge(\"node_a\", \"node_b\")",{"type":45,"value":6212},", ",{"type":40,"tag":56,"props":6214,"children":6215},{},[6216],{"type":45,"value":6217},"both",{"type":45,"value":6219}," ",{"type":40,"tag":110,"props":6221,"children":6223},{"className":6222},[],[6224],{"type":45,"value":5659},{"type":45,"value":6226}," and ",{"type":40,"tag":110,"props":6228,"children":6230},{"className":6229},[],[6231],{"type":45,"value":5568},{"type":45,"value":6233}," will run.",{"type":40,"tag":260,"props":6235,"children":6236},{},[],{"type":40,"tag":264,"props":6238,"children":6240},{"id":6239},"send-api",[6241],{"type":45,"value":6242},"Send API",{"type":40,"tag":104,"props":6244,"children":6245},{},[6246,6248,6253,6255,6261],{"type":45,"value":6247},"Fan-out with ",{"type":40,"tag":110,"props":6249,"children":6251},{"className":6250},[],[6252],{"type":45,"value":2429},{"type":45,"value":6254},": return ",{"type":40,"tag":110,"props":6256,"children":6258},{"className":6257},[],[6259],{"type":45,"value":6260},"[Send(\"worker\", {...})]",{"type":45,"value":6262}," from a conditional edge to spawn parallel workers. Requires a reducer on the results field.",{"type":40,"tag":6264,"props":6265,"children":6266},"ex-orchestrator-worker",{},[6267,6511],{"type":40,"tag":360,"props":6268,"children":6269},{},[6270,6272],{"type":45,"value":6271},"\nFan out tasks to parallel workers using the Send API and aggregate results.\n",{"type":40,"tag":366,"props":6273,"children":6275},{"className":368,"code":6274,"language":360,"meta":370,"style":370},"from langgraph.types import Send\nfrom typing import Annotated\nimport operator\n\nclass OrchestratorState(TypedDict):\n    tasks: list[str]\n    results: Annotated[list, operator.add]\n    summary: str\n\ndef orchestrator(state: OrchestratorState):\n    \"\"\"Fan out tasks to workers.\"\"\"\n    return [Send(\"worker\", {\"task\": task}) for task in state[\"tasks\"]]\n\ndef worker(state: dict) -> dict:\n    return {\"results\": [f\"Completed: {state['task']}\"]}\n\ndef synthesize(state: OrchestratorState) -> dict:\n    return {\"summary\": f\"Processed {len(state['results'])} tasks\"}\n\ngraph = (\n    StateGraph(OrchestratorState)\n    .add_node(\"worker\", worker)\n    .add_node(\"synthesize\", synthesize)\n    .add_conditional_edges(START, orchestrator, [\"worker\"])\n    .add_edge(\"worker\", \"synthesize\")\n    .add_edge(\"synthesize\", END)\n    .compile()\n)\n\nresult = graph.invoke({\"tasks\": [\"Task A\", \"Task B\", \"Task C\"]})\n",[6276],{"type":40,"tag":110,"props":6277,"children":6278},{"__ignoreMap":370},[6279,6287,6294,6301,6308,6316,6324,6332,6340,6347,6355,6363,6371,6378,6386,6394,6401,6409,6417,6424,6431,6439,6447,6455,6463,6471,6479,6486,6494,6502],{"type":40,"tag":376,"props":6280,"children":6281},{"class":378,"line":379},[6282],{"type":40,"tag":376,"props":6283,"children":6284},{},[6285],{"type":45,"value":6286},"from langgraph.types import Send\n",{"type":40,"tag":376,"props":6288,"children":6289},{"class":378,"line":388},[6290],{"type":40,"tag":376,"props":6291,"children":6292},{},[6293],{"type":45,"value":967},{"type":40,"tag":376,"props":6295,"children":6296},{"class":378,"line":397},[6297],{"type":40,"tag":376,"props":6298,"children":6299},{},[6300],{"type":45,"value":394},{"type":40,"tag":376,"props":6302,"children":6303},{"class":378,"line":407},[6304],{"type":40,"tag":376,"props":6305,"children":6306},{"emptyLinePlaceholder":401},[6307],{"type":45,"value":404},{"type":40,"tag":376,"props":6309,"children":6310},{"class":378,"line":416},[6311],{"type":40,"tag":376,"props":6312,"children":6313},{},[6314],{"type":45,"value":6315},"class OrchestratorState(TypedDict):\n",{"type":40,"tag":376,"props":6317,"children":6318},{"class":378,"line":425},[6319],{"type":40,"tag":376,"props":6320,"children":6321},{},[6322],{"type":45,"value":6323},"    tasks: list[str]\n",{"type":40,"tag":376,"props":6325,"children":6326},{"class":378,"line":434},[6327],{"type":40,"tag":376,"props":6328,"children":6329},{},[6330],{"type":45,"value":6331},"    results: Annotated[list, operator.add]\n",{"type":40,"tag":376,"props":6333,"children":6334},{"class":378,"line":708},[6335],{"type":40,"tag":376,"props":6336,"children":6337},{},[6338],{"type":45,"value":6339},"    summary: str\n",{"type":40,"tag":376,"props":6341,"children":6342},{"class":378,"line":776},[6343],{"type":40,"tag":376,"props":6344,"children":6345},{"emptyLinePlaceholder":401},[6346],{"type":45,"value":404},{"type":40,"tag":376,"props":6348,"children":6349},{"class":378,"line":847},[6350],{"type":40,"tag":376,"props":6351,"children":6352},{},[6353],{"type":45,"value":6354},"def orchestrator(state: OrchestratorState):\n",{"type":40,"tag":376,"props":6356,"children":6357},{"class":378,"line":860},[6358],{"type":40,"tag":376,"props":6359,"children":6360},{},[6361],{"type":45,"value":6362},"    \"\"\"Fan out tasks to workers.\"\"\"\n",{"type":40,"tag":376,"props":6364,"children":6365},{"class":378,"line":977},[6366],{"type":40,"tag":376,"props":6367,"children":6368},{},[6369],{"type":45,"value":6370},"    return [Send(\"worker\", {\"task\": task}) for task in state[\"tasks\"]]\n",{"type":40,"tag":376,"props":6372,"children":6373},{"class":378,"line":985},[6374],{"type":40,"tag":376,"props":6375,"children":6376},{"emptyLinePlaceholder":401},[6377],{"type":45,"value":404},{"type":40,"tag":376,"props":6379,"children":6380},{"class":378,"line":993},[6381],{"type":40,"tag":376,"props":6382,"children":6383},{},[6384],{"type":45,"value":6385},"def worker(state: dict) -> dict:\n",{"type":40,"tag":376,"props":6387,"children":6388},{"class":378,"line":1002},[6389],{"type":40,"tag":376,"props":6390,"children":6391},{},[6392],{"type":45,"value":6393},"    return {\"results\": [f\"Completed: {state['task']}\"]}\n",{"type":40,"tag":376,"props":6395,"children":6396},{"class":378,"line":2568},[6397],{"type":40,"tag":376,"props":6398,"children":6399},{"emptyLinePlaceholder":401},[6400],{"type":45,"value":404},{"type":40,"tag":376,"props":6402,"children":6403},{"class":378,"line":2577},[6404],{"type":40,"tag":376,"props":6405,"children":6406},{},[6407],{"type":45,"value":6408},"def synthesize(state: OrchestratorState) -> dict:\n",{"type":40,"tag":376,"props":6410,"children":6411},{"class":378,"line":2586},[6412],{"type":40,"tag":376,"props":6413,"children":6414},{},[6415],{"type":45,"value":6416},"    return {\"summary\": f\"Processed {len(state['results'])} tasks\"}\n",{"type":40,"tag":376,"props":6418,"children":6419},{"class":378,"line":2595},[6420],{"type":40,"tag":376,"props":6421,"children":6422},{"emptyLinePlaceholder":401},[6423],{"type":45,"value":404},{"type":40,"tag":376,"props":6425,"children":6426},{"class":378,"line":2604},[6427],{"type":40,"tag":376,"props":6428,"children":6429},{},[6430],{"type":45,"value":2557},{"type":40,"tag":376,"props":6432,"children":6433},{"class":378,"line":2613},[6434],{"type":40,"tag":376,"props":6435,"children":6436},{},[6437],{"type":45,"value":6438},"    StateGraph(OrchestratorState)\n",{"type":40,"tag":376,"props":6440,"children":6441},{"class":378,"line":2622},[6442],{"type":40,"tag":376,"props":6443,"children":6444},{},[6445],{"type":45,"value":6446},"    .add_node(\"worker\", worker)\n",{"type":40,"tag":376,"props":6448,"children":6449},{"class":378,"line":2631},[6450],{"type":40,"tag":376,"props":6451,"children":6452},{},[6453],{"type":45,"value":6454},"    .add_node(\"synthesize\", synthesize)\n",{"type":40,"tag":376,"props":6456,"children":6457},{"class":378,"line":2639},[6458],{"type":40,"tag":376,"props":6459,"children":6460},{},[6461],{"type":45,"value":6462},"    .add_conditional_edges(START, orchestrator, [\"worker\"])\n",{"type":40,"tag":376,"props":6464,"children":6465},{"class":378,"line":2648},[6466],{"type":40,"tag":376,"props":6467,"children":6468},{},[6469],{"type":45,"value":6470},"    .add_edge(\"worker\", \"synthesize\")\n",{"type":40,"tag":376,"props":6472,"children":6473},{"class":378,"line":3501},[6474],{"type":40,"tag":376,"props":6475,"children":6476},{},[6477],{"type":45,"value":6478},"    .add_edge(\"synthesize\", END)\n",{"type":40,"tag":376,"props":6480,"children":6481},{"class":378,"line":3757},[6482],{"type":40,"tag":376,"props":6483,"children":6484},{},[6485],{"type":45,"value":2619},{"type":40,"tag":376,"props":6487,"children":6489},{"class":378,"line":6488},28,[6490],{"type":40,"tag":376,"props":6491,"children":6492},{},[6493],{"type":45,"value":2628},{"type":40,"tag":376,"props":6495,"children":6497},{"class":378,"line":6496},29,[6498],{"type":40,"tag":376,"props":6499,"children":6500},{"emptyLinePlaceholder":401},[6501],{"type":45,"value":404},{"type":40,"tag":376,"props":6503,"children":6505},{"class":378,"line":6504},30,[6506],{"type":40,"tag":376,"props":6507,"children":6508},{},[6509],{"type":45,"value":6510},"result = graph.invoke({\"tasks\": [\"Task A\", \"Task B\", \"Task C\"]})\n",{"type":40,"tag":442,"props":6512,"children":6513},{},[6514,6515],{"type":45,"value":6271},{"type":40,"tag":366,"props":6516,"children":6518},{"className":449,"code":6517,"language":442,"meta":370,"style":370},"import { Send, StateGraph, StateSchema, ReducedValue, START, END } from \"@langchain\u002Flanggraph\";\nimport { z } from \"zod\";\n\nconst State = new StateSchema({\n  tasks: z.array(z.string()),\n  results: new ReducedValue(\n    z.array(z.string()).default(() => []),\n    { reducer: (curr, upd) => curr.concat(upd) }\n  ),\n  summary: z.string().default(\"\"),\n});\n\nconst orchestrator = (state: typeof State.State) => {\n  return state.tasks.map((task) => new Send(\"worker\", { task }));\n};\n\nconst worker = async (state: { task: string }) => {\n  return { results: [`Completed: ${state.task}`] };\n};\n\nconst synthesize = async (state: typeof State.State) => {\n  return { summary: `Processed ${state.results.length} tasks` };\n};\n\nconst graph = new StateGraph(State)\n  .addNode(\"worker\", worker)\n  .addNode(\"synthesize\", synthesize)\n  .addConditionalEdges(START, orchestrator, [\"worker\"])\n  .addEdge(\"worker\", \"synthesize\")\n  .addEdge(\"synthesize\", END)\n  .compile();\n",[6519],{"type":40,"tag":110,"props":6520,"children":6521},{"__ignoreMap":370},[6522,6602,6641,6648,6679,6723,6747,6806,6869,6880,6932,6947,6954,7010,7111,7118,7125,7187,7248,7255,7262,7322,7394,7401,7408,7435,7471,7508,7556,7603,7638],{"type":40,"tag":376,"props":6523,"children":6524},{"class":378,"line":379},[6525,6529,6533,6538,6542,6546,6550,6554,6558,6562,6566,6570,6574,6578,6582,6586,6590,6594,6598],{"type":40,"tag":376,"props":6526,"children":6527},{"style":460},[6528],{"type":45,"value":463},{"type":40,"tag":376,"props":6530,"children":6531},{"style":466},[6532],{"type":45,"value":469},{"type":40,"tag":376,"props":6534,"children":6535},{"style":472},[6536],{"type":45,"value":6537}," Send",{"type":40,"tag":376,"props":6539,"children":6540},{"style":466},[6541],{"type":45,"value":480},{"type":40,"tag":376,"props":6543,"children":6544},{"style":472},[6545],{"type":45,"value":2682},{"type":40,"tag":376,"props":6547,"children":6548},{"style":466},[6549],{"type":45,"value":480},{"type":40,"tag":376,"props":6551,"children":6552},{"style":472},[6553],{"type":45,"value":475},{"type":40,"tag":376,"props":6555,"children":6556},{"style":466},[6557],{"type":45,"value":480},{"type":40,"tag":376,"props":6559,"children":6560},{"style":472},[6561],{"type":45,"value":485},{"type":40,"tag":376,"props":6563,"children":6564},{"style":466},[6565],{"type":45,"value":480},{"type":40,"tag":376,"props":6567,"children":6568},{"style":472},[6569],{"type":45,"value":2699},{"type":40,"tag":376,"props":6571,"children":6572},{"style":466},[6573],{"type":45,"value":480},{"type":40,"tag":376,"props":6575,"children":6576},{"style":472},[6577],{"type":45,"value":2708},{"type":40,"tag":376,"props":6579,"children":6580},{"style":466},[6581],{"type":45,"value":499},{"type":40,"tag":376,"props":6583,"children":6584},{"style":460},[6585],{"type":45,"value":504},{"type":40,"tag":376,"props":6587,"children":6588},{"style":466},[6589],{"type":45,"value":509},{"type":40,"tag":376,"props":6591,"children":6592},{"style":512},[6593],{"type":45,"value":515},{"type":40,"tag":376,"props":6595,"children":6596},{"style":466},[6597],{"type":45,"value":520},{"type":40,"tag":376,"props":6599,"children":6600},{"style":466},[6601],{"type":45,"value":525},{"type":40,"tag":376,"props":6603,"children":6604},{"class":378,"line":388},[6605,6609,6613,6617,6621,6625,6629,6633,6637],{"type":40,"tag":376,"props":6606,"children":6607},{"style":460},[6608],{"type":45,"value":463},{"type":40,"tag":376,"props":6610,"children":6611},{"style":466},[6612],{"type":45,"value":469},{"type":40,"tag":376,"props":6614,"children":6615},{"style":472},[6616],{"type":45,"value":541},{"type":40,"tag":376,"props":6618,"children":6619},{"style":466},[6620],{"type":45,"value":499},{"type":40,"tag":376,"props":6622,"children":6623},{"style":460},[6624],{"type":45,"value":504},{"type":40,"tag":376,"props":6626,"children":6627},{"style":466},[6628],{"type":45,"value":509},{"type":40,"tag":376,"props":6630,"children":6631},{"style":512},[6632],{"type":45,"value":558},{"type":40,"tag":376,"props":6634,"children":6635},{"style":466},[6636],{"type":45,"value":520},{"type":40,"tag":376,"props":6638,"children":6639},{"style":466},[6640],{"type":45,"value":525},{"type":40,"tag":376,"props":6642,"children":6643},{"class":378,"line":397},[6644],{"type":40,"tag":376,"props":6645,"children":6646},{"emptyLinePlaceholder":401},[6647],{"type":45,"value":404},{"type":40,"tag":376,"props":6649,"children":6650},{"class":378,"line":407},[6651,6655,6659,6663,6667,6671,6675],{"type":40,"tag":376,"props":6652,"children":6653},{"style":579},[6654],{"type":45,"value":582},{"type":40,"tag":376,"props":6656,"children":6657},{"style":472},[6658],{"type":45,"value":587},{"type":40,"tag":376,"props":6660,"children":6661},{"style":466},[6662],{"type":45,"value":592},{"type":40,"tag":376,"props":6664,"children":6665},{"style":466},[6666],{"type":45,"value":597},{"type":40,"tag":376,"props":6668,"children":6669},{"style":600},[6670],{"type":45,"value":475},{"type":40,"tag":376,"props":6672,"children":6673},{"style":472},[6674],{"type":45,"value":607},{"type":40,"tag":376,"props":6676,"children":6677},{"style":466},[6678],{"type":45,"value":612},{"type":40,"tag":376,"props":6680,"children":6681},{"class":378,"line":416},[6682,6687,6691,6695,6699,6703,6707,6711,6715,6719],{"type":40,"tag":376,"props":6683,"children":6684},{"style":618},[6685],{"type":45,"value":6686},"  tasks",{"type":40,"tag":376,"props":6688,"children":6689},{"style":466},[6690],{"type":45,"value":626},{"type":40,"tag":376,"props":6692,"children":6693},{"style":472},[6694],{"type":45,"value":541},{"type":40,"tag":376,"props":6696,"children":6697},{"style":466},[6698],{"type":45,"value":635},{"type":40,"tag":376,"props":6700,"children":6701},{"style":600},[6702],{"type":45,"value":723},{"type":40,"tag":376,"props":6704,"children":6705},{"style":472},[6706],{"type":45,"value":728},{"type":40,"tag":376,"props":6708,"children":6709},{"style":466},[6710],{"type":45,"value":635},{"type":40,"tag":376,"props":6712,"children":6713},{"style":600},[6714],{"type":45,"value":640},{"type":40,"tag":376,"props":6716,"children":6717},{"style":472},[6718],{"type":45,"value":741},{"type":40,"tag":376,"props":6720,"children":6721},{"style":466},[6722],{"type":45,"value":773},{"type":40,"tag":376,"props":6724,"children":6725},{"class":378,"line":425},[6726,6731,6735,6739,6743],{"type":40,"tag":376,"props":6727,"children":6728},{"style":618},[6729],{"type":45,"value":6730},"  results",{"type":40,"tag":376,"props":6732,"children":6733},{"style":466},[6734],{"type":45,"value":626},{"type":40,"tag":376,"props":6736,"children":6737},{"style":466},[6738],{"type":45,"value":597},{"type":40,"tag":376,"props":6740,"children":6741},{"style":600},[6742],{"type":45,"value":485},{"type":40,"tag":376,"props":6744,"children":6745},{"style":472},[6746],{"type":45,"value":705},{"type":40,"tag":376,"props":6748,"children":6749},{"class":378,"line":434},[6750,6754,6758,6762,6766,6770,6774,6778,6782,6786,6790,6794,6798,6802],{"type":40,"tag":376,"props":6751,"children":6752},{"style":472},[6753],{"type":45,"value":714},{"type":40,"tag":376,"props":6755,"children":6756},{"style":466},[6757],{"type":45,"value":635},{"type":40,"tag":376,"props":6759,"children":6760},{"style":600},[6761],{"type":45,"value":723},{"type":40,"tag":376,"props":6763,"children":6764},{"style":472},[6765],{"type":45,"value":728},{"type":40,"tag":376,"props":6767,"children":6768},{"style":466},[6769],{"type":45,"value":635},{"type":40,"tag":376,"props":6771,"children":6772},{"style":600},[6773],{"type":45,"value":640},{"type":40,"tag":376,"props":6775,"children":6776},{"style":472},[6777],{"type":45,"value":741},{"type":40,"tag":376,"props":6779,"children":6780},{"style":466},[6781],{"type":45,"value":635},{"type":40,"tag":376,"props":6783,"children":6784},{"style":600},[6785],{"type":45,"value":750},{"type":40,"tag":376,"props":6787,"children":6788},{"style":472},[6789],{"type":45,"value":607},{"type":40,"tag":376,"props":6791,"children":6792},{"style":466},[6793],{"type":45,"value":645},{"type":40,"tag":376,"props":6795,"children":6796},{"style":579},[6797],{"type":45,"value":763},{"type":40,"tag":376,"props":6799,"children":6800},{"style":472},[6801],{"type":45,"value":768},{"type":40,"tag":376,"props":6803,"children":6804},{"style":466},[6805],{"type":45,"value":773},{"type":40,"tag":376,"props":6807,"children":6808},{"class":378,"line":708},[6809,6813,6817,6821,6825,6830,6834,6839,6843,6847,6852,6856,6860,6865],{"type":40,"tag":376,"props":6810,"children":6811},{"style":466},[6812],{"type":45,"value":782},{"type":40,"tag":376,"props":6814,"children":6815},{"style":600},[6816],{"type":45,"value":787},{"type":40,"tag":376,"props":6818,"children":6819},{"style":466},[6820],{"type":45,"value":626},{"type":40,"tag":376,"props":6822,"children":6823},{"style":466},[6824],{"type":45,"value":796},{"type":40,"tag":376,"props":6826,"children":6827},{"style":799},[6828],{"type":45,"value":6829},"curr",{"type":40,"tag":376,"props":6831,"children":6832},{"style":466},[6833],{"type":45,"value":480},{"type":40,"tag":376,"props":6835,"children":6836},{"style":799},[6837],{"type":45,"value":6838}," upd",{"type":40,"tag":376,"props":6840,"children":6841},{"style":466},[6842],{"type":45,"value":816},{"type":40,"tag":376,"props":6844,"children":6845},{"style":579},[6846],{"type":45,"value":763},{"type":40,"tag":376,"props":6848,"children":6849},{"style":472},[6850],{"type":45,"value":6851}," curr",{"type":40,"tag":376,"props":6853,"children":6854},{"style":466},[6855],{"type":45,"value":635},{"type":40,"tag":376,"props":6857,"children":6858},{"style":600},[6859],{"type":45,"value":834},{"type":40,"tag":376,"props":6861,"children":6862},{"style":472},[6863],{"type":45,"value":6864},"(upd) ",{"type":40,"tag":376,"props":6866,"children":6867},{"style":466},[6868],{"type":45,"value":844},{"type":40,"tag":376,"props":6870,"children":6871},{"class":378,"line":776},[6872,6876],{"type":40,"tag":376,"props":6873,"children":6874},{"style":472},[6875],{"type":45,"value":853},{"type":40,"tag":376,"props":6877,"children":6878},{"style":466},[6879],{"type":45,"value":773},{"type":40,"tag":376,"props":6881,"children":6882},{"class":378,"line":847},[6883,6888,6892,6896,6900,6904,6908,6912,6916,6920,6924,6928],{"type":40,"tag":376,"props":6884,"children":6885},{"style":618},[6886],{"type":45,"value":6887},"  summary",{"type":40,"tag":376,"props":6889,"children":6890},{"style":466},[6891],{"type":45,"value":626},{"type":40,"tag":376,"props":6893,"children":6894},{"style":472},[6895],{"type":45,"value":541},{"type":40,"tag":376,"props":6897,"children":6898},{"style":466},[6899],{"type":45,"value":635},{"type":40,"tag":376,"props":6901,"children":6902},{"style":600},[6903],{"type":45,"value":640},{"type":40,"tag":376,"props":6905,"children":6906},{"style":472},[6907],{"type":45,"value":645},{"type":40,"tag":376,"props":6909,"children":6910},{"style":466},[6911],{"type":45,"value":635},{"type":40,"tag":376,"props":6913,"children":6914},{"style":600},[6915],{"type":45,"value":750},{"type":40,"tag":376,"props":6917,"children":6918},{"style":472},[6919],{"type":45,"value":607},{"type":40,"tag":376,"props":6921,"children":6922},{"style":466},[6923],{"type":45,"value":2886},{"type":40,"tag":376,"props":6925,"children":6926},{"style":472},[6927],{"type":45,"value":816},{"type":40,"tag":376,"props":6929,"children":6930},{"style":466},[6931],{"type":45,"value":773},{"type":40,"tag":376,"props":6933,"children":6934},{"class":378,"line":860},[6935,6939,6943],{"type":40,"tag":376,"props":6936,"children":6937},{"style":466},[6938],{"type":45,"value":866},{"type":40,"tag":376,"props":6940,"children":6941},{"style":472},[6942],{"type":45,"value":816},{"type":40,"tag":376,"props":6944,"children":6945},{"style":466},[6946],{"type":45,"value":525},{"type":40,"tag":376,"props":6948,"children":6949},{"class":378,"line":977},[6950],{"type":40,"tag":376,"props":6951,"children":6952},{"emptyLinePlaceholder":401},[6953],{"type":45,"value":404},{"type":40,"tag":376,"props":6955,"children":6956},{"class":378,"line":985},[6957,6961,6966,6970,6974,6978,6982,6986,6990,6994,6998,7002,7006],{"type":40,"tag":376,"props":6958,"children":6959},{"style":579},[6960],{"type":45,"value":582},{"type":40,"tag":376,"props":6962,"children":6963},{"style":472},[6964],{"type":45,"value":6965}," orchestrator ",{"type":40,"tag":376,"props":6967,"children":6968},{"style":466},[6969],{"type":45,"value":592},{"type":40,"tag":376,"props":6971,"children":6972},{"style":466},[6973],{"type":45,"value":796},{"type":40,"tag":376,"props":6975,"children":6976},{"style":799},[6977],{"type":45,"value":1493},{"type":40,"tag":376,"props":6979,"children":6980},{"style":466},[6981],{"type":45,"value":626},{"type":40,"tag":376,"props":6983,"children":6984},{"style":466},[6985],{"type":45,"value":1502},{"type":40,"tag":376,"props":6987,"children":6988},{"style":472},[6989],{"type":45,"value":1507},{"type":40,"tag":376,"props":6991,"children":6992},{"style":466},[6993],{"type":45,"value":635},{"type":40,"tag":376,"props":6995,"children":6996},{"style":472},[6997],{"type":45,"value":1516},{"type":40,"tag":376,"props":6999,"children":7000},{"style":466},[7001],{"type":45,"value":816},{"type":40,"tag":376,"props":7003,"children":7004},{"style":579},[7005],{"type":45,"value":763},{"type":40,"tag":376,"props":7007,"children":7008},{"style":466},[7009],{"type":45,"value":1529},{"type":40,"tag":376,"props":7011,"children":7012},{"class":378,"line":993},[7013,7017,7021,7025,7030,7034,7039,7043,7047,7052,7056,7060,7064,7068,7072,7076,7081,7085,7089,7093,7098,7102,7107],{"type":40,"tag":376,"props":7014,"children":7015},{"style":460},[7016],{"type":45,"value":1576},{"type":40,"tag":376,"props":7018,"children":7019},{"style":472},[7020],{"type":45,"value":1581},{"type":40,"tag":376,"props":7022,"children":7023},{"style":466},[7024],{"type":45,"value":635},{"type":40,"tag":376,"props":7026,"children":7027},{"style":472},[7028],{"type":45,"value":7029},"tasks",{"type":40,"tag":376,"props":7031,"children":7032},{"style":466},[7033],{"type":45,"value":635},{"type":40,"tag":376,"props":7035,"children":7036},{"style":600},[7037],{"type":45,"value":7038},"map",{"type":40,"tag":376,"props":7040,"children":7041},{"style":618},[7042],{"type":45,"value":607},{"type":40,"tag":376,"props":7044,"children":7045},{"style":466},[7046],{"type":45,"value":607},{"type":40,"tag":376,"props":7048,"children":7049},{"style":799},[7050],{"type":45,"value":7051},"task",{"type":40,"tag":376,"props":7053,"children":7054},{"style":466},[7055],{"type":45,"value":816},{"type":40,"tag":376,"props":7057,"children":7058},{"style":579},[7059],{"type":45,"value":763},{"type":40,"tag":376,"props":7061,"children":7062},{"style":466},[7063],{"type":45,"value":597},{"type":40,"tag":376,"props":7065,"children":7066},{"style":600},[7067],{"type":45,"value":6537},{"type":40,"tag":376,"props":7069,"children":7070},{"style":618},[7071],{"type":45,"value":607},{"type":40,"tag":376,"props":7073,"children":7074},{"style":466},[7075],{"type":45,"value":520},{"type":40,"tag":376,"props":7077,"children":7078},{"style":512},[7079],{"type":45,"value":7080},"worker",{"type":40,"tag":376,"props":7082,"children":7083},{"style":466},[7084],{"type":45,"value":520},{"type":40,"tag":376,"props":7086,"children":7087},{"style":466},[7088],{"type":45,"value":480},{"type":40,"tag":376,"props":7090,"children":7091},{"style":466},[7092],{"type":45,"value":469},{"type":40,"tag":376,"props":7094,"children":7095},{"style":472},[7096],{"type":45,"value":7097}," task",{"type":40,"tag":376,"props":7099,"children":7100},{"style":466},[7101],{"type":45,"value":499},{"type":40,"tag":376,"props":7103,"children":7104},{"style":618},[7105],{"type":45,"value":7106},"))",{"type":40,"tag":376,"props":7108,"children":7109},{"style":466},[7110],{"type":45,"value":525},{"type":40,"tag":376,"props":7112,"children":7113},{"class":378,"line":1002},[7114],{"type":40,"tag":376,"props":7115,"children":7116},{"style":466},[7117],{"type":45,"value":1599},{"type":40,"tag":376,"props":7119,"children":7120},{"class":378,"line":2568},[7121],{"type":40,"tag":376,"props":7122,"children":7123},{"emptyLinePlaceholder":401},[7124],{"type":45,"value":404},{"type":40,"tag":376,"props":7126,"children":7127},{"class":378,"line":2577},[7128,7132,7137,7141,7145,7149,7153,7157,7161,7165,7169,7174,7179,7183],{"type":40,"tag":376,"props":7129,"children":7130},{"style":579},[7131],{"type":45,"value":582},{"type":40,"tag":376,"props":7133,"children":7134},{"style":472},[7135],{"type":45,"value":7136}," worker ",{"type":40,"tag":376,"props":7138,"children":7139},{"style":466},[7140],{"type":45,"value":592},{"type":40,"tag":376,"props":7142,"children":7143},{"style":579},[7144],{"type":45,"value":1484},{"type":40,"tag":376,"props":7146,"children":7147},{"style":466},[7148],{"type":45,"value":796},{"type":40,"tag":376,"props":7150,"children":7151},{"style":799},[7152],{"type":45,"value":1493},{"type":40,"tag":376,"props":7154,"children":7155},{"style":466},[7156],{"type":45,"value":626},{"type":40,"tag":376,"props":7158,"children":7159},{"style":466},[7160],{"type":45,"value":469},{"type":40,"tag":376,"props":7162,"children":7163},{"style":618},[7164],{"type":45,"value":7097},{"type":40,"tag":376,"props":7166,"children":7167},{"style":466},[7168],{"type":45,"value":626},{"type":40,"tag":376,"props":7170,"children":7171},{"style":2054},[7172],{"type":45,"value":7173}," string",{"type":40,"tag":376,"props":7175,"children":7176},{"style":466},[7177],{"type":45,"value":7178}," })",{"type":40,"tag":376,"props":7180,"children":7181},{"style":579},[7182],{"type":45,"value":763},{"type":40,"tag":376,"props":7184,"children":7185},{"style":466},[7186],{"type":45,"value":1529},{"type":40,"tag":376,"props":7188,"children":7189},{"class":378,"line":2586},[7190,7194,7198,7202,7206,7210,7215,7220,7224,7228,7232,7236,7240,7244],{"type":40,"tag":376,"props":7191,"children":7192},{"style":460},[7193],{"type":45,"value":1576},{"type":40,"tag":376,"props":7195,"children":7196},{"style":466},[7197],{"type":45,"value":469},{"type":40,"tag":376,"props":7199,"children":7200},{"style":618},[7201],{"type":45,"value":2110},{"type":40,"tag":376,"props":7203,"children":7204},{"style":466},[7205],{"type":45,"value":626},{"type":40,"tag":376,"props":7207,"children":7208},{"style":618},[7209],{"type":45,"value":4684},{"type":40,"tag":376,"props":7211,"children":7212},{"style":466},[7213],{"type":45,"value":7214},"`",{"type":40,"tag":376,"props":7216,"children":7217},{"style":512},[7218],{"type":45,"value":7219},"Completed: ",{"type":40,"tag":376,"props":7221,"children":7222},{"style":466},[7223],{"type":45,"value":2288},{"type":40,"tag":376,"props":7225,"children":7226},{"style":472},[7227],{"type":45,"value":1493},{"type":40,"tag":376,"props":7229,"children":7230},{"style":466},[7231],{"type":45,"value":635},{"type":40,"tag":376,"props":7233,"children":7234},{"style":472},[7235],{"type":45,"value":7051},{"type":40,"tag":376,"props":7237,"children":7238},{"style":466},[7239],{"type":45,"value":2298},{"type":40,"tag":376,"props":7241,"children":7242},{"style":618},[7243],{"type":45,"value":5807},{"type":40,"tag":376,"props":7245,"children":7246},{"style":466},[7247],{"type":45,"value":1599},{"type":40,"tag":376,"props":7249,"children":7250},{"class":378,"line":2595},[7251],{"type":40,"tag":376,"props":7252,"children":7253},{"style":466},[7254],{"type":45,"value":1599},{"type":40,"tag":376,"props":7256,"children":7257},{"class":378,"line":2604},[7258],{"type":40,"tag":376,"props":7259,"children":7260},{"emptyLinePlaceholder":401},[7261],{"type":45,"value":404},{"type":40,"tag":376,"props":7263,"children":7264},{"class":378,"line":2613},[7265,7269,7274,7278,7282,7286,7290,7294,7298,7302,7306,7310,7314,7318],{"type":40,"tag":376,"props":7266,"children":7267},{"style":579},[7268],{"type":45,"value":582},{"type":40,"tag":376,"props":7270,"children":7271},{"style":472},[7272],{"type":45,"value":7273}," synthesize ",{"type":40,"tag":376,"props":7275,"children":7276},{"style":466},[7277],{"type":45,"value":592},{"type":40,"tag":376,"props":7279,"children":7280},{"style":579},[7281],{"type":45,"value":1484},{"type":40,"tag":376,"props":7283,"children":7284},{"style":466},[7285],{"type":45,"value":796},{"type":40,"tag":376,"props":7287,"children":7288},{"style":799},[7289],{"type":45,"value":1493},{"type":40,"tag":376,"props":7291,"children":7292},{"style":466},[7293],{"type":45,"value":626},{"type":40,"tag":376,"props":7295,"children":7296},{"style":466},[7297],{"type":45,"value":1502},{"type":40,"tag":376,"props":7299,"children":7300},{"style":472},[7301],{"type":45,"value":1507},{"type":40,"tag":376,"props":7303,"children":7304},{"style":466},[7305],{"type":45,"value":635},{"type":40,"tag":376,"props":7307,"children":7308},{"style":472},[7309],{"type":45,"value":1516},{"type":40,"tag":376,"props":7311,"children":7312},{"style":466},[7313],{"type":45,"value":816},{"type":40,"tag":376,"props":7315,"children":7316},{"style":579},[7317],{"type":45,"value":763},{"type":40,"tag":376,"props":7319,"children":7320},{"style":466},[7321],{"type":45,"value":1529},{"type":40,"tag":376,"props":7323,"children":7324},{"class":378,"line":2622},[7325,7329,7333,7338,7342,7346,7351,7355,7359,7363,7368,7372,7377,7381,7386,7390],{"type":40,"tag":376,"props":7326,"children":7327},{"style":460},[7328],{"type":45,"value":1576},{"type":40,"tag":376,"props":7330,"children":7331},{"style":466},[7332],{"type":45,"value":469},{"type":40,"tag":376,"props":7334,"children":7335},{"style":618},[7336],{"type":45,"value":7337}," summary",{"type":40,"tag":376,"props":7339,"children":7340},{"style":466},[7341],{"type":45,"value":626},{"type":40,"tag":376,"props":7343,"children":7344},{"style":466},[7345],{"type":45,"value":2278},{"type":40,"tag":376,"props":7347,"children":7348},{"style":512},[7349],{"type":45,"value":7350},"Processed ",{"type":40,"tag":376,"props":7352,"children":7353},{"style":466},[7354],{"type":45,"value":2288},{"type":40,"tag":376,"props":7356,"children":7357},{"style":472},[7358],{"type":45,"value":1493},{"type":40,"tag":376,"props":7360,"children":7361},{"style":466},[7362],{"type":45,"value":635},{"type":40,"tag":376,"props":7364,"children":7365},{"style":472},[7366],{"type":45,"value":7367},"results",{"type":40,"tag":376,"props":7369,"children":7370},{"style":466},[7371],{"type":45,"value":635},{"type":40,"tag":376,"props":7373,"children":7374},{"style":472},[7375],{"type":45,"value":7376},"length",{"type":40,"tag":376,"props":7378,"children":7379},{"style":466},[7380],{"type":45,"value":866},{"type":40,"tag":376,"props":7382,"children":7383},{"style":512},[7384],{"type":45,"value":7385}," tasks",{"type":40,"tag":376,"props":7387,"children":7388},{"style":466},[7389],{"type":45,"value":7214},{"type":40,"tag":376,"props":7391,"children":7392},{"style":466},[7393],{"type":45,"value":1710},{"type":40,"tag":376,"props":7395,"children":7396},{"class":378,"line":2631},[7397],{"type":40,"tag":376,"props":7398,"children":7399},{"style":466},[7400],{"type":45,"value":1599},{"type":40,"tag":376,"props":7402,"children":7403},{"class":378,"line":2639},[7404],{"type":40,"tag":376,"props":7405,"children":7406},{"emptyLinePlaceholder":401},[7407],{"type":45,"value":404},{"type":40,"tag":376,"props":7409,"children":7410},{"class":378,"line":2648},[7411,7415,7419,7423,7427,7431],{"type":40,"tag":376,"props":7412,"children":7413},{"style":579},[7414],{"type":45,"value":582},{"type":40,"tag":376,"props":7416,"children":7417},{"style":472},[7418],{"type":45,"value":3180},{"type":40,"tag":376,"props":7420,"children":7421},{"style":466},[7422],{"type":45,"value":592},{"type":40,"tag":376,"props":7424,"children":7425},{"style":466},[7426],{"type":45,"value":597},{"type":40,"tag":376,"props":7428,"children":7429},{"style":600},[7430],{"type":45,"value":2682},{"type":40,"tag":376,"props":7432,"children":7433},{"style":472},[7434],{"type":45,"value":3197},{"type":40,"tag":376,"props":7436,"children":7437},{"class":378,"line":3501},[7438,7442,7446,7450,7454,7458,7462,7466],{"type":40,"tag":376,"props":7439,"children":7440},{"style":466},[7441],{"type":45,"value":3205},{"type":40,"tag":376,"props":7443,"children":7444},{"style":600},[7445],{"type":45,"value":3210},{"type":40,"tag":376,"props":7447,"children":7448},{"style":472},[7449],{"type":45,"value":607},{"type":40,"tag":376,"props":7451,"children":7452},{"style":466},[7453],{"type":45,"value":520},{"type":40,"tag":376,"props":7455,"children":7456},{"style":512},[7457],{"type":45,"value":7080},{"type":40,"tag":376,"props":7459,"children":7460},{"style":466},[7461],{"type":45,"value":520},{"type":40,"tag":376,"props":7463,"children":7464},{"style":466},[7465],{"type":45,"value":480},{"type":40,"tag":376,"props":7467,"children":7468},{"style":472},[7469],{"type":45,"value":7470}," worker)\n",{"type":40,"tag":376,"props":7472,"children":7473},{"class":378,"line":3757},[7474,7478,7482,7486,7490,7495,7499,7503],{"type":40,"tag":376,"props":7475,"children":7476},{"style":466},[7477],{"type":45,"value":3205},{"type":40,"tag":376,"props":7479,"children":7480},{"style":600},[7481],{"type":45,"value":3210},{"type":40,"tag":376,"props":7483,"children":7484},{"style":472},[7485],{"type":45,"value":607},{"type":40,"tag":376,"props":7487,"children":7488},{"style":466},[7489],{"type":45,"value":520},{"type":40,"tag":376,"props":7491,"children":7492},{"style":512},[7493],{"type":45,"value":7494},"synthesize",{"type":40,"tag":376,"props":7496,"children":7497},{"style":466},[7498],{"type":45,"value":520},{"type":40,"tag":376,"props":7500,"children":7501},{"style":466},[7502],{"type":45,"value":480},{"type":40,"tag":376,"props":7504,"children":7505},{"style":472},[7506],{"type":45,"value":7507}," synthesize)\n",{"type":40,"tag":376,"props":7509,"children":7510},{"class":378,"line":6488},[7511,7515,7519,7523,7527,7532,7536,7540,7544,7548,7552],{"type":40,"tag":376,"props":7512,"children":7513},{"style":466},[7514],{"type":45,"value":3205},{"type":40,"tag":376,"props":7516,"children":7517},{"style":600},[7518],{"type":45,"value":4650},{"type":40,"tag":376,"props":7520,"children":7521},{"style":472},[7522],{"type":45,"value":3290},{"type":40,"tag":376,"props":7524,"children":7525},{"style":466},[7526],{"type":45,"value":480},{"type":40,"tag":376,"props":7528,"children":7529},{"style":472},[7530],{"type":45,"value":7531}," orchestrator",{"type":40,"tag":376,"props":7533,"children":7534},{"style":466},[7535],{"type":45,"value":480},{"type":40,"tag":376,"props":7537,"children":7538},{"style":472},[7539],{"type":45,"value":4684},{"type":40,"tag":376,"props":7541,"children":7542},{"style":466},[7543],{"type":45,"value":520},{"type":40,"tag":376,"props":7545,"children":7546},{"style":512},[7547],{"type":45,"value":7080},{"type":40,"tag":376,"props":7549,"children":7550},{"style":466},[7551],{"type":45,"value":520},{"type":40,"tag":376,"props":7553,"children":7554},{"style":472},[7555],{"type":45,"value":4717},{"type":40,"tag":376,"props":7557,"children":7558},{"class":378,"line":6496},[7559,7563,7567,7571,7575,7579,7583,7587,7591,7595,7599],{"type":40,"tag":376,"props":7560,"children":7561},{"style":466},[7562],{"type":45,"value":3205},{"type":40,"tag":376,"props":7564,"children":7565},{"style":600},[7566],{"type":45,"value":3285},{"type":40,"tag":376,"props":7568,"children":7569},{"style":472},[7570],{"type":45,"value":607},{"type":40,"tag":376,"props":7572,"children":7573},{"style":466},[7574],{"type":45,"value":520},{"type":40,"tag":376,"props":7576,"children":7577},{"style":512},[7578],{"type":45,"value":7080},{"type":40,"tag":376,"props":7580,"children":7581},{"style":466},[7582],{"type":45,"value":520},{"type":40,"tag":376,"props":7584,"children":7585},{"style":466},[7586],{"type":45,"value":480},{"type":40,"tag":376,"props":7588,"children":7589},{"style":466},[7590],{"type":45,"value":509},{"type":40,"tag":376,"props":7592,"children":7593},{"style":512},[7594],{"type":45,"value":7494},{"type":40,"tag":376,"props":7596,"children":7597},{"style":466},[7598],{"type":45,"value":520},{"type":40,"tag":376,"props":7600,"children":7601},{"style":472},[7602],{"type":45,"value":2628},{"type":40,"tag":376,"props":7604,"children":7605},{"class":378,"line":6504},[7606,7610,7614,7618,7622,7626,7630,7634],{"type":40,"tag":376,"props":7607,"children":7608},{"style":466},[7609],{"type":45,"value":3205},{"type":40,"tag":376,"props":7611,"children":7612},{"style":600},[7613],{"type":45,"value":3285},{"type":40,"tag":376,"props":7615,"children":7616},{"style":472},[7617],{"type":45,"value":607},{"type":40,"tag":376,"props":7619,"children":7620},{"style":466},[7621],{"type":45,"value":520},{"type":40,"tag":376,"props":7623,"children":7624},{"style":512},[7625],{"type":45,"value":7494},{"type":40,"tag":376,"props":7627,"children":7628},{"style":466},[7629],{"type":45,"value":520},{"type":40,"tag":376,"props":7631,"children":7632},{"style":466},[7633],{"type":45,"value":480},{"type":40,"tag":376,"props":7635,"children":7636},{"style":472},[7637],{"type":45,"value":3393},{"type":40,"tag":376,"props":7639,"children":7641},{"class":378,"line":7640},31,[7642,7646,7650,7654],{"type":40,"tag":376,"props":7643,"children":7644},{"style":466},[7645],{"type":45,"value":3205},{"type":40,"tag":376,"props":7647,"children":7648},{"style":600},[7649],{"type":45,"value":3405},{"type":40,"tag":376,"props":7651,"children":7652},{"style":472},[7653],{"type":45,"value":645},{"type":40,"tag":376,"props":7655,"children":7656},{"style":466},[7657],{"type":45,"value":525},{"type":40,"tag":7659,"props":7660,"children":7661},"fix-send-accumulator",{},[7662,7727],{"type":40,"tag":360,"props":7663,"children":7664},{},[7665,7667],{"type":45,"value":7666},"\nUse a reducer to accumulate parallel worker results (otherwise last worker overwrites).\n",{"type":40,"tag":366,"props":7668,"children":7670},{"className":368,"code":7669,"language":360,"meta":370,"style":370},"# WRONG: No reducer - last worker overwrites\nclass State(TypedDict):\n    results: list\n\n# CORRECT\nclass State(TypedDict):\n    results: Annotated[list, operator.add]  # Accumulates\n",[7671],{"type":40,"tag":110,"props":7672,"children":7673},{"__ignoreMap":370},[7674,7682,7689,7697,7704,7712,7719],{"type":40,"tag":376,"props":7675,"children":7676},{"class":378,"line":379},[7677],{"type":40,"tag":376,"props":7678,"children":7679},{},[7680],{"type":45,"value":7681},"# WRONG: No reducer - last worker overwrites\n",{"type":40,"tag":376,"props":7683,"children":7684},{"class":378,"line":388},[7685],{"type":40,"tag":376,"props":7686,"children":7687},{},[7688],{"type":45,"value":413},{"type":40,"tag":376,"props":7690,"children":7691},{"class":378,"line":397},[7692],{"type":40,"tag":376,"props":7693,"children":7694},{},[7695],{"type":45,"value":7696},"    results: list\n",{"type":40,"tag":376,"props":7698,"children":7699},{"class":378,"line":407},[7700],{"type":40,"tag":376,"props":7701,"children":7702},{"emptyLinePlaceholder":401},[7703],{"type":45,"value":404},{"type":40,"tag":376,"props":7705,"children":7706},{"class":378,"line":416},[7707],{"type":40,"tag":376,"props":7708,"children":7709},{},[7710],{"type":45,"value":7711},"# CORRECT\n",{"type":40,"tag":376,"props":7713,"children":7714},{"class":378,"line":425},[7715],{"type":40,"tag":376,"props":7716,"children":7717},{},[7718],{"type":45,"value":413},{"type":40,"tag":376,"props":7720,"children":7721},{"class":378,"line":434},[7722],{"type":40,"tag":376,"props":7723,"children":7724},{},[7725],{"type":45,"value":7726},"    results: Annotated[list, operator.add]  # Accumulates\n",{"type":40,"tag":442,"props":7728,"children":7729},{},[7730,7732],{"type":45,"value":7731},"\nUse ReducedValue to accumulate parallel worker results.\n",{"type":40,"tag":366,"props":7733,"children":7735},{"className":449,"code":7734,"language":442,"meta":370,"style":370},"\u002F\u002F WRONG: No reducer\nconst State = new StateSchema({ results: z.array(z.string()) });\n\n\u002F\u002F CORRECT\nconst State = new StateSchema({\n  results: new ReducedValue(z.array(z.string()).default(() => []), { reducer: (curr, upd) => curr.concat(upd) }),\n});\n",[7736],{"type":40,"tag":110,"props":7737,"children":7738},{"__ignoreMap":370},[7739,7747,7827,7834,7842,7873,8012],{"type":40,"tag":376,"props":7740,"children":7741},{"class":378,"line":379},[7742],{"type":40,"tag":376,"props":7743,"children":7744},{"style":652},[7745],{"type":45,"value":7746},"\u002F\u002F WRONG: No reducer\n",{"type":40,"tag":376,"props":7748,"children":7749},{"class":378,"line":388},[7750,7754,7758,7762,7766,7770,7774,7778,7782,7786,7790,7794,7798,7802,7806,7810,7815,7819,7823],{"type":40,"tag":376,"props":7751,"children":7752},{"style":579},[7753],{"type":45,"value":582},{"type":40,"tag":376,"props":7755,"children":7756},{"style":472},[7757],{"type":45,"value":587},{"type":40,"tag":376,"props":7759,"children":7760},{"style":466},[7761],{"type":45,"value":592},{"type":40,"tag":376,"props":7763,"children":7764},{"style":466},[7765],{"type":45,"value":597},{"type":40,"tag":376,"props":7767,"children":7768},{"style":600},[7769],{"type":45,"value":475},{"type":40,"tag":376,"props":7771,"children":7772},{"style":472},[7773],{"type":45,"value":607},{"type":40,"tag":376,"props":7775,"children":7776},{"style":466},[7777],{"type":45,"value":3464},{"type":40,"tag":376,"props":7779,"children":7780},{"style":618},[7781],{"type":45,"value":2110},{"type":40,"tag":376,"props":7783,"children":7784},{"style":466},[7785],{"type":45,"value":626},{"type":40,"tag":376,"props":7787,"children":7788},{"style":472},[7789],{"type":45,"value":541},{"type":40,"tag":376,"props":7791,"children":7792},{"style":466},[7793],{"type":45,"value":635},{"type":40,"tag":376,"props":7795,"children":7796},{"style":600},[7797],{"type":45,"value":723},{"type":40,"tag":376,"props":7799,"children":7800},{"style":472},[7801],{"type":45,"value":728},{"type":40,"tag":376,"props":7803,"children":7804},{"style":466},[7805],{"type":45,"value":635},{"type":40,"tag":376,"props":7807,"children":7808},{"style":600},[7809],{"type":45,"value":640},{"type":40,"tag":376,"props":7811,"children":7812},{"style":472},[7813],{"type":45,"value":7814},"()) ",{"type":40,"tag":376,"props":7816,"children":7817},{"style":466},[7818],{"type":45,"value":866},{"type":40,"tag":376,"props":7820,"children":7821},{"style":472},[7822],{"type":45,"value":816},{"type":40,"tag":376,"props":7824,"children":7825},{"style":466},[7826],{"type":45,"value":525},{"type":40,"tag":376,"props":7828,"children":7829},{"class":378,"line":397},[7830],{"type":40,"tag":376,"props":7831,"children":7832},{"emptyLinePlaceholder":401},[7833],{"type":45,"value":404},{"type":40,"tag":376,"props":7835,"children":7836},{"class":378,"line":407},[7837],{"type":40,"tag":376,"props":7838,"children":7839},{"style":652},[7840],{"type":45,"value":7841},"\u002F\u002F CORRECT\n",{"type":40,"tag":376,"props":7843,"children":7844},{"class":378,"line":416},[7845,7849,7853,7857,7861,7865,7869],{"type":40,"tag":376,"props":7846,"children":7847},{"style":579},[7848],{"type":45,"value":582},{"type":40,"tag":376,"props":7850,"children":7851},{"style":472},[7852],{"type":45,"value":587},{"type":40,"tag":376,"props":7854,"children":7855},{"style":466},[7856],{"type":45,"value":592},{"type":40,"tag":376,"props":7858,"children":7859},{"style":466},[7860],{"type":45,"value":597},{"type":40,"tag":376,"props":7862,"children":7863},{"style":600},[7864],{"type":45,"value":475},{"type":40,"tag":376,"props":7866,"children":7867},{"style":472},[7868],{"type":45,"value":607},{"type":40,"tag":376,"props":7870,"children":7871},{"style":466},[7872],{"type":45,"value":612},{"type":40,"tag":376,"props":7874,"children":7875},{"class":378,"line":425},[7876,7880,7884,7888,7892,7896,7900,7904,7908,7912,7916,7920,7924,7928,7932,7936,7940,7944,7948,7952,7956,7960,7964,7968,7972,7976,7980,7984,7988,7992,7996,8000,8004,8008],{"type":40,"tag":376,"props":7877,"children":7878},{"style":618},[7879],{"type":45,"value":6730},{"type":40,"tag":376,"props":7881,"children":7882},{"style":466},[7883],{"type":45,"value":626},{"type":40,"tag":376,"props":7885,"children":7886},{"style":466},[7887],{"type":45,"value":597},{"type":40,"tag":376,"props":7889,"children":7890},{"style":600},[7891],{"type":45,"value":485},{"type":40,"tag":376,"props":7893,"children":7894},{"style":472},[7895],{"type":45,"value":728},{"type":40,"tag":376,"props":7897,"children":7898},{"style":466},[7899],{"type":45,"value":635},{"type":40,"tag":376,"props":7901,"children":7902},{"style":600},[7903],{"type":45,"value":723},{"type":40,"tag":376,"props":7905,"children":7906},{"style":472},[7907],{"type":45,"value":728},{"type":40,"tag":376,"props":7909,"children":7910},{"style":466},[7911],{"type":45,"value":635},{"type":40,"tag":376,"props":7913,"children":7914},{"style":600},[7915],{"type":45,"value":640},{"type":40,"tag":376,"props":7917,"children":7918},{"style":472},[7919],{"type":45,"value":741},{"type":40,"tag":376,"props":7921,"children":7922},{"style":466},[7923],{"type":45,"value":635},{"type":40,"tag":376,"props":7925,"children":7926},{"style":600},[7927],{"type":45,"value":750},{"type":40,"tag":376,"props":7929,"children":7930},{"style":472},[7931],{"type":45,"value":607},{"type":40,"tag":376,"props":7933,"children":7934},{"style":466},[7935],{"type":45,"value":645},{"type":40,"tag":376,"props":7937,"children":7938},{"style":579},[7939],{"type":45,"value":763},{"type":40,"tag":376,"props":7941,"children":7942},{"style":472},[7943],{"type":45,"value":768},{"type":40,"tag":376,"props":7945,"children":7946},{"style":466},[7947],{"type":45,"value":480},{"type":40,"tag":376,"props":7949,"children":7950},{"style":466},[7951],{"type":45,"value":469},{"type":40,"tag":376,"props":7953,"children":7954},{"style":600},[7955],{"type":45,"value":787},{"type":40,"tag":376,"props":7957,"children":7958},{"style":466},[7959],{"type":45,"value":626},{"type":40,"tag":376,"props":7961,"children":7962},{"style":466},[7963],{"type":45,"value":796},{"type":40,"tag":376,"props":7965,"children":7966},{"style":799},[7967],{"type":45,"value":6829},{"type":40,"tag":376,"props":7969,"children":7970},{"style":466},[7971],{"type":45,"value":480},{"type":40,"tag":376,"props":7973,"children":7974},{"style":799},[7975],{"type":45,"value":6838},{"type":40,"tag":376,"props":7977,"children":7978},{"style":466},[7979],{"type":45,"value":816},{"type":40,"tag":376,"props":7981,"children":7982},{"style":579},[7983],{"type":45,"value":763},{"type":40,"tag":376,"props":7985,"children":7986},{"style":472},[7987],{"type":45,"value":6851},{"type":40,"tag":376,"props":7989,"children":7990},{"style":466},[7991],{"type":45,"value":635},{"type":40,"tag":376,"props":7993,"children":7994},{"style":600},[7995],{"type":45,"value":834},{"type":40,"tag":376,"props":7997,"children":7998},{"style":472},[7999],{"type":45,"value":6864},{"type":40,"tag":376,"props":8001,"children":8002},{"style":466},[8003],{"type":45,"value":866},{"type":40,"tag":376,"props":8005,"children":8006},{"style":472},[8007],{"type":45,"value":816},{"type":40,"tag":376,"props":8009,"children":8010},{"style":466},[8011],{"type":45,"value":773},{"type":40,"tag":376,"props":8013,"children":8014},{"class":378,"line":434},[8015,8019,8023],{"type":40,"tag":376,"props":8016,"children":8017},{"style":466},[8018],{"type":45,"value":866},{"type":40,"tag":376,"props":8020,"children":8021},{"style":472},[8022],{"type":45,"value":816},{"type":40,"tag":376,"props":8024,"children":8025},{"style":466},[8026],{"type":45,"value":525},{"type":40,"tag":260,"props":8028,"children":8029},{},[],{"type":40,"tag":264,"props":8031,"children":8033},{"id":8032},"running-graphs-invoke-and-stream",[8034],{"type":45,"value":8035},"Running Graphs: Invoke and Stream",{"type":40,"tag":8037,"props":8038,"children":8039},"invoke-basics",{},[8040,8053,8086],{"type":40,"tag":104,"props":8041,"children":8042},{},[8043,8045,8051],{"type":45,"value":8044},"Call ",{"type":40,"tag":110,"props":8046,"children":8048},{"className":8047},[],[8049],{"type":45,"value":8050},"graph.invoke(input, config)",{"type":45,"value":8052}," to run a graph to completion and return the final state.",{"type":40,"tag":360,"props":8054,"children":8055},{},[8056],{"type":40,"tag":366,"props":8057,"children":8059},{"className":368,"code":8058,"language":360,"meta":370,"style":370},"result = graph.invoke({\"input\": \"hello\"})\n# With config (for persistence, tags, etc.)\nresult = graph.invoke({\"input\": \"hello\"}, {\"configurable\": {\"thread_id\": \"1\"}})\n",[8060],{"type":40,"tag":110,"props":8061,"children":8062},{"__ignoreMap":370},[8063,8070,8078],{"type":40,"tag":376,"props":8064,"children":8065},{"class":378,"line":379},[8066],{"type":40,"tag":376,"props":8067,"children":8068},{},[8069],{"type":45,"value":2645},{"type":40,"tag":376,"props":8071,"children":8072},{"class":378,"line":388},[8073],{"type":40,"tag":376,"props":8074,"children":8075},{},[8076],{"type":45,"value":8077},"# With config (for persistence, tags, etc.)\n",{"type":40,"tag":376,"props":8079,"children":8080},{"class":378,"line":397},[8081],{"type":40,"tag":376,"props":8082,"children":8083},{},[8084],{"type":45,"value":8085},"result = graph.invoke({\"input\": \"hello\"}, {\"configurable\": {\"thread_id\": \"1\"}})\n",{"type":40,"tag":442,"props":8087,"children":8088},{},[8089],{"type":40,"tag":366,"props":8090,"children":8092},{"className":449,"code":8091,"language":442,"meta":370,"style":370},"const result = await graph.invoke({ input: \"hello\" });\n\u002F\u002F With config\nconst result = await graph.invoke({ input: \"hello\" }, { configurable: { thread_id: \"1\" } });\n",[8093],{"type":40,"tag":110,"props":8094,"children":8095},{"__ignoreMap":370},[8096,8167,8175],{"type":40,"tag":376,"props":8097,"children":8098},{"class":378,"line":379},[8099,8103,8107,8111,8115,8119,8123,8127,8131,8135,8139,8143,8147,8151,8155,8159,8163],{"type":40,"tag":376,"props":8100,"children":8101},{"style":579},[8102],{"type":45,"value":582},{"type":40,"tag":376,"props":8104,"children":8105},{"style":472},[8106],{"type":45,"value":3432},{"type":40,"tag":376,"props":8108,"children":8109},{"style":466},[8110],{"type":45,"value":592},{"type":40,"tag":376,"props":8112,"children":8113},{"style":460},[8114],{"type":45,"value":3441},{"type":40,"tag":376,"props":8116,"children":8117},{"style":472},[8118],{"type":45,"value":3446},{"type":40,"tag":376,"props":8120,"children":8121},{"style":466},[8122],{"type":45,"value":635},{"type":40,"tag":376,"props":8124,"children":8125},{"style":600},[8126],{"type":45,"value":3455},{"type":40,"tag":376,"props":8128,"children":8129},{"style":472},[8130],{"type":45,"value":607},{"type":40,"tag":376,"props":8132,"children":8133},{"style":466},[8134],{"type":45,"value":3464},{"type":40,"tag":376,"props":8136,"children":8137},{"style":618},[8138],{"type":45,"value":3469},{"type":40,"tag":376,"props":8140,"children":8141},{"style":466},[8142],{"type":45,"value":626},{"type":40,"tag":376,"props":8144,"children":8145},{"style":466},[8146],{"type":45,"value":509},{"type":40,"tag":376,"props":8148,"children":8149},{"style":512},[8150],{"type":45,"value":3482},{"type":40,"tag":376,"props":8152,"children":8153},{"style":466},[8154],{"type":45,"value":520},{"type":40,"tag":376,"props":8156,"children":8157},{"style":466},[8158],{"type":45,"value":499},{"type":40,"tag":376,"props":8160,"children":8161},{"style":472},[8162],{"type":45,"value":816},{"type":40,"tag":376,"props":8164,"children":8165},{"style":466},[8166],{"type":45,"value":525},{"type":40,"tag":376,"props":8168,"children":8169},{"class":378,"line":388},[8170],{"type":40,"tag":376,"props":8171,"children":8172},{"style":652},[8173],{"type":45,"value":8174},"\u002F\u002F With config\n",{"type":40,"tag":376,"props":8176,"children":8177},{"class":378,"line":397},[8178,8182,8186,8190,8194,8198,8202,8206,8210,8214,8218,8222,8226,8230,8234,8238,8242,8247,8251,8255,8260,8264,8268,8273,8277,8281,8285,8289],{"type":40,"tag":376,"props":8179,"children":8180},{"style":579},[8181],{"type":45,"value":582},{"type":40,"tag":376,"props":8183,"children":8184},{"style":472},[8185],{"type":45,"value":3432},{"type":40,"tag":376,"props":8187,"children":8188},{"style":466},[8189],{"type":45,"value":592},{"type":40,"tag":376,"props":8191,"children":8192},{"style":460},[8193],{"type":45,"value":3441},{"type":40,"tag":376,"props":8195,"children":8196},{"style":472},[8197],{"type":45,"value":3446},{"type":40,"tag":376,"props":8199,"children":8200},{"style":466},[8201],{"type":45,"value":635},{"type":40,"tag":376,"props":8203,"children":8204},{"style":600},[8205],{"type":45,"value":3455},{"type":40,"tag":376,"props":8207,"children":8208},{"style":472},[8209],{"type":45,"value":607},{"type":40,"tag":376,"props":8211,"children":8212},{"style":466},[8213],{"type":45,"value":3464},{"type":40,"tag":376,"props":8215,"children":8216},{"style":618},[8217],{"type":45,"value":3469},{"type":40,"tag":376,"props":8219,"children":8220},{"style":466},[8221],{"type":45,"value":626},{"type":40,"tag":376,"props":8223,"children":8224},{"style":466},[8225],{"type":45,"value":509},{"type":40,"tag":376,"props":8227,"children":8228},{"style":512},[8229],{"type":45,"value":3482},{"type":40,"tag":376,"props":8231,"children":8232},{"style":466},[8233],{"type":45,"value":520},{"type":40,"tag":376,"props":8235,"children":8236},{"style":466},[8237],{"type":45,"value":5550},{"type":40,"tag":376,"props":8239,"children":8240},{"style":466},[8241],{"type":45,"value":469},{"type":40,"tag":376,"props":8243,"children":8244},{"style":618},[8245],{"type":45,"value":8246}," configurable",{"type":40,"tag":376,"props":8248,"children":8249},{"style":466},[8250],{"type":45,"value":626},{"type":40,"tag":376,"props":8252,"children":8253},{"style":466},[8254],{"type":45,"value":469},{"type":40,"tag":376,"props":8256,"children":8257},{"style":618},[8258],{"type":45,"value":8259}," thread_id",{"type":40,"tag":376,"props":8261,"children":8262},{"style":466},[8263],{"type":45,"value":626},{"type":40,"tag":376,"props":8265,"children":8266},{"style":466},[8267],{"type":45,"value":509},{"type":40,"tag":376,"props":8269,"children":8270},{"style":512},[8271],{"type":45,"value":8272},"1",{"type":40,"tag":376,"props":8274,"children":8275},{"style":466},[8276],{"type":45,"value":520},{"type":40,"tag":376,"props":8278,"children":8279},{"style":466},[8280],{"type":45,"value":499},{"type":40,"tag":376,"props":8282,"children":8283},{"style":466},[8284],{"type":45,"value":499},{"type":40,"tag":376,"props":8286,"children":8287},{"style":472},[8288],{"type":45,"value":816},{"type":40,"tag":376,"props":8290,"children":8291},{"style":466},[8292],{"type":45,"value":525},{"type":40,"tag":8294,"props":8295,"children":8296},"stream-mode-selection",{},[8297],{"type":40,"tag":193,"props":8298,"children":8299},{},[8300,8321],{"type":40,"tag":197,"props":8301,"children":8302},{},[8303],{"type":40,"tag":201,"props":8304,"children":8305},{},[8306,8311,8316],{"type":40,"tag":205,"props":8307,"children":8308},{},[8309],{"type":45,"value":8310},"Mode",{"type":40,"tag":205,"props":8312,"children":8313},{},[8314],{"type":45,"value":8315},"What it Streams",{"type":40,"tag":205,"props":8317,"children":8318},{},[8319],{"type":45,"value":8320},"Use Case",{"type":40,"tag":216,"props":8322,"children":8323},{},[8324,8346,8368,8390],{"type":40,"tag":201,"props":8325,"children":8326},{},[8327,8336,8341],{"type":40,"tag":223,"props":8328,"children":8329},{},[8330],{"type":40,"tag":110,"props":8331,"children":8333},{"className":8332},[],[8334],{"type":45,"value":8335},"values",{"type":40,"tag":223,"props":8337,"children":8338},{},[8339],{"type":45,"value":8340},"Full state after each step",{"type":40,"tag":223,"props":8342,"children":8343},{},[8344],{"type":45,"value":8345},"Monitor complete state",{"type":40,"tag":201,"props":8347,"children":8348},{},[8349,8358,8363],{"type":40,"tag":223,"props":8350,"children":8351},{},[8352],{"type":40,"tag":110,"props":8353,"children":8355},{"className":8354},[],[8356],{"type":45,"value":8357},"updates",{"type":40,"tag":223,"props":8359,"children":8360},{},[8361],{"type":45,"value":8362},"State deltas",{"type":40,"tag":223,"props":8364,"children":8365},{},[8366],{"type":45,"value":8367},"Track incremental updates",{"type":40,"tag":201,"props":8369,"children":8370},{},[8371,8380,8385],{"type":40,"tag":223,"props":8372,"children":8373},{},[8374],{"type":40,"tag":110,"props":8375,"children":8377},{"className":8376},[],[8378],{"type":45,"value":8379},"messages",{"type":40,"tag":223,"props":8381,"children":8382},{},[8383],{"type":45,"value":8384},"LLM tokens + metadata",{"type":40,"tag":223,"props":8386,"children":8387},{},[8388],{"type":45,"value":8389},"Chat UIs",{"type":40,"tag":201,"props":8391,"children":8392},{},[8393,8402,8407],{"type":40,"tag":223,"props":8394,"children":8395},{},[8396],{"type":40,"tag":110,"props":8397,"children":8399},{"className":8398},[],[8400],{"type":45,"value":8401},"custom",{"type":40,"tag":223,"props":8403,"children":8404},{},[8405],{"type":45,"value":8406},"User-defined data",{"type":40,"tag":223,"props":8408,"children":8409},{},[8410],{"type":45,"value":8411},"Progress indicators",{"type":40,"tag":8413,"props":8414,"children":8415},"ex-stream-llm-tokens",{},[8416,8484],{"type":40,"tag":360,"props":8417,"children":8418},{},[8419,8421],{"type":45,"value":8420},"\nStream LLM tokens in real-time for chat UI display.\n",{"type":40,"tag":366,"props":8422,"children":8424},{"className":368,"code":8423,"language":360,"meta":370,"style":370},"for chunk in graph.stream(\n    {\"messages\": [HumanMessage(\"Hello\")]},\n    stream_mode=\"messages\"\n):\n    token, metadata = chunk\n    if hasattr(token, \"content\"):\n        print(token.content, end=\"\", flush=True)\n",[8425],{"type":40,"tag":110,"props":8426,"children":8427},{"__ignoreMap":370},[8428,8436,8444,8452,8460,8468,8476],{"type":40,"tag":376,"props":8429,"children":8430},{"class":378,"line":379},[8431],{"type":40,"tag":376,"props":8432,"children":8433},{},[8434],{"type":45,"value":8435},"for chunk in graph.stream(\n",{"type":40,"tag":376,"props":8437,"children":8438},{"class":378,"line":388},[8439],{"type":40,"tag":376,"props":8440,"children":8441},{},[8442],{"type":45,"value":8443},"    {\"messages\": [HumanMessage(\"Hello\")]},\n",{"type":40,"tag":376,"props":8445,"children":8446},{"class":378,"line":397},[8447],{"type":40,"tag":376,"props":8448,"children":8449},{},[8450],{"type":45,"value":8451},"    stream_mode=\"messages\"\n",{"type":40,"tag":376,"props":8453,"children":8454},{"class":378,"line":407},[8455],{"type":40,"tag":376,"props":8456,"children":8457},{},[8458],{"type":45,"value":8459},"):\n",{"type":40,"tag":376,"props":8461,"children":8462},{"class":378,"line":416},[8463],{"type":40,"tag":376,"props":8464,"children":8465},{},[8466],{"type":45,"value":8467},"    token, metadata = chunk\n",{"type":40,"tag":376,"props":8469,"children":8470},{"class":378,"line":425},[8471],{"type":40,"tag":376,"props":8472,"children":8473},{},[8474],{"type":45,"value":8475},"    if hasattr(token, \"content\"):\n",{"type":40,"tag":376,"props":8477,"children":8478},{"class":378,"line":434},[8479],{"type":40,"tag":376,"props":8480,"children":8481},{},[8482],{"type":45,"value":8483},"        print(token.content, end=\"\", flush=True)\n",{"type":40,"tag":442,"props":8485,"children":8486},{},[8487,8488],{"type":45,"value":8420},{"type":40,"tag":366,"props":8489,"children":8491},{"className":449,"code":8490,"language":442,"meta":370,"style":370},"for await (const chunk of graph.stream(\n  { messages: [new HumanMessage(\"Hello\")] },\n  { streamMode: \"messages\" }\n)) {\n  const [token, metadata] = chunk;\n  if (token.content) {\n    process.stdout.write(token.content);\n  }\n}\n",[8492],{"type":40,"tag":110,"props":8493,"children":8494},{"__ignoreMap":370},[8495,8542,8600,8633,8644,8687,8719,8769,8776],{"type":40,"tag":376,"props":8496,"children":8497},{"class":378,"line":379},[8498,8503,8507,8511,8515,8520,8525,8529,8533,8538],{"type":40,"tag":376,"props":8499,"children":8500},{"style":460},[8501],{"type":45,"value":8502},"for",{"type":40,"tag":376,"props":8504,"children":8505},{"style":460},[8506],{"type":45,"value":3441},{"type":40,"tag":376,"props":8508,"children":8509},{"style":472},[8510],{"type":45,"value":796},{"type":40,"tag":376,"props":8512,"children":8513},{"style":579},[8514],{"type":45,"value":582},{"type":40,"tag":376,"props":8516,"children":8517},{"style":472},[8518],{"type":45,"value":8519}," chunk ",{"type":40,"tag":376,"props":8521,"children":8522},{"style":466},[8523],{"type":45,"value":8524},"of",{"type":40,"tag":376,"props":8526,"children":8527},{"style":472},[8528],{"type":45,"value":3446},{"type":40,"tag":376,"props":8530,"children":8531},{"style":466},[8532],{"type":45,"value":635},{"type":40,"tag":376,"props":8534,"children":8535},{"style":600},[8536],{"type":45,"value":8537},"stream",{"type":40,"tag":376,"props":8539,"children":8540},{"style":472},[8541],{"type":45,"value":705},{"type":40,"tag":376,"props":8543,"children":8544},{"class":378,"line":388},[8545,8550,8555,8559,8563,8568,8573,8577,8581,8586,8590,8595],{"type":40,"tag":376,"props":8546,"children":8547},{"style":466},[8548],{"type":45,"value":8549},"  {",{"type":40,"tag":376,"props":8551,"children":8552},{"style":618},[8553],{"type":45,"value":8554}," messages",{"type":40,"tag":376,"props":8556,"children":8557},{"style":466},[8558],{"type":45,"value":626},{"type":40,"tag":376,"props":8560,"children":8561},{"style":472},[8562],{"type":45,"value":4684},{"type":40,"tag":376,"props":8564,"children":8565},{"style":466},[8566],{"type":45,"value":8567},"new",{"type":40,"tag":376,"props":8569,"children":8570},{"style":600},[8571],{"type":45,"value":8572}," HumanMessage",{"type":40,"tag":376,"props":8574,"children":8575},{"style":472},[8576],{"type":45,"value":607},{"type":40,"tag":376,"props":8578,"children":8579},{"style":466},[8580],{"type":45,"value":520},{"type":40,"tag":376,"props":8582,"children":8583},{"style":512},[8584],{"type":45,"value":8585},"Hello",{"type":40,"tag":376,"props":8587,"children":8588},{"style":466},[8589],{"type":45,"value":520},{"type":40,"tag":376,"props":8591,"children":8592},{"style":472},[8593],{"type":45,"value":8594},")] ",{"type":40,"tag":376,"props":8596,"children":8597},{"style":466},[8598],{"type":45,"value":8599},"},\n",{"type":40,"tag":376,"props":8601,"children":8602},{"class":378,"line":397},[8603,8607,8612,8616,8620,8624,8628],{"type":40,"tag":376,"props":8604,"children":8605},{"style":466},[8606],{"type":45,"value":8549},{"type":40,"tag":376,"props":8608,"children":8609},{"style":618},[8610],{"type":45,"value":8611}," streamMode",{"type":40,"tag":376,"props":8613,"children":8614},{"style":466},[8615],{"type":45,"value":626},{"type":40,"tag":376,"props":8617,"children":8618},{"style":466},[8619],{"type":45,"value":509},{"type":40,"tag":376,"props":8621,"children":8622},{"style":512},[8623],{"type":45,"value":8379},{"type":40,"tag":376,"props":8625,"children":8626},{"style":466},[8627],{"type":45,"value":520},{"type":40,"tag":376,"props":8629,"children":8630},{"style":466},[8631],{"type":45,"value":8632}," }\n",{"type":40,"tag":376,"props":8634,"children":8635},{"class":378,"line":407},[8636,8640],{"type":40,"tag":376,"props":8637,"children":8638},{"style":472},[8639],{"type":45,"value":4201},{"type":40,"tag":376,"props":8641,"children":8642},{"style":466},[8643],{"type":45,"value":612},{"type":40,"tag":376,"props":8645,"children":8646},{"class":378,"line":416},[8647,8651,8655,8660,8664,8669,8674,8678,8683],{"type":40,"tag":376,"props":8648,"children":8649},{"style":579},[8650],{"type":45,"value":2218},{"type":40,"tag":376,"props":8652,"children":8653},{"style":466},[8654],{"type":45,"value":4684},{"type":40,"tag":376,"props":8656,"children":8657},{"style":472},[8658],{"type":45,"value":8659},"token",{"type":40,"tag":376,"props":8661,"children":8662},{"style":466},[8663],{"type":45,"value":480},{"type":40,"tag":376,"props":8665,"children":8666},{"style":472},[8667],{"type":45,"value":8668}," metadata",{"type":40,"tag":376,"props":8670,"children":8671},{"style":466},[8672],{"type":45,"value":8673},"]",{"type":40,"tag":376,"props":8675,"children":8676},{"style":466},[8677],{"type":45,"value":1551},{"type":40,"tag":376,"props":8679,"children":8680},{"style":472},[8681],{"type":45,"value":8682}," chunk",{"type":40,"tag":376,"props":8684,"children":8685},{"style":466},[8686],{"type":45,"value":525},{"type":40,"tag":376,"props":8688,"children":8689},{"class":378,"line":425},[8690,8694,8698,8702,8706,8711,8715],{"type":40,"tag":376,"props":8691,"children":8692},{"style":460},[8693],{"type":45,"value":4140},{"type":40,"tag":376,"props":8695,"children":8696},{"style":618},[8697],{"type":45,"value":796},{"type":40,"tag":376,"props":8699,"children":8700},{"style":472},[8701],{"type":45,"value":8659},{"type":40,"tag":376,"props":8703,"children":8704},{"style":466},[8705],{"type":45,"value":635},{"type":40,"tag":376,"props":8707,"children":8708},{"style":472},[8709],{"type":45,"value":8710},"content",{"type":40,"tag":376,"props":8712,"children":8713},{"style":618},[8714],{"type":45,"value":5493},{"type":40,"tag":376,"props":8716,"children":8717},{"style":466},[8718],{"type":45,"value":612},{"type":40,"tag":376,"props":8720,"children":8721},{"class":378,"line":434},[8722,8727,8731,8736,8740,8745,8749,8753,8757,8761,8765],{"type":40,"tag":376,"props":8723,"children":8724},{"style":472},[8725],{"type":45,"value":8726},"    process",{"type":40,"tag":376,"props":8728,"children":8729},{"style":466},[8730],{"type":45,"value":635},{"type":40,"tag":376,"props":8732,"children":8733},{"style":472},[8734],{"type":45,"value":8735},"stdout",{"type":40,"tag":376,"props":8737,"children":8738},{"style":466},[8739],{"type":45,"value":635},{"type":40,"tag":376,"props":8741,"children":8742},{"style":600},[8743],{"type":45,"value":8744},"write",{"type":40,"tag":376,"props":8746,"children":8747},{"style":618},[8748],{"type":45,"value":607},{"type":40,"tag":376,"props":8750,"children":8751},{"style":472},[8752],{"type":45,"value":8659},{"type":40,"tag":376,"props":8754,"children":8755},{"style":466},[8756],{"type":45,"value":635},{"type":40,"tag":376,"props":8758,"children":8759},{"style":472},[8760],{"type":45,"value":8710},{"type":40,"tag":376,"props":8762,"children":8763},{"style":618},[8764],{"type":45,"value":816},{"type":40,"tag":376,"props":8766,"children":8767},{"style":466},[8768],{"type":45,"value":525},{"type":40,"tag":376,"props":8770,"children":8771},{"class":378,"line":708},[8772],{"type":40,"tag":376,"props":8773,"children":8774},{"style":466},[8775],{"type":45,"value":4250},{"type":40,"tag":376,"props":8777,"children":8778},{"class":378,"line":776},[8779],{"type":40,"tag":376,"props":8780,"children":8781},{"style":466},[8782],{"type":45,"value":844},{"type":40,"tag":8784,"props":8785,"children":8786},"ex-stream-custom-data",{},[8787,8885],{"type":40,"tag":360,"props":8788,"children":8789},{},[8790,8792],{"type":45,"value":8791},"\nEmit custom progress updates from within nodes using the stream writer.\n",{"type":40,"tag":366,"props":8793,"children":8795},{"className":368,"code":8794,"language":360,"meta":370,"style":370},"from langgraph.config import get_stream_writer\n\ndef my_node(state):\n    writer = get_stream_writer()\n    writer(\"Processing step 1...\")\n    # Do work\n    writer(\"Complete!\")\n    return {\"result\": \"done\"}\n\nfor chunk in graph.stream({\"data\": \"test\"}, stream_mode=\"custom\"):\n    print(chunk)\n",[8796],{"type":40,"tag":110,"props":8797,"children":8798},{"__ignoreMap":370},[8799,8807,8814,8822,8830,8838,8846,8854,8862,8869,8877],{"type":40,"tag":376,"props":8800,"children":8801},{"class":378,"line":379},[8802],{"type":40,"tag":376,"props":8803,"children":8804},{},[8805],{"type":45,"value":8806},"from langgraph.config import get_stream_writer\n",{"type":40,"tag":376,"props":8808,"children":8809},{"class":378,"line":388},[8810],{"type":40,"tag":376,"props":8811,"children":8812},{"emptyLinePlaceholder":401},[8813],{"type":45,"value":404},{"type":40,"tag":376,"props":8815,"children":8816},{"class":378,"line":397},[8817],{"type":40,"tag":376,"props":8818,"children":8819},{},[8820],{"type":45,"value":8821},"def my_node(state):\n",{"type":40,"tag":376,"props":8823,"children":8824},{"class":378,"line":407},[8825],{"type":40,"tag":376,"props":8826,"children":8827},{},[8828],{"type":45,"value":8829},"    writer = get_stream_writer()\n",{"type":40,"tag":376,"props":8831,"children":8832},{"class":378,"line":416},[8833],{"type":40,"tag":376,"props":8834,"children":8835},{},[8836],{"type":45,"value":8837},"    writer(\"Processing step 1...\")\n",{"type":40,"tag":376,"props":8839,"children":8840},{"class":378,"line":425},[8841],{"type":40,"tag":376,"props":8842,"children":8843},{},[8844],{"type":45,"value":8845},"    # Do work\n",{"type":40,"tag":376,"props":8847,"children":8848},{"class":378,"line":434},[8849],{"type":40,"tag":376,"props":8850,"children":8851},{},[8852],{"type":45,"value":8853},"    writer(\"Complete!\")\n",{"type":40,"tag":376,"props":8855,"children":8856},{"class":378,"line":708},[8857],{"type":40,"tag":376,"props":8858,"children":8859},{},[8860],{"type":45,"value":8861},"    return {\"result\": \"done\"}\n",{"type":40,"tag":376,"props":8863,"children":8864},{"class":378,"line":776},[8865],{"type":40,"tag":376,"props":8866,"children":8867},{"emptyLinePlaceholder":401},[8868],{"type":45,"value":404},{"type":40,"tag":376,"props":8870,"children":8871},{"class":378,"line":847},[8872],{"type":40,"tag":376,"props":8873,"children":8874},{},[8875],{"type":45,"value":8876},"for chunk in graph.stream({\"data\": \"test\"}, stream_mode=\"custom\"):\n",{"type":40,"tag":376,"props":8878,"children":8879},{"class":378,"line":860},[8880],{"type":40,"tag":376,"props":8881,"children":8882},{},[8883],{"type":45,"value":8884},"    print(chunk)\n",{"type":40,"tag":442,"props":8886,"children":8887},{},[8888,8889],{"type":45,"value":8791},{"type":40,"tag":366,"props":8890,"children":8892},{"className":449,"code":8891,"language":442,"meta":370,"style":370},"import { getWriter } from \"@langchain\u002Flanggraph\";\n\nconst myNode = async (state: typeof State.State) => {\n  const writer = getWriter();\n  writer(\"Processing step 1...\");\n  \u002F\u002F Do work\n  writer(\"Complete!\");\n  return { result: \"done\" };\n};\n\nfor await (const chunk of graph.stream({ data: \"test\" }, { streamMode: \"custom\" })) {\n  console.log(chunk);\n}\n",[8893],{"type":40,"tag":110,"props":8894,"children":8895},{"__ignoreMap":370},[8896,8936,8943,9002,9030,9063,9071,9103,9138,9145,9152,9261,9294],{"type":40,"tag":376,"props":8897,"children":8898},{"class":378,"line":379},[8899,8903,8907,8912,8916,8920,8924,8928,8932],{"type":40,"tag":376,"props":8900,"children":8901},{"style":460},[8902],{"type":45,"value":463},{"type":40,"tag":376,"props":8904,"children":8905},{"style":466},[8906],{"type":45,"value":469},{"type":40,"tag":376,"props":8908,"children":8909},{"style":472},[8910],{"type":45,"value":8911}," getWriter",{"type":40,"tag":376,"props":8913,"children":8914},{"style":466},[8915],{"type":45,"value":499},{"type":40,"tag":376,"props":8917,"children":8918},{"style":460},[8919],{"type":45,"value":504},{"type":40,"tag":376,"props":8921,"children":8922},{"style":466},[8923],{"type":45,"value":509},{"type":40,"tag":376,"props":8925,"children":8926},{"style":512},[8927],{"type":45,"value":515},{"type":40,"tag":376,"props":8929,"children":8930},{"style":466},[8931],{"type":45,"value":520},{"type":40,"tag":376,"props":8933,"children":8934},{"style":466},[8935],{"type":45,"value":525},{"type":40,"tag":376,"props":8937,"children":8938},{"class":378,"line":388},[8939],{"type":40,"tag":376,"props":8940,"children":8941},{"emptyLinePlaceholder":401},[8942],{"type":45,"value":404},{"type":40,"tag":376,"props":8944,"children":8945},{"class":378,"line":397},[8946,8950,8954,8958,8962,8966,8970,8974,8978,8982,8986,8990,8994,8998],{"type":40,"tag":376,"props":8947,"children":8948},{"style":579},[8949],{"type":45,"value":582},{"type":40,"tag":376,"props":8951,"children":8952},{"style":472},[8953],{"type":45,"value":1475},{"type":40,"tag":376,"props":8955,"children":8956},{"style":466},[8957],{"type":45,"value":592},{"type":40,"tag":376,"props":8959,"children":8960},{"style":579},[8961],{"type":45,"value":1484},{"type":40,"tag":376,"props":8963,"children":8964},{"style":466},[8965],{"type":45,"value":796},{"type":40,"tag":376,"props":8967,"children":8968},{"style":799},[8969],{"type":45,"value":1493},{"type":40,"tag":376,"props":8971,"children":8972},{"style":466},[8973],{"type":45,"value":626},{"type":40,"tag":376,"props":8975,"children":8976},{"style":466},[8977],{"type":45,"value":1502},{"type":40,"tag":376,"props":8979,"children":8980},{"style":472},[8981],{"type":45,"value":1507},{"type":40,"tag":376,"props":8983,"children":8984},{"style":466},[8985],{"type":45,"value":635},{"type":40,"tag":376,"props":8987,"children":8988},{"style":472},[8989],{"type":45,"value":1516},{"type":40,"tag":376,"props":8991,"children":8992},{"style":466},[8993],{"type":45,"value":816},{"type":40,"tag":376,"props":8995,"children":8996},{"style":579},[8997],{"type":45,"value":763},{"type":40,"tag":376,"props":8999,"children":9000},{"style":466},[9001],{"type":45,"value":1529},{"type":40,"tag":376,"props":9003,"children":9004},{"class":378,"line":407},[9005,9009,9014,9018,9022,9026],{"type":40,"tag":376,"props":9006,"children":9007},{"style":579},[9008],{"type":45,"value":2218},{"type":40,"tag":376,"props":9010,"children":9011},{"style":472},[9012],{"type":45,"value":9013}," writer",{"type":40,"tag":376,"props":9015,"children":9016},{"style":466},[9017],{"type":45,"value":1551},{"type":40,"tag":376,"props":9019,"children":9020},{"style":600},[9021],{"type":45,"value":8911},{"type":40,"tag":376,"props":9023,"children":9024},{"style":618},[9025],{"type":45,"value":645},{"type":40,"tag":376,"props":9027,"children":9028},{"style":466},[9029],{"type":45,"value":525},{"type":40,"tag":376,"props":9031,"children":9032},{"class":378,"line":416},[9033,9038,9042,9046,9051,9055,9059],{"type":40,"tag":376,"props":9034,"children":9035},{"style":600},[9036],{"type":45,"value":9037},"  writer",{"type":40,"tag":376,"props":9039,"children":9040},{"style":618},[9041],{"type":45,"value":607},{"type":40,"tag":376,"props":9043,"children":9044},{"style":466},[9045],{"type":45,"value":520},{"type":40,"tag":376,"props":9047,"children":9048},{"style":512},[9049],{"type":45,"value":9050},"Processing step 1...",{"type":40,"tag":376,"props":9052,"children":9053},{"style":466},[9054],{"type":45,"value":520},{"type":40,"tag":376,"props":9056,"children":9057},{"style":618},[9058],{"type":45,"value":816},{"type":40,"tag":376,"props":9060,"children":9061},{"style":466},[9062],{"type":45,"value":525},{"type":40,"tag":376,"props":9064,"children":9065},{"class":378,"line":425},[9066],{"type":40,"tag":376,"props":9067,"children":9068},{"style":652},[9069],{"type":45,"value":9070},"  \u002F\u002F Do work\n",{"type":40,"tag":376,"props":9072,"children":9073},{"class":378,"line":434},[9074,9078,9082,9086,9091,9095,9099],{"type":40,"tag":376,"props":9075,"children":9076},{"style":600},[9077],{"type":45,"value":9037},{"type":40,"tag":376,"props":9079,"children":9080},{"style":618},[9081],{"type":45,"value":607},{"type":40,"tag":376,"props":9083,"children":9084},{"style":466},[9085],{"type":45,"value":520},{"type":40,"tag":376,"props":9087,"children":9088},{"style":512},[9089],{"type":45,"value":9090},"Complete!",{"type":40,"tag":376,"props":9092,"children":9093},{"style":466},[9094],{"type":45,"value":520},{"type":40,"tag":376,"props":9096,"children":9097},{"style":618},[9098],{"type":45,"value":816},{"type":40,"tag":376,"props":9100,"children":9101},{"style":466},[9102],{"type":45,"value":525},{"type":40,"tag":376,"props":9104,"children":9105},{"class":378,"line":708},[9106,9110,9114,9118,9122,9126,9130,9134],{"type":40,"tag":376,"props":9107,"children":9108},{"style":460},[9109],{"type":45,"value":1576},{"type":40,"tag":376,"props":9111,"children":9112},{"style":466},[9113],{"type":45,"value":469},{"type":40,"tag":376,"props":9115,"children":9116},{"style":618},[9117],{"type":45,"value":4497},{"type":40,"tag":376,"props":9119,"children":9120},{"style":466},[9121],{"type":45,"value":626},{"type":40,"tag":376,"props":9123,"children":9124},{"style":466},[9125],{"type":45,"value":509},{"type":40,"tag":376,"props":9127,"children":9128},{"style":512},[9129],{"type":45,"value":2123},{"type":40,"tag":376,"props":9131,"children":9132},{"style":466},[9133],{"type":45,"value":520},{"type":40,"tag":376,"props":9135,"children":9136},{"style":466},[9137],{"type":45,"value":1710},{"type":40,"tag":376,"props":9139,"children":9140},{"class":378,"line":776},[9141],{"type":40,"tag":376,"props":9142,"children":9143},{"style":466},[9144],{"type":45,"value":1599},{"type":40,"tag":376,"props":9146,"children":9147},{"class":378,"line":847},[9148],{"type":40,"tag":376,"props":9149,"children":9150},{"emptyLinePlaceholder":401},[9151],{"type":45,"value":404},{"type":40,"tag":376,"props":9153,"children":9154},{"class":378,"line":860},[9155,9159,9163,9167,9171,9175,9179,9183,9187,9191,9195,9199,9204,9208,9212,9217,9221,9225,9229,9233,9237,9241,9245,9249,9253,9257],{"type":40,"tag":376,"props":9156,"children":9157},{"style":460},[9158],{"type":45,"value":8502},{"type":40,"tag":376,"props":9160,"children":9161},{"style":460},[9162],{"type":45,"value":3441},{"type":40,"tag":376,"props":9164,"children":9165},{"style":472},[9166],{"type":45,"value":796},{"type":40,"tag":376,"props":9168,"children":9169},{"style":579},[9170],{"type":45,"value":582},{"type":40,"tag":376,"props":9172,"children":9173},{"style":472},[9174],{"type":45,"value":8519},{"type":40,"tag":376,"props":9176,"children":9177},{"style":466},[9178],{"type":45,"value":8524},{"type":40,"tag":376,"props":9180,"children":9181},{"style":472},[9182],{"type":45,"value":3446},{"type":40,"tag":376,"props":9184,"children":9185},{"style":466},[9186],{"type":45,"value":635},{"type":40,"tag":376,"props":9188,"children":9189},{"style":600},[9190],{"type":45,"value":8537},{"type":40,"tag":376,"props":9192,"children":9193},{"style":472},[9194],{"type":45,"value":607},{"type":40,"tag":376,"props":9196,"children":9197},{"style":466},[9198],{"type":45,"value":3464},{"type":40,"tag":376,"props":9200,"children":9201},{"style":618},[9202],{"type":45,"value":9203}," data",{"type":40,"tag":376,"props":9205,"children":9206},{"style":466},[9207],{"type":45,"value":626},{"type":40,"tag":376,"props":9209,"children":9210},{"style":466},[9211],{"type":45,"value":509},{"type":40,"tag":376,"props":9213,"children":9214},{"style":512},[9215],{"type":45,"value":9216},"test",{"type":40,"tag":376,"props":9218,"children":9219},{"style":466},[9220],{"type":45,"value":520},{"type":40,"tag":376,"props":9222,"children":9223},{"style":466},[9224],{"type":45,"value":5550},{"type":40,"tag":376,"props":9226,"children":9227},{"style":466},[9228],{"type":45,"value":469},{"type":40,"tag":376,"props":9230,"children":9231},{"style":618},[9232],{"type":45,"value":8611},{"type":40,"tag":376,"props":9234,"children":9235},{"style":466},[9236],{"type":45,"value":626},{"type":40,"tag":376,"props":9238,"children":9239},{"style":466},[9240],{"type":45,"value":509},{"type":40,"tag":376,"props":9242,"children":9243},{"style":512},[9244],{"type":45,"value":8401},{"type":40,"tag":376,"props":9246,"children":9247},{"style":466},[9248],{"type":45,"value":520},{"type":40,"tag":376,"props":9250,"children":9251},{"style":466},[9252],{"type":45,"value":499},{"type":40,"tag":376,"props":9254,"children":9255},{"style":472},[9256],{"type":45,"value":4201},{"type":40,"tag":376,"props":9258,"children":9259},{"style":466},[9260],{"type":45,"value":612},{"type":40,"tag":376,"props":9262,"children":9263},{"class":378,"line":977},[9264,9269,9273,9277,9281,9286,9290],{"type":40,"tag":376,"props":9265,"children":9266},{"style":472},[9267],{"type":45,"value":9268},"  console",{"type":40,"tag":376,"props":9270,"children":9271},{"style":466},[9272],{"type":45,"value":635},{"type":40,"tag":376,"props":9274,"children":9275},{"style":600},[9276],{"type":45,"value":3516},{"type":40,"tag":376,"props":9278,"children":9279},{"style":618},[9280],{"type":45,"value":607},{"type":40,"tag":376,"props":9282,"children":9283},{"style":472},[9284],{"type":45,"value":9285},"chunk",{"type":40,"tag":376,"props":9287,"children":9288},{"style":618},[9289],{"type":45,"value":816},{"type":40,"tag":376,"props":9291,"children":9292},{"style":466},[9293],{"type":45,"value":525},{"type":40,"tag":376,"props":9295,"children":9296},{"class":378,"line":985},[9297],{"type":40,"tag":376,"props":9298,"children":9299},{"style":466},[9300],{"type":45,"value":844},{"type":40,"tag":260,"props":9302,"children":9303},{},[],{"type":40,"tag":264,"props":9305,"children":9307},{"id":9306},"error-handling",[9308],{"type":45,"value":9309},"Error Handling",{"type":40,"tag":104,"props":9311,"children":9312},{},[9313],{"type":45,"value":9314},"Match the error type to the right handler:",{"type":40,"tag":9316,"props":9317,"children":9318},"error-handling-table",{},[9319],{"type":40,"tag":193,"props":9320,"children":9321},{},[9322,9347],{"type":40,"tag":197,"props":9323,"children":9324},{},[9325],{"type":40,"tag":201,"props":9326,"children":9327},{},[9328,9333,9338,9343],{"type":40,"tag":205,"props":9329,"children":9330},{},[9331],{"type":45,"value":9332},"Error Type",{"type":40,"tag":205,"props":9334,"children":9335},{},[9336],{"type":45,"value":9337},"Who Fixes",{"type":40,"tag":205,"props":9339,"children":9340},{},[9341],{"type":45,"value":9342},"Strategy",{"type":40,"tag":205,"props":9344,"children":9345},{},[9346],{"type":45,"value":297},{"type":40,"tag":216,"props":9348,"children":9349},{},[9350,9381,9407,9434],{"type":40,"tag":201,"props":9351,"children":9352},{},[9353,9358,9363,9372],{"type":40,"tag":223,"props":9354,"children":9355},{},[9356],{"type":45,"value":9357},"Transient (network, rate limits)",{"type":40,"tag":223,"props":9359,"children":9360},{},[9361],{"type":45,"value":9362},"System",{"type":40,"tag":223,"props":9364,"children":9365},{},[9366],{"type":40,"tag":110,"props":9367,"children":9369},{"className":9368},[],[9370],{"type":45,"value":9371},"RetryPolicy(max_attempts=3)",{"type":40,"tag":223,"props":9373,"children":9374},{},[9375],{"type":40,"tag":110,"props":9376,"children":9378},{"className":9377},[],[9379],{"type":45,"value":9380},"add_node(..., retry_policy=...)",{"type":40,"tag":201,"props":9382,"children":9383},{},[9384,9389,9393,9402],{"type":40,"tag":223,"props":9385,"children":9386},{},[9387],{"type":45,"value":9388},"LLM-recoverable (tool failures)",{"type":40,"tag":223,"props":9390,"children":9391},{},[9392],{"type":45,"value":14},{"type":40,"tag":223,"props":9394,"children":9395},{},[9396],{"type":40,"tag":110,"props":9397,"children":9399},{"className":9398},[],[9400],{"type":45,"value":9401},"ToolNode(tools, handle_tool_errors=True)",{"type":40,"tag":223,"props":9403,"children":9404},{},[9405],{"type":45,"value":9406},"Error returned as ToolMessage",{"type":40,"tag":201,"props":9408,"children":9409},{},[9410,9415,9420,9429],{"type":40,"tag":223,"props":9411,"children":9412},{},[9413],{"type":45,"value":9414},"User-fixable (missing info)",{"type":40,"tag":223,"props":9416,"children":9417},{},[9418],{"type":45,"value":9419},"Human",{"type":40,"tag":223,"props":9421,"children":9422},{},[9423],{"type":40,"tag":110,"props":9424,"children":9426},{"className":9425},[],[9427],{"type":45,"value":9428},"interrupt({\"message\": ...})",{"type":40,"tag":223,"props":9430,"children":9431},{},[9432],{"type":45,"value":9433},"Collect missing data (see HITL skill)",{"type":40,"tag":201,"props":9435,"children":9436},{},[9437,9442,9447,9452],{"type":40,"tag":223,"props":9438,"children":9439},{},[9440],{"type":45,"value":9441},"Unexpected",{"type":40,"tag":223,"props":9443,"children":9444},{},[9445],{"type":45,"value":9446},"Developer",{"type":40,"tag":223,"props":9448,"children":9449},{},[9450],{"type":45,"value":9451},"Let bubble up",{"type":40,"tag":223,"props":9453,"children":9454},{},[9455],{"type":40,"tag":110,"props":9456,"children":9458},{"className":9457},[],[9459],{"type":45,"value":9460},"raise",{"type":40,"tag":9462,"props":9463,"children":9464},"ex-retry-policy",{},[9465,9531],{"type":40,"tag":360,"props":9466,"children":9467},{},[9468,9470],{"type":45,"value":9469},"\nUse RetryPolicy for transient errors (network issues, rate limits).\n",{"type":40,"tag":366,"props":9471,"children":9473},{"className":368,"code":9472,"language":360,"meta":370,"style":370},"from langgraph.types import RetryPolicy\n\nworkflow.add_node(\n    \"search_documentation\",\n    search_documentation,\n    retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0)\n)\n",[9474],{"type":40,"tag":110,"props":9475,"children":9476},{"__ignoreMap":370},[9477,9485,9492,9500,9508,9516,9524],{"type":40,"tag":376,"props":9478,"children":9479},{"class":378,"line":379},[9480],{"type":40,"tag":376,"props":9481,"children":9482},{},[9483],{"type":45,"value":9484},"from langgraph.types import RetryPolicy\n",{"type":40,"tag":376,"props":9486,"children":9487},{"class":378,"line":388},[9488],{"type":40,"tag":376,"props":9489,"children":9490},{"emptyLinePlaceholder":401},[9491],{"type":45,"value":404},{"type":40,"tag":376,"props":9493,"children":9494},{"class":378,"line":397},[9495],{"type":40,"tag":376,"props":9496,"children":9497},{},[9498],{"type":45,"value":9499},"workflow.add_node(\n",{"type":40,"tag":376,"props":9501,"children":9502},{"class":378,"line":407},[9503],{"type":40,"tag":376,"props":9504,"children":9505},{},[9506],{"type":45,"value":9507},"    \"search_documentation\",\n",{"type":40,"tag":376,"props":9509,"children":9510},{"class":378,"line":416},[9511],{"type":40,"tag":376,"props":9512,"children":9513},{},[9514],{"type":45,"value":9515},"    search_documentation,\n",{"type":40,"tag":376,"props":9517,"children":9518},{"class":378,"line":425},[9519],{"type":40,"tag":376,"props":9520,"children":9521},{},[9522],{"type":45,"value":9523},"    retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0)\n",{"type":40,"tag":376,"props":9525,"children":9526},{"class":378,"line":434},[9527],{"type":40,"tag":376,"props":9528,"children":9529},{},[9530],{"type":45,"value":2628},{"type":40,"tag":442,"props":9532,"children":9533},{},[9534,9536],{"type":45,"value":9535},"\nUse retryPolicy for transient errors.\n",{"type":40,"tag":366,"props":9537,"children":9539},{"className":449,"code":9538,"language":442,"meta":370,"style":370},"workflow.addNode(\n  \"searchDocumentation\",\n  searchDocumentation,\n  {\n    retryPolicy: { maxAttempts: 3, initialInterval: 1.0 },\n  },\n);\n",[9540],{"type":40,"tag":110,"props":9541,"children":9542},{"__ignoreMap":370},[9543,9563,9584,9596,9604,9657,9665],{"type":40,"tag":376,"props":9544,"children":9545},{"class":378,"line":379},[9546,9551,9555,9559],{"type":40,"tag":376,"props":9547,"children":9548},{"style":472},[9549],{"type":45,"value":9550},"workflow",{"type":40,"tag":376,"props":9552,"children":9553},{"style":466},[9554],{"type":45,"value":635},{"type":40,"tag":376,"props":9556,"children":9557},{"style":600},[9558],{"type":45,"value":3210},{"type":40,"tag":376,"props":9560,"children":9561},{"style":472},[9562],{"type":45,"value":705},{"type":40,"tag":376,"props":9564,"children":9565},{"class":378,"line":388},[9566,9571,9576,9580],{"type":40,"tag":376,"props":9567,"children":9568},{"style":466},[9569],{"type":45,"value":9570},"  \"",{"type":40,"tag":376,"props":9572,"children":9573},{"style":512},[9574],{"type":45,"value":9575},"searchDocumentation",{"type":40,"tag":376,"props":9577,"children":9578},{"style":466},[9579],{"type":45,"value":520},{"type":40,"tag":376,"props":9581,"children":9582},{"style":466},[9583],{"type":45,"value":773},{"type":40,"tag":376,"props":9585,"children":9586},{"class":378,"line":397},[9587,9592],{"type":40,"tag":376,"props":9588,"children":9589},{"style":472},[9590],{"type":45,"value":9591},"  searchDocumentation",{"type":40,"tag":376,"props":9593,"children":9594},{"style":466},[9595],{"type":45,"value":773},{"type":40,"tag":376,"props":9597,"children":9598},{"class":378,"line":407},[9599],{"type":40,"tag":376,"props":9600,"children":9601},{"style":466},[9602],{"type":45,"value":9603},"  {\n",{"type":40,"tag":376,"props":9605,"children":9606},{"class":378,"line":416},[9607,9612,9616,9620,9625,9629,9634,9638,9643,9647,9652],{"type":40,"tag":376,"props":9608,"children":9609},{"style":618},[9610],{"type":45,"value":9611},"    retryPolicy",{"type":40,"tag":376,"props":9613,"children":9614},{"style":466},[9615],{"type":45,"value":626},{"type":40,"tag":376,"props":9617,"children":9618},{"style":466},[9619],{"type":45,"value":469},{"type":40,"tag":376,"props":9621,"children":9622},{"style":618},[9623],{"type":45,"value":9624}," maxAttempts",{"type":40,"tag":376,"props":9626,"children":9627},{"style":466},[9628],{"type":45,"value":626},{"type":40,"tag":376,"props":9630,"children":9631},{"style":5275},[9632],{"type":45,"value":9633}," 3",{"type":40,"tag":376,"props":9635,"children":9636},{"style":466},[9637],{"type":45,"value":480},{"type":40,"tag":376,"props":9639,"children":9640},{"style":618},[9641],{"type":45,"value":9642}," initialInterval",{"type":40,"tag":376,"props":9644,"children":9645},{"style":466},[9646],{"type":45,"value":626},{"type":40,"tag":376,"props":9648,"children":9649},{"style":5275},[9650],{"type":45,"value":9651}," 1.0",{"type":40,"tag":376,"props":9653,"children":9654},{"style":466},[9655],{"type":45,"value":9656}," },\n",{"type":40,"tag":376,"props":9658,"children":9659},{"class":378,"line":425},[9660],{"type":40,"tag":376,"props":9661,"children":9662},{"style":466},[9663],{"type":45,"value":9664},"  },\n",{"type":40,"tag":376,"props":9666,"children":9667},{"class":378,"line":434},[9668,9672],{"type":40,"tag":376,"props":9669,"children":9670},{"style":472},[9671],{"type":45,"value":816},{"type":40,"tag":376,"props":9673,"children":9674},{"style":466},[9675],{"type":45,"value":525},{"type":40,"tag":9677,"props":9678,"children":9679},"ex-tool-node-error-handling",{},[9680,9730],{"type":40,"tag":360,"props":9681,"children":9682},{},[9683,9685],{"type":45,"value":9684},"\nUse ToolNode from langgraph.prebuilt to handle tool execution and errors. When handle_tool_errors=True, errors are returned as ToolMessages so the LLM can recover.\n",{"type":40,"tag":366,"props":9686,"children":9688},{"className":368,"code":9687,"language":360,"meta":370,"style":370},"from langgraph.prebuilt import ToolNode\n\ntool_node = ToolNode(tools, handle_tool_errors=True)\n\nworkflow.add_node(\"tools\", tool_node)\n",[9689],{"type":40,"tag":110,"props":9690,"children":9691},{"__ignoreMap":370},[9692,9700,9707,9715,9722],{"type":40,"tag":376,"props":9693,"children":9694},{"class":378,"line":379},[9695],{"type":40,"tag":376,"props":9696,"children":9697},{},[9698],{"type":45,"value":9699},"from langgraph.prebuilt import ToolNode\n",{"type":40,"tag":376,"props":9701,"children":9702},{"class":378,"line":388},[9703],{"type":40,"tag":376,"props":9704,"children":9705},{"emptyLinePlaceholder":401},[9706],{"type":45,"value":404},{"type":40,"tag":376,"props":9708,"children":9709},{"class":378,"line":397},[9710],{"type":40,"tag":376,"props":9711,"children":9712},{},[9713],{"type":45,"value":9714},"tool_node = ToolNode(tools, handle_tool_errors=True)\n",{"type":40,"tag":376,"props":9716,"children":9717},{"class":378,"line":407},[9718],{"type":40,"tag":376,"props":9719,"children":9720},{"emptyLinePlaceholder":401},[9721],{"type":45,"value":404},{"type":40,"tag":376,"props":9723,"children":9724},{"class":378,"line":416},[9725],{"type":40,"tag":376,"props":9726,"children":9727},{},[9728],{"type":45,"value":9729},"workflow.add_node(\"tools\", tool_node)\n",{"type":40,"tag":442,"props":9731,"children":9732},{},[9733,9735],{"type":45,"value":9734},"\nUse ToolNode from @langchain\u002Flanggraph\u002Fprebuilt to handle tool execution and errors. When handleToolErrors is true, errors are returned as ToolMessages so the LLM can recover.\n",{"type":40,"tag":366,"props":9736,"children":9738},{"className":449,"code":9737,"language":442,"meta":370,"style":370},"import { ToolNode } from \"@langchain\u002Flanggraph\u002Fprebuilt\";\n\nconst toolNode = new ToolNode(tools, { handleToolErrors: true });\n\nworkflow.addNode(\"tools\", toolNode);\n",[9739],{"type":40,"tag":110,"props":9740,"children":9741},{"__ignoreMap":370},[9742,9783,9790,9854,9861],{"type":40,"tag":376,"props":9743,"children":9744},{"class":378,"line":379},[9745,9749,9753,9758,9762,9766,9770,9775,9779],{"type":40,"tag":376,"props":9746,"children":9747},{"style":460},[9748],{"type":45,"value":463},{"type":40,"tag":376,"props":9750,"children":9751},{"style":466},[9752],{"type":45,"value":469},{"type":40,"tag":376,"props":9754,"children":9755},{"style":472},[9756],{"type":45,"value":9757}," ToolNode",{"type":40,"tag":376,"props":9759,"children":9760},{"style":466},[9761],{"type":45,"value":499},{"type":40,"tag":376,"props":9763,"children":9764},{"style":460},[9765],{"type":45,"value":504},{"type":40,"tag":376,"props":9767,"children":9768},{"style":466},[9769],{"type":45,"value":509},{"type":40,"tag":376,"props":9771,"children":9772},{"style":512},[9773],{"type":45,"value":9774},"@langchain\u002Flanggraph\u002Fprebuilt",{"type":40,"tag":376,"props":9776,"children":9777},{"style":466},[9778],{"type":45,"value":520},{"type":40,"tag":376,"props":9780,"children":9781},{"style":466},[9782],{"type":45,"value":525},{"type":40,"tag":376,"props":9784,"children":9785},{"class":378,"line":388},[9786],{"type":40,"tag":376,"props":9787,"children":9788},{"emptyLinePlaceholder":401},[9789],{"type":45,"value":404},{"type":40,"tag":376,"props":9791,"children":9792},{"class":378,"line":397},[9793,9797,9802,9806,9810,9814,9819,9823,9827,9832,9836,9842,9846,9850],{"type":40,"tag":376,"props":9794,"children":9795},{"style":579},[9796],{"type":45,"value":582},{"type":40,"tag":376,"props":9798,"children":9799},{"style":472},[9800],{"type":45,"value":9801}," toolNode ",{"type":40,"tag":376,"props":9803,"children":9804},{"style":466},[9805],{"type":45,"value":592},{"type":40,"tag":376,"props":9807,"children":9808},{"style":466},[9809],{"type":45,"value":597},{"type":40,"tag":376,"props":9811,"children":9812},{"style":600},[9813],{"type":45,"value":9757},{"type":40,"tag":376,"props":9815,"children":9816},{"style":472},[9817],{"type":45,"value":9818},"(tools",{"type":40,"tag":376,"props":9820,"children":9821},{"style":466},[9822],{"type":45,"value":480},{"type":40,"tag":376,"props":9824,"children":9825},{"style":466},[9826],{"type":45,"value":469},{"type":40,"tag":376,"props":9828,"children":9829},{"style":618},[9830],{"type":45,"value":9831}," handleToolErrors",{"type":40,"tag":376,"props":9833,"children":9834},{"style":466},[9835],{"type":45,"value":626},{"type":40,"tag":376,"props":9837,"children":9839},{"style":9838},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[9840],{"type":45,"value":9841}," true",{"type":40,"tag":376,"props":9843,"children":9844},{"style":466},[9845],{"type":45,"value":499},{"type":40,"tag":376,"props":9847,"children":9848},{"style":472},[9849],{"type":45,"value":816},{"type":40,"tag":376,"props":9851,"children":9852},{"style":466},[9853],{"type":45,"value":525},{"type":40,"tag":376,"props":9855,"children":9856},{"class":378,"line":407},[9857],{"type":40,"tag":376,"props":9858,"children":9859},{"emptyLinePlaceholder":401},[9860],{"type":45,"value":404},{"type":40,"tag":376,"props":9862,"children":9863},{"class":378,"line":416},[9864,9868,9872,9876,9880,9884,9889,9893,9897,9902],{"type":40,"tag":376,"props":9865,"children":9866},{"style":472},[9867],{"type":45,"value":9550},{"type":40,"tag":376,"props":9869,"children":9870},{"style":466},[9871],{"type":45,"value":635},{"type":40,"tag":376,"props":9873,"children":9874},{"style":600},[9875],{"type":45,"value":3210},{"type":40,"tag":376,"props":9877,"children":9878},{"style":472},[9879],{"type":45,"value":607},{"type":40,"tag":376,"props":9881,"children":9882},{"style":466},[9883],{"type":45,"value":520},{"type":40,"tag":376,"props":9885,"children":9886},{"style":512},[9887],{"type":45,"value":9888},"tools",{"type":40,"tag":376,"props":9890,"children":9891},{"style":466},[9892],{"type":45,"value":520},{"type":40,"tag":376,"props":9894,"children":9895},{"style":466},[9896],{"type":45,"value":480},{"type":40,"tag":376,"props":9898,"children":9899},{"style":472},[9900],{"type":45,"value":9901}," toolNode)",{"type":40,"tag":376,"props":9903,"children":9904},{"style":466},[9905],{"type":45,"value":525},{"type":40,"tag":260,"props":9907,"children":9908},{},[],{"type":40,"tag":264,"props":9910,"children":9912},{"id":9911},"common-fixes",[9913],{"type":45,"value":9914},"Common Fixes",{"type":40,"tag":9916,"props":9917,"children":9918},"fix-compile-before-execution",{},[9919,9977],{"type":40,"tag":360,"props":9920,"children":9921},{},[9922,9924],{"type":45,"value":9923},"\nMust compile() to get executable graph.\n",{"type":40,"tag":366,"props":9925,"children":9927},{"className":368,"code":9926,"language":360,"meta":370,"style":370},"# WRONG\nbuilder.invoke({\"input\": \"test\"})  # AttributeError!\n\n# CORRECT\ngraph = builder.compile()\ngraph.invoke({\"input\": \"test\"})\n",[9928],{"type":40,"tag":110,"props":9929,"children":9930},{"__ignoreMap":370},[9931,9939,9947,9954,9961,9969],{"type":40,"tag":376,"props":9932,"children":9933},{"class":378,"line":379},[9934],{"type":40,"tag":376,"props":9935,"children":9936},{},[9937],{"type":45,"value":9938},"# WRONG\n",{"type":40,"tag":376,"props":9940,"children":9941},{"class":378,"line":388},[9942],{"type":40,"tag":376,"props":9943,"children":9944},{},[9945],{"type":45,"value":9946},"builder.invoke({\"input\": \"test\"})  # AttributeError!\n",{"type":40,"tag":376,"props":9948,"children":9949},{"class":378,"line":397},[9950],{"type":40,"tag":376,"props":9951,"children":9952},{"emptyLinePlaceholder":401},[9953],{"type":45,"value":404},{"type":40,"tag":376,"props":9955,"children":9956},{"class":378,"line":407},[9957],{"type":40,"tag":376,"props":9958,"children":9959},{},[9960],{"type":45,"value":7711},{"type":40,"tag":376,"props":9962,"children":9963},{"class":378,"line":416},[9964],{"type":40,"tag":376,"props":9965,"children":9966},{},[9967],{"type":45,"value":9968},"graph = builder.compile()\n",{"type":40,"tag":376,"props":9970,"children":9971},{"class":378,"line":425},[9972],{"type":40,"tag":376,"props":9973,"children":9974},{},[9975],{"type":45,"value":9976},"graph.invoke({\"input\": \"test\"})\n",{"type":40,"tag":442,"props":9978,"children":9979},{},[9980,9981],{"type":45,"value":9923},{"type":40,"tag":366,"props":9982,"children":9984},{"className":449,"code":9983,"language":442,"meta":370,"style":370},"\u002F\u002F WRONG\nawait builder.invoke({ input: \"test\" });\n\n\u002F\u002F CORRECT\nconst graph = builder.compile();\nawait graph.invoke({ input: \"test\" });\n",[9985],{"type":40,"tag":110,"props":9986,"children":9987},{"__ignoreMap":370},[9988,9996,10057,10064,10071,10106],{"type":40,"tag":376,"props":9989,"children":9990},{"class":378,"line":379},[9991],{"type":40,"tag":376,"props":9992,"children":9993},{"style":652},[9994],{"type":45,"value":9995},"\u002F\u002F WRONG\n",{"type":40,"tag":376,"props":9997,"children":9998},{"class":378,"line":388},[9999,10004,10009,10013,10017,10021,10025,10029,10033,10037,10041,10045,10049,10053],{"type":40,"tag":376,"props":10000,"children":10001},{"style":460},[10002],{"type":45,"value":10003},"await",{"type":40,"tag":376,"props":10005,"children":10006},{"style":472},[10007],{"type":45,"value":10008}," builder",{"type":40,"tag":376,"props":10010,"children":10011},{"style":466},[10012],{"type":45,"value":635},{"type":40,"tag":376,"props":10014,"children":10015},{"style":600},[10016],{"type":45,"value":3455},{"type":40,"tag":376,"props":10018,"children":10019},{"style":472},[10020],{"type":45,"value":607},{"type":40,"tag":376,"props":10022,"children":10023},{"style":466},[10024],{"type":45,"value":3464},{"type":40,"tag":376,"props":10026,"children":10027},{"style":618},[10028],{"type":45,"value":3469},{"type":40,"tag":376,"props":10030,"children":10031},{"style":466},[10032],{"type":45,"value":626},{"type":40,"tag":376,"props":10034,"children":10035},{"style":466},[10036],{"type":45,"value":509},{"type":40,"tag":376,"props":10038,"children":10039},{"style":512},[10040],{"type":45,"value":9216},{"type":40,"tag":376,"props":10042,"children":10043},{"style":466},[10044],{"type":45,"value":520},{"type":40,"tag":376,"props":10046,"children":10047},{"style":466},[10048],{"type":45,"value":499},{"type":40,"tag":376,"props":10050,"children":10051},{"style":472},[10052],{"type":45,"value":816},{"type":40,"tag":376,"props":10054,"children":10055},{"style":466},[10056],{"type":45,"value":525},{"type":40,"tag":376,"props":10058,"children":10059},{"class":378,"line":397},[10060],{"type":40,"tag":376,"props":10061,"children":10062},{"emptyLinePlaceholder":401},[10063],{"type":45,"value":404},{"type":40,"tag":376,"props":10065,"children":10066},{"class":378,"line":407},[10067],{"type":40,"tag":376,"props":10068,"children":10069},{"style":652},[10070],{"type":45,"value":7841},{"type":40,"tag":376,"props":10072,"children":10073},{"class":378,"line":416},[10074,10078,10082,10086,10090,10094,10098,10102],{"type":40,"tag":376,"props":10075,"children":10076},{"style":579},[10077],{"type":45,"value":582},{"type":40,"tag":376,"props":10079,"children":10080},{"style":472},[10081],{"type":45,"value":3180},{"type":40,"tag":376,"props":10083,"children":10084},{"style":466},[10085],{"type":45,"value":592},{"type":40,"tag":376,"props":10087,"children":10088},{"style":472},[10089],{"type":45,"value":10008},{"type":40,"tag":376,"props":10091,"children":10092},{"style":466},[10093],{"type":45,"value":635},{"type":40,"tag":376,"props":10095,"children":10096},{"style":600},[10097],{"type":45,"value":3405},{"type":40,"tag":376,"props":10099,"children":10100},{"style":472},[10101],{"type":45,"value":645},{"type":40,"tag":376,"props":10103,"children":10104},{"style":466},[10105],{"type":45,"value":525},{"type":40,"tag":376,"props":10107,"children":10108},{"class":378,"line":425},[10109,10113,10117,10121,10125,10129,10133,10137,10141,10145,10149,10153,10157,10161],{"type":40,"tag":376,"props":10110,"children":10111},{"style":460},[10112],{"type":45,"value":10003},{"type":40,"tag":376,"props":10114,"children":10115},{"style":472},[10116],{"type":45,"value":3446},{"type":40,"tag":376,"props":10118,"children":10119},{"style":466},[10120],{"type":45,"value":635},{"type":40,"tag":376,"props":10122,"children":10123},{"style":600},[10124],{"type":45,"value":3455},{"type":40,"tag":376,"props":10126,"children":10127},{"style":472},[10128],{"type":45,"value":607},{"type":40,"tag":376,"props":10130,"children":10131},{"style":466},[10132],{"type":45,"value":3464},{"type":40,"tag":376,"props":10134,"children":10135},{"style":618},[10136],{"type":45,"value":3469},{"type":40,"tag":376,"props":10138,"children":10139},{"style":466},[10140],{"type":45,"value":626},{"type":40,"tag":376,"props":10142,"children":10143},{"style":466},[10144],{"type":45,"value":509},{"type":40,"tag":376,"props":10146,"children":10147},{"style":512},[10148],{"type":45,"value":9216},{"type":40,"tag":376,"props":10150,"children":10151},{"style":466},[10152],{"type":45,"value":520},{"type":40,"tag":376,"props":10154,"children":10155},{"style":466},[10156],{"type":45,"value":499},{"type":40,"tag":376,"props":10158,"children":10159},{"style":472},[10160],{"type":45,"value":816},{"type":40,"tag":376,"props":10162,"children":10163},{"style":466},[10164],{"type":45,"value":525},{"type":40,"tag":10166,"props":10167,"children":10168},"fix-infinite-loop-needs-exit",{},[10169,10243],{"type":40,"tag":360,"props":10170,"children":10171},{},[10172,10174],{"type":45,"value":10173},"\nProvide conditional path to END to avoid infinite loops.\n",{"type":40,"tag":366,"props":10175,"children":10177},{"className":368,"code":10176,"language":360,"meta":370,"style":370},"# WRONG: Loops forever\nbuilder.add_edge(\"node_a\", \"node_b\")\nbuilder.add_edge(\"node_b\", \"node_a\")\n\n# CORRECT\ndef should_continue(state):\n    return END if state[\"count\"] > 10 else \"node_b\"\nbuilder.add_conditional_edges(\"node_a\", should_continue)\n",[10178],{"type":40,"tag":110,"props":10179,"children":10180},{"__ignoreMap":370},[10181,10189,10197,10205,10212,10219,10227,10235],{"type":40,"tag":376,"props":10182,"children":10183},{"class":378,"line":379},[10184],{"type":40,"tag":376,"props":10185,"children":10186},{},[10187],{"type":45,"value":10188},"# WRONG: Loops forever\n",{"type":40,"tag":376,"props":10190,"children":10191},{"class":378,"line":388},[10192],{"type":40,"tag":376,"props":10193,"children":10194},{},[10195],{"type":45,"value":10196},"builder.add_edge(\"node_a\", \"node_b\")\n",{"type":40,"tag":376,"props":10198,"children":10199},{"class":378,"line":397},[10200],{"type":40,"tag":376,"props":10201,"children":10202},{},[10203],{"type":45,"value":10204},"builder.add_edge(\"node_b\", \"node_a\")\n",{"type":40,"tag":376,"props":10206,"children":10207},{"class":378,"line":407},[10208],{"type":40,"tag":376,"props":10209,"children":10210},{"emptyLinePlaceholder":401},[10211],{"type":45,"value":404},{"type":40,"tag":376,"props":10213,"children":10214},{"class":378,"line":416},[10215],{"type":40,"tag":376,"props":10216,"children":10217},{},[10218],{"type":45,"value":7711},{"type":40,"tag":376,"props":10220,"children":10221},{"class":378,"line":425},[10222],{"type":40,"tag":376,"props":10223,"children":10224},{},[10225],{"type":45,"value":10226},"def should_continue(state):\n",{"type":40,"tag":376,"props":10228,"children":10229},{"class":378,"line":434},[10230],{"type":40,"tag":376,"props":10231,"children":10232},{},[10233],{"type":45,"value":10234},"    return END if state[\"count\"] > 10 else \"node_b\"\n",{"type":40,"tag":376,"props":10236,"children":10237},{"class":378,"line":708},[10238],{"type":40,"tag":376,"props":10239,"children":10240},{},[10241],{"type":45,"value":10242},"builder.add_conditional_edges(\"node_a\", should_continue)\n",{"type":40,"tag":442,"props":10244,"children":10245},{},[10246,10248],{"type":45,"value":10247},"\nUse conditional edges with END return to break loops.\n",{"type":40,"tag":366,"props":10249,"children":10251},{"className":449,"code":10250,"language":442,"meta":370,"style":370},"\u002F\u002F WRONG: Loops forever\nbuilder.addEdge(\"node_a\", \"node_b\").addEdge(\"node_b\", \"node_a\");\n\n\u002F\u002F CORRECT\nbuilder.addConditionalEdges(\"node_a\", (state) => state.count > 10 ? END : \"node_b\");\n",[10252],{"type":40,"tag":110,"props":10253,"children":10254},{"__ignoreMap":370},[10255,10263,10363,10370,10377],{"type":40,"tag":376,"props":10256,"children":10257},{"class":378,"line":379},[10258],{"type":40,"tag":376,"props":10259,"children":10260},{"style":652},[10261],{"type":45,"value":10262},"\u002F\u002F WRONG: Loops forever\n",{"type":40,"tag":376,"props":10264,"children":10265},{"class":378,"line":388},[10266,10271,10275,10279,10283,10287,10291,10295,10299,10303,10307,10311,10315,10319,10323,10327,10331,10335,10339,10343,10347,10351,10355,10359],{"type":40,"tag":376,"props":10267,"children":10268},{"style":472},[10269],{"type":45,"value":10270},"builder",{"type":40,"tag":376,"props":10272,"children":10273},{"style":466},[10274],{"type":45,"value":635},{"type":40,"tag":376,"props":10276,"children":10277},{"style":600},[10278],{"type":45,"value":3285},{"type":40,"tag":376,"props":10280,"children":10281},{"style":472},[10282],{"type":45,"value":607},{"type":40,"tag":376,"props":10284,"children":10285},{"style":466},[10286],{"type":45,"value":520},{"type":40,"tag":376,"props":10288,"children":10289},{"style":512},[10290],{"type":45,"value":5740},{"type":40,"tag":376,"props":10292,"children":10293},{"style":466},[10294],{"type":45,"value":520},{"type":40,"tag":376,"props":10296,"children":10297},{"style":466},[10298],{"type":45,"value":480},{"type":40,"tag":376,"props":10300,"children":10301},{"style":466},[10302],{"type":45,"value":509},{"type":40,"tag":376,"props":10304,"children":10305},{"style":512},[10306],{"type":45,"value":5659},{"type":40,"tag":376,"props":10308,"children":10309},{"style":466},[10310],{"type":45,"value":520},{"type":40,"tag":376,"props":10312,"children":10313},{"style":472},[10314],{"type":45,"value":816},{"type":40,"tag":376,"props":10316,"children":10317},{"style":466},[10318],{"type":45,"value":635},{"type":40,"tag":376,"props":10320,"children":10321},{"style":600},[10322],{"type":45,"value":3285},{"type":40,"tag":376,"props":10324,"children":10325},{"style":472},[10326],{"type":45,"value":607},{"type":40,"tag":376,"props":10328,"children":10329},{"style":466},[10330],{"type":45,"value":520},{"type":40,"tag":376,"props":10332,"children":10333},{"style":512},[10334],{"type":45,"value":5659},{"type":40,"tag":376,"props":10336,"children":10337},{"style":466},[10338],{"type":45,"value":520},{"type":40,"tag":376,"props":10340,"children":10341},{"style":466},[10342],{"type":45,"value":480},{"type":40,"tag":376,"props":10344,"children":10345},{"style":466},[10346],{"type":45,"value":509},{"type":40,"tag":376,"props":10348,"children":10349},{"style":512},[10350],{"type":45,"value":5740},{"type":40,"tag":376,"props":10352,"children":10353},{"style":466},[10354],{"type":45,"value":520},{"type":40,"tag":376,"props":10356,"children":10357},{"style":472},[10358],{"type":45,"value":816},{"type":40,"tag":376,"props":10360,"children":10361},{"style":466},[10362],{"type":45,"value":525},{"type":40,"tag":376,"props":10364,"children":10365},{"class":378,"line":397},[10366],{"type":40,"tag":376,"props":10367,"children":10368},{"emptyLinePlaceholder":401},[10369],{"type":45,"value":404},{"type":40,"tag":376,"props":10371,"children":10372},{"class":378,"line":407},[10373],{"type":40,"tag":376,"props":10374,"children":10375},{"style":652},[10376],{"type":45,"value":7841},{"type":40,"tag":376,"props":10378,"children":10379},{"class":378,"line":416},[10380,10384,10388,10392,10396,10400,10404,10408,10412,10416,10420,10424,10428,10432,10436,10441,10445,10450,10455,10460,10464,10468,10472,10476,10480],{"type":40,"tag":376,"props":10381,"children":10382},{"style":472},[10383],{"type":45,"value":10270},{"type":40,"tag":376,"props":10385,"children":10386},{"style":466},[10387],{"type":45,"value":635},{"type":40,"tag":376,"props":10389,"children":10390},{"style":600},[10391],{"type":45,"value":4650},{"type":40,"tag":376,"props":10393,"children":10394},{"style":472},[10395],{"type":45,"value":607},{"type":40,"tag":376,"props":10397,"children":10398},{"style":466},[10399],{"type":45,"value":520},{"type":40,"tag":376,"props":10401,"children":10402},{"style":512},[10403],{"type":45,"value":5740},{"type":40,"tag":376,"props":10405,"children":10406},{"style":466},[10407],{"type":45,"value":520},{"type":40,"tag":376,"props":10409,"children":10410},{"style":466},[10411],{"type":45,"value":480},{"type":40,"tag":376,"props":10413,"children":10414},{"style":466},[10415],{"type":45,"value":796},{"type":40,"tag":376,"props":10417,"children":10418},{"style":799},[10419],{"type":45,"value":1493},{"type":40,"tag":376,"props":10421,"children":10422},{"style":466},[10423],{"type":45,"value":816},{"type":40,"tag":376,"props":10425,"children":10426},{"style":579},[10427],{"type":45,"value":763},{"type":40,"tag":376,"props":10429,"children":10430},{"style":472},[10431],{"type":45,"value":1581},{"type":40,"tag":376,"props":10433,"children":10434},{"style":466},[10435],{"type":45,"value":635},{"type":40,"tag":376,"props":10437,"children":10438},{"style":472},[10439],{"type":45,"value":10440},"count ",{"type":40,"tag":376,"props":10442,"children":10443},{"style":466},[10444],{"type":45,"value":2070},{"type":40,"tag":376,"props":10446,"children":10447},{"style":5275},[10448],{"type":45,"value":10449}," 10",{"type":40,"tag":376,"props":10451,"children":10452},{"style":466},[10453],{"type":45,"value":10454}," ?",{"type":40,"tag":376,"props":10456,"children":10457},{"style":472},[10458],{"type":45,"value":10459}," END ",{"type":40,"tag":376,"props":10461,"children":10462},{"style":466},[10463],{"type":45,"value":626},{"type":40,"tag":376,"props":10465,"children":10466},{"style":466},[10467],{"type":45,"value":509},{"type":40,"tag":376,"props":10469,"children":10470},{"style":512},[10471],{"type":45,"value":5659},{"type":40,"tag":376,"props":10473,"children":10474},{"style":466},[10475],{"type":45,"value":520},{"type":40,"tag":376,"props":10477,"children":10478},{"style":472},[10479],{"type":45,"value":816},{"type":40,"tag":376,"props":10481,"children":10482},{"style":466},[10483],{"type":45,"value":525},{"type":40,"tag":10485,"props":10486,"children":10487},"fix-common-mistakes",{},[10488,10490,10606],{"type":45,"value":10489},"\nOther common mistakes:\n",{"type":40,"tag":366,"props":10491,"children":10493},{"className":368,"code":10492,"language":360,"meta":370,"style":370},"# Router must return names of nodes that exist in the graph\nbuilder.add_node(\"my_node\", func)  # Add node BEFORE referencing in edges\nbuilder.add_conditional_edges(\"node_a\", router, [\"my_node\"])\n\n# Command return type needs Literal for routing destinations (Python)\ndef node_a(state) -> Command[Literal[\"node_b\", \"node_c\"]]:\n    return Command(goto=\"node_b\")\n\n# START is entry-only - cannot route back to it\nbuilder.add_edge(\"node_a\", START)  # WRONG!\nbuilder.add_edge(\"node_a\", \"entry\")  # Use a named entry node instead\n\n# Reducer expects matching types\nreturn {\"items\": [\"item\"]}  # List for list reducer, not a string\n",[10494],{"type":40,"tag":110,"props":10495,"children":10496},{"__ignoreMap":370},[10497,10505,10513,10521,10528,10536,10544,10552,10559,10567,10575,10583,10590,10598],{"type":40,"tag":376,"props":10498,"children":10499},{"class":378,"line":379},[10500],{"type":40,"tag":376,"props":10501,"children":10502},{},[10503],{"type":45,"value":10504},"# Router must return names of nodes that exist in the graph\n",{"type":40,"tag":376,"props":10506,"children":10507},{"class":378,"line":388},[10508],{"type":40,"tag":376,"props":10509,"children":10510},{},[10511],{"type":45,"value":10512},"builder.add_node(\"my_node\", func)  # Add node BEFORE referencing in edges\n",{"type":40,"tag":376,"props":10514,"children":10515},{"class":378,"line":397},[10516],{"type":40,"tag":376,"props":10517,"children":10518},{},[10519],{"type":45,"value":10520},"builder.add_conditional_edges(\"node_a\", router, [\"my_node\"])\n",{"type":40,"tag":376,"props":10522,"children":10523},{"class":378,"line":407},[10524],{"type":40,"tag":376,"props":10525,"children":10526},{"emptyLinePlaceholder":401},[10527],{"type":45,"value":404},{"type":40,"tag":376,"props":10529,"children":10530},{"class":378,"line":416},[10531],{"type":40,"tag":376,"props":10532,"children":10533},{},[10534],{"type":45,"value":10535},"# Command return type needs Literal for routing destinations (Python)\n",{"type":40,"tag":376,"props":10537,"children":10538},{"class":378,"line":425},[10539],{"type":40,"tag":376,"props":10540,"children":10541},{},[10542],{"type":45,"value":10543},"def node_a(state) -> Command[Literal[\"node_b\", \"node_c\"]]:\n",{"type":40,"tag":376,"props":10545,"children":10546},{"class":378,"line":434},[10547],{"type":40,"tag":376,"props":10548,"children":10549},{},[10550],{"type":45,"value":10551},"    return Command(goto=\"node_b\")\n",{"type":40,"tag":376,"props":10553,"children":10554},{"class":378,"line":708},[10555],{"type":40,"tag":376,"props":10556,"children":10557},{"emptyLinePlaceholder":401},[10558],{"type":45,"value":404},{"type":40,"tag":376,"props":10560,"children":10561},{"class":378,"line":776},[10562],{"type":40,"tag":376,"props":10563,"children":10564},{},[10565],{"type":45,"value":10566},"# START is entry-only - cannot route back to it\n",{"type":40,"tag":376,"props":10568,"children":10569},{"class":378,"line":847},[10570],{"type":40,"tag":376,"props":10571,"children":10572},{},[10573],{"type":45,"value":10574},"builder.add_edge(\"node_a\", START)  # WRONG!\n",{"type":40,"tag":376,"props":10576,"children":10577},{"class":378,"line":860},[10578],{"type":40,"tag":376,"props":10579,"children":10580},{},[10581],{"type":45,"value":10582},"builder.add_edge(\"node_a\", \"entry\")  # Use a named entry node instead\n",{"type":40,"tag":376,"props":10584,"children":10585},{"class":378,"line":977},[10586],{"type":40,"tag":376,"props":10587,"children":10588},{"emptyLinePlaceholder":401},[10589],{"type":45,"value":404},{"type":40,"tag":376,"props":10591,"children":10592},{"class":378,"line":985},[10593],{"type":40,"tag":376,"props":10594,"children":10595},{},[10596],{"type":45,"value":10597},"# Reducer expects matching types\n",{"type":40,"tag":376,"props":10599,"children":10600},{"class":378,"line":993},[10601],{"type":40,"tag":376,"props":10602,"children":10603},{},[10604],{"type":45,"value":10605},"return {\"items\": [\"item\"]}  # List for list reducer, not a string\n",{"type":40,"tag":366,"props":10607,"children":10609},{"className":449,"code":10608,"language":442,"meta":370,"style":370},"\u002F\u002F Always await graph.invoke() - it returns a Promise\nconst result = await graph.invoke({ input: \"test\" });\n\n\u002F\u002F TS Command nodes need { ends } to declare routing destinations\nbuilder.addNode(\"router\", routerFn, { ends: [\"node_b\", \"node_c\"] });\n",[10610],{"type":40,"tag":110,"props":10611,"children":10612},{"__ignoreMap":370},[10613,10621,10692,10699,10707],{"type":40,"tag":376,"props":10614,"children":10615},{"class":378,"line":379},[10616],{"type":40,"tag":376,"props":10617,"children":10618},{"style":652},[10619],{"type":45,"value":10620},"\u002F\u002F Always await graph.invoke() - it returns a Promise\n",{"type":40,"tag":376,"props":10622,"children":10623},{"class":378,"line":388},[10624,10628,10632,10636,10640,10644,10648,10652,10656,10660,10664,10668,10672,10676,10680,10684,10688],{"type":40,"tag":376,"props":10625,"children":10626},{"style":579},[10627],{"type":45,"value":582},{"type":40,"tag":376,"props":10629,"children":10630},{"style":472},[10631],{"type":45,"value":3432},{"type":40,"tag":376,"props":10633,"children":10634},{"style":466},[10635],{"type":45,"value":592},{"type":40,"tag":376,"props":10637,"children":10638},{"style":460},[10639],{"type":45,"value":3441},{"type":40,"tag":376,"props":10641,"children":10642},{"style":472},[10643],{"type":45,"value":3446},{"type":40,"tag":376,"props":10645,"children":10646},{"style":466},[10647],{"type":45,"value":635},{"type":40,"tag":376,"props":10649,"children":10650},{"style":600},[10651],{"type":45,"value":3455},{"type":40,"tag":376,"props":10653,"children":10654},{"style":472},[10655],{"type":45,"value":607},{"type":40,"tag":376,"props":10657,"children":10658},{"style":466},[10659],{"type":45,"value":3464},{"type":40,"tag":376,"props":10661,"children":10662},{"style":618},[10663],{"type":45,"value":3469},{"type":40,"tag":376,"props":10665,"children":10666},{"style":466},[10667],{"type":45,"value":626},{"type":40,"tag":376,"props":10669,"children":10670},{"style":466},[10671],{"type":45,"value":509},{"type":40,"tag":376,"props":10673,"children":10674},{"style":512},[10675],{"type":45,"value":9216},{"type":40,"tag":376,"props":10677,"children":10678},{"style":466},[10679],{"type":45,"value":520},{"type":40,"tag":376,"props":10681,"children":10682},{"style":466},[10683],{"type":45,"value":499},{"type":40,"tag":376,"props":10685,"children":10686},{"style":472},[10687],{"type":45,"value":816},{"type":40,"tag":376,"props":10689,"children":10690},{"style":466},[10691],{"type":45,"value":525},{"type":40,"tag":376,"props":10693,"children":10694},{"class":378,"line":397},[10695],{"type":40,"tag":376,"props":10696,"children":10697},{"emptyLinePlaceholder":401},[10698],{"type":45,"value":404},{"type":40,"tag":376,"props":10700,"children":10701},{"class":378,"line":407},[10702],{"type":40,"tag":376,"props":10703,"children":10704},{"style":652},[10705],{"type":45,"value":10706},"\u002F\u002F TS Command nodes need { ends } to declare routing destinations\n",{"type":40,"tag":376,"props":10708,"children":10709},{"class":378,"line":416},[10710,10714,10718,10722,10726,10730,10735,10739,10743,10748,10752,10756,10760,10764,10768,10772,10776,10780,10784,10788,10792,10796,10800,10804,10808],{"type":40,"tag":376,"props":10711,"children":10712},{"style":472},[10713],{"type":45,"value":10270},{"type":40,"tag":376,"props":10715,"children":10716},{"style":466},[10717],{"type":45,"value":635},{"type":40,"tag":376,"props":10719,"children":10720},{"style":600},[10721],{"type":45,"value":3210},{"type":40,"tag":376,"props":10723,"children":10724},{"style":472},[10725],{"type":45,"value":607},{"type":40,"tag":376,"props":10727,"children":10728},{"style":466},[10729],{"type":45,"value":520},{"type":40,"tag":376,"props":10731,"children":10732},{"style":512},[10733],{"type":45,"value":10734},"router",{"type":40,"tag":376,"props":10736,"children":10737},{"style":466},[10738],{"type":45,"value":520},{"type":40,"tag":376,"props":10740,"children":10741},{"style":466},[10742],{"type":45,"value":480},{"type":40,"tag":376,"props":10744,"children":10745},{"style":472},[10746],{"type":45,"value":10747}," routerFn",{"type":40,"tag":376,"props":10749,"children":10750},{"style":466},[10751],{"type":45,"value":480},{"type":40,"tag":376,"props":10753,"children":10754},{"style":466},[10755],{"type":45,"value":469},{"type":40,"tag":376,"props":10757,"children":10758},{"style":618},[10759],{"type":45,"value":5766},{"type":40,"tag":376,"props":10761,"children":10762},{"style":466},[10763],{"type":45,"value":626},{"type":40,"tag":376,"props":10765,"children":10766},{"style":472},[10767],{"type":45,"value":4684},{"type":40,"tag":376,"props":10769,"children":10770},{"style":466},[10771],{"type":45,"value":520},{"type":40,"tag":376,"props":10773,"children":10774},{"style":512},[10775],{"type":45,"value":5659},{"type":40,"tag":376,"props":10777,"children":10778},{"style":466},[10779],{"type":45,"value":520},{"type":40,"tag":376,"props":10781,"children":10782},{"style":466},[10783],{"type":45,"value":480},{"type":40,"tag":376,"props":10785,"children":10786},{"style":466},[10787],{"type":45,"value":509},{"type":40,"tag":376,"props":10789,"children":10790},{"style":512},[10791],{"type":45,"value":5568},{"type":40,"tag":376,"props":10793,"children":10794},{"style":466},[10795],{"type":45,"value":520},{"type":40,"tag":376,"props":10797,"children":10798},{"style":472},[10799],{"type":45,"value":5807},{"type":40,"tag":376,"props":10801,"children":10802},{"style":466},[10803],{"type":45,"value":866},{"type":40,"tag":376,"props":10805,"children":10806},{"style":472},[10807],{"type":45,"value":816},{"type":40,"tag":376,"props":10809,"children":10810},{"style":466},[10811],{"type":45,"value":525},{"type":40,"tag":10813,"props":10814,"children":10815},"boundaries",{},[10816,10818],{"type":45,"value":10817},"\n### What You Should NOT Do\n",{"type":40,"tag":48,"props":10819,"children":10820},{},[10821,10826,10831,10836],{"type":40,"tag":52,"props":10822,"children":10823},{},[10824],{"type":45,"value":10825},"Mutate state directly — always return partial update dicts from nodes",{"type":40,"tag":52,"props":10827,"children":10828},{},[10829],{"type":45,"value":10830},"Route back to START — it's entry-only; use a named node instead",{"type":40,"tag":52,"props":10832,"children":10833},{},[10834],{"type":45,"value":10835},"Forget reducers on list fields — without one, last write wins",{"type":40,"tag":52,"props":10837,"children":10838},{},[10839],{"type":45,"value":10840},"Mix static edges with Command goto without understanding both will execute\n\n",{"type":40,"tag":10842,"props":10843,"children":10844},"style",{},[10845],{"type":45,"value":10846},"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":10848,"total":11021},[10849,10869,10880,10897,10910,10925,10939,10954,10968,10978,10989,11008],{"slug":10850,"name":10850,"fn":10851,"description":10852,"org":10853,"tags":10854,"stars":10866,"repoUrl":10867,"updatedAt":10868},"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},[10855,10858,10861,10864],{"name":10856,"slug":10857,"type":16},"Marketing","marketing",{"name":10859,"slug":10860,"type":16},"Research","research",{"name":10862,"slug":10863,"type":16},"Sales","sales",{"name":9342,"slug":10865,"type":16},"strategy",26592,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fdeepagents","2026-04-18T04:46:54.557115",{"slug":10870,"name":10870,"fn":10871,"description":10872,"org":10873,"tags":10874,"stars":10866,"repoUrl":10867,"updatedAt":10879},"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},[10875,10876],{"name":10859,"slug":10860,"type":16},{"name":10877,"slug":10878,"type":16},"Search","search","2026-05-13T06:11:01.203061",{"slug":10881,"name":10881,"fn":10882,"description":10883,"org":10884,"tags":10885,"stars":10866,"repoUrl":10867,"updatedAt":10896},"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},[10886,10889,10890,10893],{"name":10887,"slug":10888,"type":16},"Content Creation","content-creation",{"name":10856,"slug":10857,"type":16},{"name":10891,"slug":10892,"type":16},"SEO","seo",{"name":10894,"slug":10895,"type":16},"Writing","writing","2026-04-15T05:00:54.149813",{"slug":10898,"name":10898,"fn":10899,"description":10900,"org":10901,"tags":10902,"stars":10866,"repoUrl":10867,"updatedAt":10909},"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},[10903,10906,10907,10908],{"name":10904,"slug":10905,"type":16},"Competitive Intelligence","competitive-intelligence",{"name":10856,"slug":10857,"type":16},{"name":10859,"slug":10860,"type":16},{"name":9342,"slug":10865,"type":16},"2026-04-18T04:46:55.79306",{"slug":10911,"name":10911,"fn":10912,"description":10913,"org":10914,"tags":10915,"stars":10866,"repoUrl":10867,"updatedAt":10924},"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},[10916,10917,10920,10921],{"name":22,"slug":23,"type":16},{"name":10918,"slug":10919,"type":16},"Debugging","debugging",{"name":9,"slug":8,"type":16},{"name":10922,"slug":10923,"type":16},"SQLite","sqlite","2026-07-24T06:08:57.102689",{"slug":10926,"name":10926,"fn":5,"description":10927,"org":10928,"tags":10929,"stars":10866,"repoUrl":10867,"updatedAt":10938},"langgraph-docs","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},[10930,10931,10934,10935],{"name":22,"slug":23,"type":16},{"name":10932,"slug":10933,"type":16},"Documentation","documentation",{"name":19,"slug":20,"type":16},{"name":10936,"slug":10937,"type":16},"Multi-Agent","multi-agent","2026-05-13T06:11:03.650877",{"slug":10940,"name":10940,"fn":10941,"description":10942,"org":10943,"tags":10944,"stars":10866,"repoUrl":10867,"updatedAt":10953},"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},[10945,10946,10947,10950],{"name":22,"slug":23,"type":16},{"name":10932,"slug":10933,"type":16},{"name":10948,"slug":10949,"type":16},"Knowledge Management","knowledge-management",{"name":10951,"slug":10952,"type":16},"Memory","memory","2026-05-13T06:10:58.510037",{"slug":10955,"name":10955,"fn":10956,"description":10957,"org":10958,"tags":10959,"stars":10866,"repoUrl":10867,"updatedAt":10967},"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},[10960,10961,10964],{"name":22,"slug":23,"type":16},{"name":10962,"slug":10963,"type":16},"Engineering","engineering",{"name":10965,"slug":10966,"type":16},"Plugin Development","plugin-development","2026-05-13T06:10:59.88449",{"slug":10969,"name":10969,"fn":10970,"description":10971,"org":10972,"tags":10973,"stars":10866,"repoUrl":10867,"updatedAt":10977},"social-media","create optimized social media posts","Create social media posts optimized for engagement across platforms.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[10974,10975,10976],{"name":10887,"slug":10888,"type":16},{"name":10856,"slug":10857,"type":16},{"name":10894,"slug":10895,"type":16},"2026-04-15T05:00:55.37452",{"slug":10979,"name":10979,"fn":10980,"description":10981,"org":10982,"tags":10983,"stars":10866,"repoUrl":10867,"updatedAt":10988},"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},[10984,10985,10986,10987],{"name":22,"slug":23,"type":16},{"name":10936,"slug":10937,"type":16},{"name":10859,"slug":10860,"type":16},{"name":10877,"slug":10878,"type":16},"2026-05-13T06:11:04.930044",{"slug":10990,"name":10990,"fn":10991,"description":10992,"org":10993,"tags":10994,"stars":11005,"repoUrl":11006,"updatedAt":11007},"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},[10995,10998,10999,11002],{"name":10996,"slug":10997,"type":16},"Diagrams","diagrams",{"name":10932,"slug":10933,"type":16},{"name":11000,"slug":11001,"type":16},"Markdown","markdown",{"name":11003,"slug":11004,"type":16},"Technical Writing","technical-writing",12181,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fopenwiki","2026-07-24T06:09:01.089597",{"slug":11009,"name":11009,"fn":11010,"description":11011,"org":11012,"tags":11013,"stars":11005,"repoUrl":11006,"updatedAt":11020},"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},[11014,11017],{"name":11015,"slug":11016,"type":16},"API Development","api-development",{"name":11018,"slug":11019,"type":16},"Integrations","integrations","2026-07-18T05:48:23.961804",41,{"items":11023,"total":2622},[11024,11037,11050,11066,11076,11086,11100],{"slug":11025,"name":11025,"fn":11026,"description":11027,"org":11028,"tags":11029,"stars":24,"repoUrl":25,"updatedAt":11036},"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},[11030,11031,11034,11035],{"name":22,"slug":23,"type":16},{"name":11032,"slug":11033,"type":16},"Architecture","architecture",{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:26:24.822592",{"slug":11038,"name":11038,"fn":11039,"description":11040,"org":11041,"tags":11042,"stars":24,"repoUrl":25,"updatedAt":11049},"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},[11043,11044,11045,11046],{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"name":10951,"slug":10952,"type":16},{"name":11047,"slug":11048,"type":16},"Storage","storage","2026-04-06T18:26:26.065654",{"slug":11051,"name":11051,"fn":11052,"description":11053,"org":11054,"tags":11055,"stars":24,"repoUrl":25,"updatedAt":11065},"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},[11056,11057,11060,11061,11062],{"name":22,"slug":23,"type":16},{"name":11058,"slug":11059,"type":16},"Approvals","approvals",{"name":9,"slug":8,"type":16},{"name":10936,"slug":10937,"type":16},{"name":11063,"slug":11064,"type":16},"Workflow Automation","workflow-automation","2026-04-06T18:26:32.280463",{"slug":11067,"name":11067,"fn":11068,"description":11069,"org":11070,"tags":11071,"stars":24,"repoUrl":25,"updatedAt":11075},"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},[11072,11073,11074],{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"name":6111,"slug":360,"type":16},"2026-07-24T06:09:00.291108",{"slug":11077,"name":11077,"fn":11078,"description":11079,"org":11080,"tags":11081,"stars":24,"repoUrl":25,"updatedAt":11085},"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},[11082,11083,11084],{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"name":6129,"slug":442,"type":16},"2026-07-24T06:09:00.673714",{"slug":11087,"name":11087,"fn":11088,"description":11089,"org":11090,"tags":11091,"stars":24,"repoUrl":25,"updatedAt":11099},"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},[11092,11093,11096,11097,11098],{"name":22,"slug":23,"type":16},{"name":11094,"slug":11095,"type":16},"AI Infrastructure","ai-infrastructure",{"name":11032,"slug":11033,"type":16},{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"2026-07-24T05:42:48.348966",{"slug":11101,"name":11101,"fn":11102,"description":11103,"org":11104,"tags":11105,"stars":24,"repoUrl":25,"updatedAt":11117},"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},[11106,11107,11110,11113,11114],{"name":22,"slug":23,"type":16},{"name":11108,"slug":11109,"type":16},"Code Analysis","code-analysis",{"name":11111,"slug":11112,"type":16},"Evals","evals",{"name":9,"slug":8,"type":16},{"name":11115,"slug":11116,"type":16},"Testing","testing","2026-07-31T05:53:29.552458"]