Based on Agentic Architectural Patterns for Building Multi-Agent Systems (Arsanjani & Bustos, Packt 2026). Consultation date: 2026-03-24.
OpenAI Agents SDK Multi-Agent Pipeline
Centralized Supervisor with sequential pipeline: Plan → Search (parallel fan-out) → Write (with sub-agent tools) → Verify
Python, OpenAI Agents SDK, asyncio, Pydantic, Rich (console UI), GPT-5.4 / o3-mini
FinancialResearchManager orchestrator with Runner.run() invocations, asyncio.create_task for parallel search, agent.as_tool() for sub-analyst delegation
No explicit security controls — no auth, no input validation, no rate limiting
Decomposes user queries into 5-15 financial search terms with reasoning
Executes web searches and produces 300-word financial summaries
Analyzes company financials: revenue, margins, growth trajectory
Identifies risk factors: competitive threats, regulatory issues, supply chain
Synthesizes search results + analyst outputs into markdown report with executive summary
Audits report for internal consistency, sourcing, and unsupported claims
Each pattern assessed against the Ch. 12 rubric. Hover status badges for evidence.
| Pattern | Level | Status |
|---|---|---|
| Supervisor Architecture | Basic | Implemented |
| Multi-Agent Planning | Basic | Implemented |
| Hybrid Delegation Framework | Intermediate | Not Assessed |
| Shared Epistemic Memory | Intermediate | Missing |
| Consensus, Negotiation & Conflict Resolution | Advanced | Not Assessed |
| Pattern | Level | Status |
|---|---|---|
| Basic Audit Logging | Basic | Not Assessed |
| Instruction Fidelity Auditing | Intermediate | Missing |
| Persistent Instruction Anchoring | Intermediate | Missing |
| Causal Dependency Graph | Intermediate | Not Assessed |
| Fractal CoT Embedding | Advanced | Missing |
| Pattern | Level | Status |
|---|---|---|
| Watchdog Timeout | Basic | Not Assessed |
| Simple Retry Mechanism | Basic | Missing |
| Adaptive Retry with Prompt Mutation | Intermediate | Not Assessed |
| Auto-Healing Agent Resuscitation | Intermediate | Not Assessed |
| Incremental Checkpointing | Intermediate | Missing |
| Fallback Model Invocation | Intermediate | Not Assessed |
| Rate-Limited Invocation | Intermediate | Not Assessed |
| Majority Voting Across Agents | Advanced | Not Assessed |
| Trust Decay & Scoring | Advanced | Not Assessed |
| Canary Agent Testing | Advanced | Not Assessed |
| Pattern | Level | Status |
|---|---|---|
| Human Calls Agent | Basic | Not Assessed |
| Agent Calls Human | Basic | Not Assessed |
| Agent Delegates to Agent | Intermediate | Implemented |
| Agent Calls Proxy Agent | Intermediate | Not Assessed |
| Pattern | Level | Status |
|---|---|---|
| Single Agent Baseline | Basic | Implemented |
| Agent-Specific Memory (Short-Term) | Basic | Not Assessed |
| Context-Aware Retrieval (Simple RAG) | Basic | Not Assessed |
| Advanced RAG | Intermediate | Not Assessed |
| Agentic RAG & Graph-Vector Hybrid Retrieval | Advanced | Not Assessed |
| Pattern | Level | Status |
|---|---|---|
| Agent Authentication & Authorization | Basic | Not Assessed |
| Tool & Agent Registry | Intermediate | Not Assessed |
| Event-Driven Reactivity | Intermediate | Missing |
| Pattern | Level | Status |
|---|---|---|
| Hybrid Workflow Agent Architecture (Planner + Scorer) | Advanced | Not Assessed |
| Coevolved Agent Training | Advanced | N/A |
| Preference-Controlled Synthetic Data Generation | Advanced | Not Assessed |
| Custom Evaluation Metrics | Advanced | Missing |
Blue = existing, red dashed = opportunities for growth, green = new additions in target state.
flowchart TD
User([User Query]) --> Manager[FinancialResearchManager]
Manager --> Planner[PlannerAgent\no3-mini]
Planner --> |FinancialSearchPlan| FanOut{Parallel Fan-Out}
FanOut --> S1[SearchAgent 1]
FanOut --> S2[SearchAgent 2]
FanOut --> SN[SearchAgent N]
S1 --> Collect[Collect Results]
S2 --> Collect
SN --> Collect
Collect --> Writer[WriterAgent\ngpt-5.4]
Writer -.-> |as_tool| Fundamentals[FundamentalsAnalystAgent]
Writer -.-> |as_tool| Risk[RiskAnalystAgent]
Fundamentals -.-> Writer
Risk -.-> Writer
Writer --> |FinancialReportData| Verifier[VerifierAgent\ngpt-5.4]
Verifier --> Output([Print Report])
classDef existing fill:#4A90D9,stroke:#333,color:white
classDef tool fill:#2ECC71,stroke:#333,color:white
classDef io fill:#95a5a6,stroke:#333,color:white
class Manager,Planner,S1,S2,SN,Writer,Verifier existing
class Fundamentals,Risk tool
class User,Output,FanOut,Collect io
flowchart TD
User([User Query]) --> Manager[FinancialResearchManager]
Manager --> Planner[PlannerAgent\no3-mini]
Planner --> |FinancialSearchPlan| FanOut{Parallel Fan-Out}
FanOut --> S1[SearchAgent 1]
FanOut --> S2[SearchAgent 2]
FanOut --> SN[SearchAgent N]
S1 --> Collect[Collect Results]
S2 --> Collect
SN --> Collect
FanOut -.-> WD[Watchdog Timeout\nSupervisor]:::opportunity
S1 -.-> RT[Adaptive Retry\n+ Prompt Mutation]:::opportunity
S2 -.-> RT
SN -.-> RT
Collect --> CP1[Checkpoint\nSearch Results]:::opportunity
CP1 --> SharedMem[(Shared Epistemic\nMemory)]:::newpattern
SharedMem --> Writer[WriterAgent\ngpt-5.4]
Writer -.-> |as_tool| Fundamentals[FundamentalsAnalystAgent]
Writer -.-> |as_tool| Risk[RiskAnalystAgent]
Fundamentals -.-> Writer
Risk -.-> Writer
Writer --> |FinancialReportData| Verifier[VerifierAgent\ngpt-5.4\n+ Scoring Rubric]:::newpattern
Verifier --> |Pass| Output([Print Report])
Verifier --> |Fail + Feedback| Writer
Verifier -.-> Metrics[Custom Evaluation\nMetrics]:::opportunity
classDef existing fill:#4A90D9,stroke:#333,color:white
classDef tool fill:#2ECC71,stroke:#333,color:white
classDef io fill:#95a5a6,stroke:#333,color:white
classDef opportunity fill:none,stroke:#E74C3C,stroke-dasharray:5 5,color:#E74C3C
classDef newpattern fill:#27AE60,stroke:#333,color:white
class Manager,Planner,S1,S2,SN,Writer existing
class Fundamentals,Risk tool
class User,Output,FanOut,Collect io
Key capabilities: Agent actions are logged with timestamps, agent IDs, and outcome status to a file or console output; Log entries are generated before and after critical agent operations or decisions; A centralized logging mechanism captures audit trails across multiple agents in the system.
A verification pattern that introduces a specialized auditor agent as an automated checkpoint to compare a worker agent's output against its original instructions, ensuring all constraints and goals are met before actions are finalized, thereby enforcing accountability and preventing instruction drift.
A pattern that uses semantically significant tags (e.g., <CRITICAL_INSTRUCTION>, [GOAL]) to embed high-priority goals or constraints within agent prompts, ensuring critical instructions remain salient as they are passed down hierarchical agent chains and are not lost to the LLM's 'lost in the middle' problem.
An auditability pattern that creates a structured, machine-readable record of an entire workflow's data and decision lineage by logging each agent's inputs, outputs, and dependencies as nodes in a traversable graph, enabling root-cause analysis, debugging, and regulatory compliance.
Structured reasoning techniques such as ReAct, Reflexion, and Tree-of-Thought that guide an agent's LLM core through iterative reasoning, self-reflection, and multi-path exploration for complex problem-solving.
A reliability pattern where an orchestrator wraps agent calls with a timed execution block; if the agent becomes unresponsive or hangs past the timeout period, the supervisor cancels the task and triggers a fallback, preventing silent stalls from freezing entire workflows.
A robustness pattern that implements an intelligent retry mechanism where, upon a deterministic failure, the system modifies or mutates the prompt (via rephrasing, adding examples, decomposition, or constraint tightening) rather than resending the same request, increasing the likelihood of successful recovery.
An intelligent retry mechanism that modifies the prompt after a deterministic failure by rephrasing instructions, adding few-shot examples, requesting chain-of-thought reasoning, or tightening output constraints, guiding a confused LLM out of a cognitive failure loop rather than simply resending the same failing request.
A pattern for building self-healing systems where a supervisor continuously monitors worker agents through health checks and heartbeats, automatically restarting agents that crash or become unresponsive, often combined with checkpointing for stateful recovery.
After _perform_searches completes, serialize search_results to disk (JSON or pickle). Before _write_report, check for a checkpoint file — if found, load it instead of re-searching. This is the cheapest resilience win: one file write protects against all downstream crashes. (Ch.7 p.221)
A resilience pattern providing automatic runtime switching from a failing primary LLM to a reliable backup model when the primary experiences outages, performance degradation, or produces invalid outputs, ensuring continuous service availability through graceful degradation.
A defensive pattern that wraps critical agent tool calls with a rate limiter tracking request timestamps to control call frequency within a time window, preventing agents from overwhelming external APIs or shared services, avoiding service denials, and enabling predictable cost management.
A validation pattern using three or more independent agents to perform the same task in parallel, with an orchestrator tallying their outputs via majority vote; if a clear majority exists the result is finalized, otherwise the system escalates for human review, providing extreme reliability for high-stakes decisions.
A pattern implementing dynamic trust scores for each worker agent, updated based on task outcomes (success increases score, failure decreases it) with gradual decay, enabling orchestrators to self-optimize by routing tasks to the most reliable agents and gracefully sidelining degrading ones.
A deployment safety pattern (also known as Shadow Mode Deployment) that deploys a new agent version alongside the stable version, routing live traffic to the stable agent while simultaneously sending copies of requests to the canary for background testing, enabling data-driven validation of updates without impacting production users.
Security measures ensuring that model access, API keys, and tool credentials are managed securely with least privilege principles and regular rotation to prevent unauthorized access.
A centralized registry service acting as a dynamic 'yellow pages' for an agentic ecosystem, where tools and agents register their capabilities, endpoints, and schemas so that other agents can discover and invoke them at runtime without hardcoded knowledge.
The capability of agents to perceive their operational environment and respond to changes or events within it, a key characteristic distinguishing true AI agents from basic LLM interactions.
Key capabilities: A planner agent generates workflow plans or task sequences that are passed to other components; A scorer agent evaluates or rates the quality of generated workflows or plans; The system contains feedback loops where scorer outputs influence planner behavior or workflow refinement.
Key capabilities: Synthetic data generation functions include explicit preference or control parameters in their function signatures; Data generation processes have configured offline evaluation benchmarks or validation datasets; Human-in-the-loop validation checkpoints are implemented with manual approval gates or review workflows.
A pattern for codifying domain-specific quality criteria into automated, repeatable scoring functions (such as STEPScore) that measure dimensions like factual correctness, logical step ordering, and business rule adherence, going far beyond generic NLP metrics like BLEU or BERTScore.
A foundational interaction pattern structuring a direct, transactional request-response cycle where the user provides a specific query or command and the agent quickly classifies intent, selects the best tool, executes it, and returns a concise result.
A human-agent interaction pattern in which an agent autonomously pauses its operation to escalate a decision to a human expert when its confidence falls below a threshold, when ambiguity is detected, or when company policy mandates human approval for high-stakes actions.
A security pattern introducing a specialized intermediary proxy agent that acts as a secure gateway to external systems, centralizing credentials and API logic so that primary agents never handle sensitive external access directly.
Key capabilities: The agent maintains a conversation_history or session_history data structure that persists across multiple interactions; The agent implements memory summarization or context window management to handle growing conversation state; Agent responses incorporate or reference information from previous turns in the same session.
Key capabilities: The agent retrieves external documents or data before generating responses using similarity search or database queries; Retrieved context is explicitly inserted into the LLM prompt alongside the user query; The system includes a vector database or knowledge base that stores preprocessed document chunks or embeddings.
Key capabilities: The RAG pipeline includes a re-ranking component that reorders retrieved documents before generation; Query transformation or reformulation occurs before the initial retrieval step; Multiple retrieval iterations are performed with refined queries based on initial results.
Key capabilities: The system maintains and queries a knowledge graph database alongside vector embeddings for retrieval; Retrieval queries combine both semantic vector search and graph traversal operations; The agent can dynamically build or update knowledge graph relationships based on retrieved information.
A market-based agent composition topology implementing a Contract-Net Protocol where a solicitor broadcasts task announcements to bidder agents, who respond with formal bids containing capability, cost, ETA, and confidence scores; the solicitor then awards the task to the agent with the highest utility score for dynamic, runtime task assignment.
Replace the flat string concatenation in manager.py:126 with a typed SharedMemory class backed by Redis or in-memory dict. Expose via typed tools like get_search_results(topic) rather than passing raw strings. Add TTL timestamps so agents can assess data freshness. (Ch.6 p.197-203)
A pattern where agents with conflicting data engage in iterative debate to converge on a shared understanding in advanced multi-agent systems.
The recommended 5-step recovery chain. 0 of 5 steps covered.
Concrete scenarios illustrating how strengthening partial patterns protects the system.
Recovery: Implement Simple Retry Mechanism (target: Recovery rate (%); Ch. 7, Table 7.2)
Recovery: Implement Instruction Fidelity Auditing (Ch. 6)
Recovery: Implement Shared Epistemic Memory (Ch. 5)
Recovery: Implement Event-Driven Reactivity (Ch. 10)
Recovery: Implement Fractal CoT Embedding (target: Self-correction trigger rate / reduction in final errors; Ch. 9, Table 9.3)