Continuation of the article "IBM Bob: Beyond the Copilot — The Rise of the Enterprise Development Agent"
Introduction
In my previous article about Bob, I positioned IBM Bob as an enterprise development agent based on three pillars: deterministic harnessing, dynamic multi-LLM routing, and a focus on the modernization of legacy systems. What was only outlined, however, was how several specialized agents manage to cooperate on a single business task, without stepping on each other's toes, without incurring excessive context costs, and without compromising the traceability required by corporate governance.
This is precisely the purpose of this article: to present the multi-agent orchestration design patterns that underpin platforms like Bob and demonstrate how they apply to complex business use cases: Java modernization, mainframe remediation, or any other flow involving code exploration, planning, execution, and validation.
1. Why is a single agent not sufficient?
A unique generalist agent, equipped with a comprehensive context and a singular model, may appear attractive due to its simplicity. Yet, at the scale of an enterprise information system, this approach quickly reveals its limitations:
- Context accumulation: exploring a repository of several million lines of code enlarges the context window at each stage, increasing the cost of each subsequent token even though the underlying model remains unchanged.
- Model/task mismatch: classifying a Jira ticket, generating critical business code, and drafting documentation do not require the same level of reasoning nor the same token cost.
- Lack of specialization: a general-purpose model does not benefit from fine-tuning and the heuristics specific to a domain (security reviews, COBOL conversion, etc.).
- Diluted governance: it is harder to audit, restrict, or approve the actions of a monolithic agent than those of agents with well-defined boundaries.
It is this operational reality that drives enterprise agent platforms towards an orchestrated multi-agent architecture, where multiple specialized agents collaborate under the supervision of an orchestrator.
2. Fundamental design patterns
2.1 The Supervisor / Delegates Pattern (Orchestrator-Workers)
This represents the central pattern. An orchestrator agent receives the initial business intent (' modernize this Spring module to Spring Boot 3'), decomposes it into sub-tasks, and delegates each one to a specialized agent: dependency analysis, code generation, security review, test drafting.
The orchestrator does not perform the work itself: it plans, distributes, collects results, and arbitrates in case of conflict or failure. This is the role played by the modes Plan and Agent described for Bob, where an action graph is generated before execution and then submitted for approval.
Key advantage: each delegating agent remains focused on its scope, thus limiting the size of its context and enabling the assignment of the most economical model capable of processing its task.
2.2 The Sequential Pipeline Pattern
Certain business tasks naturally follow a linear sequence: analysis → planning → execution → validation → documentation. Each agent receives as input the structured output of the previous agent, without needing to know the entire conversation's history.
A Java modernization pipeline illustrates this pattern:
1. Mapping Agent: rebuilds the AST and the module's dependency graph.
2. Planning Agent: breaks down modernization into module-specific plans.
3. Generation Agent: applies the changes within an isolated sandbox.
4. Validation Agent: executes static analysis (such as Semgrep) and the test suite.
- Documentation Agent: drafts the pull request and updates the technical documentation.
The advantage of this pattern is its readability and traceability: each step produces a verifiable artefact, which facilitates audit requirements in regulated environments.
2.3 The Fan-out / Fan-in Pattern (Parallelization)
When several subtasks are independent, such as analyzing ten distinct microservices within the same application portfolio, the orchestrator can distribute them in parallel (fan-out) to instances of the same specialized agent, then consolidate the results (fan-in).
This pattern reduces overall latency and naturally combines with the parallel invocation of tools within a single interaction cycle. However, it requires a robust merging mechanism: if two agents modify shared files or common dependencies, the orchestrator must detect and arbitrate the conflicts prior to integration.
2.4 The Isolated-Context Sub-Agents Pattern
This is one of the most tangible contributions to cost control. Instead of allowing a single agent to indefinitely accumulate its intermediate results such as explored files, abandoned reasoning paths, and intermediate code versions, each sub-task is assigned to a sub-agent which only receives the data strictly necessary for its mission (a code snippet, a dependency graph, a targeted suite of tests).
The sub-agent returns a condensed result to the parent agent, and its working context is then released. The orchestrator's context grows in a controlled manner, proportional to the number of consolidated results rather than the raw explored volume.
2.5 The Task-Aware Routing Pattern
This pattern does not orchestrate agents among themselves in the strict sense but determines which model drives each agent based on the nature of the task:
|
Nature of the Task
|
Typical agent
|
Model category
|
|
Classification, ticket sorting
|
Sorting agent
|
Lightweight model, low latency
|
|
Planning, dependency resolution
|
Scheduling agent
|
Wide-context reasoning model
|
|
Targeted code generation
|
Development agent
|
Specialized code model
|
|
Security review, documentation
|
Analysis agent
|
Analytical model + RAG
|
This routing is what allows an architecture like Bob to leverage a heterogeneous portfolio of models (Claude, Mistral, Granite, fine-tuned models) without imposing the same cost at every stage of the process.
2.6 The Deterministic Validation Loop Pattern
A solitary generative agent offers no certainty of correctness. The deterministic loop pattern introduces a validation agent whose role is not generative but instead verificatory: static analysis, test execution, compilation. In case of failure, the validation result is reintroduced into the generative agent's context for correction, until convergence or up to a maximum number of iterations, beyond which the orchestrator must escalate the case to a human.
This pattern transforms a probabilistic generative system into a system whose outcome adheres to mechanically verifiable criteria: an essential aspect for trust in a corporate environment.
2.7 The Hierarchical Checkpoints Pattern (approval gates)
Within regulated contexts, full autonomy is not always desirable. This pattern introduces human approval gates into key stages of the multi-agent flow such as before executing the plan or prior to merging a pull request affecting a critical banking system.
The level of granularity at these checkpoints can be adjusted using role-based access control (RBAC), associating a level of autonomy (strict, supervised, autonomous) to the sensitivity of the repository or targeted system.
2.8 The Blackboard Pattern for Shared State
Finally, when multiple agents must contribute asynchronously to the same representation of the system's state (for example, the code graph of an application undergoing modernization), a shared state space ('blackboard') allows each agent to read and write verified facts without depending on direct sequential exchanges with other agents. The orchestrator supervises the coherence of this shared state rather than routing each piece of information through itself.
3. Composing patterns: a complete example
Let us revisit the case of modernizing a Java monolith to Spring Boot 3 / Java 21, by assembling several patterns.
3.1. Creating the environment for testing
Who better than Bob to generate for us an application responding to the issue of obsolescence, adhering to a directive explicitly requiring the use of ageing technologies?
|
Context:
I am preparing a test case to evaluate an application modernization tool.
Generate a small Java application (Spring Boot 2.x, Java 8) representative of a typical legacy business module, INTENTIONALLY not modernized, so that it serves as a starting point for a subsequent migration to Spring Boot 3 / Java 21.
Functional scope:
- A simple order management module: an Order entity (id, customerName, amount, status, createdAt) and a REST controller exposing:
- GET /orders/{id}
- POST /orders
- GET /orders?status=...
Technical constraints to be strictly adhered to (they are intentional, do not "correct" them):
1. Use the javax.* package (javax.persistence, javax.servlet) and not jakarta.*
2. Employ a deprecated JPA annotation or one whose behavior changes in Hibernate 6 / Spring Boot 3 (for instance, @Type or an obsolete ID generation strategy)
3. Declare in the pom.xml a dependency with a known and documented CVE (e.g., a version of Jackson-databind or Log4j before its respective fix) - specify the exact version and the associated CVE in comments
4. Use Spring Boot 2.7.x and Java 8 as the target compilation version
5. Add at least one utility method using a Java 8 API that changes behavior or signature in Java 21
Tests:
- Provide a JUnit unit test that passes with this version (e.g., controller test with MockMvc, or order service test), to verify post-migration that it remains green.
Expected deliverables:
- Standard Maven structure (pom.xml + src/main/java + src/test/java)
- A README.md explicitly listing, in a bullet-point list, the 4 intentionally dated elements introduced above (for future reference, this file should not be utilized by the modernization tool itself)
- Do NOT add Spring Security configuration, real database (in-memory H2 is sufficient), or additional complexity not requested
Mode: Plan (I want to see the generation plan before execution)
|

