Video summary

Complete Deep Agents Course With Langchain In 3 Hours

Main summary

Key takeaways

Technology

Overview

This video is a course-style walkthrough of “Deep Agents” (agentic LLM systems) using LangGraph/LangChain and a library referred to as deep agents (built on LangGraph). The speaker contrasts deep agents with simpler “shallow” agent patterns, then demonstrates setup and implementation details, followed by progressive customization topics.


1) What are deep agents (vs shallow agents / ReAct)

Shallow agent pattern

  • An LLM decides whether to call tools or answer directly.
  • Common flow is essentially a single request → optional tool call → output.
  • No explicit planning, with weak ability to handle complex multi-step queries.
  • Limited context retention because the flow doesn’t maintain structured state/planning across steps.

ReAct-style agent

  • An LLM + tools in a loop; it can act multiple times based on tool observations.
  • Better for multi-step tasks than shallow agents, but still lacks:
    • No structured plan / deep reasoning
    • No robust state management / persistent memory
    • Still mostly “LLM + tools” without deep architecture

Deep agents (core architecture idea)

Deep agents explicitly include 4 core components:

  1. Planning tool (e.g., produces a to-do list / plan)
  2. Sub-agents (delegate subtasks)
  3. System prompt (behavior/instructions)
  4. File system (persistent/shared context among agents)

Example: holiday planning

  • Build a day-by-day to-do list
  • Create sub-agents to execute booking/research tasks
  • Use shared storage via file system for coordination

Example: blog research

  • Plan steps (research, more research, write blog, copyright check)
  • Run research subtasks in parallel via specialized sub-agents (e.g., internet/search, archive/papers, writing, etc.)

2) Build a basic deep agent (implementation walkthrough)

Project setup (using uv)

  • Create workspace + virtual environment
  • Install libraries:
    • deep agents (LangGraph-based)
    • langchain, langchain-openai
    • Additional referenced tools like groq
    • ipykernel
    • Tavily for real-time web search

Environment variables

  • OpenAI, Groq, Google, Tavily API keys loaded via a .env file.

Tool creation: Tavily web search tool

  • Defines a web search tool using TavilyClient.search()
  • Parameters include:
    • query
    • max results
    • topic categories
    • include raw content

Creating a deep agent via the library

  • Uses create_deep_agent with:
    • tools (e.g., web search)
    • system prompt
    • model (OpenAI/Groq depending on configuration)
  • Execution:
    • Calls agent.invoke(...) with a user message
  • Runtime behavior:
    • Automatically creates to-dos
    • May call tools
    • Uses middleware hooks for:
      • to-do list tracking
      • summarization
    • Shows “files” created/modified and returned in results to preserve context

3) Roadmap and future customization

  • Mentions upcoming “part 2” topics, such as:
    • customization parameters
    • backend options
    • sub-agents
    • interrupts
  • Highlights feature set vs Claude agent SDK / Claude code approach:
    • Deep agents: based on open-source LangGraph/LangChain
    • Claude agent SDK: vendor-specific runtime; still conceptually similar (planning, multi-agent orchestration, context memory, skills, hooks/events, etc.)

4) Backends (where agent files/memory actually live)

Deep agents use a virtual file system, while backends decide where data is physically stored.

Covered major backends:

  1. State backend

    • Data stored in LangGraph state (in-memory / RAM-like)
    • Accessible within the same thread; disappears when the run ends
  2. File system backend

    • Agent writes files to disk under a configured root directory
    • Demonstrated reading/writing actual files with path checks
  3. Store backend

    • Persistent key-value/object storage (in-memory store / “namespace + store”)
    • Demonstrates access across different threads

Key point: the agent can “read/write using virtual FS,” but the backend controls persistence and location.


5) Context engineering (how to provide the “right context”)

Context engineering = providing correct information + tools + formatting so deep agents can work reliably.

Discussed context types:

  • Input context: loaded into prompts at startup via system prompt, memory, skills.
  • Runtime context, context compression, context isolation (mentioned as next subtopics).

Using agent.md as persistent instructions

  • Introduces an agent.md pattern:
    • A “project conventions / durable instructions” file for coding agents
  • Used as persistent context loaded into the system prompt.
  • Demonstrates:
    • loading agent.md content using memory/checkpointing
    • using different backends (state/store/file system) for where that context persists

6) Skills (on-demand expertise vs memory)

  • Skills are specialized capability modules loaded only when relevant to the user request.
  • Difference vs memory:
    • Memory: usually injected globally into the prompt (“always loaded” / baseline rules)
    • Skills: “progressive disclosure,” loaded only when needed

Skill folder structure described:

  • skill.md
  • instruction.md
  • examples.md
  • (and related docs)

Demonstration:

  • Create multiple skills (Python, AWS, LangGraph, report writing)
  • Load all skill docs, then deep agent selects the right skill based on the query
  • Shows evidence of tool calls / file updates when a skill triggers

7) Sub-agents (delegation + context quarantine)

Sub-agents are specialized agents the main supervisor delegates tasks to.

Key behaviors:

  • Sub-agents can have their own:
    • context
    • tools
    • memory
    • instructions
  • Useful for:
    • splitting complex tasks
    • parallelism
    • context isolation (reduce noise / token usage)
    • reliability/maintainability

Demonstrations include:

  • main agent delegating web research to a sub-agent using a web search tool
  • generating structured output from sub-agent results (via response_format / typed schema), e.g.:
    • summary
    • confidence
    • sources (URLs)

8) End-to-end “Deep Agent Course” demo: Streamlit chatbot

The demo uses an “Claude code” / AI coding workflow to generate a Streamlit app that integrates:

  • deep agent planning
  • skills
  • sub-agents
  • backend selection (state/file system/store)
  • thread memory/checkpointing
  • system prompt + file loading (agent.md, skill files)

The app demonstrates answering research/coding questions with visible intermediate planning and citations/sources.


Main speakers / sources

  • Main speaker: Krishna (channel host; repeatedly says “my name is Krishna”)
  • Primary technical sources referenced:
    • LangGraph (agent workflows, stateful execution)
    • LangChain (agent creation, models)
    • deep agents library built on LangGraph (as used in the tutorial)
    • Tavily (real-time web search tool)
    • Mentions Claude Code / Claude Agent SDK and Claude / ChatGPT deep research agents as conceptual comparisons

Original video