AI • Science • Technology • Future

Business AI

Deep Insight: Solving Production Challenges in Multi-Agent Systems

Image from the original article
Featured image: original publisher image. Via original publisher.

Building multi-agent AI systems is common in research and prototypes. But moving them into real-world production remains a major hurdle. While early-stage demonstrations may showcase impressive capabilities—such as generating reports from raw data or automating complex workflows—the transition from a proof-of-concept to a reliable, scalable, and secure production system reveals a set of persistent, often overlooked challenges. These challenges are not merely technical—they are architectural, operational, and deeply rooted in how agents interact, reason, and execute decisions in real environments. Source: aws.amazon.com.

Five Key Production Challenges

Teams attempting to deploy multi-agent systems in business applications frequently encounter five core issues that, if unaddressed, can lead to system failures, security breaches, user frustration, and operational inefficiencies. These challenges are not hypothetical—they are directly observed in real-world deployments and represent the critical gaps between prototype performance and production resilience.

  • Orchestrating execution flow across multiple agents: In a multi-agent system, each agent operates independently and makes decisions based on context. Without a clear, structured workflow, agents may skip steps, reprocess data unnecessarily, or fail to communicate effectively. This leads to inconsistent outputs and a lack of traceability in the decision-making process. For example, an agent might generate a report without validating its underlying calculations, or skip a critical data validation step due to a misjudgment in context.
  • Selecting the right large language model (LLM) for each agent role: Using a single model across all agents is inefficient and suboptimal. Different agents have distinct responsibilities—some require high reasoning capacity, others need fast response times, and some must generate precise, executable code. A model that excels at reasoning may be too costly for routing tasks, while a lightweight model may lack the depth to handle complex planning. Therefore, selecting the appropriate model for each agent role is not a simple choice—it is a strategic design decision that balances performance, cost, and reliability.
  • Ensuring reliable, stable operation in production environments: Prototype systems often run in isolated, low-stakes environments where failures are rare and easily recoverable. In production, however, systems must operate continuously under variable loads, with real users depending on consistent performance. Without proper runtime management, agents may crash, hang, or behave unpredictably under stress, leading to service degradation or data loss. Stability requires not only robust code but also a managed runtime environment with monitoring, session isolation, and failover mechanisms.
  • Securing execution of AI-generated code: One of the most critical risks in multi-agent systems is the execution of AI-generated code. Models can produce code with unintended behaviors—such as deleting files, accessing unauthorized data, or running infinite loops. In a production setting, such errors can compromise system integrity, expose sensitive data, or disrupt operations. Therefore, secure execution is not optional—it is a foundational requirement for any production-grade system.
  • Monitoring system performance and failures: A production system must provide real-time visibility into its health. Without monitoring, teams cannot detect anomalies, diagnose root causes, or respond to failures in a timely manner. Metrics such as token usage, execution time, agent status, and failure rates are essential for maintaining system reliability and enabling continuous improvement. Without these, even a well-designed system can become opaque and difficult to manage.

These challenges are not isolated—they are interdependent. For instance, poor orchestration can lead to inefficient model usage, which increases costs and reduces performance. Insecure code execution undermines trust in the system, making it difficult to deploy in regulated environments. Without monitoring, teams cannot validate that the system is operating as intended, especially when edge cases or unexpected inputs arise.

Deep Insight: A Production-Grade Solution

Deep Insight is an open-source multi-agent system developed by the AWS Solutions Architecture team. It turns raw data into automated insights through a hierarchy of specialized agents. The system processes CSV files and column definitions, then generates a report in DOCX format with charts and citations. The system includes a Coordinator, Planner, Supervisor, Coder, Validator, Reporter, and Tracker agent, each with a defined role and responsibility.

Deep Insight was designed not just to demonstrate the potential of multi-agent systems, but to solve the actual problems teams face when deploying such systems in real-world environments. It serves as a practical blueprint for how to build, secure, and operate a production-grade multi-agent system with measurable outcomes and real-world applicability.

