| name | developing-deepagent |
| description | Implements DeepAgent components using LangChain's deepagents SDK. Use when building deep agents with create_deep_agent, configuring backends/subagents/skills/memory/interpreter, need DeepAgent patterns (sandbox, HITL interrupts, long-term memory, subagent spawning, subagent structured output, QuickJS code interpreter with programmatic tool calling), or ask "implement deep agent", "add subagent", "configure backend", "add interpreter". |
| version | 2026.05.27 |
| author | Proact0 |
| allowed-tools | ["Bash(uv sync *)","Bash(uv add --dev *)","Bash(uv add --group *)","Bash(uv add --package *)","Bash(uv remove --package *)","Read","Write","Edit","AskUserQuestion"] |
Developing {{ cookiecutter.act_name }}'s DeepAgent
Implement DeepAgent components using the deepagents SDK within {{ cookiecutter.act_name }} Act patterns.
When to Use
- Building deep agents with
create_deep_agent
- Configuring backends, subagents, skills, or long-term memory
- Need DeepAgent harness patterns (sandbox, HITL, memory)
- Integrating subagent delegation into existing casts
When NOT to Use
- LangGraph graph building (state/node/edge) →
developing-cast
- Architecture design →
architecting-act
- Project / cast scaffolding → run
uv run act new (project) or uv run act cast (new cast) directly
- Testing →
testing-cast
DeepAgent vs Cast
Cast = LangGraph StateGraph (low-level nodes, edges, state)
DeepAgent = Agent harness built on LangChain + LangGraph (high-level: planning, filesystem, subagents, memory)
Use developing-cast when you need custom graph topology. Use developing-deepagent when you need an agent harness with built-in capabilities.
Implementation Workflow
Step 1: Understand Requirements
If CLAUDE.md exists:
- Read
/CLAUDE.md → Act overview, find target agent spec
- Identify: model, tools, subagents, backend type, memory needs
- Proceed to Step 2
If CLAUDE.md not found:
AskUserQuestion Format:
{
"question": "CLAUDE.md not found. Create architecture first?",
"header": "Architecture",
"multiSelect": false,
"options": [
{"label": "Yes", "description": "Switch to architecting-act skill"},
{"label": "No", "description": "Proceed without architecture specs"}
]
}
Step 2: Install deepagents
Add the SDK to the cast that uses it (each cast is a workspace member under casts/*):
uv add --package {{ cookiecutter.cast_slug }} deepagents
uv add --package {{ cookiecutter.cast_slug }} "deepagents[quickjs]"
Step 3: Implementation
Implement in this order — each layer depends on the previous one:
Step Module File Component
──── ─────────────────────── ──────────────────────────────────────
1. modules/utils.py Backend instances (StateBackend(), ...)
2. modules/tools.py Custom tools (@tool / MCP)
3. modules/agents.py Subagent definitions
4. modules/middlewares.py Middleware configuration
5. modules/models.py Model configuration
6. modules/prompts.py System prompt content
7. modules/agents.py create_deep_agent assembly
Optional Step 4: Environment Variables
Update .env.example (project root):
OPENAI_API_KEY=your_key
ANTHROPIC_API_KEY=your_key
Component Reference
Core
Backends (Virtual Filesystem)
Subagents
Interrupt (Human-in-the-Loop)
Memory
Skills
Sandbox (Code Execution — OS-level)
Interpreter (Code Execution — QuickJS, in-agent)
Middleware
Verification