A single AI agent is a reasoning engine with a set of tools. Agent orchestration is what happens when you need multiple reasoning engines working together toward a goal that no single agent can accomplish alone.
The problems that agent orchestration solves are real: a complex software penetration test that requires reconnaissance, web application testing, API security assessment, network layer testing, and report generation is beyond the context window, time constraints, and tool set of any single agent working in sequence. A multi-agent system distributes these tasks across specialised agents, coordinates their work, aggregates their findings, and produces an integrated output.
The problems that agent orchestration introduces are equally real and significantly less discussed. Trust boundaries between agents create injection propagation paths. Shared memory architectures create state corruption vulnerabilities. Cascading failures propagate from compromised agents to downstream agents with full trust. And the security testing implications of multi-agent systems are qualitatively different from those of single-agent systems.
This guide covers both halves: how orchestration works, and where it breaks.
Part I: How agent orchestration works
What agent orchestration is
Agent orchestration is the coordination of multiple AI agents to accomplish tasks that require decomposition, parallelisation, specialisation, or sequential handoffs. The orchestrator (which may itself be an AI agent or a deterministic control layer) manages task routing, agent communication, result aggregation, and error handling.
The key properties that distinguish orchestrated multi-agent systems from single-agent systems:
Decomposition: complex tasks are broken into sub-tasks that can be executed by specialised agents. A research task might be decomposed into search (a web browsing agent), analysis (a reasoning agent), and synthesis (a writing agent).
Specialisation: individual agents can be tuned, prompted, and tooled for specific task types, producing higher quality output for each sub-task than a generalist agent attempting the full task.
Parallelisation: independent sub-tasks can execute concurrently, reducing total execution time and enabling coverage of broader attack surfaces in security contexts.
Context management: the orchestrator manages what information flows between agents, preventing context window overflow in long-running tasks and maintaining coherent state across agent interactions.
The three orchestration patterns
Hierarchical orchestration (orchestrator-worker)
A central orchestrator agent receives the top-level goal, decomposes it into sub-tasks, delegates each sub-task to worker agents, monitors progress, and aggregates results. The orchestrator maintains the global task state and is responsible for coherence across worker outputs.
This is the most common pattern for complex tasks. The orchestrator does not necessarily execute any individual task itself: its role is coordination, not execution. Worker agents operate with limited scope: each sees only its sub-task, its allocated tools, and the context passed to it by the orchestrator.
Strengths: clear separation of concerns, straightforward task state management, easy to add specialised workers.
Weaknesses: the orchestrator is a single point of failure. Prompt injection against the orchestrator propagates to all workers. Orchestrator compromise grants access to the full task coordination layer.
Sequential pipeline
Agents operate in defined sequence where each agent receives the output of the previous agent as input. Agent A produces output that becomes Agent B's input; Agent B's output becomes Agent C's input. The pipeline structure is fixed at design time.
This pattern suits tasks with strong sequential dependencies: data collection must precede analysis, which must precede report generation. It is simpler to reason about than hierarchical systems because the execution flow is predetermined.
Weaknesses: failures propagate forward: an error in Agent B's output affects all downstream agents. The pipeline cannot dynamically adapt to unexpected situations that require changing the task decomposition.
Peer-to-peer collaborative
Agents communicate directly with each other without a central coordinator, collaborating to solve problems through shared reasoning and negotiation. Each agent can initiate communication with other agents and request assistance.
This pattern suits tasks where the decomposition is not known in advance and agents must collectively determine the approach. It is the most flexible and the most complex to reason about from a security perspective, because trust boundaries between peer agents are inherently blurrier than in hierarchical systems.
Weaknesses: harder to audit, harder to test, harder to secure. Trust escalation between peer agents can propagate compromise across the entire agent network.
Inter-agent communication mechanisms
Agents communicate through several mechanisms, each with distinct security implications:
Structured message passing: agents exchange messages in defined formats through a message queue or direct API calls. The orchestrator controls message routing. This is the most auditable communication pattern.
Shared memory/state: agents read and write to a shared memory store (vector database, key-value store, relational database). Any agent can read state written by any other agent. This enables coordination without explicit message passing but creates state corruption risks.
Context injection: the orchestrator constructs the context window for each worker agent by combining the original task, relevant prior outputs, and agent-specific instructions. The orchestrator controls what each agent sees.
Tool-mediated coordination: agents coordinate through shared tools, for example, both reading from and writing to the same database or external service, without direct communication.
In a well-designed multi-agent system, tool access is scoped to the minimum required for each agent's task. A reconnaissance agent that only needs to perform DNS lookups and web browsing should not have write access to databases or the ability to send emails.
Tool routing (the orchestrator's assignment of specific tools to specific agents) determines the blast radius of any individual agent compromise. An agent with access to only read-only tools cannot take irreversible actions even if compromised. An agent with write access to production systems is a much more valuable target.
Tool routing decisions at design time have security implications that are often not considered during initial system design, where the priority is enabling the agent to complete its task.
Part II: Where agent orchestration breaks
Failure mode 1: Trust escalation across agent chains
In a hierarchical orchestration system, worker agents typically receive their instructions from the orchestrator and execute them with the level of trust the orchestrator has granted them. If the orchestrator's instructions are compromised (through prompt injection against the orchestrator), and all worker agents execute those compromised instructions with their allocated tool access.
More subtly: in systems where worker agents can request elevated permissions or additional tools from the orchestrator as needed, a compromised worker agent can request tool access it was not initially granted. If the orchestrator grants tool requests from workers without verification, a single compromised low-privilege worker can escalate to the full privilege set of any tool the orchestrator controls.
What this looks like in practice: An indirect prompt injection attack against a reconnaissance agent (embedded in a web page that agent browses) instructs the agent to report that a specific internal URL is safe to proceed with. The orchestrator, trusting the reconnaissance agent's output, instructs the application testing agent to proceed. The application testing agent now operates against an attacker-controlled surface under the orchestrator's direction.
Failure mode 2: Prompt injection propagation through agent outputs
In a sequential pipeline, each agent's output becomes the next agent's input. If an attacker can inject instructions into the output of one agent, those instructions propagate through the pipeline, potentially affecting all downstream agents.
This failure mode is qualitatively different from prompt injection against a single-agent system. In a single-agent system, injection requires access to a surface the agent interacts with. In a pipeline, injection against any upstream agent propagates the attack to all downstream agents, multiplying the attack surface.
The critical asymmetry: each agent in a pipeline typically validates inputs from the external world but trusts inputs from upstream agents. The injection bypasses the external validation by arriving through a trusted inter-agent channel.
Failure mode 3: Shared memory state corruption
In architectures where multiple agents read and write to shared memory, a compromised agent can corrupt shared state in ways that affect all other agents' reasoning. A compromised agent that writes false task state ("task subtask-42 completed successfully" when it was not) causes the orchestrator and other agents to reason from a false foundation.
Shared memory poisoning is particularly insidious because the corruption is persistent (it remains in memory for the duration of the session and potentially across sessions) and indirect (the corrupted agent does not need direct access to the downstream agent: it only needs write access to shared memory that the downstream agent reads).
Failure mode 4: Context window smuggling between agent handoffs
When an orchestrator constructs the context window for a worker agent, it includes prior agent outputs. If an attacker can control what prior agent outputs contain, they control part of the context that the next agent reasons from.
Unlike direct prompt injection, context window smuggling operates through the orchestration layer's normal context construction mechanism. The malicious content arrives in a context position that the agent is designed to treat as trusted (prior work by other agents) rather than untrusted (external inputs).
In systems where agents interact with external tools (APIs, databases, web services), an attacker with the ability to intercept or modify tool responses can manipulate what agents "see" from those tools. An agent instructed to verify that a security check passed will conclude the check passed if the tool response is manipulated to report success.
This failure mode becomes compound in orchestrated systems: a tool result that is manipulated for one agent's consumption may be stored in shared memory or passed to downstream agents as fact, propagating the manipulation through the entire agent network.
Failure mode 6: Cascading failure from single compromised agent
In a well-designed single-agent system, a compromised agent's blast radius is limited to the tools and data that agent has access to. In a multi-agent system with inter-agent trust, a single compromised agent can cascade compromise to other agents through:
- Outputting instructions to downstream agents that override their intended behaviour
- Writing corrupted state to shared memory that misleads downstream agents
- Requesting elevated tool access from the orchestrator that it would not have granted without the compromised agent's social engineering
- Providing false confirmation to the orchestrator that authorised the next phase of the task
The blast radius of a single compromised agent in a multi-agent system is bounded by the inter-agent trust architecture, which is often not explicitly designed and never explicitly tested.
Security testing implications for multi-agent systems
The failure modes above have direct implications for how multi-agent systems must be tested, and why existing testing approaches are insufficient.
Traditional application security testing targets the application's external interface. It tests what an unauthenticated or authenticated user can do. Multi-agent systems have additional internal attack surfaces: the inter-agent communication channels, the shared memory stores, the tool routing logic, and the orchestrator's context construction mechanism.
Single-agent AI security testing tests prompt injection against a single agent's input surface and output handling. Multi-agent systems require testing prompt injection propagation across agent chains: does injection at Agent A propagate to Agent B? Does Agent C trust Agent B's outputs without validation?
Static configuration review can verify that tool access is appropriately scoped at design time. It cannot verify whether the orchestrator enforces that scoping correctly at runtime, or whether agents can manipulate tool access through the orchestrator's request handling.
The security testing methodology for multi-agent systems requires: testing each inter-agent trust boundary for injection propagation, testing shared memory access controls for unauthorised reads and writes, testing tool routing enforcement under adversarial conditions, testing cascading failure behaviour when individual agents are compromised, and testing the orchestrator's handling of unexpected agent outputs.
This is the security testing methodology that agentic pentesting and continuous security validation applies to application security: reasoning across multiple test phases, maintaining context across interactions, adapting approach based on intermediate findings, and testing the boundaries between application components rather than treating each endpoint independently. The agentic AI security pillar covers the full security context for agentic systems, including both the defence of AI agents and the use of AI agents for security testing.
The 10x Pentest platform deploys multiple specialised security agents coordinated by an orchestration layer that manages task decomposition, specialist routing, finding aggregation, and report generation. Understanding the orchestration architecture in a security testing context illuminates why multi-agent systems produce qualitatively different results than single-agent approaches.
A single agent attempting a full penetration test faces fundamental constraints: a single context window must hold the entire test state, a single agent must context-switch between reconnaissance reasoning, exploitation reasoning, and reporting, and sequential execution cannot test multiple application surfaces in parallel.
An orchestrated multi-agent security testing system distributes this work: a reconnaissance specialist builds the attack surface map and passes it to the orchestrator, which routes specific testing tasks to authentication specialists, API security specialists, business logic testing specialists, and network layer specialists operating concurrently. The orchestrator aggregates confirmed findings, identifies finding relationships that constitute chained attack paths, and coordinates the report generation layer.
The trust boundary design in a security testing agent system is specifically engineered to prevent the failure modes described above from affecting test integrity: outputs from external application surfaces are treated as untrusted even when those surfaces are the test target, inter-agent communication is validated at each handoff, and tool access for each specialist agent is scoped to the minimum required for its testing function.
How autonomous pentesting works in a DevSecOps pipeline covers the operational architecture. AI in penetration testing: how automation is changing security testing covers the broader context of where orchestrated agent systems fit in the security testing tool landscape.
For organisations building their own multi-agent systems and needing to understand what security testing should cover, what a real web application penetration test should cover maps the application-layer coverage that applies to any agent-accessible web surface. The security gaps DAST and standard testing misses covers why the inter-agent attack surfaces require testing beyond standard DAST coverage. Attack surface management covers continuous discovery of the full surface that multi-agent systems expose.
Continuous penetration testing covers the cadence model that keeps security validation pace with the rapid deployment cycles that agent-based systems operate on. Generative AI security risks covers the broader CISO-level context for AI security risk management within which agent orchestration failure modes sit.
For penetration testing services in the US covering AI-integrated and agent-based applications, agentic penetration testing for continuous validation, and PTaaS for the continuous model, the 10x Pentest platform covers the application security layer. See pricing or get in touch to discuss how security testing applies to your agent-integrated application environment.
Frequently asked questions
Q1. What is agent orchestration?
Agent orchestration is the coordination of multiple AI agents to accomplish complex tasks that require decomposition, parallelisation, specialisation, or sequential handoffs between agents. An orchestrator (which may be an AI agent or a deterministic control layer) manages task routing, inter-agent communication, result aggregation, and error handling. Orchestrated multi-agent systems enable tasks that exceed the context window, time constraints, or tool set of any single agent, by distributing work across specialised agents working concurrently or sequentially.
Q2. What are the main agent orchestration patterns?
Three primary patterns are used in practice: hierarchical orchestration (a central orchestrator delegates sub-tasks to worker agents and aggregates their results), sequential pipeline (agents operate in defined sequence where each agent's output becomes the next agent's input), and peer-to-peer collaborative (agents communicate directly with each other without a central coordinator, collectively determining the approach). Hierarchical orchestration is most common for complex tasks; sequential pipelines suit tasks with strong sequential dependencies; peer-to-peer collaboration is most flexible but hardest to secure and audit.
Q3. What are the main security risks of multi-agent orchestration?
Multi-agent orchestration introduces six categories of security failure that single-agent systems do not face: trust escalation across agent chains (a compromised low-privilege agent requests elevated access from the orchestrator); prompt injection propagation through agent outputs (injection at one agent propagates to downstream agents through inter-agent trust); shared memory state corruption (a compromised agent poisons shared state that other agents read); context window smuggling between agent handoffs (malicious content arrives in the trusted "prior agent output" position); tool call interception and result manipulation (attacker-controlled tool responses feed downstream agents false information); and cascading failure from single compromised agents (one compromised agent can cascade compromise through the full agent network via inter-agent trust relationships).
Q4. How do trust boundaries work in multi-agent systems?
Trust boundaries in multi-agent systems define what each agent accepts as trustworthy input without additional validation. In hierarchical systems, workers typically trust instructions from the orchestrator without validation. In pipelines, downstream agents typically trust upstream agent outputs without validation. These trust assumptions are what make orchestrated systems efficient, but they are also what makes them vulnerable. If an attacker can inject into any trusted communication channel (orchestrator instructions, upstream agent outputs, shared memory), they operate within a trusted context that bypasses validation controls designed for untrusted external inputs.
Q5. How should multi-agent systems be tested for security?
Multi-agent system security testing requires methodology beyond standard application security testing, which focuses on the external interface. Testing must cover: inter-agent trust boundary validation (does Agent B validate inputs from Agent A, or accept them without validation?), prompt injection propagation testing (does injection at Agent A affect Agent B's behaviour?), shared memory access control testing (can agents read or write state they should not access?), tool routing enforcement testing (does the orchestrator correctly enforce tool access scoping under adversarial conditions?), and cascading failure testing (what happens to Agent B, C, and D if Agent A is compromised?). Standard DAST and manual penetration testing methodology does not cover these inter-agent attack surfaces.