How It Works: A Step-by-Step Flow

  1. The Coordinator receives user input and routes simple requests directly. For instance, a greeting or a basic query about data structure is handled immediately. Complex tasks—such as analyzing sales data or generating marketing insights—are passed to the Planner to be broken down into manageable steps.
  2. The Planner breaks down the task into discrete, actionable steps. It uses a structured checklist format to assign specific actions to each agent. This decomposition ensures that no step is skipped and that each agent operates within a well-defined scope. For example, the Planner might generate a checklist that includes loading data, analyzing consumer purchase patterns, comparing advertising channel effectiveness, and generating visualizations.
  3. The Plan Reviewer presents the proposed plan to the user. This is a human-in-the-loop (HITL) step that allows users to review, approve, or revise the plan before execution begins. If the user provides feedback, the plan is sent back to the Planner for revision. A maximum of 25 plan revisions is enforced to prevent infinite loops and ensure that the system remains responsive and efficient.
  4. The Supervisor orchestrates the workflow. It invokes specialized agents in a strict, ordered sequence—first the Coder, then the Tracker, then the Validator, and finally the Reporter—ensuring that each step is completed before moving to the next. After each agent runs, the Tracker updates the progress status, allowing the Supervisor to maintain a real-time view of the workflow state.
  5. Agents like the Coder generate and execute Python code to analyze data and produce visualizations. The Validator rechecks all numerical calculations to ensure accuracy. The Reporter compiles the final report in DOCX format, including both a version with citations and one without. The Tracker continuously updates the progress status, ensuring that the system provides real-time feedback on task completion.

Each agent operates in its own independent context. It receives only the information it needs and returns only compressed, actionable results. This design minimizes context leakage, prevents information loss, and ensures that each agent maintains its domain expertise without overloading or misusing shared data.

Model Selection by Role: A Strategic Design Decision

Deep Insight does not use a single large language model across all agents. Instead, it assigns different models based on function, performance needs, and cost considerations. This is not a simple substitution—it is a deliberate architectural choice that reflects a deep understanding of how different models perform under different conditions.

  • Coordinator: Uses Claude Haiku. This model is lightweight and optimized for fast response times. It is ideal for basic routing tasks such as classifying user input or determining whether a request requires complex analysis. By avoiding the use of more expensive models like Opus for these tasks, Deep Insight minimizes latency and reduces operational costs.
  • Planner: Uses Claude Opus with Extended Thinking enabled. This model is designed for deep reasoning and long-context understanding. It can analyze complex business problems, break them into logical steps, and generate detailed, well-structured plans. The Extended Thinking feature allows the Planner to maintain a broader context during reasoning, which is essential for creating comprehensive and accurate analysis plans.
  • Supervisor : Uses Claude Sonnet. This model is optimized for orchestration and coordination. It manages the workflow between agents, enforces execution rules, and maintains a consistent flow of information. This caching strategy is effective because the Supervisor’s prompts and tool configurations remain stable across multiple executions.
  • Coder: Uses Claude Sonnet. This agent generates and executes Python code to perform data analysis and visualization. It requires high precision and consistency, especially when writing code that interacts with data files. Prompt caching is enabled because the Coder often performs repeated tasks with similar inputs, allowing it to reuse previously generated code snippets and reduce redundant work.
  • Validator: Uses Claude Sonnet. This agent performs numerical verification of calculations. It re-executes the same calculations from the source data to ensure accuracy. Because each execution uses different data inputs (e.g., different data files or time periods), caching is ineffective and is therefore disabled. This ensures that the validation process remains accurate and responsive to changes in input.
  • Reporter: Uses Claude Sonnet. This agent generates a professional report in DOCX format. It must produce consistent, well-structured content with citations and visual elements. Prompt caching is enabled because the report generation process often involves long, repetitive prompts, and caching allows it to reuse previously generated content, improving performance and reducing costs.
  • Tracker: Uses Claude Sonnet. This agent updates the progress status of each task in real time. Its role is lightweight and primarily involves reasoning about task completion, rather than generating complex content. Because the tasks are simple and repetitive, caching is unnecessary and is therefore disabled.

Only the Supervisor, Coder, and Reporter use prompt caching. This selective caching strategy is a deliberate trade-off between performance and cost. It ensures that the system achieves optimal performance for the agents that benefit most from it, while avoiding unnecessary overhead in others.

Secure Code Execution in Production: A Foundational Requirement

