Deep Agents Glossary: Every Term Explained From Zero

19 min read

The problem

Articles about Deep Agents use a lot of words that sound alike: agent, harness, middleware, backend, subagent, sandbox, checkpointer. Each one is a small wall. After three of them in one paragraph, most readers give up, even when the idea underneath is simple.

This page takes those walls down one at a time, in plain words. You can read the series in order and come back here whenever a word is unclear. Every later part links back to these entries.

Hand-drawn map of the Deep Agents stack: your code calls create_deep_agent, which builds on LangChain create_agent, which runs on the LangGraph runtime, with the model, tools, filesystem backend and subagents around it

Start here

Read these five in order. Together they get you from "what is a language model" to "what is a deep agent".

LLM

An LLM, or large language model, is a program trained on a huge amount of text so it can predict the next words. Give it text and it writes text back. Claude, GPT, Gemini and Llama are all LLMs.

Why it matters: Every agent in this series has an LLM at its centre. The agent is the LLM plus everything wrapped around it.

Covered in: Part 3: Build your first deep agent

Tool calling

Tool calling is when the model, instead of only writing an answer, writes a structured request like "call read_file with path /notes.md". Your code runs that function and sends the result back to the model. The model never runs anything itself.

Why it matters: Every action a deep agent takes, from writing a file to starting a subagent, is a tool call.

Covered in: Part 2: Why simple agent loops fail, Part 7: Custom tools and MCP

Agent

An agent is an LLM that runs in a loop. It reads the conversation, decides on a tool call, gets the result, and decides again, until it chooses to stop and answer.

Why it matters: Deep Agents is a way to build agents that keep working well when the loop runs for a long time.

Covered in: Part 2: Why simple agent loops fail

Agent loop

The agent loop is the repeat cycle itself: call the model, run any tool calls it asked for, add the results to the message list, call the model again. The loop ends when the model replies with no tool calls.

Why it matters: A plain loop works for short tasks. Long tasks expose its weak spots, which is the whole reason Deep Agents exists.

Covered in: Part 2: Why simple agent loops fail

Deep agent

"Deep agent" is LangChain's name for an agent that can handle long, multi-step work. The recipe adds four things to a plain loop: a planning tool, subagents, a filesystem, and a detailed system prompt. The README of the deepagents library says it was inspired by Claude Code.

Why it matters: This is the idea the whole series builds, piece by piece.

Covered in: Part 2: Why simple agent loops fail

The library and what it sits on

flowchart TB
  A[Your code] --> B[create_deep_agent]
  B --> C[LangChain create_agent]
  C --> D[LangGraph runtime]
  B --> E[Middleware: files, subagents, todos, memory, skills]
  B --> F[Backend: where files live]
  C --> G[Model and tools]

deepagents

deepagents is LangChain's open-source Python library for building deep agents. It is MIT licensed. Its README calls it "The batteries-included agent harness". This series uses version 0.7.42.

Why it matters: Every code block in this series imports from this package and was run at that version.

Covered in: Part 3: Build your first deep agent

deepagents.js

deepagents.js is the JavaScript and TypeScript version of the same library, kept in its own repository. This series sticks to Python.

Why it matters: The ideas carry over if you work in TypeScript, but the exact function names can differ.

Covered in: Part 3: Build your first deep agent

Harness

A harness is the code wrapped around a model that turns it into a working agent: the loop, the tools, the prompt, the rules for handling context. Deep Agents calls itself an agent harness.

Why it matters: When an agent fails, the harness is often the part you can fix. The model is the part you rent.

Covered in: Part 2: Why simple agent loops fail

create_deep_agent

create_deep_agent is the one function you call to build a deep agent. You give it a model, your tools, and optional settings such as subagents, a backend, memory files, skills and approval rules. It returns a compiled agent you can invoke or stream.

Why it matters: Almost every part of this series is about one of its arguments.

Covered in: Part 3: Build your first deep agent

LangChain

LangChain is the open-source framework that deepagents is built on. It gives a common interface over many model providers, plus tools and agent building blocks.

Why it matters: You can swap the model under a deep agent because LangChain hides the differences between providers.

Covered in: Part 3: Build your first deep agent

create_agent

create_agent is LangChain's function for building a plain tool-calling agent. create_deep_agent builds on it and adds the deep agent pieces as middleware.

Why it matters: If you only need a short loop, create_agent alone is enough. Part 2 compares the two.

Covered in: Part 2: Why simple agent loops fail

LangGraph

LangGraph is LangChain's runtime for agents written as graphs of steps. A deep agent is a compiled LangGraph graph under the hood, which is where streaming, checkpoints and interrupts come from.

Why it matters: When you want to pause, resume, replay or stream an agent, you are using LangGraph features.

Covered in: Part 11: Streaming, checkpoints and context

