# #543: Deep Agents: LangChain's SDK for Agents That Plan and Delegate Page: https://stenobird.com/podcast/talk-python-to-me/543-deep-agents-langchain-s-sdk-for-agents-that-plan-and-delegate Text version: https://stenobird.com/podcast/talk-python-to-me/543-deep-agents-langchain-s-sdk-for-agents-that-plan-and-delegate.md Podcast: [Talk Python To Me](https://stenobird.com/podcast/talk-python-to-me) Published: 2026-04-01T17:20:51+00:00 Episode link: https://talkpython.fm/episodes/show/543/deep-agents-langchains-sdk-for-agents-that-plan-and-delegate Audio file: https://talkpython.fm/episodes/download/543/deep-agents-langchains-sdk-for-agents-that-plan-and-delegate.mp3 Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/talk-python-to-me/episodes/543-deep-agents-langchain-s-sdk-for-agents-that-plan-and-delegate Duration seconds: 3833 ## Resource Move beyond simple LLM prompts to build sophisticated, autonomous agents that can plan, iterate, and recover from errors. This episode explores LangChain's Deep Agents SDK, a framework for creating 'deep' agents with advanced capabilities like file system access and sub-agent delegation. ## Highlights - Main idea: Deep agents differ from shallow agents by using an 'agent harness' to enable planning, testing, and error recovery - Practical takeaway: You can define custom agent tools using standard Python functions and integrate external capabilities via MCP servers - Technical pattern: Use middleware hooks to standardize common agent behaviors like retry logic and task lists - Failure mode: Avoid building complex agent logic manually; leverage frameworks that provide structured context management and sub-agent orchestration - Practical takeaway: Improving agent performance relies heavily on analyzing traces to identify failures and optimize the agent's harness ## Topics LangChain, Deep Agents, AI Agents, Python, MCP, LLM Orchestration, Agentic Workflows, Software Engineering ## Chapters - 5:45 — Shallow vs. Deep Agents: Distinguishing between simple tool-calling loops and complex agents capable of multi-step planning and iteration. - 20:15 — The Agent Harness: Understanding the role of the harness, including skills, toolchains, and focused system prompts. - 25:25 — Sub-agents and Context Management: How to implement parallel execution and manage context when delegating tasks to specialized sub-agents. - 34:50 — Defining Tools with Python: The simplicity of turning any Python function or API call into a functional tool for an agent. - 39:35 — MCP Integration: Leveraging the Model Context Protocol (MCP) to fetch and use tools from external MCP servers. - 49:00 — Middleware and Standardization: Using middleware to implement common patterns like retry logic and task tracking in agent workflows. - 54:05 — Agentic Data Analysis: Applying agentic patterns to complex tasks like converting natural language into SQL queries for data analysis. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/talk-python-to-me/episodes/543-deep-agents-langchain-s-sdk-for-agents-that-plan-and-delegate/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/talk-python-to-me/543-deep-agents-langchain-s-sdk-for-agents-that-plan-and-delegate.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.