liveBook · Manning

Separation of concerns

As explained in AI Agents in Action, Second Edition

Separation of concerns is a software design technique that isolates distinct responsibilities so they can be developed and changed independently.

Separation of concerns isolates distinct responsibilities so each part can be developed, replaced, and changed independently. The boundary is an explicit interface rather than shared implementation or state. section 3.4.1

Apply the pattern by assigning each component a focused responsibility:

  • Expose capabilities through a stable contract, such as a tool name, description, parameter schema, and return type. section 3.4.1
  • Keep implementation details private behind the interface; a journal can move from a Python list to Postgres, Redis, or a remote API without changing the agent. section 3.4.1
  • Separate exploration from presentation: let a research agent discover findings and a synthesis agent compile and structure the final report. section 9.2.6
  • Deploy related concerns as independently managed services when upgrades, scaling, security, or component swaps matter. section 8.1

From shared tools to an MCP server

A tightly coupled agent directly accesses journal tools and shared state. A separated design places those tools in an MCP server. The agent discovers the server’s tools through their schemas and communicates over STDIO locally or SSE remotely, without reaching the implementation. section 3.4.1

Figure 3.15 The separation of tools from the agent into a standalone MCP server that can be hosted locally or remotely and accessed through STDIO (local) or SSE (remote). Now the agent registers the MCP server instead of individual tools and then internally discovers the tools the server supports and how to use them.

Use the architecture figure to compare an agent registering individual tools with an agent registering a standalone MCP server hosted locally or remotely. section 3.4.1

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains interfaces, private implementations, deployment patterns, and workflow responsibilities, but stops short of general design heuristics beyond these cases.
Examples
Uses journal tools behind MCP, containerized agent deployment patterns, and separate research and synthesis agents.
What it assumes
Assumes basic familiarity with agents and software components while illustrating boundaries through concrete tools, services, and workflows.
What you can do after
Apply it via MCP servers, service boundaries, and separate agent roles to support replacement, scaling, and focused execution.
How it connects
Connects separation of concerns with MCP, microservices, containerization, APIs, and agentic loops.

Also explained in

Compare how 22 books explain separation of concerns →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.