Overview

6 Application and integration architecture

This chapter explains that autonomous agents should not be dropped into an enterprise as if they were just another app feature. Instead, architects must first decide where an agent participates in the application estate, what it owns, and what must remain under deterministic services, workflow engines, policy components, systems of record, or human control. The core idea is to create bounded interaction surfaces, where authority, state, evidence, accountability, and recovery are explicit at every boundary so that the business effect of an agent’s actions stays aligned with what the enterprise actually intended.

The chapter then shows that ordinary API, event, and tool contracts are not enough for agentic systems, because they describe how something is invoked or published, but not why the agent is acting, under what delegated authority, and what evidence must remain afterward. To close that gap, it introduces conversational contracts that carry intent, context, constraints, authority, outcome, and evidence obligations. It also explains how governed tool wrappers mediate access to enterprise APIs, SaaS, legacy systems, and data operations, ensuring that agent actions are validated, bounded, idempotent, auditable, and recoverable rather than merely technically successful.

Beyond single-system access, the chapter covers asynchronous coordination, multi-agent collaboration, and human handoff. Events are used to preserve correlation, next ownership, and accountability across time and systems, while an Agent Mesh defines which specialist agents may work together, through what paths, and with what evidence obligations. When autonomy reaches an oversight boundary or encounters an unrecoverable interruption, a fallback-to-human path must transfer state and evidence to a person and then return the decision to the workflow in a structured way. The chapter closes by warning against common antipatterns such as raw APIs exposed directly to agents, prompt chains masquerading as workflows, orchestrators becoming hidden enterprise buses, and event choreography that loses accountability, then offers a practical playbook for building a bounded agentic flow one workload at a time.

Agent participation in the enterprise application estate. An agent may occupy any of the seven positions relative to applications, users, workflows, APIs, events, and other agents. Each position creates one or more bounded interaction surfaces.
Agent participation in the enterprise application estate. An agent may occupy any of the seven positions relative to applications, users, workflows, APIs, events, and other agents. Each position creates one or more bounded interaction surfaces.
Anatomy of a conversational contract. A conversational contract carries an agentic interaction from intent toward outcome. Context shapes how the intent is interpreted, constraints and authority define the boundary within which the agent may act, and the evidence obligation defines what must remain after the agent has acted.
Anatomy of a conversational contract. A conversational contract carries an agentic interaction from intent toward outcome. Context shapes how the intent is interpreted, constraints and authority define the boundary within which the agent may act, and the evidence obligation defines what must remain after the agent has acted.
Why integration uncertainty requires governed wrappers. Without a wrapper (left), a confirmation timeout drives the agent to retry, and the enterprise sees a duplicate business effect with no linked evidence. With a governed wrapper (right), the retry is resolved against the prior effect recorded for the conversational contract instance, so uncertainty is absorbed at the boundary rather than leaking into the agent loop.
Why integration uncertainty requires governed wrappers. Without a wrapper (left), a confirmation timeout drives the agent to retry, and the enterprise sees a duplicate business effect with no linked evidence. With a governed wrapper (right), the retry is resolved against the prior effect recorded for the conversational contract instance, so uncertainty is absorbed at the boundary rather than leaking into the agent loop.
A correlated event chain preserves the relationship among the originating interaction, authority context, next ownership, and evidence. The qualifying nonconformance signal triggers the workflow or case platform to create conversational-contract instance CC-2418, which then correlates the investigation, handoff, and human decision so the flow can be reconstructed afterward.
A correlated event chain preserves the relationship among the originating interaction, authority context, next ownership, and evidence. The qualifying nonconformance signal triggers the workflow or case platform to create conversational-contract instance CC-2418, which then correlates the investigation, handoff, and human decision so the flow can be reconstructed afterward.
The quality-investigation mesh. The supervisor holds the conversational contract for the containment recommendation and delegates bounded work to four specialist agents. Every path into the enterprise estate passes through a governed wrapper. The three retained human authority holders remain outside the agent boundary; decisions requiring their authority return to the flow through them.
The quality-investigation mesh. The supervisor holds the conversational contract for the containment recommendation and delegates bounded work to four specialist agents. Every path into the enterprise estate passes through a governed wrapper. The three retained human authority holders remain outside the agent boundary; decisions requiring their authority return to the flow through them.
Three coordination structures within an Agent Mesh. In the supervisor structure, one coordinating agent delegates to specialists and reconciles their outputs, so every decision that crosses the mesh boundary passes through a single explainable point. In the brokered structure, an intermediary mediates access to a shared resource or enforces policy without contributing domain reasoning. In the peer-to-peer structure, specialist agents coordinate directly through bounded interaction paths.
Three coordination structures within an Agent Mesh. In the supervisor structure, one coordinating agent delegates to specialists and reconciles their outputs, so every decision that crosses the mesh boundary passes through a single explainable point. In the brokered structure, an intermediary mediates access to a shared resource or enforces policy without contributing domain reasoning. In the peer-to-peer structure, specialist agents coordinate directly through bounded interaction paths.
The human re-entry path. A trigger ends autonomous execution; control crosses the oversight boundary to a human, carrying a handoff payload that extends the chapter 4 context packet (table 4.8) with the originating interaction and a return path. The human's structured decision re-enters the flow as a case or workflow state so the flow can resume, close, or escalate, while the agent holds a bounded support role until the decision is recorded. Unlike a notification, this path transfers control, preserves state and evidence, and returns the decision to the flow.
The human re-entry path. A trigger ends autonomous execution; control crosses the oversight boundary to a human, carrying a handoff payload that extends the chapter 4 context packet (table 4.8) with the originating interaction and a return path. The human's structured decision re-enters the flow as a case or workflow state so the flow can resume, close, or escalate, while the agent holds a bounded support role until the decision is recorded. Unlike a notification, this path transfers control, preserves state and evidence, and returns the decision to the flow.

