Deep Agent Scaffold Generator
🔒 In your browserDesign a deep agent (planning, subagents, tools) → get runnable LangChain deepagents code + a diagram.
How it works
Design a deep agent — the planning + subagents + virtual-filesystem pattern behind Claude Code and Deep Research — and get a runnable LangChain deepagents scaffold plus an architecture diagram. Define the main agent, its tools, and any specialist subagents; the code and diagram update live. Everything is generated in your browser.
Architecture
🤖 research-agent
Researches questions in depth.
tools: internet_search
# Deep Agent scaffold — LangChain `deepagents` (research preview; verify the API against your version).
# pip install deepagents
from deepagents import create_deep_agent
from langchain.agents.middleware.todo import TodoListMiddleware # planning / write_todos
# ---- Tools (plain functions; the docstring + type hints are the tool's schema) ----
def internet_search(query: str) -> str:
"""Search the web for a query.
Args:
query:
"""
# TODO: implement
return "result"
# ---- Subagents (delegated, context-isolated specialists) ----
research_agent = {
"name": "research_agent",
"description": "Researches questions in depth.",
"system_prompt": "You are a thorough researcher. Cite sources.",
"tools": [internet_search]
}
agent = create_deep_agent(
model="anthropic:claude-sonnet-4-6",
tools=[internet_search],
system_prompt="You are a capable deep agent. Break the task into a plan, use your tools and subagents, and keep notes in files as you go.",
subagents=[research_agent],
middleware=[TodoListMiddleware()]
)
# A virtual filesystem is built in; long-horizon runs offload context to files automatically.
result = agent.invoke({"messages": "Describe the task for your deep agent here."})
print(result["messages"][-1].content)
deepagents is a research preview (Jan 2026) and its API can change — verify imports against your installed version. This generates a scaffold to build on; it doesn't run the agent (that needs your own Python runtime and API keys). Everything is generated in your browser.
About the Deep Agent Scaffold Generator
A "deep agent" is the pattern behind tools like Claude Code and Deep Research: an agent built for long, multi-step tasks using four pillars — a planning tool (a todo list it maintains), a virtual filesystem to offload context, specialist subagents it delegates to, and a detailed system prompt. This free deep agent scaffold generator turns a simple design into runnable LangChain deepagents Python code and an architecture diagram.
Everything is generated in your browser — nothing you enter is uploaded.
How to use it
- Pick a model and write the main system prompt — the agent's overall brief.
- Add tools as plain functions (name, description, and params like query:string) — the description and types become the tool's schema.
- Add subagents — specialists the main agent delegates to, each with its own prompt and a subset of the tools.
- Toggle planning (the write_todos middleware). Copy the generated Python, or the mermaid diagram of the architecture.
The four pillars of a deep agent
- Planning — a write_todos tool keeps the goal and next steps in the model's attention across a long run.
- Virtual filesystem — large results and notes are offloaded to files instead of bloating the prompt (built in).
- Subagents — delegated, context-isolated specialists keep each task focused and the main context clean.
- Detailed system prompt — clear, specific instructions are what make the difference on hard, long-horizon tasks.
Frequently asked questions
What is a deep agent?
It's an agent designed for complex, long-horizon tasks (often 10+ steps) using planning, a virtual filesystem, subagent delegation and a detailed system prompt. LangChain formalised the pattern in its deepagents library (research preview, January 2026), inspired by Claude Code, Deep Research and Manus.
Does this run the agent?
No. It generates a scaffold — the code and diagram — for you to run in your own Python environment with your own API keys. Running an agent needs a real runtime and credentials, which this tool deliberately doesn't touch.
Is the generated code final?
It's a correct starting point that follows the deepagents API, but deepagents is a fast-moving preview — verify imports against your installed version and fill in each tool's implementation.
What are subagents for?
They let the main agent hand a focused subtask to a specialist with its own prompt, tools and isolated context — which keeps the main agent's context clean and improves reliability on big tasks.
Is anything uploaded?
No. The code and diagram are generated entirely in your browser.
Related searches
Learn more
Related Developer tools
🔗 Embed this tool on your website — free
Copy this and paste it into your page's HTML. The tool runs in the visitor's browser, just like here. Change height to fit, or add the optional auto-resize snippet below. Add ?theme=dark to the URL for dark mode.
<iframe src="https://toolhq.dev/embed/deep-agent-scaffold/" title="Deep Agent Scaffold Generator — ToolsHub" width="100%" height="520" style="border:1px solid #e5e7eb;border-radius:12px;max-width:680px" loading="lazy"></iframe>Optional: auto-resize the iframe height
Add this once on the same page so the iframe grows to fit the tool:
<script>
addEventListener("message", function (e) {
if (e.data && e.data.type === "toolshub:resize") {
document.querySelectorAll('iframe[src*="/embed/"]').forEach(function (f) {
if (f.contentWindow === e.source) f.style.height = e.data.height + "px";
});
}
});
</script>