Bob after Plan validation and switching to Agent mode

It compiles! After 1.76 Bobcoin spent
3.2. The analysis and execution of the modernization plan
Let's get to work on the migration plan:

Migration plan generated

Detailed distribution

The action graph
The analysis of the plan confirms that Bob has indeed considered the update of log4j-core (sub-task 1), the migration from javax → jakarta (sub-task 2), the compatibility issue correction with Hibernate 6 in the Order.java file (sub-task 3), and even took into account the modernization of java.util.Date/java.util.Calendar (deprecated in Java 8) to java.time (sub-task 4). Sub-task 5 concludes the modernization by testing the entirety of the sub-tasks.
Bob provides a set of questions at the end of the plan’s creation:
|
Questions for validation prior to implementation
Details to verify:
1. Target version for Spring Boot 3 — I've noted 3.3.4 (the latest stable patch from the 3.3 series as of mid-2024). Is this the version you'd like, or do you have another 3.x.y preference?
2. GenerationType.IDENTITY for H2 — this represents the most straightforward deterministic strategy for the in-memory H2 configuration. Would you rather opt for SEQUENCE with a clearly defined @SequenceGenerator?
3. formatDate output formatting — the current test solely checks assertFalse(result.isEmpty()). My intention is to employ DateTimeFormatter.ISO_LOCAL_DATE_TIME (e.g., 2024-01-06T12:00:00). Do you have any specific preferences for the formatting pattern?
4. CHANGES.md location — I plan to compose it within legacy-order-app/CHANGES.md. Should it be placed at the repository's root or elsewhere?
|
This series of questions demonstrates that Bob's Plan mode subjects ambiguous implementation choices to human validation prior to execution (versions, technical strategies, file locations), rather than deciding silently. It is a concrete illustration of the pattern 'hierarchical checkpoints' mentioned earlier on, even at a fine level of granularity.