AI-generated code is inherently risky. Models can produce code with unintended behaviors—such as deleting files, accessing system resources, or running infinite loops. In a production environment, such errors can compromise data integrity, disrupt operations, or expose sensitive information. Therefore, secure execution is not a secondary feature—it is a foundational requirement for any production-grade system.

Deep Insight architecture: the Strands Agents multi-agent layer on Amazon Bedrock AgentCore, with an Application Load Balancer routing code execution to AWS Fargate containers…
Deep Insight architecture: the Strands Agents multi-agent layer on Amazon Bedrock AgentCore, with an Application Load Balancer routing code execution to AWS Fargate containers in a private VPC. Via original publisher. · Source

In Deep Insight, code execution is isolated and secured through a multi-layered approach. In the Self-Hosted version, the Coder runs locally using Python’s subprocess.run() function. However, in production environments—particularly when deployed via Amazon Bedrock AgentCore—the system implements a secure execution environment to protect against unauthorized access and malicious behavior.

The execution process follows a two-step model:

  1. Code is first base64-encoded and sent over HTTP to a secure endpoint.
  2. The encoded code is written to a temporary file and executed via a subprocess in a sandboxed environment.

This two-step process ensures that the code is not executed directly in the host environment, reducing the risk of system-level damage. The sandboxed environment is isolated from the rest of the system and has no access to the host’s file system, network, or other services.

Each analysis session runs in a per-session ephemeral container on AWS Fargate. These containers are created in a private virtual private cloud (VPC) subnet with no direct internet access. This ensures that the execution environment is isolated from external threats and does not expose sensitive data to the public internet.

Application Load Balancer (ALB) uses sticky sessions to ensure that all steps of a single analysis are handled by the same container. This consistency is critical for maintaining state across multiple agent interactions and ensures that the system behaves predictably throughout the workflow.

After the analysis completes, all generated artifacts—including charts, reports, and logs—are uploaded to Amazon S3. The Fargate container is automatically terminated after one hour, ensuring that no session remains active longer than necessary and reducing the risk of resource exhaustion or unauthorized access.

While container isolation prevents direct access to system files or other users’ data, it does not eliminate all risks. The Validator agent re-verifies calculations, but it does not detect prompt injection, harmful content, or ungrounded claims hidden in user inputs or uploaded data. For production systems, AWS recommends integrating Amazon Bedrock Guardrails to apply content filters, detect prompt attacks, and perform contextual grounding checks on both user prompts and agent outputs. This ensures that the generated content remains aligned with the source data and does not contain false or misleading information.

Monitoring and Operational Visibility: Enabling Real-Time Oversight

Production systems must provide real-time visibility into performance, status, and failures. Without monitoring, teams cannot detect anomalies, diagnose issues, or respond to problems in a timely manner. Deep Insight includes both a user-facing web interface and an administrative dashboard to provide comprehensive operational visibility.

Hierarchical multi-agent structure where the Coordinator and Planner feed the Supervisor, which orchestrates the Coder, Validator, Reporter, and Tracker agents
Hierarchical multi-agent structure where the Coordinator and Planner feed the Supervisor, which orchestrates the Coder, Validator, Reporter, and Tracker agents. Via original publisher. · Source

The Web UI is a FastAPI-based interface that allows users to upload data, enter prompts, and monitor progress in real time. The system uses Server-Sent Events (SSE) streaming to deliver updates as tasks progress, enabling users to see the workflow unfold step by step. When the plan is generated, a modal appears where users can approve or provide revision feedback. If no response is given within 300 seconds, the system auto-approves the plan, ensuring that the workflow does not stall due to user inactivity.

The Ops dashboard is a backend tool designed for operations teams. It records detailed metrics for every analysis task—including status (e.g., pending, running, completed, failed), token usage, and elapsed time—into Amazon DynamoDB. This data enables teams to analyze performance trends, identify bottlenecks, and optimize workflows over time.

When an analysis fails, an immediate email alert is sent to administrators via Amazon SNS. This ensures that critical issues are not overlooked and that teams can respond quickly to prevent cascading failures. The dashboard is protected by JSON Web Token (JWT) authentication through Amazon Cognito, ensuring that only authorized personnel can access sensitive operational data.

