How to Build a Custom Agent Harness
Cody and Justy debate whether LangChain’s new create_agent primitive truly simplifies building custom agent harnesses or just shifts complexity into middleware. They clash on the value of minimalism versus pre-assembled stacks like Deep Agents, then land on who actually benefits from this approach.
Script: Mistral Medium 3.5 128B Voice: ElevenLabs
Transcript
Justy Okay, so LangChain’s saying the thing that matters for agents is the harness.
Cody That’s… not what matters.
Justy I know, I know, but hear me out— their whole point is the harness is the scaffolding that decides if the agent’s actually useful.
Cody Right.
Justy And they’re pitching create_agent as this minimal primitive where you just hand it a model, some tools, a prompt, and boom— working agent.
Cody Which is fine. But then they immediately pivot to middleware.
Justy Yeah, because that’s where the magic happens.
Cody That’s where the happens.
Justy Cody, you’re doing the thing where you see a new abstraction and assume it’s hiding a mess.
Cody Because it .
Justy Okay, but let’s say I’m building an agent that needs to pull from three different proprietary APIs, enforce some custom business rules, and log every single tool call for compliance.
Cody Sure.
Justy Deep Agents or Claude’s SDK would either not support that or force me to hack around their defaults. create_agent lets me slot in middleware for all of that— setup, teardown, state, stream handlers— without rewriting the whole loop.
Cody Or you could just use the pre-assembled stack and save yourself six months of debugging edge cases in your custom middleware.
Justy But what if the pre-assembled stack do what I need?
Cody Then you’re probably building something weird enough that you be writing custom middleware.
Justy There it is.
Cody I’m not wrong.
Justy No, but you’re also missing the point. This isn’t for the average builder. This is for the teams that that control— internal tooling, niche workflows, stuff that doesn’t fit the opinionated stacks.
Cody Mm-hm.
Justy And the middleware approach is actually pretty elegant— hooks for before and after model calls, tool calls, startup, teardown. It’s composable. You can swap in logic for dynamic model switching, prompt adjustments, even custom state tracking.
Cody Composable, sure. But it’s also layer to maintain. And now you’re not just debugging your agent, you’re debugging your middleware your agent.
Justy Yeah, but that’s the trade-off for flexibility. And for the right use case, it’s worth it.
Cody For the right , maybe. This feels like a power-user feature masquerading as a general-purpose solution.
Justy I mean… isn’t that how most good tools start? Someone builds a thing for their own weird needs, and then it turns out other people have those needs too.
Cody That is SUCH an Exploring Next take.
Justy Oh, come on. You can’t tell me you haven’t seen this pattern a hundred times.
Cody I’ve seen it. I’ve also seen a hundred teams drown in their own abstractions.
Justy Okay, but let’s say I’m wrong. Let’s say most people just use Deep Agents or the Claude SDK. What’s the harm in create_agent existing?
Cody No harm. It’s fine. It’s just… not the revolution they’re making it sound like.
Justy It’s not a revolution for the people who need it.
Cody Alright, fine. For the teams with the chops and the weird requirements, this is a solid step forward.
Justy And for everyone else?
Cody Stick to the pre-assembled harnesses and save your sanity.
Cody I’ll set a reminder. And when I’m right, you owe me coffee.
Justy And when right, you’re buying the first round.