Multi-agent systems are exciting to build. You can create a research agent, an analysis agent, a validation agent, and an execution agent. Give each agent a role, connect a few tools, pass context between them, and suddenly the workflow feels significantly more intelligent than a traditional application.
Then you put the system in front of real users.
The final agent produces the wrong recommendation. The natural reaction is: "The final agent failed."
Maybe. But what if the real failure started three steps earlier?
What if the retrieval layer returned outdated information? The research agent then summarized the wrong context correctly. The analysis agent reasoned correctly over the incorrect summary. The final agent generated a perfectly structured recommendation based on information that was already wrong before it ever entered the final step.
The visible failure occurred at the output. The actual failure originated upstream.
This is one of the most important things to understand when building production multi-agent systems: the point where a failure surfaces is not always the point where the failure started.
This is why I increasingly think about production AI systems across multiple engineering layers rather than focusing only on the prompt or model. For a multi-agent system, I typically think across nine layers.
Each layer has a different responsibility. Each introduces a different category of failure. In a multi-step agentic workflow, a failure in one layer can quietly propagate through several agents before the user finally sees the problem.
First, what makes a multi-agent system different?
Before talking about the nine layers, it is important to separate a workflow from an agent.
A workflow generally follows defined code paths and predetermined execution logic. Agents operate more dynamically and can determine aspects of their process or tool usage based on the task and available context. A multi-agent system introduces multiple agentic components that may have different responsibilities.
For example, imagine we are building an AI Market Intelligence System. The user asks:
"Analyze why customer churn increased this month and recommend the top three actions the retention team should take."
We might design the workflow like this:
Retrieves churn metrics, customer segments, and historical trends.
Retrieves customer feedback, support themes, and relevant business context.
Combines structured metrics and qualitative findings to identify likely churn drivers.
Checks whether the analysis is supported by the available evidence.
Produces the final recommendations for the retention team.
The workflow looks reasonable. But now we have introduced several points where the system can fail. What happens if Agent 1 retrieves the wrong date range? What if Agent 2 retrieves customer feedback from a different product? What if Agent 3 receives both inputs but loses important metadata? What if the validation agent checks response formatting but never verifies whether the recommendation is grounded? What if the final agent receives an already-corrupted summary?
β οΈ By the time the final recommendation appears on the screen, the original failure may have traveled through four different components.
This is why a production multi-agent system needs more than several agents connected together. It needs system-level engineering.
The Application Layer
The application layer is the product users actually interact with. This includes the interface, user input, application state, business logic, and the way results are presented.
In our market intelligence example, the application may allow a user to select:
- βBusiness unit
- βProduct
- βDate range
- βCustomer segment
- βAnalysis type
The application then sends this information into the agentic workflow. Here is the problem: if the application captures the wrong date range, every agent downstream may behave correctly and still produce the wrong result.
Imagine the user selects June 1 to June 30. But because of a frontend date-handling issue, the system sends May 1 to May 31.
The Data Retrieval Agent retrieves May data. The Analysis Agent identifies May trends. The Validation Agent confirms that the recommendations are supported by the supplied data. The Executive Recommendation Agent produces a polished summary. The user sees:
"Churn increased because of onboarding friction and payment failures."
The final output looks like an AI failure.
β The model was not necessarily the problem. β The agents may not have failed. π The incorrect input entered the workflow at the application layer.
- π‘How is user input validated?
- π‘What application state is being passed into the workflow?
- π‘Are dates, IDs, filters, and user selections preserved correctly?
- π‘Can the user submit an ambiguous request?
- π‘What happens when required context is missing?
- π‘Does the interface accurately display the final system state?
The AI workflow can only reason over the information it receives. If the wrong information enters the system, intelligent agents can become very efficient at producing the wrong answer.
The Model Layer
The model layer includes the LLMs or other models responsible for reasoning, generation, classification, prediction, or decision support. In a multi-agent system, every agent does not necessarily need to use the same model.
The Research Agent may need strong long-context capabilities. The Classification Agent may only need to categorize incoming requests. The Executive Recommendation Agent may require stronger reasoning and communication capabilities. A routing task may not need the same model used for a complex analytical task.
Model selection should follow the responsibility of the component.
When evaluating a model for an agent, I think about:
The largest model is not automatically the correct model for every step. But model-layer failures can also propagate.
Imagine Agent 2 is responsible for extracting the top customer complaints from support tickets. The model incorrectly classifies "payment authorization failure" as an "onboarding problem."
Agent 3 receives: "Primary customer complaint: onboarding friction." Agent 3 has no reason to know that the classification was wrong. It performs its analysis using the information supplied. The final recommendation tells the business to redesign onboarding.
β οΈ The recommendation is wrong. But the failure originated in an upstream classification step. This is why evaluating only the final model is dangerous in a multi-agent system.
The Data and Retrieval Layer
The data and retrieval layer determines what context enters the AI workflow. This may include:
I consider this one of the most important layers in an AI system because models reason over context. Providing the right information, tools, and context to an agent is a central reliability challenge in agent systems. LangChain's current context-engineering guidance explicitly describes providing the correct information and tools in the right format as a core AI engineering responsibility.
Let us return to our churn analysis workflow. The Retrieval Agent is asked to retrieve churn metrics for June. The database query runs successfully. The API returns a 200. No exception occurs. But the query uses:
WHERE event_date >= '2026-06-01'There is no end-date filter. The retrieval now includes July data.
Technically, the database worked. The API worked. The agent completed the tool call. The workflow continued. But the context is wrong. This is the type of failure traditional monitoring can easily miss.
- π‘Did we retrieve the correct information?
- π‘Did we retrieve information for the correct entity, customer, product, or date range?
- π‘Is the context current?
- π‘Are we preserving metadata?
- π‘What happens when multiple sources contradict one another?
- π‘How do we handle low-confidence retrieval?
- π‘Should the agent continue when required evidence is missing?
In many AI systems, the model is blamed for a reasoning failure that actually began as a context failure.
Orchestration and Workflow
This is where multi-agent architecture becomes especially important. The orchestration layer coordinates:
A multi-agent workflow is not simply a collection of prompts. It is a stateful execution system.
Consider this workflow:
Retrieval Agent β Analysis Agent β Validation Agent β Recommendation Agent
Now imagine the Analysis Agent produces this structured output:
{
"primary_driver": "payment_failures",
"confidence": 0.61,
"supporting_evidence": [
"32% increase in authorization failures",
"payment-related tickets increased 18%"
]
}But the orchestration workflow passes only this to the next agent:
{
"primary_driver": "payment_failures"
}The confidence score and supporting evidence are lost. The Validation Agent now receives a conclusion without the evidence required to validate it. Maybe the validation agent simply checks whether a primary_driver exists. The workflow passes validation. The Recommendation Agent confidently recommends changing the payment system.
Where did the failure occur? Not necessarily in the Recommendation Agent. Not necessarily in the Validation Agent.
The orchestration layer dropped critical context between two agents.
- π‘What does each agent receive?
- π‘What is intentionally removed from context?
- π‘Is the full output passed downstream or only selected fields?
- π‘How is workflow state stored?
- π‘What happens after a tool failure?
- π‘Does the system retry?
- π‘Could a retry duplicate an action?
- π‘What causes the workflow to stop?
- π‘Can an agent enter an execution loop?
- π‘Which step owns the final decision?
In a single model application, debugging may involve inspecting one input and one output. In a multi-agent system, the interaction between components becomes part of the problem.
A failure can originate three steps upstream
This is the part I think more AI engineering teams need to discuss. Let us look at one complete failure chain.
The user asks: "Why did enterprise churn increase in June?"
The correct request is captured. β Product: Enterprise Β· β Date: June
The Retrieval Agent queries the churn database β but accidentally retrieves all customer segments instead of enterprise customers. β The original failure starts here.
Correctly summarizes: 'Churn is concentrated among monthly customers with payment failures.' The agent performed its task correctly β but is summarizing the wrong population.
Identifies payment failures as the primary driver. Based on the available context, the reasoning is reasonable.
Verifies that the recommendation is supported by the supplied summary. It is. The validator passes the output.
Recommends: 'Prioritize payment recovery for enterprise accounts.' The user knows this is wrong β enterprise customers are annual-contract customers. The failure becomes visible here.
The team opens the final prompt. They rewrite the instructions. They add: "Carefully verify that your recommendations are accurate." They increase the model temperature. They switch to another model. Nothing consistently fixes the problem.
Why?
Because the failure did not originate in the final agent. It started three steps upstream when the wrong customer population was retrieved.
This is the difference between debugging a model and debugging an AI system.
Evaluation
Evaluation answers: Is the AI system meeting the quality and behavioral criteria we defined?
AI evaluation frameworks are designed to test systems against dimensions relevant to a specific use case rather than relying on one universal quality measure. OpenAI's Evals framework, for example, supports custom evaluations for the patterns and dimensions a particular LLM system needs to test.
For a multi-agent system, I would not only evaluate the final response. That is one of the main points of this article. I may evaluate:
- βCorrect data source selected
- βCorrect filters applied
- βCorrect date range
- βRelevant context returned
- βImportant themes identified
- βEvidence preserved
- βNo unsupported claims introduced
- βConclusion supported by evidence
- βConfidence appropriately represented
- βCompeting explanations considered
- βUnsupported claims detected
- βMissing evidence flagged
- βLow-confidence conclusions rejected
- βRecommendation aligns with findings
- βNo unsupported recommendation added
- βOutput meets the business requirements
Then I also evaluate the workflow as a complete system.
- π‘Did the correct agents run?
- π‘Did context move correctly between steps?
- π‘Did the workflow stop when a quality gate failed?
- π‘Was human approval triggered when required?
- π‘Did the system recover appropriately from failure?
This is why I would not define evaluation as only "testing the model before deployment." Evaluation should test the behavior and quality criteria of the AI system throughout its lifecycle. NIST's AI RMF explicitly frames trustworthiness considerations across the design, development, use, and evaluation of AI products, services, and systems.
Evaluate components. Evaluate interactions. Evaluate the end-to-end system.
A good final response can occasionally hide a bad workflow. That is also a failure signal.
Guardrails
Guardrails define the boundaries around system behavior. In a multi-agent workflow, I think about controls at multiple points.
- βValidate user input
- βAuthenticate the user
- βVerify authorization
- βDetect unsupported requests
- βRestrict sensitive data
- βLimit available tools
- βRestrict agent permissions
- βValidate structured outputs
- βEnforce workflow state requirements
- βRequire human approval for high-impact actions
- βValidate output
- βCheck groundedness
- βDetect sensitive information
- βApply business rules
- βBlock unsupported actions
A common mistake is treating the guardrail as one final filter. But consider our earlier retrieval failure. If the final guardrail checks only for unsafe language, it will happily approve a polished recommendation based on the wrong customer segment. The correct control may need to sit earlier. For example:
REQUEST:
Segment = Enterprise
β
RETRIEVAL RESULT:
Segments returned = Enterprise, SMB, Consumer
β
VALIDATION GATE:
β Retrieved segment does not match requested scope.
β
STOP WORKFLOWπ‘ The location of the guardrail matters. My question is always:
Where does this specific failure enter the system, and where can we prevent or detect it before it propagates?
The best control is not always at the final output.
Observability and Monitoring
Two concepts get conflated constantly:
π Evaluation asks whether the AI system meets defined quality and behavior criteria.
π Observability helps us understand what the system is actually doing while it runs and investigate where failures occur.
In a multi-agent system, that distinction becomes even more important. Agent tracing tools record execution steps such as model interactions, tool calls, and decision points so engineers can analyze the path from initial input to final response.
I want to be able to trace:
USER REQUEST
β
ROUTER AGENT
β
RETRIEVAL AGENT
β
DATABASE TOOL CALL
β
RESEARCH AGENT
β
ANALYSIS AGENT
β
VALIDATION GATE
β
RECOMMENDATION AGENT
β
FINAL RESPONSEFor each meaningful step, I may want visibility into:
The goal is not to log everything blindly. The goal is to preserve enough execution context to reconstruct meaningful system behavior while respecting privacy, security, and data-retention requirements.
Distributed tracing has solved a related problem in traditional software systems: context propagation allows traces, metrics, and logs generated across process and service boundaries to be correlated into a causal execution path. Agentic AI needs similar thinking.
When the user says: "The AI gave me the wrong recommendation." I do not want my investigation to stop at the final output.
- π‘Which path did the request take?
- π‘Which agents executed?
- π‘What context did each agent receive?
- π‘Which tools were called?
- π‘Where did the first unexpected state appear?
That last question is especially important. Where did the first unexpected state appear? Not "where did the user first notice the problem?" Those may be two completely different steps.
Cost and Infrastructure
Every additional agent has an operational cost. Another model call. Another network request. Another tool call. More latency. More tokens. More infrastructure. More failure points.
This is why I am careful about designing multi-agent systems simply because multiple agents sound sophisticated. Imagine this workflow:
Research Agent β Summary Agent β Reformatting Agent β Critic Agent β Final Writing Agent
Five agents. But perhaps the task could reliably be completed using: one retrieval function, one analysis agent, one deterministic validator. This is an engineering trade-off.
- π‘Does this step require an LLM?
- π‘Does this step require an agent?
- π‘Can the task be deterministic?
- π‘Are we repeatedly passing large context windows between agents?
- π‘Can intermediate results be cached?
- π‘What happens when usage increases by 10x?
- π‘What is the latency introduced by sequential agents?
- π‘Which agents can execute in parallel?
- π‘What is the cost per completed workflow rather than cost per model call?
That last question matters. A model call may cost very little individually. But a workflow with twelve model calls, retries, tool executions, and long context windows can create a completely different production cost profile.
Measure the cost of the workflow, not only the cost of the model.
Security and Access Controls
An agent should not automatically receive access to every tool available in the system. This becomes increasingly important as AI agents move from generating content to executing actions.
Imagine an agent connected to:
The question is no longer only: "Can the model generate an unsafe response?" Now we need to ask:
NIST's Generative AI Profile specifically provides risk-management guidance for risks unique to generative AI systems as part of the broader AI RMF approach.
From a technical architecture perspective, my default question is:
What is the minimum level of access this agent needs to complete its responsibility?
The Research Agent may require read access. The Recommendation Agent may require no external tools. The Execution Agent may need write permissions but only for a specific resource. A high-impact action may require human approval. For example:
RECOMMENDATION AGENT
Can generate refund recommendation.
Cannot issue refund.
β
HUMAN APPROVAL GATE
β
EXECUTION AGENT
Can issue approved refund.
Maximum value: $500.
Allowed tool: Refund API.This is much stronger than giving every agent broad tool access and relying on prompts that say:
"Please do not perform unauthorized actions."
β A prompt is not an access-control system. Technical permissions should enforce technical boundaries.
The 9 layers work as one system
Here is the mistake I want AI teams to avoid. We often discuss these areas independently.
The application team owns the interface. The AI engineers own the models. The data team owns retrieval. The governance team owns the guardrails. The platform team owns infrastructure. Security owns access. Each team may perform its work correctly within its individual area. But the product is experienced as one system.
A production multi-agent workflow may look like this:
APPLICATION
User intent + business context
β
SECURITY & ACCESS
Identity + authorization
β
ORCHESTRATION
Route request to correct workflow
β
DATA & RETRIEVAL
Retrieve relevant context
β
AGENT 1 / MODEL
Research or classification
β
GUARDRAIL
Validate intermediate result
β
AGENT 2 / MODEL
Analysis
β
EVALUATION OR QUALITY GATE
Check evidence and behavior
β
AGENT 3 / MODEL
Recommendation
β
HUMAN APPROVAL IF REQUIRED
β
APPLICATION
Present result or execute action
Across the entire workflow:
OBSERVABILITY + MONITORING
COST + INFRASTRUCTURE
SECURITY + ACCESS CONTROLSThe system is only as reliable as the interaction between these components. That is why the prompt matters. The model matters. The agent design matters. But the bigger AI engineering question is:
How do all of these components work together to produce a system that is actually reliable?
The 9 layers, side by side
"What information actually entered the workflow?"
- βInterface
- βUser input
- βApp state
- βBusiness logic
- βHow results are presented
"Is this the right model for this responsibility?"
- βTask complexity
- βReasoning requirements
- βContext requirements
- βStructured output reliability
- βTool use
- βLatency
- βCost
- βSecurity & deployment
"Did we retrieve the correct information for the right entity, at the right time?"
- βDatabases
- βAPIs
- βEnterprise documents
- βVector databases
- βEmbeddings
- βSearch systems
- βRAG pipelines
- βMemory
- βExternal data sources
"What context, permissions, and state move between agents?"
- βWhich agent runs & in what order
- βWhat context each agent receives
- βWhich tools are available
- βRetry logic
- βRouting decisions
- βApproval steps
- βTermination conditions
"Is the AI system meeting the quality and behavioral criteria we defined?"
- βComponent-level evals (per agent)
- βInteraction-level evals
- βEnd-to-end workflow evals
- βBehavioral criteria
- βQuality gates
"Where does this specific failure enter the system β and where can we stop it?"
- βBefore execution (input, authn, authz)
- βDuring execution (tool limits, structured output validation)
- βAfter generation (groundedness, sensitive info, business rules)
"Where did the first unexpected state appear?"
- βAgent tracing
- βModel & prompt versions
- βTool arguments
- βLatency & token usage
- βValidation results
- βRetry & error state
"What does one completed workflow actually cost β and what breaks at 10x?"
- βCost per workflow (not per call)
- βSequential vs. parallel agents
- βCaching intermediate results
- βDeterministic steps vs. LLM steps
- βLatency budget
"What is the minimum level of access this agent needs to complete its responsibility?"
- βRead vs. write vs. delete permissions
- βReversible vs. irreversible actions
- βTool allowlists per agent
- βHuman approval gates
- βManipulation & prompt injection defenses
When a failure surfaces downstream, trace upstream
This has become one of my strongest mental models for multi-agent debugging. When a failure appears, I ask:
- 01Where did the failure surface?What did the user or downstream system observe?
- 02What was the immediate input to that component?Was the final agent given incorrect context?
- 03Where was that input created?Which agent, tool, or transformation produced it?
- 04What did that upstream component receive?Was its input already incorrect?
- 05Where does the first unexpected state appear?That is usually where I start the deeper investigation.
For example:
FINAL RECOMMENDATION
Wrong customer strategy
β
ANALYSIS
Incorrect churn driver
β
RESEARCH SUMMARY
Payment failures overrepresented
β
RETRIEVAL
Wrong customer segment
β
DATABASE QUERY
Missing enterprise filterThe final recommendation is wrong. The Recommendation Agent is three or four steps away from the original defect. Fixing the final prompt will not fix a missing SQL filter upstream.
This sounds obvious when written out. It is much harder to see when your application contains dynamic routing, five agents, several tools, retries, asynchronous tasks, and thousands of production requests.
That is why traces matter. That is why context propagation matters. That is why component-level evaluation matters. And that is why observability is not an optional dashboard you add after deployment.
My technical founder takeaway
I like multi-agent systems. I think they create some very interesting opportunities for specialized reasoning, separation of responsibilities, tool use, and complex workflows.
But adding more agents increases the importance of system-level engineering.
Every new agent introducesβ¦
- βEvery new agent introduces another interaction.
- βAnother context boundary.
- βAnother potential model call.
- βAnother place state may be transformed.
- βAnother tool permission to consider.
- βAnother component to evaluate.
- βAnother point to trace.
The goal should not be to build the most agentic architecture possible. The goal should be to build the simplest architecture that reliably solves the intended problem.
And when a multi-agent system is justified, I think production readiness requires thinking across all nine layers:
Because when the final AI output is wrong, the most important debugging question may not be:
"What is wrong with the model?"
The better question may be:
Where did the first unexpected state enter the workflow?
That is the part of multi-agent AI engineering I think we need to talk about more.
About the Technical Series. The Data Techcon Technical Series explores AI engineering, agentic systems, technical AI governance, and the engineering decisions required to move AI products from demonstrations into production.
Shipping an agentic system into production?
Data Techcon AI Consulting helps teams design multi-agent architectures, evaluation, guardrails, and launch-readiness systems for real-world AI products.
Work with Data Techcon AI Consulting