Graph and node

A graph is a set of steps (nodes) joined by arrows (edges). In a deep agent the main nodes are model, which calls the LLM, and tools, which runs tool calls. Middleware can add small nodes of its own.

Why it matters: Debugging gets easier once you can see which node a step ran in.

Covered in: Part 11: Streaming, checkpoints and context

Model provider

A model provider is the company or server that runs the model, such as Anthropic, OpenAI, Google, or a local server like Ollama. LangChain has one integration package per provider.

Why it matters: The same deep agent code can run on a paid API or an open model you host yourself.

Covered in: Part 3: Build your first deep agent

The built-in tools

A default deep agent in 0.7.42 registers these tools. We listed them by building an agent and reading its tool node:

text
deepagents 0.7.42
tools: ['delete', 'edit_file', 'execute', 'glob', 'grep', 'ls', 'read_file', 'task', 'write_file', 'write_todos']

That run passed TodoListMiddleware, which is where write_todos comes from. The execute tool is registered, but the library removes it from the model's tool list when the backend cannot run commands.

write_todos

write_todos is the planning tool. The model uses it to write a to-do list for the task and update each item's status as it works. Since version 0.7 it is opt-in: you get it by passing TodoListMiddleware.

Why it matters: A written plan keeps a long task on track after dozens of steps.

Covered in: Part 4: The to-do list planning tool

Todo status

Each to-do item has one of three statuses: pending, in_progress or completed.

Why it matters: You can stream these statuses to a user as a progress bar.

Covered in: Part 4: The to-do list planning tool

ls, read_file, write_file, edit_file

These are the basic file tools. ls lists a folder, read_file reads a file (in pages, for long files), write_file creates a file, and edit_file replaces exact text inside a file.

Why it matters: Files let the agent save notes and results outside the message list, so the context stays small.

Covered in: Part 5: The virtual filesystem

glob and grep