Bob's state before executing the plan

Example of modifications related to sub-task 4
During the final verification subtask, the final compilation fails because Bob did not verify the JDK version.
|
The JVM executing the tests is Java 25, yet Spring Boot 3.3.4's included byte-buddy 1.14.19 supports only Java 23. The solution is to update Spring Boot to 3.3.6+ (which upgrades byte-buddy to 1.15.x to support Java 25), or to directly specify a newer byte-buddy version. The most straightforward approach is to update to the newest 3.3.x — Spring Boot 3.3.7 — which includes byte-buddy 1.15.7 (supporting Java 25).
|
Bob will require multiple correction cycles to complete the migration.
In conclusion, Bob executed the migration as planned and utilized 3.49 Bobcoins. Unfortunately, a significant portion was used to resolve the JVM version compatibility issue...
4. Constraints and points of caution
These patterns are not a magic solution.
Several challenges deserve to be kept in mind:
- Inter-agent coherence: agents working on related portions of the code might introduce inconsistencies which only a rigorous merging and validation phase can uncover.
- Observability: as the number of agents and sub-agents grows, fine-grained traceability becomes increasingly necessary (who decided what, with which model, on which data), a prerequisite for compliance, particularly under the European AI Act.
- Orchestration Cost: decomposition into sub-agents reduces the cost per task, but the orchestrator itself consumes resources; the net gain depends on the balance between decomposition granularity and coordination overheads.
- Dependence on the quality of the initial plan: a poorly framed plan from the supervising agent affects all sub-agents; the robustness of the Planning mode and the quality of human checkpoints remain critical.
4.1 A concrete illustration: the byte-buddy incident
Several interesting deductions emerge from this incident:
· The Planning mode validates preferences, not environmental facts
The four questions raised prior to implementation all pertained to implementation choices (target version, ID strategy, date format, file location); in other words, decisions where multiple answers are valid and where ambiguity is legitimately escalated to a human being.
On the contrary, no question addressed a verifiable fact in the execution environment: which version of JVM runs within the sandbox. This is a significant distinction: Bob suggested "3.3.4, latest stable patch of the 3.3 series, mid-2024" as if it were a matter of preference, whereas compatibility with the JVM within the sandbox is an objective fact, verifiable with a single command (java -version), which renders certain answers entirely invalid.
· The harness catches up afterwards; it does not warn.
The deterministic validation loop operated as expected: the incompatibility failure between byte-buddy and Java 25 was detected during test execution and was not silently ignored. This is a positive point; the fallback mechanism is functioning.
However, it also reveals an asymmetry in the validation pattern: it is reactive (detecting a failure after execution) rather than proactive (verifying environmental constraints before proposing a plan). A mapping agent that had inventoried the target environment (for example: available JVM, installed toolchain, etc.) before the planning phase could have avoided this back-and-forth and the unnecessary consumption of Bobcoins.
· An indicator of the temporal anchoring of the model's knowledge
Bob's very phrasing ('last stable patch... by mid-2024') suggests that the initial proposal is based on the training knowledge of the underlying model, not on a live query to a package registry or on inspecting the actual environment. Two worlds coexist within the same flow: reasoning anchored in the past (choice of version) and execution in the present (JVM 25 truly installed), and nothing within the planning process reconciled these two worlds before execution.
This concretely illustrates a limitation that was generically mentioned in the section "dependence on the quality of the initial plan": a plan can be coherent in appearance (i.e., each choice individually defensible) while still being collectively invalid because it does not consider the actual execution context.
It would be worth adding a complementary pattern to the list: an environment inventory agent, whose role would precisely be to verify the technical constraints of the target sandbox (JVM versions, available tools) before the scheduling agent suggests dependency versions, rather than letting the validation loop detect the issue afterwards, at the cost of an additional iteration.
Conclusion
Multi-agent orchestration is not merely a marketing layer appended to a language model: it constitutes a standalone software architecture, composed of recognizable patterns (supervision/delegation, pipeline, parallelization, context isolation, task routing, validation, deterministic processes, control points, and shared state) coordinated based on the nature of the business task to be handled.
It is this composition of patterns, more than the power of a model, that enables platforms like IBM Bob to tackle problems that classic code assistance could not solve: the governed modernization of a heterogeneous application heritage, on a large scale, all while maintaining control of costs and compliance.
The test case conducted for this article, however, illustrates that these patterns do not yet exhibit uniform maturity. The deterministic validation cycle effectively caught an environment incompatibility (target JVM not verified before planning), but after execution rather than before, revealing an imbalance between planning and environment validation that remains, at this stage, the responsibility of the orchestrator rather than being resolved during construction. The architecture is solid in principle; its operational execution, on the other hand, will continue to refine with use.