These tools collectively provide a complete picture of system health. They enable teams to track performance, diagnose issues, maintain accountability, and ensure that the system operates reliably under real-world conditions.

Real-World Applications: Validating the Architecture in Practice

The Deep Insight architecture has been tested in two distinct domains, demonstrating its versatility and effectiveness across different use cases.

LG Electronics: Marketing Insight Extraction

LG Electronics’ Korea Sales Division faced a significant challenge: marketing data analysis tasks that previously took 2–3 weeks were often lost in translation between marketers and data scientists. The process was slow, error-prone, and lacked transparency. With Deep Insight, the same analysis now takes just 30 minutes—representing a 288x improvement in productivity.

The system uses the same agent hierarchy. The Coordinator routes by complexity, the Planner tracks tasks, and the Supervisor orchestrates execution with state passed through a shared file (e.g., all_results.txt). This allows marketers without SQL skills to explore data and propose strategies, significantly lowering the barrier to entry for data-driven decision-making.

TechRecon: Technology Strategy Analysis

At AWS re:Invent 2025, TechRecon applied the same architecture to technology strategy. Given a company and sector, a Researcher gathers technology trends, the Coder analyzes the data, the Validator verifies the findings, and the Reporter produces a Landscape Analysis and a Technical Position Paper.

This case demonstrates that the architecture is not limited to data analysis—it is a general-purpose pattern. By swapping agent roles and prompts, the same orchestration structure can be adapted to solve entirely different problems, such as competitive intelligence, market research, or product development strategy.

Deep Insight web UI showing the Plan Reviewer modal where the user approves or revises the generated analysis plan
Deep Insight web UI showing the Plan Reviewer modal where the user approves or revises the generated analysis plan. Via original publisher. · Source

These real-world examples validate that the core design principles of Deep Insight—workflow management, model selection, secure execution, and operational visibility—are not just theoretical—they are proven, scalable, and effective in diverse business contexts.

Why This Architecture Matters

Deep Insight shows that multi-agent systems are not simply about having access to powerful language models. They are about architecture and operational design. The success of such systems depends not on model capability alone, but on how well the system is structured to manage execution, reasoning, security, and monitoring.

Key design principles include:

  • Workflow management via the Strands Agents SDK’s Graph pattern and Agents-as-Tools pattern: These patterns define a clear, structured execution flow between agents. The Graph pattern ensures that agents execute in a defined sequence, while the Agents-as-Tools pattern allows the Supervisor to invoke specialized agents only when needed, reducing context overhead and improving efficiency.
  • Model selection optimized for cost and quality: By assigning different models to different roles, Deep Insight achieves a balance between performance, cost, and reliability. This is a scalable approach that can be adapted to other domains and use cases.
  • Deployment using Amazon Bedrock AgentCore with private VPC and session isolation: This managed runtime provides stability, security, and scalability, enabling teams to deploy multi-agent systems without managing low-level infrastructure.
  • Secure code execution in per-session Fargate containers: This ensures that AI-generated code runs in a safe, isolated environment, preventing system-level damage and data exposure.
  • Operations visibility through real-time streaming and monitoring tools: These tools provide teams with real-time insights into system performance, enabling proactive management and continuous improvement.

These principles have been validated in real-world use cases. LG Electronics achieved a dramatic improvement in productivity, while TechRecon demonstrated the adaptability of the architecture to new domains. Together, these examples show that a well-designed multi-agent system can deliver measurable value across industries.

What’s Next?

Part 2 of the series will explore Context Engineering techniques—how to manage context window limits through prompt design, tool optimization, and verification safeguards. These techniques build upon the foundation laid in this post and address the limitations of context windows in large language models, ensuring that agents can reason effectively even when working with long, complex inputs.

Deep Insight is open source. The full codebase is available on GitHub. A workshop is available in English and Korean, providing hands-on experience with the system’s architecture and deployment.

For more on the underlying framework, see Strands Agents.

Deep Insight demonstrates that production-grade multi-agent systems are achievable. They require not just powerful models, but thoughtful architecture, secure execution, and operational discipline. By addressing the five core production challenges with a proven, scalable, and secure design, Deep Insight offers a practical path for organizations to adopt multi-agent AI in their operations.

Sources & further reading

Featured image: original publisher image. Via original publisher. Image source