glob finds files by a name pattern like **/*.md. grep searches file contents for text.

Why it matters: They let the agent find things in a big workspace without reading every file.

Covered in: Part 5: The virtual filesystem

delete

delete removes a file. It counts as a write operation for permission rules.

Why it matters: It is the first tool you might want to put behind an approval step.

Covered in: Part 5: The virtual filesystem, Part 8: Approvals

execute

execute runs a shell command and returns its output and exit code. It only works with a sandbox backend.

Why it matters: Running code is the most powerful and the most dangerous thing an agent can do. Part 10 is about doing it safely.

Covered in: Part 10: Sandboxing agent code with gVisor

task

task is the tool that starts a subagent. The model gives it a description of the job and the name of a subagent type, and gets back one final report.

Why it matters: It is how a deep agent hands off heavy work without filling its own context.

Covered in: Part 6: Subagents and context isolation

Subagents

sequenceDiagram
  participant M as Main agent
  participant T as task tool
  participant S as Subagent
  M->>T: task(description, subagent_type)
  T->>S: fresh context with the description
  S->>S: many tool calls
  S-->>T: one final report
  T-->>M: report as a tool result

Subagent

A subagent is a second agent that the main agent starts for one job. It gets its own fresh message list, does the work, and returns only a short result.

Why it matters: The long, messy middle of the job never lands in the main agent's context.

Covered in: Part 6: Subagents and context isolation

Context isolation

Context isolation means the subagent's messages and tool results stay separate from the main agent's. Only the final report crosses over.

Why it matters: A smaller context is cheaper, faster, and less likely to confuse the model.

Covered in: Part 6: Subagents and context isolation

General-purpose subagent

If you do not define a subagent named general-purpose, create_deep_agent adds a default one with the same tools as the main agent.

Why it matters: The agent can split work into isolated pieces even before you write any subagents yourself.

Covered in: Part 6: Subagents and context isolation

SubAgent and CompiledSubAgent

A SubAgent is a dictionary that describes a subagent: name, description, system prompt, and optionally its own tools and model. A CompiledSubAgent wraps a graph you already built, so any LangGraph agent can be a subagent.

Why it matters: These are the two ways to plug your own specialists into the task tool.

Covered in: Part 6: Subagents and context isolation

Async subagent

An async subagent runs in the background while the main agent keeps going. The library exposes it as AsyncSubAgent with its own middleware.

Why it matters: Long jobs do not have to block the main conversation.

Covered in: Part 6: Subagents and context isolation

Files and backends

Virtual filesystem

The virtual filesystem is the set of files the agent sees through its file tools. The files can live in memory, on disk, or in a database, depending on the backend.

Why it matters: The agent uses the same tools no matter where the files really live.

Covered in: Part 5: The virtual filesystem

Backend

A backend is the piece that decides where files are stored and how commands run. You pass one with backend=.

Why it matters: Changing the backend changes what the agent can touch on your machine.

Covered in: Part 5: The virtual filesystem

StateBackend

StateBackend keeps files inside the agent's state, in memory. It is the default. Files live as long as the conversation thread does.

Why it matters: It is safe to start with, because nothing touches your real disk.

Covered in: Part 5: The virtual filesystem

FilesystemBackend

FilesystemBackend reads and writes real files in a folder on your machine.

Why it matters: Useful for coding agents, but the agent can now change real files, so scope it to one folder.

Covered in: Part 5: The virtual filesystem

StoreBackend

StoreBackend saves files in a LangGraph store, which can outlive a single conversation.

Why it matters: This is how an agent remembers things across threads.

Covered in: Part 9: Memory, skills and AGENTS.md

CompositeBackend

CompositeBackend sends different folders to different backends, for example /memories/ to a store and everything else to state.

Why it matters: You can mix short-lived scratch files and long-lived memory in one agent.

Covered in: Part 5: The virtual filesystem

Permissions

Permissions are rules that allow or deny file operations on paths. The first matching rule wins and the default is allow. The docs note they do not apply to sandbox backends.

Why it matters: A simple rule can stop an agent from writing outside one folder.

Covered in: Part 5: The virtual filesystem

Offloading

Offloading means saving a very large tool result to a file and giving the model a short pointer instead of the full text.

Why it matters: One huge web page or log file cannot blow up the context.

Covered in: Part 5: The virtual filesystem, Part 11: Streaming, checkpoints and context

Sandboxes and gVisor

Sandbox

A sandbox is a walled-off place where code can run without reaching the rest of your machine. Deep Agents sandbox backends add the execute tool.

Why it matters: A model can write a harmful command by mistake or because a web page tricked it. A sandbox limits the damage.

Covered in: Part 10: Sandboxing agent code with gVisor

Syscall

A syscall, or system call, is how a program asks the operating system kernel to do something: open a file, send network data, start a process.

Why it matters: Every escape from a sandbox goes through syscalls, so controlling them is how sandboxes work.

Covered in: Part 10: Sandboxing agent code with gVisor

Kernel

The kernel is the core of the operating system. It controls memory, files, devices and processes. Normal containers share the host's kernel.

Why it matters: A bug in a shared kernel can let code break out of a container.

Covered in: Part 10: Sandboxing agent code with gVisor

Container

A container runs a program with its own view of files and processes, while sharing the host's kernel. Docker is the best known tool for them.

Why it matters: Containers are light, but on their own they are a thinner wall than many people assume.

Covered in: Part 10: Sandboxing agent code with gVisor

gVisor

gVisor is an open-source project from Google that puts its own kernel, written in Go, between a container and the host kernel. It calls itself an application kernel.

Why it matters: The agent's code talks to gVisor's kernel instead of your real one.

Covered in: Part 10: Sandboxing agent code with gVisor

runsc

runsc is gVisor's command-line runtime. It can run a container for Docker or Kubernetes, or run a single command with runsc do.

Why it matters: This is the binary we run in Part 10, with real output.

Covered in: Part 10: Sandboxing agent code with gVisor

Sentry

The Sentry is gVisor's user-space kernel. It catches the sandboxed program's syscalls and handles them itself.

Why it matters: Most syscalls never reach the host kernel at all.

Covered in: Part 10: Sandboxing agent code with gVisor

Gofer

The Gofer is a separate gVisor process that handles access to the host's files for the sandbox.

Why it matters: File access gets its own narrow gate instead of going straight to your disk.

Covered in: Part 10: Sandboxing agent code with gVisor

Platform (systrap, ptrace, KVM)

The platform is how gVisor intercepts the sandboxed program's syscalls. systrap is the default, ptrace works almost anywhere, and KVM needs hardware virtualization.

Why it matters: Our test machine has no KVM, and both systrap and ptrace still ran.

Covered in: Part 10: Sandboxing agent code with gVisor

MicroVM

A microVM, such as Firecracker, is a very small virtual machine with its own guest kernel, isolated by hardware virtualization.

Why it matters: It is the other common way to isolate untrusted code. Part 10 compares it with gVisor.

Covered in: Part 10: Sandboxing agent code with gVisor

Control, memory and context

Middleware

Middleware is code that runs before or after model calls and tool calls, and can change them. Deep Agents adds most of its features as middleware: files, subagents, todos, memory, skills, summarization.

Why it matters: You add or remove whole features by adding or removing middleware.

Covered in: Part 8: Approvals

Human in the loop

Human in the loop means the agent pauses before certain tool calls and waits for a person to approve, edit or reject them. You set it up with interrupt_on.

Why it matters: Risky actions, like deleting files or sending email, get a human check.

Covered in: Part 8: Approvals

Interrupt

An interrupt is the pause itself. The graph stops, saves its state, and returns the pending action. You resume it with a Command that carries the decision.

Why it matters: The agent can wait hours for an answer without losing its place.

Covered in: Part 8: Approvals

Checkpointer

A checkpointer saves the agent's state after each step. Interrupts need one, and it also lets you resume or replay a thread.

Why it matters: No checkpointer, no pause and resume.

Covered in: Part 8: Approvals, Part 11: Streaming, checkpoints and context

Thread

A thread is one conversation, named by a thread_id. The checkpointer stores state per thread.

Why it matters: Two threads do not share messages or state files, unless you add long-term memory.

Covered in: Part 11: Streaming, checkpoints and context

State

State is everything the agent carries between steps: the message list, the files in a StateBackend, the to-do list, and anything you add.

Why it matters: When you inspect a finished run, you read its state.

Covered in: Part 3: Build your first deep agent

AGENTS.md

AGENTS.md is a plain markdown file of standing instructions for an agent. You load it with memory=, and its contents go into the system prompt.

Why it matters: It gives the agent project rules that survive across conversations.

Covered in: Part 9: Memory, skills and AGENTS.md

Skill and SKILL.md

A skill is a folder with a SKILL.md file of instructions, following the Agent Skills format. The agent first sees only each skill's name and description, and reads the full file when it needs it.

Why it matters: You can give an agent many playbooks without paying for all of them in every prompt.

Covered in: Part 9: Memory, skills and AGENTS.md

Progressive disclosure

Progressive disclosure means showing the model a short summary first and the details only when asked.

Why it matters: It keeps the prompt small while the agent still has access to a lot of knowledge.

Covered in: Part 9: Memory, skills and AGENTS.md

Context window

The context window is the most text a model can read in one call, counted in tokens. Everything the agent knows in that moment has to fit.

Why it matters: Long tasks fill it up. Most of the deep agent recipe is about keeping it under control.

Covered in: Part 2: Why simple agent loops fail

Token

A token is a chunk of text, often part of a word, that models read and write. Providers bill by the token.

Why it matters: Token counts per step tell you what a run costs.

Covered in: Part 13: A research agent end to end

Summarization

Summarization replaces old messages with a short summary when the conversation gets too long. Deep Agents has it built in.

Why it matters: Long runs keep going instead of hitting the context limit.

Covered in: Part 11: Streaming, checkpoints and context

Prompt caching

Prompt caching lets a provider reuse the processed start of a prompt that has not changed, which cuts cost and wait time. The docs say Deep Agents turns it on automatically for Anthropic and Bedrock models.

Why it matters: An agent resends a long system prompt on every step, so caching it adds up.

Covered in: Part 11: Streaming, checkpoints and context

Streaming

Streaming sends results as they happen: each step, each token, each subagent update. LangGraph supports several stream modes.

Why it matters: Users can watch a long task move instead of staring at a spinner.

Covered in: Part 11: Streaming, checkpoints and context

Testing and running in production

MCP

MCP, the Model Context Protocol, is an open standard for connecting tools to AI apps. An MCP server offers tools, and the langchain-mcp-adapters package turns them into LangChain tools.

Why it matters: Any MCP server can become a set of tools for your deep agent.

Covered in: Part 7: Custom tools and MCP

Fake chat model

A fake chat model returns scripted replies instead of calling a real LLM. LangChain ships some in langchain_core.

Why it matters: It makes tests fast, free and repeatable. Many code blocks in this series were checked with one.

Covered in: Part 12: Debugging and evaluating

Trace

A trace is a record of every model call and tool call in one run, with inputs, outputs, timings and tokens.

Why it matters: When a run goes wrong, the trace shows where.

Covered in: Part 12: Debugging and evaluating

LangSmith

LangSmith is LangChain's hosted service for traces and evaluations. It is optional. Deep Agents works without it.

Why it matters: It is the official place to look at traces, and Part 12 also shows ways to debug without it.

Covered in: Part 12: Debugging and evaluating

Eval

An eval is a repeatable test of agent behaviour, such as "did it write the report file" or "did it call the right tool".

Why it matters: Without evals, every prompt change is a guess.

Covered in: Part 12: Debugging and evaluating

Try this

bash
python -m venv .venv && . .venv/bin/activate
pip install "deepagents==0.7.42"
python -c "import deepagents; print(deepagents.__version__); print(deepagents.__all__)"

You should see 0.7.42 and the public names, including create_deep_agent, SubAgent, CompiledSubAgent, FilesystemMiddleware and SubAgentMiddleware.

How this page was tested

The tool list above came from building a default agent with deepagents 0.7.42, langchain 1.5.2 and langgraph 1.2.24, using a scripted fake model. No real model call was needed to read the tool list.

Sources