Pattern library

Agentic integration and orchestration patterns

14 vendor-neutral patterns for connecting AI agents to enterprise systems and coordinating several agents: when to use each one, the controls it needs, and how it fails in production. Free to use and share with a link back.

How to read this: new to the topic? Start with the agentic AI orchestration guide. integration patterns describe how one agent reaches tools and systems safely; orchestration patterns describe how work is split across agents and workflows. Real solutions combine them, typically a workflow-led or supervisor backbone over a central MCP gateway, with approval gates on high-impact writes. Risk codes refer to the OWASP Top 10 for Agentic Applications; hover a code for its name.
Quick index table
PatternTypeMaturityIn one line
Governed tool facadeIntegrationStart hereExpose one narrow
Central MCP gatewayIntegrationStart hereRoute every agent-to-tool call through one gateway that authenticates
Event-triggered agentIntegrationCommonA business event (invoice blocked
Human approval gateIntegrationStart hereThe agent prepares a high-impact action
Agent-to-agent delegationIntegrationEmergingAn agent hands a task to another agent on a different platform or in another company using A2A
Entitlement-aware retrievalIntegrationCommonGive agents context from documents and records through a retrieval tool that filters results by the calling user's permissions before anything reaches the model.
Safe write with compensationIntegrationStart hereEvery agent write carries an idempotency key
Workflow-led (agent in the loop)OrchestrationStart hereA workflow or integration flow owns the process and the order of steps
Supervisor (orchestrator and workers)OrchestrationCommonAn orchestrator agent plans
Sequential hand-offOrchestrationCommonEach agent completes its step and hands the case to the next one
Parallel fan-out and fan-inOrchestrationCommonIndependent sub-tasks go to several agents at once and the results are aggregated.
Event-driven choreographyOrchestrationAdvancedAgents subscribe to business events and react independently
Maker–checker review loopOrchestrationCommonOne agent produces a draft
Agent-assisted integration operationsOrchestrationEmergingAn agent watches failed messages and alerts
Integration patternStart here

Governed tool facade

Also called: MCP tool over a managed API

Expose one narrow, well-described MCP tool on top of an API or integration flow you already run, instead of letting the agent reach the system directly.

Use it when

  • An agent needs to read or change data in ERP, HR, CRM or finance
  • A managed API or integration flow already exists for the business object
  • You want the agent to see only what its user could see

Avoid it when

  • The only available API is a broad technical endpoint with no business meaning
  • You are tempted to build one generic “call any API” tool

Controls you need

  • One tool per business action, with a strict input schema and additionalProperties: false
  • Tool description written for the model: what it does, limits, read-only or not
  • User identity carried end to end (token exchange, not a shared technical user)
  • Read-only hints and rate limits; writes added later with idempotency keys

How it fails

  • Over-broad tool returns more data than the user is entitled to
  • Vague description makes the model call the wrong tool or invent parameters
  • Backend error text leaks into the model context and is treated as instructions

Example: A sales copilot calls get_order_status(orderId) which maps to an existing order API in the ERP; it cannot change orders.

OWASP agentic risks: ASI02 ASI03 Read more: MCP gateway architecture · API-centric integration patterns

Integration patternStart here

Central MCP gateway

Also called: Tool gateway, agent gateway

Route every agent-to-tool call through one gateway that authenticates, filters tool discovery per caller, applies policy, rate-limits and writes an audit record.

Use it when

  • More than one agent or MCP server is in use
  • Security needs one place to approve, revoke and observe tool access
  • You need per-tool authorization rather than per-server

Avoid it when

  • A single prototype with one read-only tool (add the gateway before the second tool)

Controls you need

  • Filtered tools/list: callers only discover tools they may use
  • Policy decision on every call: allow, deny or require approval
  • Approved MCP server registry; pin versions and review tool description changes
  • Correlation ID and audit record per call; kill switch per agent and per tool

How it fails

  • Gateway bypass because a team connects an agent straight to a server
  • Tool description silently changed upstream (rug pull)
  • Gateway becomes a single point of failure without capacity planning

Example: Finance, procurement and HR agents all call tools through one gateway that blocks create_payment_request for anyone but the finance agent.

OWASP agentic risks: ASI02 ASI03 ASI04 Read more: MCP gateway architecture · SAP Integration Suite MCP Gateway

Integration patternCommon

Event-triggered agent

Also called: Event-driven agent activation

A business event (invoice blocked, order delayed, employee hired) wakes an agent with a scoped goal, instead of the agent polling systems.

Use it when

  • Work starts from something that happens in a system, not from a chat
  • An event broker or webhooks already carry the events
  • The agent prepares evidence or a proposal for a person

Avoid it when

  • Events are very high volume and each one would trigger model calls without filtering
  • The response must be deterministic and immediate (use a normal integration flow)

Controls you need

  • Filter and deduplicate events before they reach the agent
  • The event payload is data, never instructions to the agent
  • Service identity for the agent plus the business owner recorded on the case
  • Budget per event: maximum tool calls, tokens and time

How it fails

  • Event storm causes runaway cost
  • Duplicate events create duplicate actions
  • Injected text in an event field redirects the agent

Example: An invoice-blocked event wakes an AP agent that gathers PO, goods receipt and supplier messages, then opens a task for a clerk with a recommended fix.

OWASP agentic risks: ASI01 ASI06 ASI08 Read more: What is agentic integration? · Integration orchestration

Integration patternStart here

Human approval gate

Also called: Human-in-the-loop, four-eyes

The agent prepares a high-impact action; the gateway pauses it until a named person approves the exact payload, then executes it unchanged.

Use it when

  • Payments, bank detail changes, master data, terminations, anything irreversible
  • Regulation or internal control requires separation of duties

Avoid it when

  • Every low-risk step needs approval (people rubber-stamp; use allow rules instead)

Controls you need

  • Approve the exact payload hash, not a summary the agent wrote
  • Approver cannot be the requesting user; show source evidence, not only the agent's reasoning
  • Approval expires; any change to the payload restarts approval
  • Record approver, time, payload and decision in the audit trail

How it fails

  • Approval fatigue leads to blind approvals
  • Agent changes the payload after approval
  • Persuasive agent explanation hides a fraud signal

Example: Finance agent proposes a 48,000 payment; policy requires AP manager approval; the approved payload is executed byte for byte.

OWASP agentic risks: ASI09 ASI10 Read more: Governance and security policies · Agent Policy Simulator

Integration patternEmerging

Agent-to-agent delegation

Also called: A2A task delegation, cross-organization agents

An agent hands a task to another agent on a different platform or in another company using A2A, exchanging tasks and artifacts rather than sharing tools or credentials.

Use it when

  • Work crosses teams, platforms or companies (suppliers, logistics, banks)
  • The other side wants to keep its own tools and data private

Avoid it when

  • Both agents run in your own platform and could share a workflow
  • You cannot verify who operates the remote agent

Controls you need

  • Allow-list of trusted agents; verify signed Agent Cards and endpoints
  • Strong authentication (OAuth 2.0 or mutual TLS) per partner
  • Treat returned artifacts as untrusted data; validate against a schema
  • Timeouts and handling for input-required and failed task states

How it fails

  • Impersonated or compromised partner agent
  • Partner reply contains instructions that hijack your agent
  • Task hangs in input-required with no owner

Example: Procurement agent asks a supplier's agent to confirm stock and ship date for 40 SKUs and receives a structured artifact.

OWASP agentic risks: ASI07 ASI01 Read more: Agent-to-agent (A2A) integration · A2A Agent Card builder

Integration patternCommon

Entitlement-aware retrieval

Also called: Permission-filtered RAG

Give agents context from documents and records through a retrieval tool that filters results by the calling user's permissions before anything reaches the model.

Use it when

  • Agents answer questions from policies, contracts, tickets or HR knowledge
  • Content has different audiences (country, role, confidentiality)

Avoid it when

  • Copying all content into one shared index without access metadata

Controls you need

  • Filter at query time with the user's identity, not at index time only
  • Return citations so people can verify answers
  • Scan ingested content for embedded instructions; label it as untrusted
  • Expire and re-index when source permissions change

How it fails

  • Confidential content leaks to a user who could not open the source
  • Poisoned document steers the agent
  • Stale index answers from withdrawn policy

Example: An HR agent answers a leave question in Germany using only policies the employee can access, with links to the source pages.

OWASP agentic risks: ASI06 ASI03 Read more: Agent identity and authorization · Enterprise AI agent integration

Integration patternStart here

Safe write with compensation

Also called: Idempotent write, saga

Every agent write carries an idempotency key, runs through an integration flow with retries, and has a defined compensating action if a later step fails.

Use it when

  • Agents create or change business documents
  • Calls can time out and be retried by the agent, the gateway or the flow

Avoid it when

  • The target system cannot detect duplicates and has no reversal (keep a person in the loop instead)

Controls you need

  • Idempotency key generated once per business intent and checked by the backend
  • Retries with backoff in the integration layer, not by the model re-calling the tool
  • Compensating action defined and tested (cancel, reverse, credit)
  • Status tool so the agent can check the outcome instead of retrying blindly

How it fails

  • Timeout plus retry creates a duplicate payment or order
  • Partial completion leaves systems inconsistent
  • Agent loops on a failing call

Example: A payment request times out; the agent calls get_request_status with the same key instead of submitting again.

OWASP agentic risks: ASI08 ASI02 Read more: Multi-agent orchestration: reliability · API-centric integration patterns

Orchestration patternStart here

Workflow-led (agent in the loop)

Also called: Deterministic backbone

A workflow or integration flow owns the process and the order of steps; it calls an agent only for judgement steps such as classifying, extracting or drafting.

Use it when

  • Regulated, audited or high-volume processes
  • The sequence must always happen in the same order
  • You want the most predictable cost and behaviour

Avoid it when

  • The path genuinely depends on what is discovered along the way

Controls you need

  • The agent output is validated against a schema before the workflow continues
  • Fallback path when the agent is unsure or unavailable
  • Confidence thresholds route low-confidence cases to people

How it fails

  • Agent output in an unexpected format stops the workflow
  • Silent drift in agent quality over time

Example: An invoice workflow calls an agent to extract fields from a PDF, then validates and posts through the normal integration flow.

OWASP agentic risks: ASI08 Read more: Multi-agent orchestration · Integration orchestration

Orchestration patternCommon

Supervisor (orchestrator and workers)

Also called: Planner, manager agent

An orchestrator agent plans, delegates tasks to specialist agents with narrow tools, and combines their results.

Use it when

  • Exception handling and investigations where the next step depends on findings
  • Several domains each need their own specialist tools

Avoid it when

  • A fixed sequence would do the job (use workflow-led)
  • You cannot bound cost or depth

Controls you need

  • Orchestrator has few or no tools of its own; specialists hold narrow tools
  • Permissions only shrink at each delegation hop
  • Depth limit, budget and stop conditions
  • One trace across all agents

How it fails

  • Orchestrator becomes an over-privileged single point
  • Delegation loops
  • Specialists disagree and the orchestrator picks silently

Example: An orchestrator investigates an invoice exception by delegating to procurement, finance and a supplier's agent.

OWASP agentic risks: ASI03 ASI08 ASI10 Read more: Multi-agent orchestration

Orchestration patternCommon

Sequential hand-off

Also called: Pipeline, relay

Each agent completes its step and hands the case to the next one, like an assembly line.

Use it when

  • Well-understood flows such as intake, validation, enrichment, posting
  • Each stage has a clear owner

Avoid it when

  • Stages need to go back and forth often

Controls you need

  • Schema validation at every hand-off
  • Each stage has only the tools for its step
  • Case state stored outside the agents

How it fails

  • Errors propagate downstream and get amplified
  • Context grows with every hand-off

Example: Supplier onboarding: intake agent reads the form, validation agent checks tax and bank data, a workflow creates the vendor after approval.

OWASP agentic risks: ASI08 ASI06 Read more: Multi-agent orchestration

Orchestration patternCommon

Parallel fan-out and fan-in

Also called: Scatter-gather

Independent sub-tasks go to several agents at once and the results are aggregated.

Use it when

  • Independent checks for one case (credit, stock, compliance)
  • Latency matters and the checks do not depend on each other

Avoid it when

  • Checks depend on each other's results

Controls you need

  • Define what “enough results” means and a timeout per branch
  • Aggregator rules are deterministic where possible
  • Per-branch budget and concurrency limit

How it fails

  • Partial failure produces a confident but incomplete answer
  • Cost multiplies with every branch

Example: A large order triggers parallel credit, stock and export-control checks; the order is released only when all three return.

OWASP agentic risks: ASI08 Read more: Multi-agent orchestration

Orchestration patternAdvanced

Event-driven choreography

Also called: Decentralized agents

Agents subscribe to business events and react independently, with no central coordinator.

Use it when

  • Loosely coupled domains already connected by an event broker
  • Teams own their agents independently

Avoid it when

  • You need a clear end-to-end owner and state for each case

Controls you need

  • Strong tracing with correlation IDs across events
  • Event schemas and contracts per topic
  • Loop detection (an agent's event triggering itself)

How it fails

  • Nobody can see the end-to-end state
  • Event loops between agents
  • Hard to stop a misbehaving flow

Example: A delivery-delayed event triggers a customer-communication agent and, independently, a replanning agent in logistics.

OWASP agentic risks: ASI08 ASI10 Read more: Multi-agent orchestration

Orchestration patternCommon

Maker–checker review loop

Also called: Evaluator, critic, reviewer agent

One agent produces a draft; a separate reviewer (a second agent, rules, tests or a person) checks it against criteria before anything is used.

Use it when

  • Generated artefacts: mappings, scripts, iFlow designs, customer letters
  • Quality criteria can be written down or tested

Avoid it when

  • Maker and checker share the same blind spots and no objective test exists

Controls you need

  • Objective checks first (schema, unit tests, linters), model review second
  • Maximum revision rounds, then hand to a person
  • Checker cannot be instructed by the maker's output

How it fails

  • Endless revision loop
  • Checker rubber-stamps the maker

Example: An agent drafts a Groovy mapping script; unit tests and a reviewer agent check it before a developer sees it.

OWASP agentic risks: ASI05 ASI09 Read more: Developer tools

Orchestration patternEmerging

Agent-assisted integration operations

Also called: AIOps for integration

An agent watches failed messages and alerts, correlates them with recent changes, and drafts a diagnosis and fix for the integration team to review.

Use it when

  • Integration teams spend time triaging repeated failures
  • Logs, message monitoring and change history are accessible through APIs

Avoid it when

  • The agent would get write access to production configuration

Controls you need

  • Read-only access to monitoring; payloads masked
  • Fixes are proposals, deployed through the normal change process
  • Feedback loop: engineers mark diagnoses right or wrong

How it fails

  • Sensitive payload data exposed in prompts
  • Confident but wrong root cause

Example: An ops agent links 300 failed messages to a certificate that expired at midnight and drafts the renewal steps.

OWASP agentic risks: ASI03 ASI09 Read more: What is agentic integration?

No pattern matches that search. Try a broader word such as “agent”, “event” or “approval”.

Reuse this library

The catalog is also published as JSON at /patterns.json for internal wikis, architecture tools or training material. Please credit “Agentic Integration Hub, agenticintegrationhub.com/patterns”. Suggestions for new patterns are welcome through the contact page.