[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-langchain-deep-agents-orchestration":3,"mdc--2rq92h-key":37,"related-repo-langchain-deep-agents-orchestration":4565,"related-org-langchain-deep-agents-orchestration":4661},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":35,"mdContent":36},"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},"langchain","LangChain","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Flangchain.png","langchain-ai",[13,15,18,21,24],{"name":9,"slug":8,"type":14},"tag",{"name":16,"slug":17,"type":14},"Agents","agents",{"name":19,"slug":20,"type":14},"Approvals","approvals",{"name":22,"slug":23,"type":14},"Multi-Agent","multi-agent",{"name":25,"slug":26,"type":14},"Workflow Automation","workflow-automation",877,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills","2026-04-06T18:26:32.280463",null,77,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":30},[],"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain-skills\u002Ftree\u002FHEAD\u002Fconfig\u002Fskills\u002Fdeep-agents-orchestration","---\nname: deep-agents-orchestration\ndescription: \"INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.\"\n---\n\n\u003Coverview>\nDeep Agents include three orchestration capabilities:\n\n1. **SubAgentMiddleware**: Delegate work via `task` tool to specialized agents\n2. **TodoListMiddleware**: Plan and track tasks via `write_todos` tool\n3. **HumanInTheLoopMiddleware**: Require approval before sensitive operations\n\nAll three are automatically included in `create_deep_agent()`.\n\u003C\u002Foverview>\n\n---\n\n## Subagents (Task Delegation)\n\n\u003Cwhen-to-use-subagents>\n\n| Use Subagents When | Use Main Agent When |\n|-------------------|-------------------|\n| Task needs specialized tools | General-purpose tools sufficient |\n| Want to isolate complex work | Single-step operation |\n| Need clean context for main agent | Context bloat acceptable |\n\n\u003C\u002Fwhen-to-use-subagents>\n\n\u003Chow-subagents-work>\nMain agent has `task` tool -> creates fresh subagent -> subagent executes autonomously -> returns final report.\n\n**Default subagent**: \"general-purpose\" - automatically available with same tools\u002Fconfig as main agent.\n\u003C\u002Fhow-subagents-work>\n\n\u003Cex-custom-subagents>\n\u003Cpython>\nCreate a custom \"researcher\" subagent with specialized tools for academic paper search.\n\n```python\nfrom deepagents import create_deep_agent\nfrom langchain.tools import tool\n\n@tool\ndef search_papers(query: str) -> str:\n    \"\"\"Search academic papers.\"\"\"\n    return f\"Found 10 papers about {query}\"\n\nagent = create_deep_agent(\n    subagents=[\n        {\n            \"name\": \"researcher\",\n            \"description\": \"Conduct web research and compile findings\",\n            \"system_prompt\": \"Search thoroughly, return concise summary\",\n            \"tools\": [search_papers],\n        }\n    ]\n)\n\n# Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nCreate a custom \"researcher\" subagent with specialized tools for academic paper search.\n\n```typescript\nimport { createDeepAgent } from \"deepagents\";\nimport { tool } from \"@langchain\u002Fcore\u002Ftools\";\nimport { z } from \"zod\";\n\nconst searchPapers = tool(\n  async ({ query }) => `Found 10 papers about ${query}`,\n  { name: \"search_papers\", description: \"Search papers\", schema: z.object({ query: z.string() }) }\n);\n\nconst agent = await createDeepAgent({\n  subagents: [\n    {\n      name: \"researcher\",\n      description: \"Conduct web research and compile findings\",\n      systemPrompt: \"Search thoroughly, return concise summary\",\n      tools: [searchPapers],\n    }\n  ]\n});\n\n\u002F\u002F Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-custom-subagents>\n\n\u003Cex-subagent-with-hitl>\n\u003Cpython>\nConfigure a subagent with HITL approval for sensitive operations.\n\n```python\nfrom deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    subagents=[\n        {\n            \"name\": \"code-deployer\",\n            \"description\": \"Deploy code to production\",\n            \"system_prompt\": \"You deploy code after tests pass.\",\n            \"tools\": [run_tests, deploy_to_prod],\n            \"interrupt_on\": {\"deploy_to_prod\": True},  # Require approval\n        }\n    ],\n    checkpointer=MemorySaver()  # Required for interrupts\n)\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-subagent-with-hitl>\n\n\u003Cfix-subagents-are-stateless>\n\u003Cpython>\nSubagents are stateless - provide complete instructions in a single call.\n\n```python\n# WRONG: Subagents don't remember previous calls\n# task(agent='research', instruction='Find data')\n# task(agent='research', instruction='What did you find?')  # Starts fresh!\n\n# CORRECT: Complete instructions upfront\n# task(agent='research', instruction='Find data on AI, save to \u002Fresearch\u002F, return summary')\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nSubagents are stateless - provide complete instructions in a single call.\n\n```typescript\n\u002F\u002F WRONG: Subagents don't remember previous calls\n\u002F\u002F task research: Find data\n\u002F\u002F task research: What did you find?  \u002F\u002F Starts fresh!\n\n\u002F\u002F CORRECT: Complete instructions upfront\n\u002F\u002F task research: Find data on AI, save to \u002Fresearch\u002F, return summary\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-subagents-are-stateless>\n\n\u003Cfix-custom-subagents-dont-inherit-skills>\n\u003Cpython>\nCustom subagents don't inherit skills from the main agent.\n\n```python\n# WRONG: Custom subagent won't have main agent's skills\nagent = create_deep_agent(\n    skills=[\"\u002Fmain-skills\u002F\"],\n    subagents=[{\"name\": \"helper\", ...}]  # No skills inherited\n)\n\n# CORRECT: Provide skills explicitly (general-purpose subagent DOES inherit)\nagent = create_deep_agent(\n    skills=[\"\u002Fmain-skills\u002F\"],\n    subagents=[{\"name\": \"helper\", \"skills\": [\"\u002Fhelper-skills\u002F\"], ...}]\n)\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-custom-subagents-dont-inherit-skills>\n\n---\n\n## TodoList (Task Planning)\n\n\u003Cwhen-to-use-todolist>\n\n| Use TodoList When | Skip TodoList When |\n|------------------|-------------------|\n| Complex multi-step tasks | Simple single-action tasks |\n| Long-running operations | Quick operations (\u003C 3 steps) |\n\n\u003C\u002Fwhen-to-use-todolist>\n\n\u003Ctodolist-tool>\n\n```\nwrite_todos(todos: list[dict]) -> None\n```\n\nEach todo item has:\n- `content`: Description of the task\n- `status`: One of `\"pending\"`, `\"in_progress\"`, `\"completed\"`\n\u003C\u002Ftodolist-tool>\n\n\u003Cex-todolist-usage>\n\u003Cpython>\nInvoke an agent that automatically creates a todo list for a multi-step task.\n\n```python\nfrom deepagents import create_deep_agent\n\nagent = create_deep_agent()  # TodoListMiddleware included by default\n\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Create a REST API: design models, implement CRUD, add auth, write tests\"}]\n}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n\n# Agent's planning via write_todos:\n# [\n#   {\"content\": \"Design data models\", \"status\": \"in_progress\"},\n#   {\"content\": \"Implement CRUD endpoints\", \"status\": \"pending\"},\n#   {\"content\": \"Add authentication\", \"status\": \"pending\"},\n#   {\"content\": \"Write tests\", \"status\": \"pending\"}\n# ]\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nInvoke an agent that automatically creates a todo list for a multi-step task.\n\n```typescript\nimport { createDeepAgent } from \"deepagents\";\n\nconst agent = await createDeepAgent();  \u002F\u002F TodoListMiddleware included\n\nconst result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Create a REST API: design models, implement CRUD, add auth, write tests\" }]\n}, { configurable: { thread_id: \"session-1\" } });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-todolist-usage>\n\n\u003Cex-access-todo-state>\n\u003Cpython>\nAccess the todo list from the agent's final state after invocation.\n\n```python\nresult = agent.invoke({...}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n\n# Access todo list from final state\ntodos = result.get(\"todos\", [])\nfor todo in todos:\n    print(f\"[{todo['status']}] {todo['content']}\")\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-access-todo-state>\n\n\u003Cfix-todolist-requires-thread-id>\n\u003Cpython>\nTodo list state requires a thread_id for persistence across invocations.\n\n```python\n# WRONG: Fresh state each time without thread_id\nagent.invoke({\"messages\": [...]})\n\n# CORRECT: Use thread_id\nconfig = {\"configurable\": {\"thread_id\": \"user-session\"}}\nagent.invoke({\"messages\": [...]}, config=config)  # Todos preserved\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-todolist-requires-thread-id>\n\n---\n\n## Human-in-the-Loop (Approval Workflows)\n\n\u003Cwhen-to-use-hitl>\n\n| Use HITL When | Skip HITL When |\n|--------------|---------------|\n| High-stakes operations (DB writes, deployments) | Read-only operations |\n| Compliance requires human oversight | Fully automated workflows |\n\n\u003C\u002Fwhen-to-use-hitl>\n\n\u003Cex-hitl-setup>\n\u003Cpython>\nConfigure which tools require human approval before execution.\n\n```python\nfrom deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    interrupt_on={\n        \"write_file\": True,  # All decisions allowed\n        \"execute_sql\": {\"allowed_decisions\": [\"approve\", \"reject\"]},\n        \"read_file\": False,  # No interrupts\n    },\n    checkpointer=MemorySaver()  # REQUIRED for interrupts\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nConfigure which tools require human approval before execution.\n\n```typescript\nimport { createDeepAgent } from \"deepagents\";\nimport { MemorySaver } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  interruptOn: {\n    write_file: true,\n    execute_sql: { allowedDecisions: [\"approve\", \"reject\"] },\n    read_file: false,\n  },\n  checkpointer: new MemorySaver()  \u002F\u002F REQUIRED\n});\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-hitl-setup>\n\n\u003Cex-approval-workflow>\n\u003Cpython>\nComplete workflow: trigger an interrupt, check state, approve action, and resume execution.\n\n```python\nfrom deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\nfrom langgraph.types import Command\n\nagent = create_deep_agent(\n    interrupt_on={\"write_file\": True},\n    checkpointer=MemorySaver()\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\n# Step 1: Agent proposes write_file - execution pauses\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write config to \u002Fprod.yaml\"}]\n}, config=config)\n\n# Step 2: Check for interrupts\nstate = agent.get_state(config)\nif state.next:\n    print(f\"Pending action\")\n\n# Step 3: Approve and resume\nresult = agent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nComplete workflow: trigger an interrupt, check state, approve action, and resume execution.\n\n```typescript\nimport { createDeepAgent } from \"deepagents\";\nimport { MemorySaver, Command } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  interruptOn: { write_file: true },\n  checkpointer: new MemorySaver()\n});\n\nconst config = { configurable: { thread_id: \"session-1\" } };\n\n\u002F\u002F Step 1: Agent proposes write_file - execution pauses\nlet result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Write config to \u002Fprod.yaml\" }]\n}, config);\n\n\u002F\u002F Step 2: Check for interrupts\nconst state = await agent.getState(config);\nif (state.next) {\n  console.log(\"Pending action\");\n}\n\n\u002F\u002F Step 3: Approve and resume\nresult = await agent.invoke(\n  new Command({ resume: { decisions: [{ type: \"approve\" }] } }), config\n);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-approval-workflow>\n\n\u003Cex-reject-with-feedback>\n\u003Cpython>\nReject a pending action with feedback, prompting the agent to try a different approach.\n\n```python\nresult = agent.invoke(\n    Command(resume={\"decisions\": [{\"type\": \"reject\", \"message\": \"Run tests first\"}]}),\n    config=config,\n)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nReject a pending action with feedback, prompting the agent to try a different approach.\n\n```typescript\nconst result = await agent.invoke(\n  new Command({ resume: { decisions: [{ type: \"reject\", message: \"Run tests first\" }] } }),\n  config,\n);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-reject-with-feedback>\n\n\u003Cex-edit-before-execution>\n\u003Cpython>\nEdit the proposed action arguments before allowing execution.\n\n```python\nresult = agent.invoke(\n    Command(resume={\"decisions\": [{\n        \"type\": \"edit\",\n        \"edited_action\": {\n            \"name\": \"execute_sql\",\n            \"args\": {\"query\": \"DELETE FROM users WHERE last_login \u003C '2020-01-01' LIMIT 100\"},\n        },\n    }]}),\n    config=config,\n)\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-edit-before-execution>\n\n\u003Cboundaries>\n### What Agents CAN Configure\n\n- Subagent names, tools, models, system prompts\n- Which tools require approval\n- Allowed decision types per tool\n- TodoList content and structure\n\n### What Agents CANNOT Configure\n\n- Tool names (`task`, `write_todos`)\n- HITL protocol (approve\u002Fedit\u002Freject structure)\n- Skip checkpointer requirement for interrupts\n- Make subagents stateful (they're ephemeral)\n\u003C\u002Fboundaries>\n\n\u003Cfix-checkpointer-required>\n\u003Cpython>\nCheckpointer is required when using interrupt_on for HITL workflows.\n\n```python\n# WRONG\nagent = create_deep_agent(interrupt_on={\"write_file\": True})\n\n# CORRECT\nagent = create_deep_agent(interrupt_on={\"write_file\": True}, checkpointer=MemorySaver())\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nCheckpointer is required when using interruptOn for HITL workflows.\n\n```typescript\n\u002F\u002F WRONG\nconst agent = await createDeepAgent({ interruptOn: { write_file: true } });\n\n\u002F\u002F CORRECT\nconst agent = await createDeepAgent({ interruptOn: { write_file: true }, checkpointer: new MemorySaver() });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-checkpointer-required>\n\n\u003Cfix-thread-id-required-for-resumption>\n\u003Cpython>\nA consistent thread_id is required to resume interrupted workflows.\n\n```python\n# WRONG: Can't resume without thread_id\nagent.invoke({\"messages\": [...]})\n\n# CORRECT\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\nagent.invoke({...}, config=config)\n# Resume with Command using same config\nagent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nA consistent thread_id is required to resume interrupted workflows.\n\n```typescript\n\u002F\u002F WRONG: Can't resume without thread_id\nawait agent.invoke({ messages: [...] });\n\n\u002F\u002F CORRECT\nconst config = { configurable: { thread_id: \"session-1\" } };\nawait agent.invoke({ messages: [...] }, config);\n\u002F\u002F Resume with Command using same config\nawait agent.invoke(new Command({ resume: { decisions: [{ type: \"approve\" }] } }), config);\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-thread-id-required-for-resumption>\n\n\u003Cfix-interrupt-checks-between-invocations>\n\u003Cpython>\nInterrupts happen BETWEEN invoke() calls, not mid-execution.\n\n```python\nresult = agent.invoke({...}, config=config)       # Step 1: triggers interrupt\nif \"__interrupt__\" in result:                      # Step 2: check for interrupt\n    result = agent.invoke(                         # Step 3: resume\n        Command(resume={\"decisions\": [{\"type\": \"approve\"}]}),\n        config=config,\n    )\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-interrupt-checks-between-invocations>\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,4559],{"type":43,"tag":44,"props":45,"children":46},"element","overview",{},[47,50,103,117,121,128,199],{"type":48,"value":49},"text","\nDeep Agents include three orchestration capabilities:\n",{"type":43,"tag":51,"props":52,"children":53},"ol",{},[54,75,93],{"type":43,"tag":55,"props":56,"children":57},"li",{},[58,64,66,73],{"type":43,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":48,"value":63},"SubAgentMiddleware",{"type":48,"value":65},": Delegate work via ",{"type":43,"tag":67,"props":68,"children":70},"code",{"className":69},[],[71],{"type":48,"value":72},"task",{"type":48,"value":74}," tool to specialized agents",{"type":43,"tag":55,"props":76,"children":77},{},[78,83,85,91],{"type":43,"tag":59,"props":79,"children":80},{},[81],{"type":48,"value":82},"TodoListMiddleware",{"type":48,"value":84},": Plan and track tasks via ",{"type":43,"tag":67,"props":86,"children":88},{"className":87},[],[89],{"type":48,"value":90},"write_todos",{"type":48,"value":92}," tool",{"type":43,"tag":55,"props":94,"children":95},{},[96,101],{"type":43,"tag":59,"props":97,"children":98},{},[99],{"type":48,"value":100},"HumanInTheLoopMiddleware",{"type":48,"value":102},": Require approval before sensitive operations",{"type":43,"tag":104,"props":105,"children":106},"p",{},[107,109,115],{"type":48,"value":108},"All three are automatically included in ",{"type":43,"tag":67,"props":110,"children":112},{"className":111},[],[113],{"type":48,"value":114},"create_deep_agent()",{"type":48,"value":116},".\n",{"type":43,"tag":118,"props":119,"children":120},"hr",{},[],{"type":43,"tag":122,"props":123,"children":125},"h2",{"id":124},"subagents-task-delegation",[126],{"type":48,"value":127},"Subagents (Task Delegation)",{"type":43,"tag":129,"props":130,"children":131},"when-to-use-subagents",{},[132],{"type":43,"tag":133,"props":134,"children":135},"table",{},[136,155],{"type":43,"tag":137,"props":138,"children":139},"thead",{},[140],{"type":43,"tag":141,"props":142,"children":143},"tr",{},[144,150],{"type":43,"tag":145,"props":146,"children":147},"th",{},[148],{"type":48,"value":149},"Use Subagents When",{"type":43,"tag":145,"props":151,"children":152},{},[153],{"type":48,"value":154},"Use Main Agent When",{"type":43,"tag":156,"props":157,"children":158},"tbody",{},[159,173,186],{"type":43,"tag":141,"props":160,"children":161},{},[162,168],{"type":43,"tag":163,"props":164,"children":165},"td",{},[166],{"type":48,"value":167},"Task needs specialized tools",{"type":43,"tag":163,"props":169,"children":170},{},[171],{"type":48,"value":172},"General-purpose tools sufficient",{"type":43,"tag":141,"props":174,"children":175},{},[176,181],{"type":43,"tag":163,"props":177,"children":178},{},[179],{"type":48,"value":180},"Want to isolate complex work",{"type":43,"tag":163,"props":182,"children":183},{},[184],{"type":48,"value":185},"Single-step operation",{"type":43,"tag":141,"props":187,"children":188},{},[189,194],{"type":43,"tag":163,"props":190,"children":191},{},[192],{"type":48,"value":193},"Need clean context for main agent",{"type":43,"tag":163,"props":195,"children":196},{},[197],{"type":48,"value":198},"Context bloat acceptable",{"type":43,"tag":200,"props":201,"children":202},"how-subagents-work",{},[203,205,215,1028,1157,1283,1381,1384,1390,1442],{"type":48,"value":204},"\nMain agent has `task` tool -> creates fresh subagent -> subagent executes autonomously -> returns final report.\n",{"type":43,"tag":104,"props":206,"children":207},{},[208,213],{"type":43,"tag":59,"props":209,"children":210},{},[211],{"type":48,"value":212},"Default subagent",{"type":48,"value":214},": \"general-purpose\" - automatically available with same tools\u002Fconfig as main agent.\n",{"type":43,"tag":216,"props":217,"children":218},"ex-custom-subagents",{},[219,416],{"type":43,"tag":220,"props":221,"children":222},"python",{},[223,225],{"type":48,"value":224},"\nCreate a custom \"researcher\" subagent with specialized tools for academic paper search.\n",{"type":43,"tag":226,"props":227,"children":231},"pre",{"className":228,"code":229,"language":220,"meta":230,"style":230},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from deepagents import create_deep_agent\nfrom langchain.tools import tool\n\n@tool\ndef search_papers(query: str) -> str:\n    \"\"\"Search academic papers.\"\"\"\n    return f\"Found 10 papers about {query}\"\n\nagent = create_deep_agent(\n    subagents=[\n        {\n            \"name\": \"researcher\",\n            \"description\": \"Conduct web research and compile findings\",\n            \"system_prompt\": \"Search thoroughly, return concise summary\",\n            \"tools\": [search_papers],\n        }\n    ]\n)\n\n# Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n","",[232],{"type":43,"tag":67,"props":233,"children":234},{"__ignoreMap":230},[235,246,255,265,274,283,292,301,309,318,327,336,345,354,363,372,381,390,399,407],{"type":43,"tag":236,"props":237,"children":240},"span",{"class":238,"line":239},"line",1,[241],{"type":43,"tag":236,"props":242,"children":243},{},[244],{"type":48,"value":245},"from deepagents import create_deep_agent\n",{"type":43,"tag":236,"props":247,"children":249},{"class":238,"line":248},2,[250],{"type":43,"tag":236,"props":251,"children":252},{},[253],{"type":48,"value":254},"from langchain.tools import tool\n",{"type":43,"tag":236,"props":256,"children":258},{"class":238,"line":257},3,[259],{"type":43,"tag":236,"props":260,"children":262},{"emptyLinePlaceholder":261},true,[263],{"type":48,"value":264},"\n",{"type":43,"tag":236,"props":266,"children":268},{"class":238,"line":267},4,[269],{"type":43,"tag":236,"props":270,"children":271},{},[272],{"type":48,"value":273},"@tool\n",{"type":43,"tag":236,"props":275,"children":277},{"class":238,"line":276},5,[278],{"type":43,"tag":236,"props":279,"children":280},{},[281],{"type":48,"value":282},"def search_papers(query: str) -> str:\n",{"type":43,"tag":236,"props":284,"children":286},{"class":238,"line":285},6,[287],{"type":43,"tag":236,"props":288,"children":289},{},[290],{"type":48,"value":291},"    \"\"\"Search academic papers.\"\"\"\n",{"type":43,"tag":236,"props":293,"children":295},{"class":238,"line":294},7,[296],{"type":43,"tag":236,"props":297,"children":298},{},[299],{"type":48,"value":300},"    return f\"Found 10 papers about {query}\"\n",{"type":43,"tag":236,"props":302,"children":304},{"class":238,"line":303},8,[305],{"type":43,"tag":236,"props":306,"children":307},{"emptyLinePlaceholder":261},[308],{"type":48,"value":264},{"type":43,"tag":236,"props":310,"children":312},{"class":238,"line":311},9,[313],{"type":43,"tag":236,"props":314,"children":315},{},[316],{"type":48,"value":317},"agent = create_deep_agent(\n",{"type":43,"tag":236,"props":319,"children":321},{"class":238,"line":320},10,[322],{"type":43,"tag":236,"props":323,"children":324},{},[325],{"type":48,"value":326},"    subagents=[\n",{"type":43,"tag":236,"props":328,"children":330},{"class":238,"line":329},11,[331],{"type":43,"tag":236,"props":332,"children":333},{},[334],{"type":48,"value":335},"        {\n",{"type":43,"tag":236,"props":337,"children":339},{"class":238,"line":338},12,[340],{"type":43,"tag":236,"props":341,"children":342},{},[343],{"type":48,"value":344},"            \"name\": \"researcher\",\n",{"type":43,"tag":236,"props":346,"children":348},{"class":238,"line":347},13,[349],{"type":43,"tag":236,"props":350,"children":351},{},[352],{"type":48,"value":353},"            \"description\": \"Conduct web research and compile findings\",\n",{"type":43,"tag":236,"props":355,"children":357},{"class":238,"line":356},14,[358],{"type":43,"tag":236,"props":359,"children":360},{},[361],{"type":48,"value":362},"            \"system_prompt\": \"Search thoroughly, return concise summary\",\n",{"type":43,"tag":236,"props":364,"children":366},{"class":238,"line":365},15,[367],{"type":43,"tag":236,"props":368,"children":369},{},[370],{"type":48,"value":371},"            \"tools\": [search_papers],\n",{"type":43,"tag":236,"props":373,"children":375},{"class":238,"line":374},16,[376],{"type":43,"tag":236,"props":377,"children":378},{},[379],{"type":48,"value":380},"        }\n",{"type":43,"tag":236,"props":382,"children":384},{"class":238,"line":383},17,[385],{"type":43,"tag":236,"props":386,"children":387},{},[388],{"type":48,"value":389},"    ]\n",{"type":43,"tag":236,"props":391,"children":393},{"class":238,"line":392},18,[394],{"type":43,"tag":236,"props":395,"children":396},{},[397],{"type":48,"value":398},")\n",{"type":43,"tag":236,"props":400,"children":402},{"class":238,"line":401},19,[403],{"type":43,"tag":236,"props":404,"children":405},{"emptyLinePlaceholder":261},[406],{"type":48,"value":264},{"type":43,"tag":236,"props":408,"children":410},{"class":238,"line":409},20,[411],{"type":43,"tag":236,"props":412,"children":413},{},[414],{"type":48,"value":415},"# Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n",{"type":43,"tag":417,"props":418,"children":419},"typescript",{},[420,421],{"type":48,"value":224},{"type":43,"tag":226,"props":422,"children":425},{"className":423,"code":424,"language":417,"meta":230,"style":230},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createDeepAgent } from \"deepagents\";\nimport { tool } from \"@langchain\u002Fcore\u002Ftools\";\nimport { z } from \"zod\";\n\nconst searchPapers = tool(\n  async ({ query }) => `Found 10 papers about ${query}`,\n  { name: \"search_papers\", description: \"Search papers\", schema: z.object({ query: z.string() }) }\n);\n\nconst agent = await createDeepAgent({\n  subagents: [\n    {\n      name: \"researcher\",\n      description: \"Conduct web research and compile findings\",\n      systemPrompt: \"Search thoroughly, return concise summary\",\n      tools: [searchPapers],\n    }\n  ]\n});\n\n\u002F\u002F Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n",[426],{"type":43,"tag":67,"props":427,"children":428},{"__ignoreMap":230},[429,481,521,562,569,598,657,794,806,813,847,864,872,901,930,959,980,988,996,1011,1018],{"type":43,"tag":236,"props":430,"children":431},{"class":238,"line":239},[432,438,444,450,455,460,465,471,476],{"type":43,"tag":236,"props":433,"children":435},{"style":434},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[436],{"type":48,"value":437},"import",{"type":43,"tag":236,"props":439,"children":441},{"style":440},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[442],{"type":48,"value":443}," {",{"type":43,"tag":236,"props":445,"children":447},{"style":446},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[448],{"type":48,"value":449}," createDeepAgent",{"type":43,"tag":236,"props":451,"children":452},{"style":440},[453],{"type":48,"value":454}," }",{"type":43,"tag":236,"props":456,"children":457},{"style":434},[458],{"type":48,"value":459}," from",{"type":43,"tag":236,"props":461,"children":462},{"style":440},[463],{"type":48,"value":464}," \"",{"type":43,"tag":236,"props":466,"children":468},{"style":467},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[469],{"type":48,"value":470},"deepagents",{"type":43,"tag":236,"props":472,"children":473},{"style":440},[474],{"type":48,"value":475},"\"",{"type":43,"tag":236,"props":477,"children":478},{"style":440},[479],{"type":48,"value":480},";\n",{"type":43,"tag":236,"props":482,"children":483},{"class":238,"line":248},[484,488,492,496,500,504,508,513,517],{"type":43,"tag":236,"props":485,"children":486},{"style":434},[487],{"type":48,"value":437},{"type":43,"tag":236,"props":489,"children":490},{"style":440},[491],{"type":48,"value":443},{"type":43,"tag":236,"props":493,"children":494},{"style":446},[495],{"type":48,"value":92},{"type":43,"tag":236,"props":497,"children":498},{"style":440},[499],{"type":48,"value":454},{"type":43,"tag":236,"props":501,"children":502},{"style":434},[503],{"type":48,"value":459},{"type":43,"tag":236,"props":505,"children":506},{"style":440},[507],{"type":48,"value":464},{"type":43,"tag":236,"props":509,"children":510},{"style":467},[511],{"type":48,"value":512},"@langchain\u002Fcore\u002Ftools",{"type":43,"tag":236,"props":514,"children":515},{"style":440},[516],{"type":48,"value":475},{"type":43,"tag":236,"props":518,"children":519},{"style":440},[520],{"type":48,"value":480},{"type":43,"tag":236,"props":522,"children":523},{"class":238,"line":257},[524,528,532,537,541,545,549,554,558],{"type":43,"tag":236,"props":525,"children":526},{"style":434},[527],{"type":48,"value":437},{"type":43,"tag":236,"props":529,"children":530},{"style":440},[531],{"type":48,"value":443},{"type":43,"tag":236,"props":533,"children":534},{"style":446},[535],{"type":48,"value":536}," z",{"type":43,"tag":236,"props":538,"children":539},{"style":440},[540],{"type":48,"value":454},{"type":43,"tag":236,"props":542,"children":543},{"style":434},[544],{"type":48,"value":459},{"type":43,"tag":236,"props":546,"children":547},{"style":440},[548],{"type":48,"value":464},{"type":43,"tag":236,"props":550,"children":551},{"style":467},[552],{"type":48,"value":553},"zod",{"type":43,"tag":236,"props":555,"children":556},{"style":440},[557],{"type":48,"value":475},{"type":43,"tag":236,"props":559,"children":560},{"style":440},[561],{"type":48,"value":480},{"type":43,"tag":236,"props":563,"children":564},{"class":238,"line":267},[565],{"type":43,"tag":236,"props":566,"children":567},{"emptyLinePlaceholder":261},[568],{"type":48,"value":264},{"type":43,"tag":236,"props":570,"children":571},{"class":238,"line":276},[572,578,583,588,593],{"type":43,"tag":236,"props":573,"children":575},{"style":574},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[576],{"type":48,"value":577},"const",{"type":43,"tag":236,"props":579,"children":580},{"style":446},[581],{"type":48,"value":582}," searchPapers ",{"type":43,"tag":236,"props":584,"children":585},{"style":440},[586],{"type":48,"value":587},"=",{"type":43,"tag":236,"props":589,"children":591},{"style":590},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[592],{"type":48,"value":92},{"type":43,"tag":236,"props":594,"children":595},{"style":446},[596],{"type":48,"value":597},"(\n",{"type":43,"tag":236,"props":599,"children":600},{"class":238,"line":285},[601,606,611,617,622,627,632,637,642,647,652],{"type":43,"tag":236,"props":602,"children":603},{"style":574},[604],{"type":48,"value":605},"  async",{"type":43,"tag":236,"props":607,"children":608},{"style":440},[609],{"type":48,"value":610}," ({",{"type":43,"tag":236,"props":612,"children":614},{"style":613},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[615],{"type":48,"value":616}," query",{"type":43,"tag":236,"props":618,"children":619},{"style":440},[620],{"type":48,"value":621}," })",{"type":43,"tag":236,"props":623,"children":624},{"style":574},[625],{"type":48,"value":626}," =>",{"type":43,"tag":236,"props":628,"children":629},{"style":440},[630],{"type":48,"value":631}," `",{"type":43,"tag":236,"props":633,"children":634},{"style":467},[635],{"type":48,"value":636},"Found 10 papers about ",{"type":43,"tag":236,"props":638,"children":639},{"style":440},[640],{"type":48,"value":641},"${",{"type":43,"tag":236,"props":643,"children":644},{"style":446},[645],{"type":48,"value":646},"query",{"type":43,"tag":236,"props":648,"children":649},{"style":440},[650],{"type":48,"value":651},"}`",{"type":43,"tag":236,"props":653,"children":654},{"style":440},[655],{"type":48,"value":656},",\n",{"type":43,"tag":236,"props":658,"children":659},{"class":238,"line":294},[660,665,671,676,680,685,689,694,699,703,707,712,716,720,725,729,733,738,743,748,753,757,761,765,769,774,779,784,789],{"type":43,"tag":236,"props":661,"children":662},{"style":440},[663],{"type":48,"value":664},"  {",{"type":43,"tag":236,"props":666,"children":668},{"style":667},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[669],{"type":48,"value":670}," name",{"type":43,"tag":236,"props":672,"children":673},{"style":440},[674],{"type":48,"value":675},":",{"type":43,"tag":236,"props":677,"children":678},{"style":440},[679],{"type":48,"value":464},{"type":43,"tag":236,"props":681,"children":682},{"style":467},[683],{"type":48,"value":684},"search_papers",{"type":43,"tag":236,"props":686,"children":687},{"style":440},[688],{"type":48,"value":475},{"type":43,"tag":236,"props":690,"children":691},{"style":440},[692],{"type":48,"value":693},",",{"type":43,"tag":236,"props":695,"children":696},{"style":667},[697],{"type":48,"value":698}," description",{"type":43,"tag":236,"props":700,"children":701},{"style":440},[702],{"type":48,"value":675},{"type":43,"tag":236,"props":704,"children":705},{"style":440},[706],{"type":48,"value":464},{"type":43,"tag":236,"props":708,"children":709},{"style":467},[710],{"type":48,"value":711},"Search papers",{"type":43,"tag":236,"props":713,"children":714},{"style":440},[715],{"type":48,"value":475},{"type":43,"tag":236,"props":717,"children":718},{"style":440},[719],{"type":48,"value":693},{"type":43,"tag":236,"props":721,"children":722},{"style":667},[723],{"type":48,"value":724}," schema",{"type":43,"tag":236,"props":726,"children":727},{"style":440},[728],{"type":48,"value":675},{"type":43,"tag":236,"props":730,"children":731},{"style":446},[732],{"type":48,"value":536},{"type":43,"tag":236,"props":734,"children":735},{"style":440},[736],{"type":48,"value":737},".",{"type":43,"tag":236,"props":739,"children":740},{"style":590},[741],{"type":48,"value":742},"object",{"type":43,"tag":236,"props":744,"children":745},{"style":446},[746],{"type":48,"value":747},"(",{"type":43,"tag":236,"props":749,"children":750},{"style":440},[751],{"type":48,"value":752},"{",{"type":43,"tag":236,"props":754,"children":755},{"style":667},[756],{"type":48,"value":616},{"type":43,"tag":236,"props":758,"children":759},{"style":440},[760],{"type":48,"value":675},{"type":43,"tag":236,"props":762,"children":763},{"style":446},[764],{"type":48,"value":536},{"type":43,"tag":236,"props":766,"children":767},{"style":440},[768],{"type":48,"value":737},{"type":43,"tag":236,"props":770,"children":771},{"style":590},[772],{"type":48,"value":773},"string",{"type":43,"tag":236,"props":775,"children":776},{"style":446},[777],{"type":48,"value":778},"() ",{"type":43,"tag":236,"props":780,"children":781},{"style":440},[782],{"type":48,"value":783},"}",{"type":43,"tag":236,"props":785,"children":786},{"style":446},[787],{"type":48,"value":788},") ",{"type":43,"tag":236,"props":790,"children":791},{"style":440},[792],{"type":48,"value":793},"}\n",{"type":43,"tag":236,"props":795,"children":796},{"class":238,"line":303},[797,802],{"type":43,"tag":236,"props":798,"children":799},{"style":446},[800],{"type":48,"value":801},")",{"type":43,"tag":236,"props":803,"children":804},{"style":440},[805],{"type":48,"value":480},{"type":43,"tag":236,"props":807,"children":808},{"class":238,"line":311},[809],{"type":43,"tag":236,"props":810,"children":811},{"emptyLinePlaceholder":261},[812],{"type":48,"value":264},{"type":43,"tag":236,"props":814,"children":815},{"class":238,"line":320},[816,820,825,829,834,838,842],{"type":43,"tag":236,"props":817,"children":818},{"style":574},[819],{"type":48,"value":577},{"type":43,"tag":236,"props":821,"children":822},{"style":446},[823],{"type":48,"value":824}," agent ",{"type":43,"tag":236,"props":826,"children":827},{"style":440},[828],{"type":48,"value":587},{"type":43,"tag":236,"props":830,"children":831},{"style":434},[832],{"type":48,"value":833}," await",{"type":43,"tag":236,"props":835,"children":836},{"style":590},[837],{"type":48,"value":449},{"type":43,"tag":236,"props":839,"children":840},{"style":446},[841],{"type":48,"value":747},{"type":43,"tag":236,"props":843,"children":844},{"style":440},[845],{"type":48,"value":846},"{\n",{"type":43,"tag":236,"props":848,"children":849},{"class":238,"line":329},[850,855,859],{"type":43,"tag":236,"props":851,"children":852},{"style":667},[853],{"type":48,"value":854},"  subagents",{"type":43,"tag":236,"props":856,"children":857},{"style":440},[858],{"type":48,"value":675},{"type":43,"tag":236,"props":860,"children":861},{"style":446},[862],{"type":48,"value":863}," [\n",{"type":43,"tag":236,"props":865,"children":866},{"class":238,"line":338},[867],{"type":43,"tag":236,"props":868,"children":869},{"style":440},[870],{"type":48,"value":871},"    {\n",{"type":43,"tag":236,"props":873,"children":874},{"class":238,"line":347},[875,880,884,888,893,897],{"type":43,"tag":236,"props":876,"children":877},{"style":667},[878],{"type":48,"value":879},"      name",{"type":43,"tag":236,"props":881,"children":882},{"style":440},[883],{"type":48,"value":675},{"type":43,"tag":236,"props":885,"children":886},{"style":440},[887],{"type":48,"value":464},{"type":43,"tag":236,"props":889,"children":890},{"style":467},[891],{"type":48,"value":892},"researcher",{"type":43,"tag":236,"props":894,"children":895},{"style":440},[896],{"type":48,"value":475},{"type":43,"tag":236,"props":898,"children":899},{"style":440},[900],{"type":48,"value":656},{"type":43,"tag":236,"props":902,"children":903},{"class":238,"line":356},[904,909,913,917,922,926],{"type":43,"tag":236,"props":905,"children":906},{"style":667},[907],{"type":48,"value":908},"      description",{"type":43,"tag":236,"props":910,"children":911},{"style":440},[912],{"type":48,"value":675},{"type":43,"tag":236,"props":914,"children":915},{"style":440},[916],{"type":48,"value":464},{"type":43,"tag":236,"props":918,"children":919},{"style":467},[920],{"type":48,"value":921},"Conduct web research and compile findings",{"type":43,"tag":236,"props":923,"children":924},{"style":440},[925],{"type":48,"value":475},{"type":43,"tag":236,"props":927,"children":928},{"style":440},[929],{"type":48,"value":656},{"type":43,"tag":236,"props":931,"children":932},{"class":238,"line":365},[933,938,942,946,951,955],{"type":43,"tag":236,"props":934,"children":935},{"style":667},[936],{"type":48,"value":937},"      systemPrompt",{"type":43,"tag":236,"props":939,"children":940},{"style":440},[941],{"type":48,"value":675},{"type":43,"tag":236,"props":943,"children":944},{"style":440},[945],{"type":48,"value":464},{"type":43,"tag":236,"props":947,"children":948},{"style":467},[949],{"type":48,"value":950},"Search thoroughly, return concise summary",{"type":43,"tag":236,"props":952,"children":953},{"style":440},[954],{"type":48,"value":475},{"type":43,"tag":236,"props":956,"children":957},{"style":440},[958],{"type":48,"value":656},{"type":43,"tag":236,"props":960,"children":961},{"class":238,"line":374},[962,967,971,976],{"type":43,"tag":236,"props":963,"children":964},{"style":667},[965],{"type":48,"value":966},"      tools",{"type":43,"tag":236,"props":968,"children":969},{"style":440},[970],{"type":48,"value":675},{"type":43,"tag":236,"props":972,"children":973},{"style":446},[974],{"type":48,"value":975}," [searchPapers]",{"type":43,"tag":236,"props":977,"children":978},{"style":440},[979],{"type":48,"value":656},{"type":43,"tag":236,"props":981,"children":982},{"class":238,"line":383},[983],{"type":43,"tag":236,"props":984,"children":985},{"style":440},[986],{"type":48,"value":987},"    }\n",{"type":43,"tag":236,"props":989,"children":990},{"class":238,"line":392},[991],{"type":43,"tag":236,"props":992,"children":993},{"style":446},[994],{"type":48,"value":995},"  ]\n",{"type":43,"tag":236,"props":997,"children":998},{"class":238,"line":401},[999,1003,1007],{"type":43,"tag":236,"props":1000,"children":1001},{"style":440},[1002],{"type":48,"value":783},{"type":43,"tag":236,"props":1004,"children":1005},{"style":446},[1006],{"type":48,"value":801},{"type":43,"tag":236,"props":1008,"children":1009},{"style":440},[1010],{"type":48,"value":480},{"type":43,"tag":236,"props":1012,"children":1013},{"class":238,"line":409},[1014],{"type":43,"tag":236,"props":1015,"children":1016},{"emptyLinePlaceholder":261},[1017],{"type":48,"value":264},{"type":43,"tag":236,"props":1019,"children":1021},{"class":238,"line":1020},21,[1022],{"type":43,"tag":236,"props":1023,"children":1025},{"style":1024},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1026],{"type":48,"value":1027},"\u002F\u002F Main agent delegates: task(agent=\"researcher\", instruction=\"Research AI trends\")\n",{"type":43,"tag":1029,"props":1030,"children":1031},"ex-subagent-with-hitl",{},[1032],{"type":43,"tag":220,"props":1033,"children":1034},{},[1035,1037],{"type":48,"value":1036},"\nConfigure a subagent with HITL approval for sensitive operations.\n",{"type":43,"tag":226,"props":1038,"children":1040},{"className":228,"code":1039,"language":220,"meta":230,"style":230},"from deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    subagents=[\n        {\n            \"name\": \"code-deployer\",\n            \"description\": \"Deploy code to production\",\n            \"system_prompt\": \"You deploy code after tests pass.\",\n            \"tools\": [run_tests, deploy_to_prod],\n            \"interrupt_on\": {\"deploy_to_prod\": True},  # Require approval\n        }\n    ],\n    checkpointer=MemorySaver()  # Required for interrupts\n)\n",[1041],{"type":43,"tag":67,"props":1042,"children":1043},{"__ignoreMap":230},[1044,1051,1059,1066,1073,1080,1087,1095,1103,1111,1119,1127,1134,1142,1150],{"type":43,"tag":236,"props":1045,"children":1046},{"class":238,"line":239},[1047],{"type":43,"tag":236,"props":1048,"children":1049},{},[1050],{"type":48,"value":245},{"type":43,"tag":236,"props":1052,"children":1053},{"class":238,"line":248},[1054],{"type":43,"tag":236,"props":1055,"children":1056},{},[1057],{"type":48,"value":1058},"from langgraph.checkpoint.memory import MemorySaver\n",{"type":43,"tag":236,"props":1060,"children":1061},{"class":238,"line":257},[1062],{"type":43,"tag":236,"props":1063,"children":1064},{"emptyLinePlaceholder":261},[1065],{"type":48,"value":264},{"type":43,"tag":236,"props":1067,"children":1068},{"class":238,"line":267},[1069],{"type":43,"tag":236,"props":1070,"children":1071},{},[1072],{"type":48,"value":317},{"type":43,"tag":236,"props":1074,"children":1075},{"class":238,"line":276},[1076],{"type":43,"tag":236,"props":1077,"children":1078},{},[1079],{"type":48,"value":326},{"type":43,"tag":236,"props":1081,"children":1082},{"class":238,"line":285},[1083],{"type":43,"tag":236,"props":1084,"children":1085},{},[1086],{"type":48,"value":335},{"type":43,"tag":236,"props":1088,"children":1089},{"class":238,"line":294},[1090],{"type":43,"tag":236,"props":1091,"children":1092},{},[1093],{"type":48,"value":1094},"            \"name\": \"code-deployer\",\n",{"type":43,"tag":236,"props":1096,"children":1097},{"class":238,"line":303},[1098],{"type":43,"tag":236,"props":1099,"children":1100},{},[1101],{"type":48,"value":1102},"            \"description\": \"Deploy code to production\",\n",{"type":43,"tag":236,"props":1104,"children":1105},{"class":238,"line":311},[1106],{"type":43,"tag":236,"props":1107,"children":1108},{},[1109],{"type":48,"value":1110},"            \"system_prompt\": \"You deploy code after tests pass.\",\n",{"type":43,"tag":236,"props":1112,"children":1113},{"class":238,"line":320},[1114],{"type":43,"tag":236,"props":1115,"children":1116},{},[1117],{"type":48,"value":1118},"            \"tools\": [run_tests, deploy_to_prod],\n",{"type":43,"tag":236,"props":1120,"children":1121},{"class":238,"line":329},[1122],{"type":43,"tag":236,"props":1123,"children":1124},{},[1125],{"type":48,"value":1126},"            \"interrupt_on\": {\"deploy_to_prod\": True},  # Require approval\n",{"type":43,"tag":236,"props":1128,"children":1129},{"class":238,"line":338},[1130],{"type":43,"tag":236,"props":1131,"children":1132},{},[1133],{"type":48,"value":380},{"type":43,"tag":236,"props":1135,"children":1136},{"class":238,"line":347},[1137],{"type":43,"tag":236,"props":1138,"children":1139},{},[1140],{"type":48,"value":1141},"    ],\n",{"type":43,"tag":236,"props":1143,"children":1144},{"class":238,"line":356},[1145],{"type":43,"tag":236,"props":1146,"children":1147},{},[1148],{"type":48,"value":1149},"    checkpointer=MemorySaver()  # Required for interrupts\n",{"type":43,"tag":236,"props":1151,"children":1152},{"class":238,"line":365},[1153],{"type":43,"tag":236,"props":1154,"children":1155},{},[1156],{"type":48,"value":398},{"type":43,"tag":1158,"props":1159,"children":1160},"fix-subagents-are-stateless",{},[1161,1220],{"type":43,"tag":220,"props":1162,"children":1163},{},[1164,1166],{"type":48,"value":1165},"\nSubagents are stateless - provide complete instructions in a single call.\n",{"type":43,"tag":226,"props":1167,"children":1169},{"className":228,"code":1168,"language":220,"meta":230,"style":230},"# WRONG: Subagents don't remember previous calls\n# task(agent='research', instruction='Find data')\n# task(agent='research', instruction='What did you find?')  # Starts fresh!\n\n# CORRECT: Complete instructions upfront\n# task(agent='research', instruction='Find data on AI, save to \u002Fresearch\u002F, return summary')\n",[1170],{"type":43,"tag":67,"props":1171,"children":1172},{"__ignoreMap":230},[1173,1181,1189,1197,1204,1212],{"type":43,"tag":236,"props":1174,"children":1175},{"class":238,"line":239},[1176],{"type":43,"tag":236,"props":1177,"children":1178},{},[1179],{"type":48,"value":1180},"# WRONG: Subagents don't remember previous calls\n",{"type":43,"tag":236,"props":1182,"children":1183},{"class":238,"line":248},[1184],{"type":43,"tag":236,"props":1185,"children":1186},{},[1187],{"type":48,"value":1188},"# task(agent='research', instruction='Find data')\n",{"type":43,"tag":236,"props":1190,"children":1191},{"class":238,"line":257},[1192],{"type":43,"tag":236,"props":1193,"children":1194},{},[1195],{"type":48,"value":1196},"# task(agent='research', instruction='What did you find?')  # Starts fresh!\n",{"type":43,"tag":236,"props":1198,"children":1199},{"class":238,"line":267},[1200],{"type":43,"tag":236,"props":1201,"children":1202},{"emptyLinePlaceholder":261},[1203],{"type":48,"value":264},{"type":43,"tag":236,"props":1205,"children":1206},{"class":238,"line":276},[1207],{"type":43,"tag":236,"props":1208,"children":1209},{},[1210],{"type":48,"value":1211},"# CORRECT: Complete instructions upfront\n",{"type":43,"tag":236,"props":1213,"children":1214},{"class":238,"line":285},[1215],{"type":43,"tag":236,"props":1216,"children":1217},{},[1218],{"type":48,"value":1219},"# task(agent='research', instruction='Find data on AI, save to \u002Fresearch\u002F, return summary')\n",{"type":43,"tag":417,"props":1221,"children":1222},{},[1223,1224],{"type":48,"value":1165},{"type":43,"tag":226,"props":1225,"children":1227},{"className":423,"code":1226,"language":417,"meta":230,"style":230},"\u002F\u002F WRONG: Subagents don't remember previous calls\n\u002F\u002F task research: Find data\n\u002F\u002F task research: What did you find?  \u002F\u002F Starts fresh!\n\n\u002F\u002F CORRECT: Complete instructions upfront\n\u002F\u002F task research: Find data on AI, save to \u002Fresearch\u002F, return summary\n",[1228],{"type":43,"tag":67,"props":1229,"children":1230},{"__ignoreMap":230},[1231,1239,1247,1260,1267,1275],{"type":43,"tag":236,"props":1232,"children":1233},{"class":238,"line":239},[1234],{"type":43,"tag":236,"props":1235,"children":1236},{"style":1024},[1237],{"type":48,"value":1238},"\u002F\u002F WRONG: Subagents don't remember previous calls\n",{"type":43,"tag":236,"props":1240,"children":1241},{"class":238,"line":248},[1242],{"type":43,"tag":236,"props":1243,"children":1244},{"style":1024},[1245],{"type":48,"value":1246},"\u002F\u002F task research: Find data\n",{"type":43,"tag":236,"props":1248,"children":1249},{"class":238,"line":257},[1250,1255],{"type":43,"tag":236,"props":1251,"children":1252},{"style":1024},[1253],{"type":48,"value":1254},"\u002F\u002F task research: What did you find?",{"type":43,"tag":236,"props":1256,"children":1257},{"style":1024},[1258],{"type":48,"value":1259},"  \u002F\u002F Starts fresh!\n",{"type":43,"tag":236,"props":1261,"children":1262},{"class":238,"line":267},[1263],{"type":43,"tag":236,"props":1264,"children":1265},{"emptyLinePlaceholder":261},[1266],{"type":48,"value":264},{"type":43,"tag":236,"props":1268,"children":1269},{"class":238,"line":276},[1270],{"type":43,"tag":236,"props":1271,"children":1272},{"style":1024},[1273],{"type":48,"value":1274},"\u002F\u002F CORRECT: Complete instructions upfront\n",{"type":43,"tag":236,"props":1276,"children":1277},{"class":238,"line":285},[1278],{"type":43,"tag":236,"props":1279,"children":1280},{"style":1024},[1281],{"type":48,"value":1282},"\u002F\u002F task research: Find data on AI, save to \u002Fresearch\u002F, return summary\n",{"type":43,"tag":1284,"props":1285,"children":1286},"fix-custom-subagents-dont-inherit-skills",{},[1287],{"type":43,"tag":220,"props":1288,"children":1289},{},[1290,1292],{"type":48,"value":1291},"\nCustom subagents don't inherit skills from the main agent.\n",{"type":43,"tag":226,"props":1293,"children":1295},{"className":228,"code":1294,"language":220,"meta":230,"style":230},"# WRONG: Custom subagent won't have main agent's skills\nagent = create_deep_agent(\n    skills=[\"\u002Fmain-skills\u002F\"],\n    subagents=[{\"name\": \"helper\", ...}]  # No skills inherited\n)\n\n# CORRECT: Provide skills explicitly (general-purpose subagent DOES inherit)\nagent = create_deep_agent(\n    skills=[\"\u002Fmain-skills\u002F\"],\n    subagents=[{\"name\": \"helper\", \"skills\": [\"\u002Fhelper-skills\u002F\"], ...}]\n)\n",[1296],{"type":43,"tag":67,"props":1297,"children":1298},{"__ignoreMap":230},[1299,1307,1314,1322,1330,1337,1344,1352,1359,1366,1374],{"type":43,"tag":236,"props":1300,"children":1301},{"class":238,"line":239},[1302],{"type":43,"tag":236,"props":1303,"children":1304},{},[1305],{"type":48,"value":1306},"# WRONG: Custom subagent won't have main agent's skills\n",{"type":43,"tag":236,"props":1308,"children":1309},{"class":238,"line":248},[1310],{"type":43,"tag":236,"props":1311,"children":1312},{},[1313],{"type":48,"value":317},{"type":43,"tag":236,"props":1315,"children":1316},{"class":238,"line":257},[1317],{"type":43,"tag":236,"props":1318,"children":1319},{},[1320],{"type":48,"value":1321},"    skills=[\"\u002Fmain-skills\u002F\"],\n",{"type":43,"tag":236,"props":1323,"children":1324},{"class":238,"line":267},[1325],{"type":43,"tag":236,"props":1326,"children":1327},{},[1328],{"type":48,"value":1329},"    subagents=[{\"name\": \"helper\", ...}]  # No skills inherited\n",{"type":43,"tag":236,"props":1331,"children":1332},{"class":238,"line":276},[1333],{"type":43,"tag":236,"props":1334,"children":1335},{},[1336],{"type":48,"value":398},{"type":43,"tag":236,"props":1338,"children":1339},{"class":238,"line":285},[1340],{"type":43,"tag":236,"props":1341,"children":1342},{"emptyLinePlaceholder":261},[1343],{"type":48,"value":264},{"type":43,"tag":236,"props":1345,"children":1346},{"class":238,"line":294},[1347],{"type":43,"tag":236,"props":1348,"children":1349},{},[1350],{"type":48,"value":1351},"# CORRECT: Provide skills explicitly (general-purpose subagent DOES inherit)\n",{"type":43,"tag":236,"props":1353,"children":1354},{"class":238,"line":303},[1355],{"type":43,"tag":236,"props":1356,"children":1357},{},[1358],{"type":48,"value":317},{"type":43,"tag":236,"props":1360,"children":1361},{"class":238,"line":311},[1362],{"type":43,"tag":236,"props":1363,"children":1364},{},[1365],{"type":48,"value":1321},{"type":43,"tag":236,"props":1367,"children":1368},{"class":238,"line":320},[1369],{"type":43,"tag":236,"props":1370,"children":1371},{},[1372],{"type":48,"value":1373},"    subagents=[{\"name\": \"helper\", \"skills\": [\"\u002Fhelper-skills\u002F\"], ...}]\n",{"type":43,"tag":236,"props":1375,"children":1376},{"class":238,"line":329},[1377],{"type":43,"tag":236,"props":1378,"children":1379},{},[1380],{"type":48,"value":398},{"type":43,"tag":118,"props":1382,"children":1383},{},[],{"type":43,"tag":122,"props":1385,"children":1387},{"id":1386},"todolist-task-planning",[1388],{"type":48,"value":1389},"TodoList (Task Planning)",{"type":43,"tag":1391,"props":1392,"children":1393},"when-to-use-todolist",{},[1394],{"type":43,"tag":133,"props":1395,"children":1396},{},[1397,1413],{"type":43,"tag":137,"props":1398,"children":1399},{},[1400],{"type":43,"tag":141,"props":1401,"children":1402},{},[1403,1408],{"type":43,"tag":145,"props":1404,"children":1405},{},[1406],{"type":48,"value":1407},"Use TodoList When",{"type":43,"tag":145,"props":1409,"children":1410},{},[1411],{"type":48,"value":1412},"Skip TodoList When",{"type":43,"tag":156,"props":1414,"children":1415},{},[1416,1429],{"type":43,"tag":141,"props":1417,"children":1418},{},[1419,1424],{"type":43,"tag":163,"props":1420,"children":1421},{},[1422],{"type":48,"value":1423},"Complex multi-step tasks",{"type":43,"tag":163,"props":1425,"children":1426},{},[1427],{"type":48,"value":1428},"Simple single-action tasks",{"type":43,"tag":141,"props":1430,"children":1431},{},[1432,1437],{"type":43,"tag":163,"props":1433,"children":1434},{},[1435],{"type":48,"value":1436},"Long-running operations",{"type":43,"tag":163,"props":1438,"children":1439},{},[1440],{"type":48,"value":1441},"Quick operations (\u003C 3 steps)",{"type":43,"tag":1443,"props":1444,"children":1445},"todolist-tool",{},[1446,1456,1461,1508,1925,1988,2051,2054,2060,2112,2523,3426,3659,3752],{"type":43,"tag":226,"props":1447,"children":1451},{"className":1448,"code":1450,"language":48},[1449],"language-text","write_todos(todos: list[dict]) -> None\n",[1452],{"type":43,"tag":67,"props":1453,"children":1454},{"__ignoreMap":230},[1455],{"type":48,"value":1450},{"type":43,"tag":104,"props":1457,"children":1458},{},[1459],{"type":48,"value":1460},"Each todo item has:",{"type":43,"tag":1462,"props":1463,"children":1464},"ul",{},[1465,1476],{"type":43,"tag":55,"props":1466,"children":1467},{},[1468,1474],{"type":43,"tag":67,"props":1469,"children":1471},{"className":1470},[],[1472],{"type":48,"value":1473},"content",{"type":48,"value":1475},": Description of the task",{"type":43,"tag":55,"props":1477,"children":1478},{},[1479,1485,1487,1493,1495,1501,1502],{"type":43,"tag":67,"props":1480,"children":1482},{"className":1481},[],[1483],{"type":48,"value":1484},"status",{"type":48,"value":1486},": One of ",{"type":43,"tag":67,"props":1488,"children":1490},{"className":1489},[],[1491],{"type":48,"value":1492},"\"pending\"",{"type":48,"value":1494},", ",{"type":43,"tag":67,"props":1496,"children":1498},{"className":1497},[],[1499],{"type":48,"value":1500},"\"in_progress\"",{"type":48,"value":1494},{"type":43,"tag":67,"props":1503,"children":1505},{"className":1504},[],[1506],{"type":48,"value":1507},"\"completed\"",{"type":43,"tag":1509,"props":1510,"children":1511},"ex-todolist-usage",{},[1512,1640],{"type":43,"tag":220,"props":1513,"children":1514},{},[1515,1517],{"type":48,"value":1516},"\nInvoke an agent that automatically creates a todo list for a multi-step task.\n",{"type":43,"tag":226,"props":1518,"children":1520},{"className":228,"code":1519,"language":220,"meta":230,"style":230},"from deepagents import create_deep_agent\n\nagent = create_deep_agent()  # TodoListMiddleware included by default\n\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Create a REST API: design models, implement CRUD, add auth, write tests\"}]\n}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n\n# Agent's planning via write_todos:\n# [\n#   {\"content\": \"Design data models\", \"status\": \"in_progress\"},\n#   {\"content\": \"Implement CRUD endpoints\", \"status\": \"pending\"},\n#   {\"content\": \"Add authentication\", \"status\": \"pending\"},\n#   {\"content\": \"Write tests\", \"status\": \"pending\"}\n# ]\n",[1521],{"type":43,"tag":67,"props":1522,"children":1523},{"__ignoreMap":230},[1524,1531,1538,1546,1553,1561,1569,1577,1584,1592,1600,1608,1616,1624,1632],{"type":43,"tag":236,"props":1525,"children":1526},{"class":238,"line":239},[1527],{"type":43,"tag":236,"props":1528,"children":1529},{},[1530],{"type":48,"value":245},{"type":43,"tag":236,"props":1532,"children":1533},{"class":238,"line":248},[1534],{"type":43,"tag":236,"props":1535,"children":1536},{"emptyLinePlaceholder":261},[1537],{"type":48,"value":264},{"type":43,"tag":236,"props":1539,"children":1540},{"class":238,"line":257},[1541],{"type":43,"tag":236,"props":1542,"children":1543},{},[1544],{"type":48,"value":1545},"agent = create_deep_agent()  # TodoListMiddleware included by default\n",{"type":43,"tag":236,"props":1547,"children":1548},{"class":238,"line":267},[1549],{"type":43,"tag":236,"props":1550,"children":1551},{"emptyLinePlaceholder":261},[1552],{"type":48,"value":264},{"type":43,"tag":236,"props":1554,"children":1555},{"class":238,"line":276},[1556],{"type":43,"tag":236,"props":1557,"children":1558},{},[1559],{"type":48,"value":1560},"result = agent.invoke({\n",{"type":43,"tag":236,"props":1562,"children":1563},{"class":238,"line":285},[1564],{"type":43,"tag":236,"props":1565,"children":1566},{},[1567],{"type":48,"value":1568},"    \"messages\": [{\"role\": \"user\", \"content\": \"Create a REST API: design models, implement CRUD, add auth, write tests\"}]\n",{"type":43,"tag":236,"props":1570,"children":1571},{"class":238,"line":294},[1572],{"type":43,"tag":236,"props":1573,"children":1574},{},[1575],{"type":48,"value":1576},"}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n",{"type":43,"tag":236,"props":1578,"children":1579},{"class":238,"line":303},[1580],{"type":43,"tag":236,"props":1581,"children":1582},{"emptyLinePlaceholder":261},[1583],{"type":48,"value":264},{"type":43,"tag":236,"props":1585,"children":1586},{"class":238,"line":311},[1587],{"type":43,"tag":236,"props":1588,"children":1589},{},[1590],{"type":48,"value":1591},"# Agent's planning via write_todos:\n",{"type":43,"tag":236,"props":1593,"children":1594},{"class":238,"line":320},[1595],{"type":43,"tag":236,"props":1596,"children":1597},{},[1598],{"type":48,"value":1599},"# [\n",{"type":43,"tag":236,"props":1601,"children":1602},{"class":238,"line":329},[1603],{"type":43,"tag":236,"props":1604,"children":1605},{},[1606],{"type":48,"value":1607},"#   {\"content\": \"Design data models\", \"status\": \"in_progress\"},\n",{"type":43,"tag":236,"props":1609,"children":1610},{"class":238,"line":338},[1611],{"type":43,"tag":236,"props":1612,"children":1613},{},[1614],{"type":48,"value":1615},"#   {\"content\": \"Implement CRUD endpoints\", \"status\": \"pending\"},\n",{"type":43,"tag":236,"props":1617,"children":1618},{"class":238,"line":347},[1619],{"type":43,"tag":236,"props":1620,"children":1621},{},[1622],{"type":48,"value":1623},"#   {\"content\": \"Add authentication\", \"status\": \"pending\"},\n",{"type":43,"tag":236,"props":1625,"children":1626},{"class":238,"line":356},[1627],{"type":43,"tag":236,"props":1628,"children":1629},{},[1630],{"type":48,"value":1631},"#   {\"content\": \"Write tests\", \"status\": \"pending\"}\n",{"type":43,"tag":236,"props":1633,"children":1634},{"class":238,"line":365},[1635],{"type":43,"tag":236,"props":1636,"children":1637},{},[1638],{"type":48,"value":1639},"# ]\n",{"type":43,"tag":417,"props":1641,"children":1642},{},[1643,1644],{"type":48,"value":1516},{"type":43,"tag":226,"props":1645,"children":1647},{"className":423,"code":1646,"language":417,"meta":230,"style":230},"import { createDeepAgent } from \"deepagents\";\n\nconst agent = await createDeepAgent();  \u002F\u002F TodoListMiddleware included\n\nconst result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Create a REST API: design models, implement CRUD, add auth, write tests\" }]\n}, { configurable: { thread_id: \"session-1\" } });\n",[1648],{"type":43,"tag":67,"props":1649,"children":1650},{"__ignoreMap":230},[1651,1690,1697,1735,1742,1784,1862],{"type":43,"tag":236,"props":1652,"children":1653},{"class":238,"line":239},[1654,1658,1662,1666,1670,1674,1678,1682,1686],{"type":43,"tag":236,"props":1655,"children":1656},{"style":434},[1657],{"type":48,"value":437},{"type":43,"tag":236,"props":1659,"children":1660},{"style":440},[1661],{"type":48,"value":443},{"type":43,"tag":236,"props":1663,"children":1664},{"style":446},[1665],{"type":48,"value":449},{"type":43,"tag":236,"props":1667,"children":1668},{"style":440},[1669],{"type":48,"value":454},{"type":43,"tag":236,"props":1671,"children":1672},{"style":434},[1673],{"type":48,"value":459},{"type":43,"tag":236,"props":1675,"children":1676},{"style":440},[1677],{"type":48,"value":464},{"type":43,"tag":236,"props":1679,"children":1680},{"style":467},[1681],{"type":48,"value":470},{"type":43,"tag":236,"props":1683,"children":1684},{"style":440},[1685],{"type":48,"value":475},{"type":43,"tag":236,"props":1687,"children":1688},{"style":440},[1689],{"type":48,"value":480},{"type":43,"tag":236,"props":1691,"children":1692},{"class":238,"line":248},[1693],{"type":43,"tag":236,"props":1694,"children":1695},{"emptyLinePlaceholder":261},[1696],{"type":48,"value":264},{"type":43,"tag":236,"props":1698,"children":1699},{"class":238,"line":257},[1700,1704,1708,1712,1716,1720,1725,1730],{"type":43,"tag":236,"props":1701,"children":1702},{"style":574},[1703],{"type":48,"value":577},{"type":43,"tag":236,"props":1705,"children":1706},{"style":446},[1707],{"type":48,"value":824},{"type":43,"tag":236,"props":1709,"children":1710},{"style":440},[1711],{"type":48,"value":587},{"type":43,"tag":236,"props":1713,"children":1714},{"style":434},[1715],{"type":48,"value":833},{"type":43,"tag":236,"props":1717,"children":1718},{"style":590},[1719],{"type":48,"value":449},{"type":43,"tag":236,"props":1721,"children":1722},{"style":446},[1723],{"type":48,"value":1724},"()",{"type":43,"tag":236,"props":1726,"children":1727},{"style":440},[1728],{"type":48,"value":1729},";",{"type":43,"tag":236,"props":1731,"children":1732},{"style":1024},[1733],{"type":48,"value":1734},"  \u002F\u002F TodoListMiddleware included\n",{"type":43,"tag":236,"props":1736,"children":1737},{"class":238,"line":267},[1738],{"type":43,"tag":236,"props":1739,"children":1740},{"emptyLinePlaceholder":261},[1741],{"type":48,"value":264},{"type":43,"tag":236,"props":1743,"children":1744},{"class":238,"line":276},[1745,1749,1754,1758,1762,1767,1771,1776,1780],{"type":43,"tag":236,"props":1746,"children":1747},{"style":574},[1748],{"type":48,"value":577},{"type":43,"tag":236,"props":1750,"children":1751},{"style":446},[1752],{"type":48,"value":1753}," result ",{"type":43,"tag":236,"props":1755,"children":1756},{"style":440},[1757],{"type":48,"value":587},{"type":43,"tag":236,"props":1759,"children":1760},{"style":434},[1761],{"type":48,"value":833},{"type":43,"tag":236,"props":1763,"children":1764},{"style":446},[1765],{"type":48,"value":1766}," agent",{"type":43,"tag":236,"props":1768,"children":1769},{"style":440},[1770],{"type":48,"value":737},{"type":43,"tag":236,"props":1772,"children":1773},{"style":590},[1774],{"type":48,"value":1775},"invoke",{"type":43,"tag":236,"props":1777,"children":1778},{"style":446},[1779],{"type":48,"value":747},{"type":43,"tag":236,"props":1781,"children":1782},{"style":440},[1783],{"type":48,"value":846},{"type":43,"tag":236,"props":1785,"children":1786},{"class":238,"line":285},[1787,1792,1796,1801,1805,1810,1814,1818,1823,1827,1831,1836,1840,1844,1849,1853,1857],{"type":43,"tag":236,"props":1788,"children":1789},{"style":667},[1790],{"type":48,"value":1791},"  messages",{"type":43,"tag":236,"props":1793,"children":1794},{"style":440},[1795],{"type":48,"value":675},{"type":43,"tag":236,"props":1797,"children":1798},{"style":446},[1799],{"type":48,"value":1800}," [",{"type":43,"tag":236,"props":1802,"children":1803},{"style":440},[1804],{"type":48,"value":752},{"type":43,"tag":236,"props":1806,"children":1807},{"style":667},[1808],{"type":48,"value":1809}," role",{"type":43,"tag":236,"props":1811,"children":1812},{"style":440},[1813],{"type":48,"value":675},{"type":43,"tag":236,"props":1815,"children":1816},{"style":440},[1817],{"type":48,"value":464},{"type":43,"tag":236,"props":1819,"children":1820},{"style":467},[1821],{"type":48,"value":1822},"user",{"type":43,"tag":236,"props":1824,"children":1825},{"style":440},[1826],{"type":48,"value":475},{"type":43,"tag":236,"props":1828,"children":1829},{"style":440},[1830],{"type":48,"value":693},{"type":43,"tag":236,"props":1832,"children":1833},{"style":667},[1834],{"type":48,"value":1835}," content",{"type":43,"tag":236,"props":1837,"children":1838},{"style":440},[1839],{"type":48,"value":675},{"type":43,"tag":236,"props":1841,"children":1842},{"style":440},[1843],{"type":48,"value":464},{"type":43,"tag":236,"props":1845,"children":1846},{"style":467},[1847],{"type":48,"value":1848},"Create a REST API: design models, implement CRUD, add auth, write tests",{"type":43,"tag":236,"props":1850,"children":1851},{"style":440},[1852],{"type":48,"value":475},{"type":43,"tag":236,"props":1854,"children":1855},{"style":440},[1856],{"type":48,"value":454},{"type":43,"tag":236,"props":1858,"children":1859},{"style":446},[1860],{"type":48,"value":1861},"]\n",{"type":43,"tag":236,"props":1863,"children":1864},{"class":238,"line":294},[1865,1870,1874,1879,1883,1887,1892,1896,1900,1905,1909,1913,1917,1921],{"type":43,"tag":236,"props":1866,"children":1867},{"style":440},[1868],{"type":48,"value":1869},"},",{"type":43,"tag":236,"props":1871,"children":1872},{"style":440},[1873],{"type":48,"value":443},{"type":43,"tag":236,"props":1875,"children":1876},{"style":667},[1877],{"type":48,"value":1878}," configurable",{"type":43,"tag":236,"props":1880,"children":1881},{"style":440},[1882],{"type":48,"value":675},{"type":43,"tag":236,"props":1884,"children":1885},{"style":440},[1886],{"type":48,"value":443},{"type":43,"tag":236,"props":1888,"children":1889},{"style":667},[1890],{"type":48,"value":1891}," thread_id",{"type":43,"tag":236,"props":1893,"children":1894},{"style":440},[1895],{"type":48,"value":675},{"type":43,"tag":236,"props":1897,"children":1898},{"style":440},[1899],{"type":48,"value":464},{"type":43,"tag":236,"props":1901,"children":1902},{"style":467},[1903],{"type":48,"value":1904},"session-1",{"type":43,"tag":236,"props":1906,"children":1907},{"style":440},[1908],{"type":48,"value":475},{"type":43,"tag":236,"props":1910,"children":1911},{"style":440},[1912],{"type":48,"value":454},{"type":43,"tag":236,"props":1914,"children":1915},{"style":440},[1916],{"type":48,"value":454},{"type":43,"tag":236,"props":1918,"children":1919},{"style":446},[1920],{"type":48,"value":801},{"type":43,"tag":236,"props":1922,"children":1923},{"style":440},[1924],{"type":48,"value":480},{"type":43,"tag":1926,"props":1927,"children":1928},"ex-access-todo-state",{},[1929],{"type":43,"tag":220,"props":1930,"children":1931},{},[1932,1934],{"type":48,"value":1933},"\nAccess the todo list from the agent's final state after invocation.\n",{"type":43,"tag":226,"props":1935,"children":1937},{"className":228,"code":1936,"language":220,"meta":230,"style":230},"result = agent.invoke({...}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n\n# Access todo list from final state\ntodos = result.get(\"todos\", [])\nfor todo in todos:\n    print(f\"[{todo['status']}] {todo['content']}\")\n",[1938],{"type":43,"tag":67,"props":1939,"children":1940},{"__ignoreMap":230},[1941,1949,1956,1964,1972,1980],{"type":43,"tag":236,"props":1942,"children":1943},{"class":238,"line":239},[1944],{"type":43,"tag":236,"props":1945,"children":1946},{},[1947],{"type":48,"value":1948},"result = agent.invoke({...}, config={\"configurable\": {\"thread_id\": \"session-1\"}})\n",{"type":43,"tag":236,"props":1950,"children":1951},{"class":238,"line":248},[1952],{"type":43,"tag":236,"props":1953,"children":1954},{"emptyLinePlaceholder":261},[1955],{"type":48,"value":264},{"type":43,"tag":236,"props":1957,"children":1958},{"class":238,"line":257},[1959],{"type":43,"tag":236,"props":1960,"children":1961},{},[1962],{"type":48,"value":1963},"# Access todo list from final state\n",{"type":43,"tag":236,"props":1965,"children":1966},{"class":238,"line":267},[1967],{"type":43,"tag":236,"props":1968,"children":1969},{},[1970],{"type":48,"value":1971},"todos = result.get(\"todos\", [])\n",{"type":43,"tag":236,"props":1973,"children":1974},{"class":238,"line":276},[1975],{"type":43,"tag":236,"props":1976,"children":1977},{},[1978],{"type":48,"value":1979},"for todo in todos:\n",{"type":43,"tag":236,"props":1981,"children":1982},{"class":238,"line":285},[1983],{"type":43,"tag":236,"props":1984,"children":1985},{},[1986],{"type":48,"value":1987},"    print(f\"[{todo['status']}] {todo['content']}\")\n",{"type":43,"tag":1989,"props":1990,"children":1991},"fix-todolist-requires-thread-id",{},[1992],{"type":43,"tag":220,"props":1993,"children":1994},{},[1995,1997],{"type":48,"value":1996},"\nTodo list state requires a thread_id for persistence across invocations.\n",{"type":43,"tag":226,"props":1998,"children":2000},{"className":228,"code":1999,"language":220,"meta":230,"style":230},"# WRONG: Fresh state each time without thread_id\nagent.invoke({\"messages\": [...]})\n\n# CORRECT: Use thread_id\nconfig = {\"configurable\": {\"thread_id\": \"user-session\"}}\nagent.invoke({\"messages\": [...]}, config=config)  # Todos preserved\n",[2001],{"type":43,"tag":67,"props":2002,"children":2003},{"__ignoreMap":230},[2004,2012,2020,2027,2035,2043],{"type":43,"tag":236,"props":2005,"children":2006},{"class":238,"line":239},[2007],{"type":43,"tag":236,"props":2008,"children":2009},{},[2010],{"type":48,"value":2011},"# WRONG: Fresh state each time without thread_id\n",{"type":43,"tag":236,"props":2013,"children":2014},{"class":238,"line":248},[2015],{"type":43,"tag":236,"props":2016,"children":2017},{},[2018],{"type":48,"value":2019},"agent.invoke({\"messages\": [...]})\n",{"type":43,"tag":236,"props":2021,"children":2022},{"class":238,"line":257},[2023],{"type":43,"tag":236,"props":2024,"children":2025},{"emptyLinePlaceholder":261},[2026],{"type":48,"value":264},{"type":43,"tag":236,"props":2028,"children":2029},{"class":238,"line":267},[2030],{"type":43,"tag":236,"props":2031,"children":2032},{},[2033],{"type":48,"value":2034},"# CORRECT: Use thread_id\n",{"type":43,"tag":236,"props":2036,"children":2037},{"class":238,"line":276},[2038],{"type":43,"tag":236,"props":2039,"children":2040},{},[2041],{"type":48,"value":2042},"config = {\"configurable\": {\"thread_id\": \"user-session\"}}\n",{"type":43,"tag":236,"props":2044,"children":2045},{"class":238,"line":285},[2046],{"type":43,"tag":236,"props":2047,"children":2048},{},[2049],{"type":48,"value":2050},"agent.invoke({\"messages\": [...]}, config=config)  # Todos preserved\n",{"type":43,"tag":118,"props":2052,"children":2053},{},[],{"type":43,"tag":122,"props":2055,"children":2057},{"id":2056},"human-in-the-loop-approval-workflows",[2058],{"type":48,"value":2059},"Human-in-the-Loop (Approval Workflows)",{"type":43,"tag":2061,"props":2062,"children":2063},"when-to-use-hitl",{},[2064],{"type":43,"tag":133,"props":2065,"children":2066},{},[2067,2083],{"type":43,"tag":137,"props":2068,"children":2069},{},[2070],{"type":43,"tag":141,"props":2071,"children":2072},{},[2073,2078],{"type":43,"tag":145,"props":2074,"children":2075},{},[2076],{"type":48,"value":2077},"Use HITL When",{"type":43,"tag":145,"props":2079,"children":2080},{},[2081],{"type":48,"value":2082},"Skip HITL When",{"type":43,"tag":156,"props":2084,"children":2085},{},[2086,2099],{"type":43,"tag":141,"props":2087,"children":2088},{},[2089,2094],{"type":43,"tag":163,"props":2090,"children":2091},{},[2092],{"type":48,"value":2093},"High-stakes operations (DB writes, deployments)",{"type":43,"tag":163,"props":2095,"children":2096},{},[2097],{"type":48,"value":2098},"Read-only operations",{"type":43,"tag":141,"props":2100,"children":2101},{},[2102,2107],{"type":43,"tag":163,"props":2103,"children":2104},{},[2105],{"type":48,"value":2106},"Compliance requires human oversight",{"type":43,"tag":163,"props":2108,"children":2109},{},[2110],{"type":48,"value":2111},"Fully automated workflows",{"type":43,"tag":2113,"props":2114,"children":2115},"ex-hitl-setup",{},[2116,2211],{"type":43,"tag":220,"props":2117,"children":2118},{},[2119,2121],{"type":48,"value":2120},"\nConfigure which tools require human approval before execution.\n",{"type":43,"tag":226,"props":2122,"children":2124},{"className":228,"code":2123,"language":220,"meta":230,"style":230},"from deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    interrupt_on={\n        \"write_file\": True,  # All decisions allowed\n        \"execute_sql\": {\"allowed_decisions\": [\"approve\", \"reject\"]},\n        \"read_file\": False,  # No interrupts\n    },\n    checkpointer=MemorySaver()  # REQUIRED for interrupts\n)\n",[2125],{"type":43,"tag":67,"props":2126,"children":2127},{"__ignoreMap":230},[2128,2135,2142,2149,2156,2164,2172,2180,2188,2196,2204],{"type":43,"tag":236,"props":2129,"children":2130},{"class":238,"line":239},[2131],{"type":43,"tag":236,"props":2132,"children":2133},{},[2134],{"type":48,"value":245},{"type":43,"tag":236,"props":2136,"children":2137},{"class":238,"line":248},[2138],{"type":43,"tag":236,"props":2139,"children":2140},{},[2141],{"type":48,"value":1058},{"type":43,"tag":236,"props":2143,"children":2144},{"class":238,"line":257},[2145],{"type":43,"tag":236,"props":2146,"children":2147},{"emptyLinePlaceholder":261},[2148],{"type":48,"value":264},{"type":43,"tag":236,"props":2150,"children":2151},{"class":238,"line":267},[2152],{"type":43,"tag":236,"props":2153,"children":2154},{},[2155],{"type":48,"value":317},{"type":43,"tag":236,"props":2157,"children":2158},{"class":238,"line":276},[2159],{"type":43,"tag":236,"props":2160,"children":2161},{},[2162],{"type":48,"value":2163},"    interrupt_on={\n",{"type":43,"tag":236,"props":2165,"children":2166},{"class":238,"line":285},[2167],{"type":43,"tag":236,"props":2168,"children":2169},{},[2170],{"type":48,"value":2171},"        \"write_file\": True,  # All decisions allowed\n",{"type":43,"tag":236,"props":2173,"children":2174},{"class":238,"line":294},[2175],{"type":43,"tag":236,"props":2176,"children":2177},{},[2178],{"type":48,"value":2179},"        \"execute_sql\": {\"allowed_decisions\": [\"approve\", \"reject\"]},\n",{"type":43,"tag":236,"props":2181,"children":2182},{"class":238,"line":303},[2183],{"type":43,"tag":236,"props":2184,"children":2185},{},[2186],{"type":48,"value":2187},"        \"read_file\": False,  # No interrupts\n",{"type":43,"tag":236,"props":2189,"children":2190},{"class":238,"line":311},[2191],{"type":43,"tag":236,"props":2192,"children":2193},{},[2194],{"type":48,"value":2195},"    },\n",{"type":43,"tag":236,"props":2197,"children":2198},{"class":238,"line":320},[2199],{"type":43,"tag":236,"props":2200,"children":2201},{},[2202],{"type":48,"value":2203},"    checkpointer=MemorySaver()  # REQUIRED for interrupts\n",{"type":43,"tag":236,"props":2205,"children":2206},{"class":238,"line":329},[2207],{"type":43,"tag":236,"props":2208,"children":2209},{},[2210],{"type":48,"value":398},{"type":43,"tag":417,"props":2212,"children":2213},{},[2214,2215],{"type":48,"value":2120},{"type":43,"tag":226,"props":2216,"children":2218},{"className":423,"code":2217,"language":417,"meta":230,"style":230},"import { createDeepAgent } from \"deepagents\";\nimport { MemorySaver } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  interruptOn: {\n    write_file: true,\n    execute_sql: { allowedDecisions: [\"approve\", \"reject\"] },\n    read_file: false,\n  },\n  checkpointer: new MemorySaver()  \u002F\u002F REQUIRED\n});\n",[2219],{"type":43,"tag":67,"props":2220,"children":2221},{"__ignoreMap":230},[2222,2261,2302,2309,2340,2357,2379,2448,2469,2477,2508],{"type":43,"tag":236,"props":2223,"children":2224},{"class":238,"line":239},[2225,2229,2233,2237,2241,2245,2249,2253,2257],{"type":43,"tag":236,"props":2226,"children":2227},{"style":434},[2228],{"type":48,"value":437},{"type":43,"tag":236,"props":2230,"children":2231},{"style":440},[2232],{"type":48,"value":443},{"type":43,"tag":236,"props":2234,"children":2235},{"style":446},[2236],{"type":48,"value":449},{"type":43,"tag":236,"props":2238,"children":2239},{"style":440},[2240],{"type":48,"value":454},{"type":43,"tag":236,"props":2242,"children":2243},{"style":434},[2244],{"type":48,"value":459},{"type":43,"tag":236,"props":2246,"children":2247},{"style":440},[2248],{"type":48,"value":464},{"type":43,"tag":236,"props":2250,"children":2251},{"style":467},[2252],{"type":48,"value":470},{"type":43,"tag":236,"props":2254,"children":2255},{"style":440},[2256],{"type":48,"value":475},{"type":43,"tag":236,"props":2258,"children":2259},{"style":440},[2260],{"type":48,"value":480},{"type":43,"tag":236,"props":2262,"children":2263},{"class":238,"line":248},[2264,2268,2272,2277,2281,2285,2289,2294,2298],{"type":43,"tag":236,"props":2265,"children":2266},{"style":434},[2267],{"type":48,"value":437},{"type":43,"tag":236,"props":2269,"children":2270},{"style":440},[2271],{"type":48,"value":443},{"type":43,"tag":236,"props":2273,"children":2274},{"style":446},[2275],{"type":48,"value":2276}," MemorySaver",{"type":43,"tag":236,"props":2278,"children":2279},{"style":440},[2280],{"type":48,"value":454},{"type":43,"tag":236,"props":2282,"children":2283},{"style":434},[2284],{"type":48,"value":459},{"type":43,"tag":236,"props":2286,"children":2287},{"style":440},[2288],{"type":48,"value":464},{"type":43,"tag":236,"props":2290,"children":2291},{"style":467},[2292],{"type":48,"value":2293},"@langchain\u002Flanggraph",{"type":43,"tag":236,"props":2295,"children":2296},{"style":440},[2297],{"type":48,"value":475},{"type":43,"tag":236,"props":2299,"children":2300},{"style":440},[2301],{"type":48,"value":480},{"type":43,"tag":236,"props":2303,"children":2304},{"class":238,"line":257},[2305],{"type":43,"tag":236,"props":2306,"children":2307},{"emptyLinePlaceholder":261},[2308],{"type":48,"value":264},{"type":43,"tag":236,"props":2310,"children":2311},{"class":238,"line":267},[2312,2316,2320,2324,2328,2332,2336],{"type":43,"tag":236,"props":2313,"children":2314},{"style":574},[2315],{"type":48,"value":577},{"type":43,"tag":236,"props":2317,"children":2318},{"style":446},[2319],{"type":48,"value":824},{"type":43,"tag":236,"props":2321,"children":2322},{"style":440},[2323],{"type":48,"value":587},{"type":43,"tag":236,"props":2325,"children":2326},{"style":434},[2327],{"type":48,"value":833},{"type":43,"tag":236,"props":2329,"children":2330},{"style":590},[2331],{"type":48,"value":449},{"type":43,"tag":236,"props":2333,"children":2334},{"style":446},[2335],{"type":48,"value":747},{"type":43,"tag":236,"props":2337,"children":2338},{"style":440},[2339],{"type":48,"value":846},{"type":43,"tag":236,"props":2341,"children":2342},{"class":238,"line":276},[2343,2348,2352],{"type":43,"tag":236,"props":2344,"children":2345},{"style":667},[2346],{"type":48,"value":2347},"  interruptOn",{"type":43,"tag":236,"props":2349,"children":2350},{"style":440},[2351],{"type":48,"value":675},{"type":43,"tag":236,"props":2353,"children":2354},{"style":440},[2355],{"type":48,"value":2356}," {\n",{"type":43,"tag":236,"props":2358,"children":2359},{"class":238,"line":285},[2360,2365,2369,2375],{"type":43,"tag":236,"props":2361,"children":2362},{"style":667},[2363],{"type":48,"value":2364},"    write_file",{"type":43,"tag":236,"props":2366,"children":2367},{"style":440},[2368],{"type":48,"value":675},{"type":43,"tag":236,"props":2370,"children":2372},{"style":2371},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2373],{"type":48,"value":2374}," true",{"type":43,"tag":236,"props":2376,"children":2377},{"style":440},[2378],{"type":48,"value":656},{"type":43,"tag":236,"props":2380,"children":2381},{"class":238,"line":294},[2382,2387,2391,2395,2400,2404,2408,2412,2417,2421,2425,2429,2434,2438,2443],{"type":43,"tag":236,"props":2383,"children":2384},{"style":667},[2385],{"type":48,"value":2386},"    execute_sql",{"type":43,"tag":236,"props":2388,"children":2389},{"style":440},[2390],{"type":48,"value":675},{"type":43,"tag":236,"props":2392,"children":2393},{"style":440},[2394],{"type":48,"value":443},{"type":43,"tag":236,"props":2396,"children":2397},{"style":667},[2398],{"type":48,"value":2399}," allowedDecisions",{"type":43,"tag":236,"props":2401,"children":2402},{"style":440},[2403],{"type":48,"value":675},{"type":43,"tag":236,"props":2405,"children":2406},{"style":446},[2407],{"type":48,"value":1800},{"type":43,"tag":236,"props":2409,"children":2410},{"style":440},[2411],{"type":48,"value":475},{"type":43,"tag":236,"props":2413,"children":2414},{"style":467},[2415],{"type":48,"value":2416},"approve",{"type":43,"tag":236,"props":2418,"children":2419},{"style":440},[2420],{"type":48,"value":475},{"type":43,"tag":236,"props":2422,"children":2423},{"style":440},[2424],{"type":48,"value":693},{"type":43,"tag":236,"props":2426,"children":2427},{"style":440},[2428],{"type":48,"value":464},{"type":43,"tag":236,"props":2430,"children":2431},{"style":467},[2432],{"type":48,"value":2433},"reject",{"type":43,"tag":236,"props":2435,"children":2436},{"style":440},[2437],{"type":48,"value":475},{"type":43,"tag":236,"props":2439,"children":2440},{"style":446},[2441],{"type":48,"value":2442},"] ",{"type":43,"tag":236,"props":2444,"children":2445},{"style":440},[2446],{"type":48,"value":2447},"},\n",{"type":43,"tag":236,"props":2449,"children":2450},{"class":238,"line":303},[2451,2456,2460,2465],{"type":43,"tag":236,"props":2452,"children":2453},{"style":667},[2454],{"type":48,"value":2455},"    read_file",{"type":43,"tag":236,"props":2457,"children":2458},{"style":440},[2459],{"type":48,"value":675},{"type":43,"tag":236,"props":2461,"children":2462},{"style":2371},[2463],{"type":48,"value":2464}," false",{"type":43,"tag":236,"props":2466,"children":2467},{"style":440},[2468],{"type":48,"value":656},{"type":43,"tag":236,"props":2470,"children":2471},{"class":238,"line":311},[2472],{"type":43,"tag":236,"props":2473,"children":2474},{"style":440},[2475],{"type":48,"value":2476},"  },\n",{"type":43,"tag":236,"props":2478,"children":2479},{"class":238,"line":320},[2480,2485,2489,2494,2498,2503],{"type":43,"tag":236,"props":2481,"children":2482},{"style":667},[2483],{"type":48,"value":2484},"  checkpointer",{"type":43,"tag":236,"props":2486,"children":2487},{"style":440},[2488],{"type":48,"value":675},{"type":43,"tag":236,"props":2490,"children":2491},{"style":440},[2492],{"type":48,"value":2493}," new",{"type":43,"tag":236,"props":2495,"children":2496},{"style":590},[2497],{"type":48,"value":2276},{"type":43,"tag":236,"props":2499,"children":2500},{"style":446},[2501],{"type":48,"value":2502},"()  ",{"type":43,"tag":236,"props":2504,"children":2505},{"style":1024},[2506],{"type":48,"value":2507},"\u002F\u002F REQUIRED\n",{"type":43,"tag":236,"props":2509,"children":2510},{"class":238,"line":329},[2511,2515,2519],{"type":43,"tag":236,"props":2512,"children":2513},{"style":440},[2514],{"type":48,"value":783},{"type":43,"tag":236,"props":2516,"children":2517},{"style":446},[2518],{"type":48,"value":801},{"type":43,"tag":236,"props":2520,"children":2521},{"style":440},[2522],{"type":48,"value":480},{"type":43,"tag":2524,"props":2525,"children":2526},"ex-approval-workflow",{},[2527,2715],{"type":43,"tag":220,"props":2528,"children":2529},{},[2530,2532],{"type":48,"value":2531},"\nComplete workflow: trigger an interrupt, check state, approve action, and resume execution.\n",{"type":43,"tag":226,"props":2533,"children":2535},{"className":228,"code":2534,"language":220,"meta":230,"style":230},"from deepagents import create_deep_agent\nfrom langgraph.checkpoint.memory import MemorySaver\nfrom langgraph.types import Command\n\nagent = create_deep_agent(\n    interrupt_on={\"write_file\": True},\n    checkpointer=MemorySaver()\n)\n\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\n\n# Step 1: Agent proposes write_file - execution pauses\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write config to \u002Fprod.yaml\"}]\n}, config=config)\n\n# Step 2: Check for interrupts\nstate = agent.get_state(config)\nif state.next:\n    print(f\"Pending action\")\n\n# Step 3: Approve and resume\nresult = agent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n",[2536],{"type":43,"tag":67,"props":2537,"children":2538},{"__ignoreMap":230},[2539,2546,2553,2561,2568,2575,2583,2591,2598,2605,2613,2620,2628,2635,2643,2651,2658,2666,2674,2682,2690,2697,2706],{"type":43,"tag":236,"props":2540,"children":2541},{"class":238,"line":239},[2542],{"type":43,"tag":236,"props":2543,"children":2544},{},[2545],{"type":48,"value":245},{"type":43,"tag":236,"props":2547,"children":2548},{"class":238,"line":248},[2549],{"type":43,"tag":236,"props":2550,"children":2551},{},[2552],{"type":48,"value":1058},{"type":43,"tag":236,"props":2554,"children":2555},{"class":238,"line":257},[2556],{"type":43,"tag":236,"props":2557,"children":2558},{},[2559],{"type":48,"value":2560},"from langgraph.types import Command\n",{"type":43,"tag":236,"props":2562,"children":2563},{"class":238,"line":267},[2564],{"type":43,"tag":236,"props":2565,"children":2566},{"emptyLinePlaceholder":261},[2567],{"type":48,"value":264},{"type":43,"tag":236,"props":2569,"children":2570},{"class":238,"line":276},[2571],{"type":43,"tag":236,"props":2572,"children":2573},{},[2574],{"type":48,"value":317},{"type":43,"tag":236,"props":2576,"children":2577},{"class":238,"line":285},[2578],{"type":43,"tag":236,"props":2579,"children":2580},{},[2581],{"type":48,"value":2582},"    interrupt_on={\"write_file\": True},\n",{"type":43,"tag":236,"props":2584,"children":2585},{"class":238,"line":294},[2586],{"type":43,"tag":236,"props":2587,"children":2588},{},[2589],{"type":48,"value":2590},"    checkpointer=MemorySaver()\n",{"type":43,"tag":236,"props":2592,"children":2593},{"class":238,"line":303},[2594],{"type":43,"tag":236,"props":2595,"children":2596},{},[2597],{"type":48,"value":398},{"type":43,"tag":236,"props":2599,"children":2600},{"class":238,"line":311},[2601],{"type":43,"tag":236,"props":2602,"children":2603},{"emptyLinePlaceholder":261},[2604],{"type":48,"value":264},{"type":43,"tag":236,"props":2606,"children":2607},{"class":238,"line":320},[2608],{"type":43,"tag":236,"props":2609,"children":2610},{},[2611],{"type":48,"value":2612},"config = {\"configurable\": {\"thread_id\": \"session-1\"}}\n",{"type":43,"tag":236,"props":2614,"children":2615},{"class":238,"line":329},[2616],{"type":43,"tag":236,"props":2617,"children":2618},{"emptyLinePlaceholder":261},[2619],{"type":48,"value":264},{"type":43,"tag":236,"props":2621,"children":2622},{"class":238,"line":338},[2623],{"type":43,"tag":236,"props":2624,"children":2625},{},[2626],{"type":48,"value":2627},"# Step 1: Agent proposes write_file - execution pauses\n",{"type":43,"tag":236,"props":2629,"children":2630},{"class":238,"line":347},[2631],{"type":43,"tag":236,"props":2632,"children":2633},{},[2634],{"type":48,"value":1560},{"type":43,"tag":236,"props":2636,"children":2637},{"class":238,"line":356},[2638],{"type":43,"tag":236,"props":2639,"children":2640},{},[2641],{"type":48,"value":2642},"    \"messages\": [{\"role\": \"user\", \"content\": \"Write config to \u002Fprod.yaml\"}]\n",{"type":43,"tag":236,"props":2644,"children":2645},{"class":238,"line":365},[2646],{"type":43,"tag":236,"props":2647,"children":2648},{},[2649],{"type":48,"value":2650},"}, config=config)\n",{"type":43,"tag":236,"props":2652,"children":2653},{"class":238,"line":374},[2654],{"type":43,"tag":236,"props":2655,"children":2656},{"emptyLinePlaceholder":261},[2657],{"type":48,"value":264},{"type":43,"tag":236,"props":2659,"children":2660},{"class":238,"line":383},[2661],{"type":43,"tag":236,"props":2662,"children":2663},{},[2664],{"type":48,"value":2665},"# Step 2: Check for interrupts\n",{"type":43,"tag":236,"props":2667,"children":2668},{"class":238,"line":392},[2669],{"type":43,"tag":236,"props":2670,"children":2671},{},[2672],{"type":48,"value":2673},"state = agent.get_state(config)\n",{"type":43,"tag":236,"props":2675,"children":2676},{"class":238,"line":401},[2677],{"type":43,"tag":236,"props":2678,"children":2679},{},[2680],{"type":48,"value":2681},"if state.next:\n",{"type":43,"tag":236,"props":2683,"children":2684},{"class":238,"line":409},[2685],{"type":43,"tag":236,"props":2686,"children":2687},{},[2688],{"type":48,"value":2689},"    print(f\"Pending action\")\n",{"type":43,"tag":236,"props":2691,"children":2692},{"class":238,"line":1020},[2693],{"type":43,"tag":236,"props":2694,"children":2695},{"emptyLinePlaceholder":261},[2696],{"type":48,"value":264},{"type":43,"tag":236,"props":2698,"children":2700},{"class":238,"line":2699},22,[2701],{"type":43,"tag":236,"props":2702,"children":2703},{},[2704],{"type":48,"value":2705},"# Step 3: Approve and resume\n",{"type":43,"tag":236,"props":2707,"children":2709},{"class":238,"line":2708},23,[2710],{"type":43,"tag":236,"props":2711,"children":2712},{},[2713],{"type":48,"value":2714},"result = agent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n",{"type":43,"tag":417,"props":2716,"children":2717},{},[2718,2719],{"type":48,"value":2531},{"type":43,"tag":226,"props":2720,"children":2722},{"className":423,"code":2721,"language":417,"meta":230,"style":230},"import { createDeepAgent } from \"deepagents\";\nimport { MemorySaver, Command } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  interruptOn: { write_file: true },\n  checkpointer: new MemorySaver()\n});\n\nconst config = { configurable: { thread_id: \"session-1\" } };\n\n\u002F\u002F Step 1: Agent proposes write_file - execution pauses\nlet result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Write config to \u002Fprod.yaml\" }]\n}, config);\n\n\u002F\u002F Step 2: Check for interrupts\nconst state = await agent.getState(config);\nif (state.next) {\n  console.log(\"Pending action\");\n}\n\n\u002F\u002F Step 3: Approve and resume\nresult = await agent.invoke(\n  new Command({ resume: { decisions: [{ type: \"approve\" }] } }), config\n);\n",[2723],{"type":43,"tag":67,"props":2724,"children":2725},{"__ignoreMap":230},[2726,2765,2813,2820,2851,2884,2908,2923,2930,2991,2998,3006,3046,3118,3134,3141,3149,3191,3217,3259,3266,3273,3281,3313,3414],{"type":43,"tag":236,"props":2727,"children":2728},{"class":238,"line":239},[2729,2733,2737,2741,2745,2749,2753,2757,2761],{"type":43,"tag":236,"props":2730,"children":2731},{"style":434},[2732],{"type":48,"value":437},{"type":43,"tag":236,"props":2734,"children":2735},{"style":440},[2736],{"type":48,"value":443},{"type":43,"tag":236,"props":2738,"children":2739},{"style":446},[2740],{"type":48,"value":449},{"type":43,"tag":236,"props":2742,"children":2743},{"style":440},[2744],{"type":48,"value":454},{"type":43,"tag":236,"props":2746,"children":2747},{"style":434},[2748],{"type":48,"value":459},{"type":43,"tag":236,"props":2750,"children":2751},{"style":440},[2752],{"type":48,"value":464},{"type":43,"tag":236,"props":2754,"children":2755},{"style":467},[2756],{"type":48,"value":470},{"type":43,"tag":236,"props":2758,"children":2759},{"style":440},[2760],{"type":48,"value":475},{"type":43,"tag":236,"props":2762,"children":2763},{"style":440},[2764],{"type":48,"value":480},{"type":43,"tag":236,"props":2766,"children":2767},{"class":238,"line":248},[2768,2772,2776,2780,2784,2789,2793,2797,2801,2805,2809],{"type":43,"tag":236,"props":2769,"children":2770},{"style":434},[2771],{"type":48,"value":437},{"type":43,"tag":236,"props":2773,"children":2774},{"style":440},[2775],{"type":48,"value":443},{"type":43,"tag":236,"props":2777,"children":2778},{"style":446},[2779],{"type":48,"value":2276},{"type":43,"tag":236,"props":2781,"children":2782},{"style":440},[2783],{"type":48,"value":693},{"type":43,"tag":236,"props":2785,"children":2786},{"style":446},[2787],{"type":48,"value":2788}," Command",{"type":43,"tag":236,"props":2790,"children":2791},{"style":440},[2792],{"type":48,"value":454},{"type":43,"tag":236,"props":2794,"children":2795},{"style":434},[2796],{"type":48,"value":459},{"type":43,"tag":236,"props":2798,"children":2799},{"style":440},[2800],{"type":48,"value":464},{"type":43,"tag":236,"props":2802,"children":2803},{"style":467},[2804],{"type":48,"value":2293},{"type":43,"tag":236,"props":2806,"children":2807},{"style":440},[2808],{"type":48,"value":475},{"type":43,"tag":236,"props":2810,"children":2811},{"style":440},[2812],{"type":48,"value":480},{"type":43,"tag":236,"props":2814,"children":2815},{"class":238,"line":257},[2816],{"type":43,"tag":236,"props":2817,"children":2818},{"emptyLinePlaceholder":261},[2819],{"type":48,"value":264},{"type":43,"tag":236,"props":2821,"children":2822},{"class":238,"line":267},[2823,2827,2831,2835,2839,2843,2847],{"type":43,"tag":236,"props":2824,"children":2825},{"style":574},[2826],{"type":48,"value":577},{"type":43,"tag":236,"props":2828,"children":2829},{"style":446},[2830],{"type":48,"value":824},{"type":43,"tag":236,"props":2832,"children":2833},{"style":440},[2834],{"type":48,"value":587},{"type":43,"tag":236,"props":2836,"children":2837},{"style":434},[2838],{"type":48,"value":833},{"type":43,"tag":236,"props":2840,"children":2841},{"style":590},[2842],{"type":48,"value":449},{"type":43,"tag":236,"props":2844,"children":2845},{"style":446},[2846],{"type":48,"value":747},{"type":43,"tag":236,"props":2848,"children":2849},{"style":440},[2850],{"type":48,"value":846},{"type":43,"tag":236,"props":2852,"children":2853},{"class":238,"line":276},[2854,2858,2862,2866,2871,2875,2879],{"type":43,"tag":236,"props":2855,"children":2856},{"style":667},[2857],{"type":48,"value":2347},{"type":43,"tag":236,"props":2859,"children":2860},{"style":440},[2861],{"type":48,"value":675},{"type":43,"tag":236,"props":2863,"children":2864},{"style":440},[2865],{"type":48,"value":443},{"type":43,"tag":236,"props":2867,"children":2868},{"style":667},[2869],{"type":48,"value":2870}," write_file",{"type":43,"tag":236,"props":2872,"children":2873},{"style":440},[2874],{"type":48,"value":675},{"type":43,"tag":236,"props":2876,"children":2877},{"style":2371},[2878],{"type":48,"value":2374},{"type":43,"tag":236,"props":2880,"children":2881},{"style":440},[2882],{"type":48,"value":2883}," },\n",{"type":43,"tag":236,"props":2885,"children":2886},{"class":238,"line":285},[2887,2891,2895,2899,2903],{"type":43,"tag":236,"props":2888,"children":2889},{"style":667},[2890],{"type":48,"value":2484},{"type":43,"tag":236,"props":2892,"children":2893},{"style":440},[2894],{"type":48,"value":675},{"type":43,"tag":236,"props":2896,"children":2897},{"style":440},[2898],{"type":48,"value":2493},{"type":43,"tag":236,"props":2900,"children":2901},{"style":590},[2902],{"type":48,"value":2276},{"type":43,"tag":236,"props":2904,"children":2905},{"style":446},[2906],{"type":48,"value":2907},"()\n",{"type":43,"tag":236,"props":2909,"children":2910},{"class":238,"line":294},[2911,2915,2919],{"type":43,"tag":236,"props":2912,"children":2913},{"style":440},[2914],{"type":48,"value":783},{"type":43,"tag":236,"props":2916,"children":2917},{"style":446},[2918],{"type":48,"value":801},{"type":43,"tag":236,"props":2920,"children":2921},{"style":440},[2922],{"type":48,"value":480},{"type":43,"tag":236,"props":2924,"children":2925},{"class":238,"line":303},[2926],{"type":43,"tag":236,"props":2927,"children":2928},{"emptyLinePlaceholder":261},[2929],{"type":48,"value":264},{"type":43,"tag":236,"props":2931,"children":2932},{"class":238,"line":311},[2933,2937,2942,2946,2950,2954,2958,2962,2966,2970,2974,2978,2982,2986],{"type":43,"tag":236,"props":2934,"children":2935},{"style":574},[2936],{"type":48,"value":577},{"type":43,"tag":236,"props":2938,"children":2939},{"style":446},[2940],{"type":48,"value":2941}," config ",{"type":43,"tag":236,"props":2943,"children":2944},{"style":440},[2945],{"type":48,"value":587},{"type":43,"tag":236,"props":2947,"children":2948},{"style":440},[2949],{"type":48,"value":443},{"type":43,"tag":236,"props":2951,"children":2952},{"style":667},[2953],{"type":48,"value":1878},{"type":43,"tag":236,"props":2955,"children":2956},{"style":440},[2957],{"type":48,"value":675},{"type":43,"tag":236,"props":2959,"children":2960},{"style":440},[2961],{"type":48,"value":443},{"type":43,"tag":236,"props":2963,"children":2964},{"style":667},[2965],{"type":48,"value":1891},{"type":43,"tag":236,"props":2967,"children":2968},{"style":440},[2969],{"type":48,"value":675},{"type":43,"tag":236,"props":2971,"children":2972},{"style":440},[2973],{"type":48,"value":464},{"type":43,"tag":236,"props":2975,"children":2976},{"style":467},[2977],{"type":48,"value":1904},{"type":43,"tag":236,"props":2979,"children":2980},{"style":440},[2981],{"type":48,"value":475},{"type":43,"tag":236,"props":2983,"children":2984},{"style":440},[2985],{"type":48,"value":454},{"type":43,"tag":236,"props":2987,"children":2988},{"style":440},[2989],{"type":48,"value":2990}," };\n",{"type":43,"tag":236,"props":2992,"children":2993},{"class":238,"line":320},[2994],{"type":43,"tag":236,"props":2995,"children":2996},{"emptyLinePlaceholder":261},[2997],{"type":48,"value":264},{"type":43,"tag":236,"props":2999,"children":3000},{"class":238,"line":329},[3001],{"type":43,"tag":236,"props":3002,"children":3003},{"style":1024},[3004],{"type":48,"value":3005},"\u002F\u002F Step 1: Agent proposes write_file - execution pauses\n",{"type":43,"tag":236,"props":3007,"children":3008},{"class":238,"line":338},[3009,3014,3018,3022,3026,3030,3034,3038,3042],{"type":43,"tag":236,"props":3010,"children":3011},{"style":574},[3012],{"type":48,"value":3013},"let",{"type":43,"tag":236,"props":3015,"children":3016},{"style":446},[3017],{"type":48,"value":1753},{"type":43,"tag":236,"props":3019,"children":3020},{"style":440},[3021],{"type":48,"value":587},{"type":43,"tag":236,"props":3023,"children":3024},{"style":434},[3025],{"type":48,"value":833},{"type":43,"tag":236,"props":3027,"children":3028},{"style":446},[3029],{"type":48,"value":1766},{"type":43,"tag":236,"props":3031,"children":3032},{"style":440},[3033],{"type":48,"value":737},{"type":43,"tag":236,"props":3035,"children":3036},{"style":590},[3037],{"type":48,"value":1775},{"type":43,"tag":236,"props":3039,"children":3040},{"style":446},[3041],{"type":48,"value":747},{"type":43,"tag":236,"props":3043,"children":3044},{"style":440},[3045],{"type":48,"value":846},{"type":43,"tag":236,"props":3047,"children":3048},{"class":238,"line":347},[3049,3053,3057,3061,3065,3069,3073,3077,3081,3085,3089,3093,3097,3101,3106,3110,3114],{"type":43,"tag":236,"props":3050,"children":3051},{"style":667},[3052],{"type":48,"value":1791},{"type":43,"tag":236,"props":3054,"children":3055},{"style":440},[3056],{"type":48,"value":675},{"type":43,"tag":236,"props":3058,"children":3059},{"style":446},[3060],{"type":48,"value":1800},{"type":43,"tag":236,"props":3062,"children":3063},{"style":440},[3064],{"type":48,"value":752},{"type":43,"tag":236,"props":3066,"children":3067},{"style":667},[3068],{"type":48,"value":1809},{"type":43,"tag":236,"props":3070,"children":3071},{"style":440},[3072],{"type":48,"value":675},{"type":43,"tag":236,"props":3074,"children":3075},{"style":440},[3076],{"type":48,"value":464},{"type":43,"tag":236,"props":3078,"children":3079},{"style":467},[3080],{"type":48,"value":1822},{"type":43,"tag":236,"props":3082,"children":3083},{"style":440},[3084],{"type":48,"value":475},{"type":43,"tag":236,"props":3086,"children":3087},{"style":440},[3088],{"type":48,"value":693},{"type":43,"tag":236,"props":3090,"children":3091},{"style":667},[3092],{"type":48,"value":1835},{"type":43,"tag":236,"props":3094,"children":3095},{"style":440},[3096],{"type":48,"value":675},{"type":43,"tag":236,"props":3098,"children":3099},{"style":440},[3100],{"type":48,"value":464},{"type":43,"tag":236,"props":3102,"children":3103},{"style":467},[3104],{"type":48,"value":3105},"Write config to \u002Fprod.yaml",{"type":43,"tag":236,"props":3107,"children":3108},{"style":440},[3109],{"type":48,"value":475},{"type":43,"tag":236,"props":3111,"children":3112},{"style":440},[3113],{"type":48,"value":454},{"type":43,"tag":236,"props":3115,"children":3116},{"style":446},[3117],{"type":48,"value":1861},{"type":43,"tag":236,"props":3119,"children":3120},{"class":238,"line":356},[3121,3125,3130],{"type":43,"tag":236,"props":3122,"children":3123},{"style":440},[3124],{"type":48,"value":1869},{"type":43,"tag":236,"props":3126,"children":3127},{"style":446},[3128],{"type":48,"value":3129}," config)",{"type":43,"tag":236,"props":3131,"children":3132},{"style":440},[3133],{"type":48,"value":480},{"type":43,"tag":236,"props":3135,"children":3136},{"class":238,"line":365},[3137],{"type":43,"tag":236,"props":3138,"children":3139},{"emptyLinePlaceholder":261},[3140],{"type":48,"value":264},{"type":43,"tag":236,"props":3142,"children":3143},{"class":238,"line":374},[3144],{"type":43,"tag":236,"props":3145,"children":3146},{"style":1024},[3147],{"type":48,"value":3148},"\u002F\u002F Step 2: Check for interrupts\n",{"type":43,"tag":236,"props":3150,"children":3151},{"class":238,"line":383},[3152,3156,3161,3165,3169,3173,3177,3182,3187],{"type":43,"tag":236,"props":3153,"children":3154},{"style":574},[3155],{"type":48,"value":577},{"type":43,"tag":236,"props":3157,"children":3158},{"style":446},[3159],{"type":48,"value":3160}," state ",{"type":43,"tag":236,"props":3162,"children":3163},{"style":440},[3164],{"type":48,"value":587},{"type":43,"tag":236,"props":3166,"children":3167},{"style":434},[3168],{"type":48,"value":833},{"type":43,"tag":236,"props":3170,"children":3171},{"style":446},[3172],{"type":48,"value":1766},{"type":43,"tag":236,"props":3174,"children":3175},{"style":440},[3176],{"type":48,"value":737},{"type":43,"tag":236,"props":3178,"children":3179},{"style":590},[3180],{"type":48,"value":3181},"getState",{"type":43,"tag":236,"props":3183,"children":3184},{"style":446},[3185],{"type":48,"value":3186},"(config)",{"type":43,"tag":236,"props":3188,"children":3189},{"style":440},[3190],{"type":48,"value":480},{"type":43,"tag":236,"props":3192,"children":3193},{"class":238,"line":392},[3194,3199,3204,3208,3213],{"type":43,"tag":236,"props":3195,"children":3196},{"style":434},[3197],{"type":48,"value":3198},"if",{"type":43,"tag":236,"props":3200,"children":3201},{"style":446},[3202],{"type":48,"value":3203}," (state",{"type":43,"tag":236,"props":3205,"children":3206},{"style":440},[3207],{"type":48,"value":737},{"type":43,"tag":236,"props":3209,"children":3210},{"style":446},[3211],{"type":48,"value":3212},"next) ",{"type":43,"tag":236,"props":3214,"children":3215},{"style":440},[3216],{"type":48,"value":846},{"type":43,"tag":236,"props":3218,"children":3219},{"class":238,"line":401},[3220,3225,3229,3234,3238,3242,3247,3251,3255],{"type":43,"tag":236,"props":3221,"children":3222},{"style":446},[3223],{"type":48,"value":3224},"  console",{"type":43,"tag":236,"props":3226,"children":3227},{"style":440},[3228],{"type":48,"value":737},{"type":43,"tag":236,"props":3230,"children":3231},{"style":590},[3232],{"type":48,"value":3233},"log",{"type":43,"tag":236,"props":3235,"children":3236},{"style":667},[3237],{"type":48,"value":747},{"type":43,"tag":236,"props":3239,"children":3240},{"style":440},[3241],{"type":48,"value":475},{"type":43,"tag":236,"props":3243,"children":3244},{"style":467},[3245],{"type":48,"value":3246},"Pending action",{"type":43,"tag":236,"props":3248,"children":3249},{"style":440},[3250],{"type":48,"value":475},{"type":43,"tag":236,"props":3252,"children":3253},{"style":667},[3254],{"type":48,"value":801},{"type":43,"tag":236,"props":3256,"children":3257},{"style":440},[3258],{"type":48,"value":480},{"type":43,"tag":236,"props":3260,"children":3261},{"class":238,"line":409},[3262],{"type":43,"tag":236,"props":3263,"children":3264},{"style":440},[3265],{"type":48,"value":793},{"type":43,"tag":236,"props":3267,"children":3268},{"class":238,"line":1020},[3269],{"type":43,"tag":236,"props":3270,"children":3271},{"emptyLinePlaceholder":261},[3272],{"type":48,"value":264},{"type":43,"tag":236,"props":3274,"children":3275},{"class":238,"line":2699},[3276],{"type":43,"tag":236,"props":3277,"children":3278},{"style":1024},[3279],{"type":48,"value":3280},"\u002F\u002F Step 3: Approve and resume\n",{"type":43,"tag":236,"props":3282,"children":3283},{"class":238,"line":2708},[3284,3289,3293,3297,3301,3305,3309],{"type":43,"tag":236,"props":3285,"children":3286},{"style":446},[3287],{"type":48,"value":3288},"result ",{"type":43,"tag":236,"props":3290,"children":3291},{"style":440},[3292],{"type":48,"value":587},{"type":43,"tag":236,"props":3294,"children":3295},{"style":434},[3296],{"type":48,"value":833},{"type":43,"tag":236,"props":3298,"children":3299},{"style":446},[3300],{"type":48,"value":1766},{"type":43,"tag":236,"props":3302,"children":3303},{"style":440},[3304],{"type":48,"value":737},{"type":43,"tag":236,"props":3306,"children":3307},{"style":590},[3308],{"type":48,"value":1775},{"type":43,"tag":236,"props":3310,"children":3311},{"style":446},[3312],{"type":48,"value":597},{"type":43,"tag":236,"props":3314,"children":3316},{"class":238,"line":3315},24,[3317,3322,3326,3330,3334,3339,3343,3347,3352,3356,3360,3364,3369,3373,3377,3381,3385,3389,3393,3397,3401,3405,3409],{"type":43,"tag":236,"props":3318,"children":3319},{"style":440},[3320],{"type":48,"value":3321},"  new",{"type":43,"tag":236,"props":3323,"children":3324},{"style":590},[3325],{"type":48,"value":2788},{"type":43,"tag":236,"props":3327,"children":3328},{"style":446},[3329],{"type":48,"value":747},{"type":43,"tag":236,"props":3331,"children":3332},{"style":440},[3333],{"type":48,"value":752},{"type":43,"tag":236,"props":3335,"children":3336},{"style":667},[3337],{"type":48,"value":3338}," resume",{"type":43,"tag":236,"props":3340,"children":3341},{"style":440},[3342],{"type":48,"value":675},{"type":43,"tag":236,"props":3344,"children":3345},{"style":440},[3346],{"type":48,"value":443},{"type":43,"tag":236,"props":3348,"children":3349},{"style":667},[3350],{"type":48,"value":3351}," decisions",{"type":43,"tag":236,"props":3353,"children":3354},{"style":440},[3355],{"type":48,"value":675},{"type":43,"tag":236,"props":3357,"children":3358},{"style":446},[3359],{"type":48,"value":1800},{"type":43,"tag":236,"props":3361,"children":3362},{"style":440},[3363],{"type":48,"value":752},{"type":43,"tag":236,"props":3365,"children":3366},{"style":667},[3367],{"type":48,"value":3368}," type",{"type":43,"tag":236,"props":3370,"children":3371},{"style":440},[3372],{"type":48,"value":675},{"type":43,"tag":236,"props":3374,"children":3375},{"style":440},[3376],{"type":48,"value":464},{"type":43,"tag":236,"props":3378,"children":3379},{"style":467},[3380],{"type":48,"value":2416},{"type":43,"tag":236,"props":3382,"children":3383},{"style":440},[3384],{"type":48,"value":475},{"type":43,"tag":236,"props":3386,"children":3387},{"style":440},[3388],{"type":48,"value":454},{"type":43,"tag":236,"props":3390,"children":3391},{"style":446},[3392],{"type":48,"value":2442},{"type":43,"tag":236,"props":3394,"children":3395},{"style":440},[3396],{"type":48,"value":783},{"type":43,"tag":236,"props":3398,"children":3399},{"style":440},[3400],{"type":48,"value":454},{"type":43,"tag":236,"props":3402,"children":3403},{"style":446},[3404],{"type":48,"value":801},{"type":43,"tag":236,"props":3406,"children":3407},{"style":440},[3408],{"type":48,"value":693},{"type":43,"tag":236,"props":3410,"children":3411},{"style":446},[3412],{"type":48,"value":3413}," config\n",{"type":43,"tag":236,"props":3415,"children":3417},{"class":238,"line":3416},25,[3418,3422],{"type":43,"tag":236,"props":3419,"children":3420},{"style":446},[3421],{"type":48,"value":801},{"type":43,"tag":236,"props":3423,"children":3424},{"style":440},[3425],{"type":48,"value":480},{"type":43,"tag":3427,"props":3428,"children":3429},"ex-reject-with-feedback",{},[3430,3473],{"type":43,"tag":220,"props":3431,"children":3432},{},[3433,3435],{"type":48,"value":3434},"\nReject a pending action with feedback, prompting the agent to try a different approach.\n",{"type":43,"tag":226,"props":3436,"children":3438},{"className":228,"code":3437,"language":220,"meta":230,"style":230},"result = agent.invoke(\n    Command(resume={\"decisions\": [{\"type\": \"reject\", \"message\": \"Run tests first\"}]}),\n    config=config,\n)\n",[3439],{"type":43,"tag":67,"props":3440,"children":3441},{"__ignoreMap":230},[3442,3450,3458,3466],{"type":43,"tag":236,"props":3443,"children":3444},{"class":238,"line":239},[3445],{"type":43,"tag":236,"props":3446,"children":3447},{},[3448],{"type":48,"value":3449},"result = agent.invoke(\n",{"type":43,"tag":236,"props":3451,"children":3452},{"class":238,"line":248},[3453],{"type":43,"tag":236,"props":3454,"children":3455},{},[3456],{"type":48,"value":3457},"    Command(resume={\"decisions\": [{\"type\": \"reject\", \"message\": \"Run tests first\"}]}),\n",{"type":43,"tag":236,"props":3459,"children":3460},{"class":238,"line":257},[3461],{"type":43,"tag":236,"props":3462,"children":3463},{},[3464],{"type":48,"value":3465},"    config=config,\n",{"type":43,"tag":236,"props":3467,"children":3468},{"class":238,"line":267},[3469],{"type":43,"tag":236,"props":3470,"children":3471},{},[3472],{"type":48,"value":398},{"type":43,"tag":417,"props":3474,"children":3475},{},[3476,3477],{"type":48,"value":3434},{"type":43,"tag":226,"props":3478,"children":3480},{"className":423,"code":3479,"language":417,"meta":230,"style":230},"const result = await agent.invoke(\n  new Command({ resume: { decisions: [{ type: \"reject\", message: \"Run tests first\" }] } }),\n  config,\n);\n",[3481],{"type":43,"tag":67,"props":3482,"children":3483},{"__ignoreMap":230},[3484,3519,3636,3648],{"type":43,"tag":236,"props":3485,"children":3486},{"class":238,"line":239},[3487,3491,3495,3499,3503,3507,3511,3515],{"type":43,"tag":236,"props":3488,"children":3489},{"style":574},[3490],{"type":48,"value":577},{"type":43,"tag":236,"props":3492,"children":3493},{"style":446},[3494],{"type":48,"value":1753},{"type":43,"tag":236,"props":3496,"children":3497},{"style":440},[3498],{"type":48,"value":587},{"type":43,"tag":236,"props":3500,"children":3501},{"style":434},[3502],{"type":48,"value":833},{"type":43,"tag":236,"props":3504,"children":3505},{"style":446},[3506],{"type":48,"value":1766},{"type":43,"tag":236,"props":3508,"children":3509},{"style":440},[3510],{"type":48,"value":737},{"type":43,"tag":236,"props":3512,"children":3513},{"style":590},[3514],{"type":48,"value":1775},{"type":43,"tag":236,"props":3516,"children":3517},{"style":446},[3518],{"type":48,"value":597},{"type":43,"tag":236,"props":3520,"children":3521},{"class":238,"line":248},[3522,3526,3530,3534,3538,3542,3546,3550,3554,3558,3562,3566,3570,3574,3578,3582,3586,3590,3595,3599,3603,3608,3612,3616,3620,3624,3628,3632],{"type":43,"tag":236,"props":3523,"children":3524},{"style":440},[3525],{"type":48,"value":3321},{"type":43,"tag":236,"props":3527,"children":3528},{"style":590},[3529],{"type":48,"value":2788},{"type":43,"tag":236,"props":3531,"children":3532},{"style":446},[3533],{"type":48,"value":747},{"type":43,"tag":236,"props":3535,"children":3536},{"style":440},[3537],{"type":48,"value":752},{"type":43,"tag":236,"props":3539,"children":3540},{"style":667},[3541],{"type":48,"value":3338},{"type":43,"tag":236,"props":3543,"children":3544},{"style":440},[3545],{"type":48,"value":675},{"type":43,"tag":236,"props":3547,"children":3548},{"style":440},[3549],{"type":48,"value":443},{"type":43,"tag":236,"props":3551,"children":3552},{"style":667},[3553],{"type":48,"value":3351},{"type":43,"tag":236,"props":3555,"children":3556},{"style":440},[3557],{"type":48,"value":675},{"type":43,"tag":236,"props":3559,"children":3560},{"style":446},[3561],{"type":48,"value":1800},{"type":43,"tag":236,"props":3563,"children":3564},{"style":440},[3565],{"type":48,"value":752},{"type":43,"tag":236,"props":3567,"children":3568},{"style":667},[3569],{"type":48,"value":3368},{"type":43,"tag":236,"props":3571,"children":3572},{"style":440},[3573],{"type":48,"value":675},{"type":43,"tag":236,"props":3575,"children":3576},{"style":440},[3577],{"type":48,"value":464},{"type":43,"tag":236,"props":3579,"children":3580},{"style":467},[3581],{"type":48,"value":2433},{"type":43,"tag":236,"props":3583,"children":3584},{"style":440},[3585],{"type":48,"value":475},{"type":43,"tag":236,"props":3587,"children":3588},{"style":440},[3589],{"type":48,"value":693},{"type":43,"tag":236,"props":3591,"children":3592},{"style":667},[3593],{"type":48,"value":3594}," message",{"type":43,"tag":236,"props":3596,"children":3597},{"style":440},[3598],{"type":48,"value":675},{"type":43,"tag":236,"props":3600,"children":3601},{"style":440},[3602],{"type":48,"value":464},{"type":43,"tag":236,"props":3604,"children":3605},{"style":467},[3606],{"type":48,"value":3607},"Run tests first",{"type":43,"tag":236,"props":3609,"children":3610},{"style":440},[3611],{"type":48,"value":475},{"type":43,"tag":236,"props":3613,"children":3614},{"style":440},[3615],{"type":48,"value":454},{"type":43,"tag":236,"props":3617,"children":3618},{"style":446},[3619],{"type":48,"value":2442},{"type":43,"tag":236,"props":3621,"children":3622},{"style":440},[3623],{"type":48,"value":783},{"type":43,"tag":236,"props":3625,"children":3626},{"style":440},[3627],{"type":48,"value":454},{"type":43,"tag":236,"props":3629,"children":3630},{"style":446},[3631],{"type":48,"value":801},{"type":43,"tag":236,"props":3633,"children":3634},{"style":440},[3635],{"type":48,"value":656},{"type":43,"tag":236,"props":3637,"children":3638},{"class":238,"line":257},[3639,3644],{"type":43,"tag":236,"props":3640,"children":3641},{"style":446},[3642],{"type":48,"value":3643},"  config",{"type":43,"tag":236,"props":3645,"children":3646},{"style":440},[3647],{"type":48,"value":656},{"type":43,"tag":236,"props":3649,"children":3650},{"class":238,"line":267},[3651,3655],{"type":43,"tag":236,"props":3652,"children":3653},{"style":446},[3654],{"type":48,"value":801},{"type":43,"tag":236,"props":3656,"children":3657},{"style":440},[3658],{"type":48,"value":480},{"type":43,"tag":3660,"props":3661,"children":3662},"ex-edit-before-execution",{},[3663],{"type":43,"tag":220,"props":3664,"children":3665},{},[3666,3668],{"type":48,"value":3667},"\nEdit the proposed action arguments before allowing execution.\n",{"type":43,"tag":226,"props":3669,"children":3671},{"className":228,"code":3670,"language":220,"meta":230,"style":230},"result = agent.invoke(\n    Command(resume={\"decisions\": [{\n        \"type\": \"edit\",\n        \"edited_action\": {\n            \"name\": \"execute_sql\",\n            \"args\": {\"query\": \"DELETE FROM users WHERE last_login \u003C '2020-01-01' LIMIT 100\"},\n        },\n    }]}),\n    config=config,\n)\n",[3672],{"type":43,"tag":67,"props":3673,"children":3674},{"__ignoreMap":230},[3675,3682,3690,3698,3706,3714,3722,3730,3738,3745],{"type":43,"tag":236,"props":3676,"children":3677},{"class":238,"line":239},[3678],{"type":43,"tag":236,"props":3679,"children":3680},{},[3681],{"type":48,"value":3449},{"type":43,"tag":236,"props":3683,"children":3684},{"class":238,"line":248},[3685],{"type":43,"tag":236,"props":3686,"children":3687},{},[3688],{"type":48,"value":3689},"    Command(resume={\"decisions\": [{\n",{"type":43,"tag":236,"props":3691,"children":3692},{"class":238,"line":257},[3693],{"type":43,"tag":236,"props":3694,"children":3695},{},[3696],{"type":48,"value":3697},"        \"type\": \"edit\",\n",{"type":43,"tag":236,"props":3699,"children":3700},{"class":238,"line":267},[3701],{"type":43,"tag":236,"props":3702,"children":3703},{},[3704],{"type":48,"value":3705},"        \"edited_action\": {\n",{"type":43,"tag":236,"props":3707,"children":3708},{"class":238,"line":276},[3709],{"type":43,"tag":236,"props":3710,"children":3711},{},[3712],{"type":48,"value":3713},"            \"name\": \"execute_sql\",\n",{"type":43,"tag":236,"props":3715,"children":3716},{"class":238,"line":285},[3717],{"type":43,"tag":236,"props":3718,"children":3719},{},[3720],{"type":48,"value":3721},"            \"args\": {\"query\": \"DELETE FROM users WHERE last_login \u003C '2020-01-01' LIMIT 100\"},\n",{"type":43,"tag":236,"props":3723,"children":3724},{"class":238,"line":294},[3725],{"type":43,"tag":236,"props":3726,"children":3727},{},[3728],{"type":48,"value":3729},"        },\n",{"type":43,"tag":236,"props":3731,"children":3732},{"class":238,"line":303},[3733],{"type":43,"tag":236,"props":3734,"children":3735},{},[3736],{"type":48,"value":3737},"    }]}),\n",{"type":43,"tag":236,"props":3739,"children":3740},{"class":238,"line":311},[3741],{"type":43,"tag":236,"props":3742,"children":3743},{},[3744],{"type":48,"value":3465},{"type":43,"tag":236,"props":3746,"children":3747},{"class":238,"line":320},[3748],{"type":43,"tag":236,"props":3749,"children":3750},{},[3751],{"type":48,"value":398},{"type":43,"tag":3753,"props":3754,"children":3755},"boundaries",{},[3756,3758,3781,3788,3823,4078,4495],{"type":48,"value":3757},"\n### What Agents CAN Configure\n",{"type":43,"tag":1462,"props":3759,"children":3760},{},[3761,3766,3771,3776],{"type":43,"tag":55,"props":3762,"children":3763},{},[3764],{"type":48,"value":3765},"Subagent names, tools, models, system prompts",{"type":43,"tag":55,"props":3767,"children":3768},{},[3769],{"type":48,"value":3770},"Which tools require approval",{"type":43,"tag":55,"props":3772,"children":3773},{},[3774],{"type":48,"value":3775},"Allowed decision types per tool",{"type":43,"tag":55,"props":3777,"children":3778},{},[3779],{"type":48,"value":3780},"TodoList content and structure",{"type":43,"tag":3782,"props":3783,"children":3785},"h3",{"id":3784},"what-agents-cannot-configure",[3786],{"type":48,"value":3787},"What Agents CANNOT Configure",{"type":43,"tag":1462,"props":3789,"children":3790},{},[3791,3808,3813,3818],{"type":43,"tag":55,"props":3792,"children":3793},{},[3794,3796,3801,3802,3807],{"type":48,"value":3795},"Tool names (",{"type":43,"tag":67,"props":3797,"children":3799},{"className":3798},[],[3800],{"type":48,"value":72},{"type":48,"value":1494},{"type":43,"tag":67,"props":3803,"children":3805},{"className":3804},[],[3806],{"type":48,"value":90},{"type":48,"value":801},{"type":43,"tag":55,"props":3809,"children":3810},{},[3811],{"type":48,"value":3812},"HITL protocol (approve\u002Fedit\u002Freject structure)",{"type":43,"tag":55,"props":3814,"children":3815},{},[3816],{"type":48,"value":3817},"Skip checkpointer requirement for interrupts",{"type":43,"tag":55,"props":3819,"children":3820},{},[3821],{"type":48,"value":3822},"Make subagents stateful (they're ephemeral)\n\n",{"type":43,"tag":3824,"props":3825,"children":3826},"fix-checkpointer-required",{},[3827,3878],{"type":43,"tag":220,"props":3828,"children":3829},{},[3830,3832],{"type":48,"value":3831},"\nCheckpointer is required when using interrupt_on for HITL workflows.\n",{"type":43,"tag":226,"props":3833,"children":3835},{"className":228,"code":3834,"language":220,"meta":230,"style":230},"# WRONG\nagent = create_deep_agent(interrupt_on={\"write_file\": True})\n\n# CORRECT\nagent = create_deep_agent(interrupt_on={\"write_file\": True}, checkpointer=MemorySaver())\n",[3836],{"type":43,"tag":67,"props":3837,"children":3838},{"__ignoreMap":230},[3839,3847,3855,3862,3870],{"type":43,"tag":236,"props":3840,"children":3841},{"class":238,"line":239},[3842],{"type":43,"tag":236,"props":3843,"children":3844},{},[3845],{"type":48,"value":3846},"# WRONG\n",{"type":43,"tag":236,"props":3848,"children":3849},{"class":238,"line":248},[3850],{"type":43,"tag":236,"props":3851,"children":3852},{},[3853],{"type":48,"value":3854},"agent = create_deep_agent(interrupt_on={\"write_file\": True})\n",{"type":43,"tag":236,"props":3856,"children":3857},{"class":238,"line":257},[3858],{"type":43,"tag":236,"props":3859,"children":3860},{"emptyLinePlaceholder":261},[3861],{"type":48,"value":264},{"type":43,"tag":236,"props":3863,"children":3864},{"class":238,"line":267},[3865],{"type":43,"tag":236,"props":3866,"children":3867},{},[3868],{"type":48,"value":3869},"# CORRECT\n",{"type":43,"tag":236,"props":3871,"children":3872},{"class":238,"line":276},[3873],{"type":43,"tag":236,"props":3874,"children":3875},{},[3876],{"type":48,"value":3877},"agent = create_deep_agent(interrupt_on={\"write_file\": True}, checkpointer=MemorySaver())\n",{"type":43,"tag":417,"props":3879,"children":3880},{},[3881,3883],{"type":48,"value":3882},"\nCheckpointer is required when using interruptOn for HITL workflows.\n",{"type":43,"tag":226,"props":3884,"children":3886},{"className":423,"code":3885,"language":417,"meta":230,"style":230},"\u002F\u002F WRONG\nconst agent = await createDeepAgent({ interruptOn: { write_file: true } });\n\n\u002F\u002F CORRECT\nconst agent = await createDeepAgent({ interruptOn: { write_file: true }, checkpointer: new MemorySaver() });\n",[3887],{"type":43,"tag":67,"props":3888,"children":3889},{"__ignoreMap":230},[3890,3898,3970,3977,3985],{"type":43,"tag":236,"props":3891,"children":3892},{"class":238,"line":239},[3893],{"type":43,"tag":236,"props":3894,"children":3895},{"style":1024},[3896],{"type":48,"value":3897},"\u002F\u002F WRONG\n",{"type":43,"tag":236,"props":3899,"children":3900},{"class":238,"line":248},[3901,3905,3909,3913,3917,3921,3925,3929,3934,3938,3942,3946,3950,3954,3958,3962,3966],{"type":43,"tag":236,"props":3902,"children":3903},{"style":574},[3904],{"type":48,"value":577},{"type":43,"tag":236,"props":3906,"children":3907},{"style":446},[3908],{"type":48,"value":824},{"type":43,"tag":236,"props":3910,"children":3911},{"style":440},[3912],{"type":48,"value":587},{"type":43,"tag":236,"props":3914,"children":3915},{"style":434},[3916],{"type":48,"value":833},{"type":43,"tag":236,"props":3918,"children":3919},{"style":590},[3920],{"type":48,"value":449},{"type":43,"tag":236,"props":3922,"children":3923},{"style":446},[3924],{"type":48,"value":747},{"type":43,"tag":236,"props":3926,"children":3927},{"style":440},[3928],{"type":48,"value":752},{"type":43,"tag":236,"props":3930,"children":3931},{"style":667},[3932],{"type":48,"value":3933}," interruptOn",{"type":43,"tag":236,"props":3935,"children":3936},{"style":440},[3937],{"type":48,"value":675},{"type":43,"tag":236,"props":3939,"children":3940},{"style":440},[3941],{"type":48,"value":443},{"type":43,"tag":236,"props":3943,"children":3944},{"style":667},[3945],{"type":48,"value":2870},{"type":43,"tag":236,"props":3947,"children":3948},{"style":440},[3949],{"type":48,"value":675},{"type":43,"tag":236,"props":3951,"children":3952},{"style":2371},[3953],{"type":48,"value":2374},{"type":43,"tag":236,"props":3955,"children":3956},{"style":440},[3957],{"type":48,"value":454},{"type":43,"tag":236,"props":3959,"children":3960},{"style":440},[3961],{"type":48,"value":454},{"type":43,"tag":236,"props":3963,"children":3964},{"style":446},[3965],{"type":48,"value":801},{"type":43,"tag":236,"props":3967,"children":3968},{"style":440},[3969],{"type":48,"value":480},{"type":43,"tag":236,"props":3971,"children":3972},{"class":238,"line":257},[3973],{"type":43,"tag":236,"props":3974,"children":3975},{"emptyLinePlaceholder":261},[3976],{"type":48,"value":264},{"type":43,"tag":236,"props":3978,"children":3979},{"class":238,"line":267},[3980],{"type":43,"tag":236,"props":3981,"children":3982},{"style":1024},[3983],{"type":48,"value":3984},"\u002F\u002F CORRECT\n",{"type":43,"tag":236,"props":3986,"children":3987},{"class":238,"line":276},[3988,3992,3996,4000,4004,4008,4012,4016,4020,4024,4028,4032,4036,4040,4045,4050,4054,4058,4062,4066,4070,4074],{"type":43,"tag":236,"props":3989,"children":3990},{"style":574},[3991],{"type":48,"value":577},{"type":43,"tag":236,"props":3993,"children":3994},{"style":446},[3995],{"type":48,"value":824},{"type":43,"tag":236,"props":3997,"children":3998},{"style":440},[3999],{"type":48,"value":587},{"type":43,"tag":236,"props":4001,"children":4002},{"style":434},[4003],{"type":48,"value":833},{"type":43,"tag":236,"props":4005,"children":4006},{"style":590},[4007],{"type":48,"value":449},{"type":43,"tag":236,"props":4009,"children":4010},{"style":446},[4011],{"type":48,"value":747},{"type":43,"tag":236,"props":4013,"children":4014},{"style":440},[4015],{"type":48,"value":752},{"type":43,"tag":236,"props":4017,"children":4018},{"style":667},[4019],{"type":48,"value":3933},{"type":43,"tag":236,"props":4021,"children":4022},{"style":440},[4023],{"type":48,"value":675},{"type":43,"tag":236,"props":4025,"children":4026},{"style":440},[4027],{"type":48,"value":443},{"type":43,"tag":236,"props":4029,"children":4030},{"style":667},[4031],{"type":48,"value":2870},{"type":43,"tag":236,"props":4033,"children":4034},{"style":440},[4035],{"type":48,"value":675},{"type":43,"tag":236,"props":4037,"children":4038},{"style":2371},[4039],{"type":48,"value":2374},{"type":43,"tag":236,"props":4041,"children":4042},{"style":440},[4043],{"type":48,"value":4044}," },",{"type":43,"tag":236,"props":4046,"children":4047},{"style":667},[4048],{"type":48,"value":4049}," checkpointer",{"type":43,"tag":236,"props":4051,"children":4052},{"style":440},[4053],{"type":48,"value":675},{"type":43,"tag":236,"props":4055,"children":4056},{"style":440},[4057],{"type":48,"value":2493},{"type":43,"tag":236,"props":4059,"children":4060},{"style":590},[4061],{"type":48,"value":2276},{"type":43,"tag":236,"props":4063,"children":4064},{"style":446},[4065],{"type":48,"value":778},{"type":43,"tag":236,"props":4067,"children":4068},{"style":440},[4069],{"type":48,"value":783},{"type":43,"tag":236,"props":4071,"children":4072},{"style":446},[4073],{"type":48,"value":801},{"type":43,"tag":236,"props":4075,"children":4076},{"style":440},[4077],{"type":48,"value":480},{"type":43,"tag":4079,"props":4080,"children":4081},"fix-thread-id-required-for-resumption",{},[4082,4154],{"type":43,"tag":220,"props":4083,"children":4084},{},[4085,4087],{"type":48,"value":4086},"\nA consistent thread_id is required to resume interrupted workflows.\n",{"type":43,"tag":226,"props":4088,"children":4090},{"className":228,"code":4089,"language":220,"meta":230,"style":230},"# WRONG: Can't resume without thread_id\nagent.invoke({\"messages\": [...]})\n\n# CORRECT\nconfig = {\"configurable\": {\"thread_id\": \"session-1\"}}\nagent.invoke({...}, config=config)\n# Resume with Command using same config\nagent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n",[4091],{"type":43,"tag":67,"props":4092,"children":4093},{"__ignoreMap":230},[4094,4102,4109,4116,4123,4130,4138,4146],{"type":43,"tag":236,"props":4095,"children":4096},{"class":238,"line":239},[4097],{"type":43,"tag":236,"props":4098,"children":4099},{},[4100],{"type":48,"value":4101},"# WRONG: Can't resume without thread_id\n",{"type":43,"tag":236,"props":4103,"children":4104},{"class":238,"line":248},[4105],{"type":43,"tag":236,"props":4106,"children":4107},{},[4108],{"type":48,"value":2019},{"type":43,"tag":236,"props":4110,"children":4111},{"class":238,"line":257},[4112],{"type":43,"tag":236,"props":4113,"children":4114},{"emptyLinePlaceholder":261},[4115],{"type":48,"value":264},{"type":43,"tag":236,"props":4117,"children":4118},{"class":238,"line":267},[4119],{"type":43,"tag":236,"props":4120,"children":4121},{},[4122],{"type":48,"value":3869},{"type":43,"tag":236,"props":4124,"children":4125},{"class":238,"line":276},[4126],{"type":43,"tag":236,"props":4127,"children":4128},{},[4129],{"type":48,"value":2612},{"type":43,"tag":236,"props":4131,"children":4132},{"class":238,"line":285},[4133],{"type":43,"tag":236,"props":4134,"children":4135},{},[4136],{"type":48,"value":4137},"agent.invoke({...}, config=config)\n",{"type":43,"tag":236,"props":4139,"children":4140},{"class":238,"line":294},[4141],{"type":43,"tag":236,"props":4142,"children":4143},{},[4144],{"type":48,"value":4145},"# Resume with Command using same config\n",{"type":43,"tag":236,"props":4147,"children":4148},{"class":238,"line":303},[4149],{"type":43,"tag":236,"props":4150,"children":4151},{},[4152],{"type":48,"value":4153},"agent.invoke(Command(resume={\"decisions\": [{\"type\": \"approve\"}]}), config=config)\n",{"type":43,"tag":417,"props":4155,"children":4156},{},[4157,4158],{"type":48,"value":4086},{"type":43,"tag":226,"props":4159,"children":4161},{"className":423,"code":4160,"language":417,"meta":230,"style":230},"\u002F\u002F WRONG: Can't resume without thread_id\nawait agent.invoke({ messages: [...] });\n\n\u002F\u002F CORRECT\nconst config = { configurable: { thread_id: \"session-1\" } };\nawait agent.invoke({ messages: [...] }, config);\n\u002F\u002F Resume with Command using same config\nawait agent.invoke(new Command({ resume: { decisions: [{ type: \"approve\" }] } }), config);\n",[4162],{"type":43,"tag":67,"props":4163,"children":4164},{"__ignoreMap":230},[4165,4173,4235,4242,4249,4308,4367,4375],{"type":43,"tag":236,"props":4166,"children":4167},{"class":238,"line":239},[4168],{"type":43,"tag":236,"props":4169,"children":4170},{"style":1024},[4171],{"type":48,"value":4172},"\u002F\u002F WRONG: Can't resume without thread_id\n",{"type":43,"tag":236,"props":4174,"children":4175},{"class":238,"line":248},[4176,4181,4185,4189,4193,4197,4201,4206,4210,4214,4219,4223,4227,4231],{"type":43,"tag":236,"props":4177,"children":4178},{"style":434},[4179],{"type":48,"value":4180},"await",{"type":43,"tag":236,"props":4182,"children":4183},{"style":446},[4184],{"type":48,"value":1766},{"type":43,"tag":236,"props":4186,"children":4187},{"style":440},[4188],{"type":48,"value":737},{"type":43,"tag":236,"props":4190,"children":4191},{"style":590},[4192],{"type":48,"value":1775},{"type":43,"tag":236,"props":4194,"children":4195},{"style":446},[4196],{"type":48,"value":747},{"type":43,"tag":236,"props":4198,"children":4199},{"style":440},[4200],{"type":48,"value":752},{"type":43,"tag":236,"props":4202,"children":4203},{"style":667},[4204],{"type":48,"value":4205}," messages",{"type":43,"tag":236,"props":4207,"children":4208},{"style":440},[4209],{"type":48,"value":675},{"type":43,"tag":236,"props":4211,"children":4212},{"style":446},[4213],{"type":48,"value":1800},{"type":43,"tag":236,"props":4215,"children":4216},{"style":440},[4217],{"type":48,"value":4218},"...",{"type":43,"tag":236,"props":4220,"children":4221},{"style":446},[4222],{"type":48,"value":2442},{"type":43,"tag":236,"props":4224,"children":4225},{"style":440},[4226],{"type":48,"value":783},{"type":43,"tag":236,"props":4228,"children":4229},{"style":446},[4230],{"type":48,"value":801},{"type":43,"tag":236,"props":4232,"children":4233},{"style":440},[4234],{"type":48,"value":480},{"type":43,"tag":236,"props":4236,"children":4237},{"class":238,"line":257},[4238],{"type":43,"tag":236,"props":4239,"children":4240},{"emptyLinePlaceholder":261},[4241],{"type":48,"value":264},{"type":43,"tag":236,"props":4243,"children":4244},{"class":238,"line":267},[4245],{"type":43,"tag":236,"props":4246,"children":4247},{"style":1024},[4248],{"type":48,"value":3984},{"type":43,"tag":236,"props":4250,"children":4251},{"class":238,"line":276},[4252,4256,4260,4264,4268,4272,4276,4280,4284,4288,4292,4296,4300,4304],{"type":43,"tag":236,"props":4253,"children":4254},{"style":574},[4255],{"type":48,"value":577},{"type":43,"tag":236,"props":4257,"children":4258},{"style":446},[4259],{"type":48,"value":2941},{"type":43,"tag":236,"props":4261,"children":4262},{"style":440},[4263],{"type":48,"value":587},{"type":43,"tag":236,"props":4265,"children":4266},{"style":440},[4267],{"type":48,"value":443},{"type":43,"tag":236,"props":4269,"children":4270},{"style":667},[4271],{"type":48,"value":1878},{"type":43,"tag":236,"props":4273,"children":4274},{"style":440},[4275],{"type":48,"value":675},{"type":43,"tag":236,"props":4277,"children":4278},{"style":440},[4279],{"type":48,"value":443},{"type":43,"tag":236,"props":4281,"children":4282},{"style":667},[4283],{"type":48,"value":1891},{"type":43,"tag":236,"props":4285,"children":4286},{"style":440},[4287],{"type":48,"value":675},{"type":43,"tag":236,"props":4289,"children":4290},{"style":440},[4291],{"type":48,"value":464},{"type":43,"tag":236,"props":4293,"children":4294},{"style":467},[4295],{"type":48,"value":1904},{"type":43,"tag":236,"props":4297,"children":4298},{"style":440},[4299],{"type":48,"value":475},{"type":43,"tag":236,"props":4301,"children":4302},{"style":440},[4303],{"type":48,"value":454},{"type":43,"tag":236,"props":4305,"children":4306},{"style":440},[4307],{"type":48,"value":2990},{"type":43,"tag":236,"props":4309,"children":4310},{"class":238,"line":285},[4311,4315,4319,4323,4327,4331,4335,4339,4343,4347,4351,4355,4359,4363],{"type":43,"tag":236,"props":4312,"children":4313},{"style":434},[4314],{"type":48,"value":4180},{"type":43,"tag":236,"props":4316,"children":4317},{"style":446},[4318],{"type":48,"value":1766},{"type":43,"tag":236,"props":4320,"children":4321},{"style":440},[4322],{"type":48,"value":737},{"type":43,"tag":236,"props":4324,"children":4325},{"style":590},[4326],{"type":48,"value":1775},{"type":43,"tag":236,"props":4328,"children":4329},{"style":446},[4330],{"type":48,"value":747},{"type":43,"tag":236,"props":4332,"children":4333},{"style":440},[4334],{"type":48,"value":752},{"type":43,"tag":236,"props":4336,"children":4337},{"style":667},[4338],{"type":48,"value":4205},{"type":43,"tag":236,"props":4340,"children":4341},{"style":440},[4342],{"type":48,"value":675},{"type":43,"tag":236,"props":4344,"children":4345},{"style":446},[4346],{"type":48,"value":1800},{"type":43,"tag":236,"props":4348,"children":4349},{"style":440},[4350],{"type":48,"value":4218},{"type":43,"tag":236,"props":4352,"children":4353},{"style":446},[4354],{"type":48,"value":2442},{"type":43,"tag":236,"props":4356,"children":4357},{"style":440},[4358],{"type":48,"value":1869},{"type":43,"tag":236,"props":4360,"children":4361},{"style":446},[4362],{"type":48,"value":3129},{"type":43,"tag":236,"props":4364,"children":4365},{"style":440},[4366],{"type":48,"value":480},{"type":43,"tag":236,"props":4368,"children":4369},{"class":238,"line":294},[4370],{"type":43,"tag":236,"props":4371,"children":4372},{"style":1024},[4373],{"type":48,"value":4374},"\u002F\u002F Resume with Command using same config\n",{"type":43,"tag":236,"props":4376,"children":4377},{"class":238,"line":303},[4378,4382,4386,4390,4394,4398,4403,4407,4411,4415,4419,4423,4427,4431,4435,4439,4443,4447,4451,4455,4459,4463,4467,4471,4475,4479,4483,4487,4491],{"type":43,"tag":236,"props":4379,"children":4380},{"style":434},[4381],{"type":48,"value":4180},{"type":43,"tag":236,"props":4383,"children":4384},{"style":446},[4385],{"type":48,"value":1766},{"type":43,"tag":236,"props":4387,"children":4388},{"style":440},[4389],{"type":48,"value":737},{"type":43,"tag":236,"props":4391,"children":4392},{"style":590},[4393],{"type":48,"value":1775},{"type":43,"tag":236,"props":4395,"children":4396},{"style":446},[4397],{"type":48,"value":747},{"type":43,"tag":236,"props":4399,"children":4400},{"style":440},[4401],{"type":48,"value":4402},"new",{"type":43,"tag":236,"props":4404,"children":4405},{"style":590},[4406],{"type":48,"value":2788},{"type":43,"tag":236,"props":4408,"children":4409},{"style":446},[4410],{"type":48,"value":747},{"type":43,"tag":236,"props":4412,"children":4413},{"style":440},[4414],{"type":48,"value":752},{"type":43,"tag":236,"props":4416,"children":4417},{"style":667},[4418],{"type":48,"value":3338},{"type":43,"tag":236,"props":4420,"children":4421},{"style":440},[4422],{"type":48,"value":675},{"type":43,"tag":236,"props":4424,"children":4425},{"style":440},[4426],{"type":48,"value":443},{"type":43,"tag":236,"props":4428,"children":4429},{"style":667},[4430],{"type":48,"value":3351},{"type":43,"tag":236,"props":4432,"children":4433},{"style":440},[4434],{"type":48,"value":675},{"type":43,"tag":236,"props":4436,"children":4437},{"style":446},[4438],{"type":48,"value":1800},{"type":43,"tag":236,"props":4440,"children":4441},{"style":440},[4442],{"type":48,"value":752},{"type":43,"tag":236,"props":4444,"children":4445},{"style":667},[4446],{"type":48,"value":3368},{"type":43,"tag":236,"props":4448,"children":4449},{"style":440},[4450],{"type":48,"value":675},{"type":43,"tag":236,"props":4452,"children":4453},{"style":440},[4454],{"type":48,"value":464},{"type":43,"tag":236,"props":4456,"children":4457},{"style":467},[4458],{"type":48,"value":2416},{"type":43,"tag":236,"props":4460,"children":4461},{"style":440},[4462],{"type":48,"value":475},{"type":43,"tag":236,"props":4464,"children":4465},{"style":440},[4466],{"type":48,"value":454},{"type":43,"tag":236,"props":4468,"children":4469},{"style":446},[4470],{"type":48,"value":2442},{"type":43,"tag":236,"props":4472,"children":4473},{"style":440},[4474],{"type":48,"value":783},{"type":43,"tag":236,"props":4476,"children":4477},{"style":440},[4478],{"type":48,"value":454},{"type":43,"tag":236,"props":4480,"children":4481},{"style":446},[4482],{"type":48,"value":801},{"type":43,"tag":236,"props":4484,"children":4485},{"style":440},[4486],{"type":48,"value":693},{"type":43,"tag":236,"props":4488,"children":4489},{"style":446},[4490],{"type":48,"value":3129},{"type":43,"tag":236,"props":4492,"children":4493},{"style":440},[4494],{"type":48,"value":480},{"type":43,"tag":4496,"props":4497,"children":4498},"fix-interrupt-checks-between-invocations",{},[4499],{"type":43,"tag":220,"props":4500,"children":4501},{},[4502,4504],{"type":48,"value":4503},"\nInterrupts happen BETWEEN invoke() calls, not mid-execution.\n",{"type":43,"tag":226,"props":4505,"children":4507},{"className":228,"code":4506,"language":220,"meta":230,"style":230},"result = agent.invoke({...}, config=config)       # Step 1: triggers interrupt\nif \"__interrupt__\" in result:                      # Step 2: check for interrupt\n    result = agent.invoke(                         # Step 3: resume\n        Command(resume={\"decisions\": [{\"type\": \"approve\"}]}),\n        config=config,\n    )\n",[4508],{"type":43,"tag":67,"props":4509,"children":4510},{"__ignoreMap":230},[4511,4519,4527,4535,4543,4551],{"type":43,"tag":236,"props":4512,"children":4513},{"class":238,"line":239},[4514],{"type":43,"tag":236,"props":4515,"children":4516},{},[4517],{"type":48,"value":4518},"result = agent.invoke({...}, config=config)       # Step 1: triggers interrupt\n",{"type":43,"tag":236,"props":4520,"children":4521},{"class":238,"line":248},[4522],{"type":43,"tag":236,"props":4523,"children":4524},{},[4525],{"type":48,"value":4526},"if \"__interrupt__\" in result:                      # Step 2: check for interrupt\n",{"type":43,"tag":236,"props":4528,"children":4529},{"class":238,"line":257},[4530],{"type":43,"tag":236,"props":4531,"children":4532},{},[4533],{"type":48,"value":4534},"    result = agent.invoke(                         # Step 3: resume\n",{"type":43,"tag":236,"props":4536,"children":4537},{"class":238,"line":267},[4538],{"type":43,"tag":236,"props":4539,"children":4540},{},[4541],{"type":48,"value":4542},"        Command(resume={\"decisions\": [{\"type\": \"approve\"}]}),\n",{"type":43,"tag":236,"props":4544,"children":4545},{"class":238,"line":276},[4546],{"type":43,"tag":236,"props":4547,"children":4548},{},[4549],{"type":48,"value":4550},"        config=config,\n",{"type":43,"tag":236,"props":4552,"children":4553},{"class":238,"line":285},[4554],{"type":43,"tag":236,"props":4555,"children":4556},{},[4557],{"type":48,"value":4558},"    )\n",{"type":43,"tag":4560,"props":4561,"children":4562},"style",{},[4563],{"type":48,"value":4564},"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":4566,"total":2699},[4567,4582,4597,4605,4616,4627,4643],{"slug":4568,"name":4568,"fn":4569,"description":4570,"org":4571,"tags":4572,"stars":27,"repoUrl":28,"updatedAt":4581},"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},[4573,4574,4577,4578],{"name":16,"slug":17,"type":14},{"name":4575,"slug":4576,"type":14},"Architecture","architecture",{"name":9,"slug":8,"type":14},{"name":4579,"slug":4580,"type":14},"LLM","llm","2026-04-06T18:26:24.822592",{"slug":4583,"name":4583,"fn":4584,"description":4585,"org":4586,"tags":4587,"stars":27,"repoUrl":28,"updatedAt":4596},"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},[4588,4589,4590,4593],{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"name":4591,"slug":4592,"type":14},"Memory","memory",{"name":4594,"slug":4595,"type":14},"Storage","storage","2026-04-06T18:26:26.065654",{"slug":4,"name":4,"fn":5,"description":6,"org":4598,"tags":4599,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4600,4601,4602,4603,4604],{"name":16,"slug":17,"type":14},{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":22,"slug":23,"type":14},{"name":25,"slug":26,"type":14},{"slug":4606,"name":4606,"fn":4607,"description":4608,"org":4609,"tags":4610,"stars":27,"repoUrl":28,"updatedAt":4615},"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},[4611,4612,4613],{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"name":4614,"slug":220,"type":14},"Python","2026-07-24T06:09:00.291108",{"slug":4617,"name":4617,"fn":4618,"description":4619,"org":4620,"tags":4621,"stars":27,"repoUrl":28,"updatedAt":4626},"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},[4622,4623,4624],{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"name":4625,"slug":417,"type":14},"TypeScript","2026-07-24T06:09:00.673714",{"slug":4628,"name":4628,"fn":4629,"description":4630,"org":4631,"tags":4632,"stars":27,"repoUrl":28,"updatedAt":4642},"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},[4633,4634,4637,4638,4639],{"name":16,"slug":17,"type":14},{"name":4635,"slug":4636,"type":14},"AI Infrastructure","ai-infrastructure",{"name":4575,"slug":4576,"type":14},{"name":9,"slug":8,"type":14},{"name":4640,"slug":4641,"type":14},"LangGraph","langgraph","2026-07-24T05:42:48.348966",{"slug":4644,"name":4644,"fn":4645,"description":4646,"org":4647,"tags":4648,"stars":27,"repoUrl":28,"updatedAt":4660},"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},[4649,4650,4653,4656,4657],{"name":16,"slug":17,"type":14},{"name":4651,"slug":4652,"type":14},"Code Analysis","code-analysis",{"name":4654,"slug":4655,"type":14},"Evals","evals",{"name":9,"slug":8,"type":14},{"name":4658,"slug":4659,"type":14},"Testing","testing","2026-07-31T05:53:29.552458",{"items":4662,"total":4833},[4663,4684,4695,4712,4725,4740,4753,4766,4780,4790,4801,4820],{"slug":4664,"name":4664,"fn":4665,"description":4666,"org":4667,"tags":4668,"stars":4681,"repoUrl":4682,"updatedAt":4683},"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},[4669,4672,4675,4678],{"name":4670,"slug":4671,"type":14},"Marketing","marketing",{"name":4673,"slug":4674,"type":14},"Research","research",{"name":4676,"slug":4677,"type":14},"Sales","sales",{"name":4679,"slug":4680,"type":14},"Strategy","strategy",26592,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fdeepagents","2026-04-18T04:46:54.557115",{"slug":4685,"name":4685,"fn":4686,"description":4687,"org":4688,"tags":4689,"stars":4681,"repoUrl":4682,"updatedAt":4694},"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},[4690,4691],{"name":4673,"slug":4674,"type":14},{"name":4692,"slug":4693,"type":14},"Search","search","2026-05-13T06:11:01.203061",{"slug":4696,"name":4696,"fn":4697,"description":4698,"org":4699,"tags":4700,"stars":4681,"repoUrl":4682,"updatedAt":4711},"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},[4701,4704,4705,4708],{"name":4702,"slug":4703,"type":14},"Content Creation","content-creation",{"name":4670,"slug":4671,"type":14},{"name":4706,"slug":4707,"type":14},"SEO","seo",{"name":4709,"slug":4710,"type":14},"Writing","writing","2026-04-15T05:00:54.149813",{"slug":4713,"name":4713,"fn":4714,"description":4715,"org":4716,"tags":4717,"stars":4681,"repoUrl":4682,"updatedAt":4724},"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},[4718,4721,4722,4723],{"name":4719,"slug":4720,"type":14},"Competitive Intelligence","competitive-intelligence",{"name":4670,"slug":4671,"type":14},{"name":4673,"slug":4674,"type":14},{"name":4679,"slug":4680,"type":14},"2026-04-18T04:46:55.79306",{"slug":4726,"name":4726,"fn":4727,"description":4728,"org":4729,"tags":4730,"stars":4681,"repoUrl":4682,"updatedAt":4739},"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},[4731,4732,4735,4736],{"name":16,"slug":17,"type":14},{"name":4733,"slug":4734,"type":14},"Debugging","debugging",{"name":9,"slug":8,"type":14},{"name":4737,"slug":4738,"type":14},"SQLite","sqlite","2026-07-24T06:08:57.102689",{"slug":4741,"name":4741,"fn":4742,"description":4743,"org":4744,"tags":4745,"stars":4681,"repoUrl":4682,"updatedAt":4752},"langgraph-docs","build stateful agents with LangGraph","Fetches and references LangGraph Python documentation to build stateful agents, create multi-agent workflows, and implement human-in-the-loop patterns. Use when the user asks about LangGraph, graph agents, state machines, agent orchestration, LangGraph API, or needs LangGraph implementation guidance.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4746,4747,4750,4751],{"name":16,"slug":17,"type":14},{"name":4748,"slug":4749,"type":14},"Documentation","documentation",{"name":4640,"slug":4641,"type":14},{"name":22,"slug":23,"type":14},"2026-05-13T06:11:03.650877",{"slug":4754,"name":4754,"fn":4755,"description":4756,"org":4757,"tags":4758,"stars":4681,"repoUrl":4682,"updatedAt":4765},"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},[4759,4760,4761,4764],{"name":16,"slug":17,"type":14},{"name":4748,"slug":4749,"type":14},{"name":4762,"slug":4763,"type":14},"Knowledge Management","knowledge-management",{"name":4591,"slug":4592,"type":14},"2026-05-13T06:10:58.510037",{"slug":4767,"name":4767,"fn":4768,"description":4769,"org":4770,"tags":4771,"stars":4681,"repoUrl":4682,"updatedAt":4779},"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},[4772,4773,4776],{"name":16,"slug":17,"type":14},{"name":4774,"slug":4775,"type":14},"Engineering","engineering",{"name":4777,"slug":4778,"type":14},"Plugin Development","plugin-development","2026-05-13T06:10:59.88449",{"slug":4781,"name":4781,"fn":4782,"description":4783,"org":4784,"tags":4785,"stars":4681,"repoUrl":4682,"updatedAt":4789},"social-media","create optimized social media posts","Create social media posts optimized for engagement across platforms.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4786,4787,4788],{"name":4702,"slug":4703,"type":14},{"name":4670,"slug":4671,"type":14},{"name":4709,"slug":4710,"type":14},"2026-04-15T05:00:55.37452",{"slug":4791,"name":4791,"fn":4792,"description":4793,"org":4794,"tags":4795,"stars":4681,"repoUrl":4682,"updatedAt":4800},"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},[4796,4797,4798,4799],{"name":16,"slug":17,"type":14},{"name":22,"slug":23,"type":14},{"name":4673,"slug":4674,"type":14},{"name":4692,"slug":4693,"type":14},"2026-05-13T06:11:04.930044",{"slug":4802,"name":4802,"fn":4803,"description":4804,"org":4805,"tags":4806,"stars":4817,"repoUrl":4818,"updatedAt":4819},"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},[4807,4810,4811,4814],{"name":4808,"slug":4809,"type":14},"Diagrams","diagrams",{"name":4748,"slug":4749,"type":14},{"name":4812,"slug":4813,"type":14},"Markdown","markdown",{"name":4815,"slug":4816,"type":14},"Technical Writing","technical-writing",12181,"https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fopenwiki","2026-07-24T06:09:01.089597",{"slug":4821,"name":4821,"fn":4822,"description":4823,"org":4824,"tags":4825,"stars":4817,"repoUrl":4818,"updatedAt":4832},"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},[4826,4829],{"name":4827,"slug":4828,"type":14},"API Development","api-development",{"name":4830,"slug":4831,"type":14},"Integrations","integrations","2026-07-18T05:48:23.961804",41]