The Agentic AI Stack: Orchestrating Claude Code (Part 2)

Part 1 looked inward, at how Claude Code itself is architected: harness, API, and model, working together to make one agent effective at a task. That architecture is powerful, but it’s also just one piece of a much bigger picture. Part 2 zooms out to that bigger picture: how do you build an agentic AI application when the objective can’t be met by one agent alone?

When one agent isn’t enough

Imagine a complex objective like fraud detection. A transaction comes in, and meeting that objective might require checking a statistical risk model, pulling transaction history from a core banking system, cross-referencing a sanctions list, investigating an unusual pattern in more depth, and, where regulation demands it, routing the case to a human before anything is finalized. Steps can fail. Systems can time out. An output might not actually satisfy the objective on the first attempt, and the system needs to notice that and course-correct, not just move forward blindly.

This is a fundamentally different problem from what a single agent’s harness is built for. Claude Code’s harness makes one agent effective within a session: it assembles context, exposes tools, and lets that agent reason and act across multiple steps. But it has no concept of coordinating several independent agents or systems, tracking shared state across all of them, or branching based on what one component decided. For that, you need an orchestrator.

Architecting the multi-agent system

This is where frameworks like LangGraph and Crew.ai come in, as goal-driven orchestrators that manage state, branching, and multi-step coordination across everything involved in reaching an objective. LangGraph does this through a stateful graph with conditional edges; Crew.ai does it through role-based agents collaborating toward a shared goal.

Underneath the orchestrator sits a layer of callable components, invoked for whatever a given step actually needs. LangChain fits here as a lighter, more linear way to wire an LLM to tools. Claude Code fits here too, not as the orchestrator, but as one of the strongest available components for coding-heavy or technical execution work, invoked headlessly when a step calls for deep codebase reasoning or a CI/CD action. Alongside it sit other LLMs, including open-weight small models for cost efficiency on simpler steps, and, critically, deterministic ML models. Fraud classification at scale is a statistical pattern-detection problem, not a language problem, and an LLM is the wrong tool for scoring transaction volumes in real time. ML flags and scores; Claude Code or an LLM investigates and explains once a case is flagged.

MCP threads through all of it as the standard connective layer, giving LangGraph, LangChain, and Claude Code a consistent way to reach databases, APIs, and internal systems, rather than each component wiring up its own bespoke connectors.

One more piece belongs in this picture: a reflection agent. Since the orchestrator’s job includes noticing when an output doesn’t actually satisfy the objective, a reflection step can check a result against the goal and trigger a retry or a different path, rather than the system simply accepting the first answer it gets. Combined with a human-in-the-loop checkpoint, which is often not optional but a regulatory requirement, this is what makes an agentic system trustworthy enough for something like fraud detection, real-time risk scoring, or insurance claim adjudication, not just capable of running end to end, but capable of catching its own mistakes and involving a person where the stakes require it.

Why this matters now

Claude Code, on its own, is one of the most capable harnesses available for autonomous engineering work. But enterprise objectives like fraud detection, risk analytics, and claims adjudication are rarely single-agent problems. They’re multi-system, multi-step, and often regulated. LangGraph and LangChain give you the orchestration layer to coordinate all of it, with Claude Code as one of the strongest components inside that system, not the system itself.

What’s next

Part 3 will move up a level again, into the surrounding application ecosystem: how a business-facing layer like n8n connects into this stack, and how observability and monitoring, including tools like LangSmith, keep the whole thing, ML, LLMs, and agents alike, accountable in production.



Leave a Reply