Summary

  • Application and integration architecture for agentic systems starts by identifying where agents participate in the estate and the bounded interaction surfaces they create. These surfaces keep authority, accountability, and evidence explicit as agents communicate, invoke systems, coordinate work, and hand off control.
  • Conversational contracts extend traditional API and event contracts by expressing intent, context, constraints, authority, outcomes, and evidence obligations, making the interaction auditable.
  • Governed tool wrappers prevent raw system access by translating agentic intent into bounded, validated, auditable, and recoverable invocations of enterprise capabilities.
  • Wrappers must treat agent-generated parameters as untrusted input and enforce idempotency, retry control, compensation, and auditability as design obligations.
  • Event-mediated coordination allows agents and systems to work asynchronously, but events must preserve causation, decision context, the basis of authority, evidence, and next ownership.
  • Agent Mesh design defines the governed collaboration structure between specialist and supervisory agents; governed wrappers, events, and human reentry paths connect that collaboration to enterprise systems and people.
  • Orchestration may own the durable execution state needed for sequencing, waiting, and recovery, but it should not absorb delegated business authority, policy interpretation, direct system access, or authoritative business state.
  • Human re-entry paths preserve state, evidence, authority context, and pending action when autonomy reaches its boundary, then return the human decision or action to the automated flow.
  • Application and integration anti-patterns emerge when APIs, prompts, orchestration layers, event choreography, or agent SDKs are allowed to make architectural decisions implicitly.
  • Taken together, these patterns express the Agentic Enterprise Framework's bounded-autonomy principle in application and integration, grounded in the Foundation for Autonomy paradigm: autonomy is permitted, but only within boundaries that keep authority, accountability, and evidence explicit at runtime.

FAQ

What is a bounded interaction surface in an agentic application?A bounded interaction surface is the point where an agent interacts with an application, tool, workflow, event stream, another agent, or a person. It is the architectural boundary where authority, state, evidence, accountability, and recovery must be made explicit.
How should responsibility be split between an agent and surrounding systems?Assign the agent tasks that require interpretation, judgment, and bounded recommendations. Keep repeatable validation, transactional rules, policy enforcement, durable state, workflow sequencing, and authoritative records in deterministic services, policy components, workflow systems, and systems of record.
What is a conversational contract?A conversational contract defines the intent, context, constraints, authority, expected outcome, and evidence obligation for an agentic interaction. It governs the meaning and boundary of the interaction, without replacing API, event, or workflow contracts.
Why isn’t an API contract enough for an agent?An API contract defines request and response shape, but it does not explain why the agent is acting, what delegated authority it has, what constraints apply, or what evidence must remain afterward. Agentic interactions need those extra controls to be explicit.
What does a governed tool wrapper do?A governed tool wrapper mediates access between an agent and enterprise systems. It translates agent intent into bounded system action, checks authority and constraints, validates parameters, controls retries, supports compensation, and records evidence.
How should organizations handle retries and idempotency for agent actions?Retries must be controlled at the wrapper, not left to the agent. The idempotency key should be derived from the conversational-contract instance and the intended business effect, so repeated calls do not create duplicate business actions.
What is the Agent Mesh pattern?The Agent Mesh is a governed collaboration structure for multiple specialist agents. It defines which agents may interact, under what authority, through which paths, and with what evidence obligations, so coordination does not create new authority or hidden control paths.
When should event-mediated coordination be used?Use events when work must continue asynchronously across time, systems, agents, or human roles. Events should preserve causation, correlation, authority context, and next ownership so accountability remains reconstructable.
What is a human re-entry path?A human re-entry path is the governed boundary where an autonomous flow transfers control to a person and later receives the human’s decision or action back into the workflow. It must carry state, evidence, authority context, and a structured return path.
What are the main application and integration anti-patterns in this chapter?The chapter highlights five major anti-patterns: Raw API as Tool, Prompt Chain as Workflow, Orchestrator as the New Enterprise Service Bus, Choreography Without Accountability, and Agent SDK Becomes Architecture. Each reflects a failure to make authority, state, recovery, and evidence explicit.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Architecting Autonomous Agentic Systems Architecting Autonomous Agentic Systems ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Architecting Autonomous Agentic Systems Architecting Autonomous Agentic Systems ebook for free