# DeepAgents — Multi-Step Agent Framework by LangChain > Agent harness built on LangGraph by the LangChain team. Features planning tools, filesystem backend, and sub-agent spawning for complex multi-step tasks like codebase refactoring. 16,500+ stars. ## Install Save as a script file and run: ## Quick Use ```bash pip install deepagents ``` ```python from deepagents import Agent agent = Agent(model="claude-sonnet-4-20250514") result = agent.run("Refactor the authentication module to use JWT tokens") print(result) ``` Or use the CLI: ```bash deepagents run "Add comprehensive tests for the API layer" ``` --- ## Intro DeepAgents is a multi-step agent framework built on LangGraph by the LangChain team with 16,500+ GitHub stars. It provides a planning tool, filesystem backend, and the ability to spawn sub-agents for complex tasks like codebase refactoring, research, and multi-file editing. Unlike simple chat-based agents, DeepAgents creates execution plans, tracks progress, and can delegate subtasks to specialized sub-agents. Best for developers building production AI agent systems that handle multi-step workflows. Works with: Claude, GPT-4, Gemini, any LangChain-supported model. Setup time: under 2 minutes. --- ## Core Architecture ### Planning Tool Before executing, DeepAgents creates a structured plan: ```python agent = Agent(model="claude-sonnet-4-20250514", planning=True) result = agent.run("Migrate the codebase from Express to Fastify") # Agent creates a plan: # 1. Analyze current Express routes and middleware # 2. Create Fastify equivalents # 3. Migrate route handlers # 4. Update tests # 5. Verify all endpoints work ``` ### Sub-Agent Spawning Complex tasks get broken into subtasks, each handled by a specialized sub-agent: ```python from deepagents import Agent, SubAgent researcher = SubAgent(role="researcher", model="claude-sonnet-4-20250514") coder = SubAgent(role="coder", model="claude-sonnet-4-20250514") reviewer = SubAgent(role="reviewer", model="gpt-4o") agent = Agent( sub_agents=[researcher, coder, reviewer], workflow="research -> code -> review" ) result = agent.run("Build a rate limiting middleware") ``` ### Filesystem Backend Persistent state across runs — agents remember previous work: ```python agent = Agent( model="claude-sonnet-4-20250514", backend="filesystem", workspace="./agent-workspace" ) ``` ### NVIDIA OpenShell Integration Secure code execution in sandboxed containers for untrusted operations. ### Key Stats - 16,500+ GitHub stars - Built on LangGraph by LangChain team - Sub-agent spawning for complex tasks - Filesystem persistence across runs - TypeScript version available (deepagentsjs) ### FAQ **Q: What is DeepAgents?** A: DeepAgents is a multi-step agent framework by the LangChain team that uses planning, sub-agent delegation, and persistent state to handle complex development tasks beyond simple chat-based interactions. **Q: Is DeepAgents free?** A: Yes, open-source under MIT license. **Q: How is DeepAgents different from LangChain?** A: LangChain is a general LLM framework. DeepAgents is specifically designed for multi-step agentic tasks with built-in planning, sub-agent orchestration, and filesystem persistence. --- ## Source & Thanks > Created by [LangChain AI](https://github.com/langchain-ai). Licensed under MIT. > > [deepagents](https://github.com/langchain-ai/deepagents) — ⭐ 16,500+ Thanks to the LangChain team for advancing the state of multi-step AI agents. --- ## 快速使用 ```bash pip install deepagents ``` ```python from deepagents import Agent agent = Agent(model="claude-sonnet-4-20250514") result = agent.run("重构认证模块使用 JWT") print(result) ``` --- ## 简介 DeepAgents 是 LangChain 团队基于 LangGraph 构建的多步骤 Agent 框架,GitHub 16,500+ stars。提供规划工具、文件系统后端和子 Agent 生成能力,用于处理代码重构、研究和多文件编辑等复杂任务。与简单聊天 Agent 不同,DeepAgents 创建执行计划、跟踪进度,并将子任务委派给专门的子 Agent。 --- ## 来源与感谢 > Created by [LangChain AI](https://github.com/langchain-ai). Licensed under MIT. > > [deepagents](https://github.com/langchain-ai/deepagents) — ⭐ 16,500+ --- Source: https://tokrepo.com/en/workflows/ac820f80-41ff-4eaa-b3b1-da27653bd7a5 Author: Agent Toolkit