Integration patternStart here
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.
User→Agent→MCP tool→Managed API / iFlow→System of record
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.
Integration patternStart here
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.
Agent AAgent BAgent C→MCP gateway→Tool serversManaged APIs→Systems
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.
Integration patternCommon
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.
Business event→Event broker→Agent (scoped goal)→Tools via gateway→Case / task for a person
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.
Integration patternStart here
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.
Agent proposes→Policy: approval required→Approver sees exact payload→Execute unchanged→Audit
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.
Integration patternEmerging
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.
Your agent→Agent Card discovery→A2A task→Partner agent (own platform)→Artifact back
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.
Integration patternCommon
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.
User + agent→Retrieval tool→Permission filter→Index / records→Cited snippets
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.
Integration patternStart here
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.
Agent write + idempotency key→Gateway→Integration flow (retries)→System of record→Compensate on failure
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.
Orchestration patternStart here
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.
Trigger→Workflow step→Agent: judgement step→Workflow step→Done
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.
Orchestration patternCommon
Also called: Planner, manager agent
An orchestrator agent plans, delegates tasks to specialist agents with narrow tools, and combines their results.
Goal→Orchestrator agent→Specialist ASpecialist BSpecialist C→Combined result
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.
Orchestration patternCommon
Also called: Pipeline, relay
Each agent completes its step and hands the case to the next one, like an assembly line.
Intake agent→Validation agent→Enrichment agent→Posting step
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.
Orchestration patternCommon
Also called: Scatter-gather
Independent sub-tasks go to several agents at once and the results are aggregated.
Request→Credit check agentStock agentCompliance agent→Aggregator→Decision
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.
Orchestration patternAdvanced
Also called: Decentralized agents
Agents subscribe to business events and react independently, with no central coordinator.
Agent AAgent B→Event broker→Agent CAgent D
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.
Orchestration patternCommon
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.
Maker agent drafts→Checker: rules, tests, agent→Pass → use / Fail → revise→Max N rounds
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.
Orchestration patternEmerging
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.
Monitoring + logs→Ops agent (read-only)→Correlate with changes→Draft fix→Engineer reviews
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.
No pattern matches that search. Try a broader word such as “agent”, “event” or “approval”.