
Building an intent classifier for LangChain-based multi-agent systems.
The gap between a proof-of-concept AI agent and a production-grade system often comes down to architecture. Recent reports detailing why enterprise AI projects fail highlight a consistent theme: a lack of visibility, governance, and architectural rigor.
To build reliable multi-agent systems, we must focus on a fundamental building block: intent capture.
Modern agent systems rarely pass a single prompt through a single model. Instead, incoming requests are evaluated, classified, and routed to specialized agents or tools.
That initial classification step—determining intent—is the most information-dense event in the entire system lifecycle. Intent serves two critical functions:
To illustrate this, consider a customer support assistant built using LangGraph. The system uses a supervisor pattern to route incoming requests to specialized agents.

While this routing pattern solves the orchestration challenge, it introduces a critical security nuance: a self-declared intent is not an absolute security boundary. An agent subjected to an indirect prompt injection attack may claim a benign intent while attempting a malicious action. To build a secure system, intent must be captured, verified, and enforced at the control plane.
Capturing a user prompt is simple; capturing an agent’s internal intent is not. How you extract intent depends entirely on how much of the execution environment you control.
We can categorize intent capture across three distinct rungs, starting from the most deeply coupled to the most universal. A well-designed architecture uses the highest available rung and gracefully degrades to lower rungs when necessary.
When you own the application code, framework-native callbacks (such as LangGraph hooks) provide the highest fidelity. A single registered handler observes the prompt at entry, extracts the classified intent and confidence score directly from the routing node, and captures the final output. This offers deep internal visibility at the cost of framework lock-in.
When working across diverse frameworks or languages, OpenTelemetry provides a vendor-neutral middle ground. Using OpenTelemetry GenAI semantic conventions, you can export prompts, tool selections, token usage, and custom attributes as standard spans via OTLP to observability backends like Datadog. While this standardizes data capture across your stack, it relies on what the underlying SDK actively exposes rather than reaching into deep framework internals.
When integrating third-party or fully managed platforms (such as Microsoft Copilot Studio), you cannot inject callbacks or telemetry agents. The system must capture data at the network or MCP gateway level. Because managed platforms do not expose their internal reasoning steps, the payload crossing the boundary contains the raw prompt but lacks the internal intent. At this rung, the control plane must derive the intent independently by evaluating the incoming prompt before passing it downstream.
Capturing intent across these three rungs transitions intent from a passive observability metric into an active security primitive. Standard IAM and EDR solutions rely on static roles and permissions, making them highly ineffective at evaluating high-velocity, non-linear agent behaviors.
By unifying intent capture into a control plane, you can implement true runtime authorization:

Building resilient, secure multi-agent systems requires viewing intent as a core architectural asset rather than an afterthought.
By structuring intent capture as a graceful degradation model—moving from native framework callbacks, to OpenTelemetry, down to gateway-level derivation—you can create a unified control plane. This control plane not only stabilizes agent routing and observability, but serves as the necessary foundation for real-time, intent-aware authorization across both custom and managed enterprise AI agents.
Building an intent classifier for LangChain-based multi-agent systems.
The gap between a proof-of-concept AI agent and a production-grade system often comes down to architecture. Recent reports detailing why enterprise AI projects fail highlight a consistent theme: a lack of visibility, governance, and architectural rigor.
To build reliable multi-agent systems, we must focus on a fundamental building block: intent capture.
Modern agent systems rarely pass a single prompt through a single model. Instead, incoming requests are evaluated, classified, and routed to specialized agents or tools.
That initial classification step—determining intent—is the most information-dense event in the entire system lifecycle. Intent serves two critical functions:
To illustrate this, consider a customer support assistant built using LangGraph. The system uses a supervisor pattern to route incoming requests to specialized agents.

While this routing pattern solves the orchestration challenge, it introduces a critical security nuance: a self-declared intent is not an absolute security boundary. An agent subjected to an indirect prompt injection attack may claim a benign intent while attempting a malicious action. To build a secure system, intent must be captured, verified, and enforced at the control plane.
Capturing a user prompt is simple; capturing an agent’s internal intent is not. How you extract intent depends entirely on how much of the execution environment you control.
We can categorize intent capture across three distinct rungs, starting from the most deeply coupled to the most universal. A well-designed architecture uses the highest available rung and gracefully degrades to lower rungs when necessary.
When you own the application code, framework-native callbacks (such as LangGraph hooks) provide the highest fidelity. A single registered handler observes the prompt at entry, extracts the classified intent and confidence score directly from the routing node, and captures the final output. This offers deep internal visibility at the cost of framework lock-in.
When working across diverse frameworks or languages, OpenTelemetry provides a vendor-neutral middle ground. Using OpenTelemetry GenAI semantic conventions, you can export prompts, tool selections, token usage, and custom attributes as standard spans via OTLP to observability backends like Datadog. While this standardizes data capture across your stack, it relies on what the underlying SDK actively exposes rather than reaching into deep framework internals.
When integrating third-party or fully managed platforms (such as Microsoft Copilot Studio), you cannot inject callbacks or telemetry agents. The system must capture data at the network or MCP gateway level. Because managed platforms do not expose their internal reasoning steps, the payload crossing the boundary contains the raw prompt but lacks the internal intent. At this rung, the control plane must derive the intent independently by evaluating the incoming prompt before passing it downstream.
Capturing intent across these three rungs transitions intent from a passive observability metric into an active security primitive. Standard IAM and EDR solutions rely on static roles and permissions, making them highly ineffective at evaluating high-velocity, non-linear agent behaviors.
By unifying intent capture into a control plane, you can implement true runtime authorization:

Building resilient, secure multi-agent systems requires viewing intent as a core architectural asset rather than an afterthought.
By structuring intent capture as a graceful degradation model—moving from native framework callbacks, to OpenTelemetry, down to gateway-level derivation—you can create a unified control plane. This control plane not only stabilizes agent routing and observability, but serves as the necessary foundation for real-time, intent-aware authorization across both custom and managed enterprise AI agents.