Hightower's AI Harness Engineering

Hightower's AI Harness Engineering

LangChain Deep Agents: The Hardest Part of Building an AI Agent Is Not the Eighth Feature. It Is Keeping the First Seven Working. XIII

Part 13: Anyone can wire up planning, or subagents, or streaming, one at a time. A production agent composes all of them at once. Here is how to build a research agent that plans its own ...

Rick Hightower's avatar
Rick Hightower
Jul 09, 2026
∙ Paid

The real heartbreak of agent building is not that one feature fails; it is watching a dozen impressive pieces collapse the moment they have to work together. This research agent is where the demos end, and the fear gets real: can your agent plan, delegate, remember, stream, verify, cite, and protect itself all at once, or was it only impressive when each part stood alone?

In this article, you will learn how to compose a complete LangChain research agent from primitives you already understand individually. We walk through a six-step orchestrator workflow, the disposable researcher subagent that keeps context clean, the filesystem as working memory, structured output your pipeline can consume, the self-review loop that separates “looks done” from “is done,” and the safety leashes an autonomous web agent needs. By the end, you will see why a research agent and a bug-fixer are the same machine pointed at different work.


Anyone can wire up planning, or subagents, or streaming, one at a time. A production agent composes all of them at once. Here is how to build a research agent that plans its own investigation, delegates to parallel workers, synthesizes a cited report, and reviews its own draft.

Most tutorials teach an agent framework one capability at a time. Planning gets its own chapter. Subagents get another. Streaming, memory, permissions, deployment- each arrives in isolation, each demonstrated on a small example that does one thing. That is the right way to learn. It is not the way you build.

Real agents do not use one primitive at a time. They compose all of them at once. And the hard part, the part no feature walkthrough can prepare you for, is making the eighth capability work without quietly breaking the previous seven. A planning tool that fights your streaming filter. A subagent that floods the orchestrator’s context. A structured output schema that the verification step never populates. Composition is where agents actually get hard.

So this is a capstone. We are going to stop adding features and start composing them, and we are going to do it by building something deliberately bigger than a bug fix: a long-running LangChain research agent. You give it a question. It plans an investigation, delegates focused research to parallel workers, synthesizes their findings into a cited report, reviews its own draft against your original request, and hands you a finished document. It is the agent equivalent of a final exam because doing it well requires that planning, subagents, parallelization, structured output, memory, streaming, permissions, deployment, and observability all cooperate. If you can build this, you can build your own.

One note on faithfulness before we start. This design follows LangChain’s own deep-research reference architecture. The shape here is the shape the maintainers recommend, not one invented for an article. Where the article simplifies, it says so.

The shape of the agent: one orchestrator, many disposable workers

Before any code, hold the architecture in your head, because every primitive slots into it.

There is one orchestrator, the main agent, and it never does research itself. Its only job is to run a fixed, high-level workflow of six steps:

  1. Plan the investigation into a todo list.

  2. Save the request to a file, so it can check its own work against the request later.

  3. Delegate focused research tasks to subagents.

  4. Synthesize what the subagents return, consolidating citations so each source gets one number across all findings.

  5. Write a comprehensive report to a file.

  6. Verify that the report actually addresses the original request.

The researcher subagents are the workers. Each one takes a single focused question, searches the web in its own isolated context, and returns findings with sources. The orchestrator stitches those findings together. The workers do the digging.

A research agent split into an orchestrator that runs a fixed six-step workflow and disposable researcher subagents that each search the web in isolated context and return cited findings.

If that division of labor feels familiar, it should. This single design is orchestrator-workers, the main agent decomposing and delegating, wrapping prompt chaining, the fixed six-step sequence, with parallelization, multiple researchers running at once, and evaluator-optimizer, the verify step checking the draft against the request. Four classic agent design patterns, cooperating inside one agent. We will watch each one fall into place.


If you are a paid subscriber, thank you. Your support makes this work possible.

If you are a free subscriber and find these articles useful, please consider upgrading. A paid subscription is $80 per year or $8 per month.

Free subscribers typically receive access to the full versions of paid articles after one to two months.

Share Hightower's AI Harness Engineering

User's avatar

Continue reading this post for free, courtesy of Rick Hightower.

Or purchase a paid subscription.
© 2026 Rick Hightower · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture