How Agentic AI is Transforming Software Architecture into Cognitive Architecture
Traditional design patterns organise the structure of software, whereas agentic design patterns organise the structure of cognition, enabling systems not merely to execute instructions, but to reason, plan, collaborate, learn, and act with increasing autonomy.

my repo- https://github.com/vivekreeves/agentic-design-patterns-lab
Traditional software frameworks are primarily designed to orchestrate deterministic logic, where behaviour is governed by predefined rules, algorithms, and control flows.
In such systems, patterns such as Facade, Strategy, Factory, and Observer facilitate modularity, maintainability, and scalability, yet the software itself possesses no intrinsic capacity for reasoning, adaptation, or autonomous decision-making. Agentic frameworks, by contrast, introduce a fundamentally different paradigm in which intelligent agents can perceive context, formulate plans, utilise tools, retrieve knowledge, collaborate with other agents, and iteratively refine their outputs. Rather than merely executing instructions, agentic systems are capable of pursuing objectives, adapting to changing circumstances, and making informed decisions within defined constraints. Consequently, whilst traditional frameworks optimise the organisation of software components, agentic frameworks optimise the orchestration of cognition, transforming software from a passive executor of commands into an active participant in problem-solving and decision-making processes.
Comparative chart
| Traditional Software Engineering | Agentic AI Engineering |
|---|---|
| Focuses on structuring software components. | Focuses on structuring intelligence and decision-making. |
| Systems execute predefined instructions. | Systems pursue goals and adapt their behaviour. |
| Behaviour is largely deterministic and rule-based. | Behaviour is contextual, probabilistic, and adaptive. |
| Design patterns solve recurring software architecture problems. | Agentic patterns solve recurring reasoning and orchestration problems. |
| A Facade hides system complexity. | A Tool-Use Agent hides databases, APIs, and services behind a conversational interface. |
| A Strategy Pattern selects the most appropriate algorithm. | Routing selects the most appropriate model, tool, or agent. |
| A Chain of Responsibility passes work through multiple handlers. | Prompt Chaining passes reasoning through multiple cognitive steps. |
| An Observer monitors events and triggers actions. | A Monitoring Agent continuously watches systems and raises alerts. |
| A Mediator coordinates communication between components. | A Multi-Agent Orchestrator coordinates communication between specialised agents. |
| An Adapter converts one interface into another. | MCP Adapters standardise access to tools, databases, and external services. |
| A Factory creates specialised objects. | An Agent Factory creates specialised agents on demand. |
| A Decorator adds behaviour without changing core logic. | Guardrails add safety, governance, and compliance controls. |
| A Proxy controls access to resources. | Access-Control Agents govern permissions and authorisation. |
| Retry Patterns handle transient failures. | Exception Recovery Patterns retry, fall back, or escalate issues. |
| A Repository centralises data access. | RAG centralises knowledge retrieval and grounding. |
| A Builder constructs complex objects step by step. | A Planning Agent constructs execution plans step by step. |
| A Singleton provides a single shared instance. | A Shared Memory Agent provides a single source of organisational context. |
| A Command Pattern encapsulates requests as objects. | A Task Agent encapsulates actions such as reporting, emailing, or ticket creation. |
| A State Machine changes behaviour based on state transitions. | A Goal Monitoring Agent adapts behaviour based on progress towards objectives. |
| Primarily concerned with modularity, maintainability, and scalability. | Primarily concerned with reasoning, collaboration, autonomy, and governance. |
| Software does not evaluate its own output. | Reflection enables agents to critique and improve their own work. |
| Software does not remember previous interactions unless explicitly coded. | Memory Management enables persistent context across interactions. |
| Software rarely improves itself during execution. | Learning & Adaptation allows continual improvement from feedback. |
| Human involvement is usually external to the workflow. | Human-in-the-Loop is often an integral part of decision-making. |
| Knowledge is typically embedded in code or databases. | RAG dynamically retrieves external knowledge when required. |
| Components communicate through APIs and message queues. | A2A Communication enables agents to collaborate directly. |
| Optimisation focuses on performance and resource utilisation. | Resource-Aware Optimisation balances cost, speed, accuracy, and quality. |
| Logic is explicitly programmed by developers. | Reasoning Techniques enable agents to derive conclusions autonomously. |
| Testing validates code correctness. | Evaluation & Monitoring assess reasoning quality, hallucinations, and reliability. |
| Task ordering is usually predefined. | Prioritisation dynamically determines what should be done first. |
| Systems generally follow predetermined paths. | Exploration & Discovery allow agents to investigate alternatives and uncover insights. |
| Applications are built around services and modules. | Agentic ecosystems are built around planners, workers, reviewers, supervisors, and specialists. |
| Mental Model: Objects → Components → Services → Applications | Mental Model: Reason → Plan → Act → Reflect → Learn → Collaborate |
| Key Question: “How should software be structured?” | Key Question: “How should intelligence be structured?” |
| Outcome: Scalable Software Systems | Outcome: Scalable Intelligent Systems |
Easy-to-Remember Summary
| Traditional Era | Agentic Era |
|---|---|
| Build Functions | Build Intelligence |
| Execute Instructions | Pursue Goals |
| Process Data | Reason About Data |
| Call Services | Use Tools |
| Store Data | Remember Context |
| Handle Events | Make Decisions |
| Follow Rules | Adapt Behaviour |
| Create Applications | Create Autonomous Systems |
Lets begin…Agentic Design Patterns
1. Prompt Chaining
Description:
Prompt chaining decomposes a complex objective into a sequence of smaller, interdependent prompts, enabling greater control, traceability, and accuracy.
Example:
“Analyse a company’s financial statements → Identify risks → Generate an investment recommendation.”
2. Routing
Description:
Routing dynamically directs a request to the most appropriate model, tool, workflow, or specialised agent based on context.
Example:
A user asks a legal question; the system routes it to a legal-analysis agent rather than a coding agent.
3. Parallelization
Description:
Parallelization executes multiple tasks concurrently, significantly reducing latency and improving throughput.
Example:
An agent simultaneously analyses revenue, expenses, and market trends before producing a report.
4. Reflection
Description:
Reflection enables an agent to critique, reassess, and refine its own outputs before presenting a final response.
Example:
After generating a regulatory report, the agent performs a self-review to identify inconsistencies.
5. Tool Use
Description:
Tool use empowers agents to interact with external systems, APIs, databases, calculators, and software services.
Example:
An agent calls Bloomberg data APIs to retrieve real-time market prices.
6. Planning
Description:
Planning allows agents to decompose high-level objectives into structured, executable sub-tasks.
Example:
“Prepare a regulatory filing” becomes:
- Collect positions
- Validate data
- Aggregate exposures
- Generate filing
7. Multi-Agent
Description:
Multi-agent systems distribute responsibilities across specialised agents that collaborate towards a shared objective.
Example:
A Research Agent, Risk Agent, and Reporting Agent jointly prepare an investment report.
Level 2 — Memory & Adaptation
8. Memory Management
Description:
Memory management enables agents to retain and retrieve relevant contextual information across interactions.
Example:
Remembering that a user primarily operates within EMEA regulatory frameworks.
9. Learning and Adaptation
Description:
Learning and adaptation allow systems to improve performance based on feedback, experience, or changing conditions.
Example:
An agent learns that a user prefers concise executive summaries.
10. Model Context Protocol (MCP)
Description:
MCP establishes a standardised mechanism through which AI models interact with tools, data sources, and external services.
Example:
A model accesses a SQL database and a document repository through a common MCP interface.
11. Goal Setting and Monitoring
Description:
Agents define objectives, track progress, and continuously evaluate whether intended outcomes are being achieved.
Example:
A project-management agent tracks completion rates against quarterly delivery targets.
Level 3 — Reliability, Human Oversight & Knowledge
12. Exception Handling and Recovery
Description:
This pattern enables agents to detect failures, recover gracefully, and continue operating under adverse conditions.
Example:
If a database connection fails, the agent automatically switches to a backup source.
13. Human-in-the-Loop (HITL)
Description:
Human oversight is incorporated into critical workflows to ensure accountability, accuracy, and governance.
Example:
A compliance officer reviews a suspicious transaction before escalation.
14. Knowledge Retrieval (RAG)
Description:
Retrieval-Augmented Generation grounds model outputs in authoritative external knowledge.
Example:
Retrieving FCA regulations before answering a compliance-related query.
Level 4 — Production Agent Systems
15. Inter-Agent Communication (A2A)
Description:
Agents exchange information, tasks, and decisions through structured communication mechanisms.
Example:
A Pricing Agent sends valuation results to a Risk Agent.
16. Resource-Aware Optimization
Description:
Agents dynamically optimise computational resources, cost, and latency while maintaining performance.
Example:
Using a smaller model for routine queries and a larger model only for complex reasoning.
17. Reasoning Techniques
Description:
Reasoning techniques improve analytical depth through structured thought processes and logical decomposition.
Example:
Determining whether a derivative position breaches regulatory thresholds through step-by-step analysis.
18. Guardrails / Safety Patterns
Description:
Guardrails enforce behavioural constraints, ensuring outputs remain safe, compliant, and aligned with policy.
Example:
Preventing an agent from disclosing confidential client information.
19. Evaluation and Monitoring
Description:
Continuous evaluation measures system quality, reliability, accuracy, and operational effectiveness.
Example:
Tracking hallucination rates, latency, and user satisfaction metrics.
20. Prioritization
Description:
Prioritization determines which tasks warrant immediate attention based on business value and urgency.
Example:
A regulatory breach investigation is prioritised above routine reporting.
21. Exploration and Discovery
Description:
Agents proactively investigate alternatives, identify opportunities, and uncover novel insights.
Example:
Exploring multiple portfolio-hedging strategies before recommending one.
Level 5 — Advanced Patterns & Engineering
22. Advanced Prompting Techniques
Description:
Sophisticated prompting methods improve precision, reasoning quality, and task performance.
Example:
Using Chain-of-Thought prompting to solve a complex risk-calculation problem.
23. AI Agentic — From GUI to Real-World Environment
Description:
This topic explores the transition from controlled demonstrations to real-world operational deployments.
Example:
Moving an AI assistant from a prototype interface into a production banking environment.
24. Quick Overview of Agentic Frameworks
Description:
Agentic frameworks provide reusable architectures for building autonomous AI systems.
Example:
Comparing LangGraph, CrewAI, AutoGen, and OpenAI Agents SDK.
25. Building an Agent with AgentSpace
Description:
This topic demonstrates practical agent construction using Google’s AgentSpace ecosystem.
Example:
Building an enterprise knowledge assistant using AgentSpace.
26. AI Agents on the CLI
Description:
Agents can be deployed and managed directly through command-line interfaces for automation and operations.
Example:
Executing a coding agent from a terminal to generate documentation.
27. Under the Hood: Agents’ Reasoning Engines
Description:
This topic examines the internal mechanisms governing planning, reasoning, memory, and decision-making.
Example:
Understanding how an agent chooses between multiple possible actions.
28. Coding Agents
Description:
Coding agents autonomously write, analyse, test, refactor, and maintain software systems.
Example:
An agent generates a REST API, writes unit tests, and fixes detected bugs.
1. Start Here — The Best Overall Learning Path
LangGraph Documentation
LangGraph is currently the closest practical implementation of most agentic design patterns:
- Prompt Chaining
- Routing
- Reflection
- Planning
- Human-in-the-Loop
- Multi-Agent Systems
- Memory
- State Management
It is effectively the “Spring Framework” of Agentic AI.
2. MCP (Model Context Protocol)
Model Context Protocol Documentation
This is the official source for MCP.
Learn:
- MCP Clients
- MCP Servers
- Tools
- Resources
- Prompts
- External Integrations
Think of MCP as:
REST API for Agents
or
USB-C for AI
as described by the official documentation.
3. Agentic Patterns Repository
ref
Contains implementations of:
- Reflection
- Planning
- Tool Use
- Multi-Agent
- Ensemble
- Graph Memory
- Meta-Controller
- Blackboard Systems
- Self-Reflective Agents
The notebooks are organised as a progressive learning path.
4. LangGraph Cookbook
LangGraph Cookbook
Excellent for:
- Agent communication
- Multi-agent workflows
- Parallel execution
- Sequential execution
- Agent coordination
5. Agentic Design Patterns in Code
Mastering Agentic Design Patterns with LangGraph
Directly maps many of the concepts from your book into working code examples.
Mapping Your Book Chapters to Online Resources
| Topic | Best Resource |
|---|---|
| Prompt Chaining | LangGraph |
| Routing | LangGraph |
| Parallelization | LangGraph Cookbook |
| Reflection | All Agentic Architectures |
| Tool Use | MCP + LangGraph |
| Planning | LangGraph |
| Multi-Agent | CrewAI + LangGraph |
| Memory Management | LangGraph Memory |
| Learning & Adaptation | Agentic Architectures |
| MCP | Official MCP Docs |
| Goal Monitoring | LangGraph |
| Exception Handling | LangGraph |
| Human-in-the-Loop | LangGraph |
| RAG | LangChain + LlamaIndex |
| A2A Communication | LangGraph Cookbook |
| Resource Optimization | Production Guides |
| Reasoning | ReAct / Plan-and-Execute |
| Guardrails | LangChain Guardrails |
| Evaluation | LangSmith |
| Monitoring | LangSmith |
| Prioritisation | Planning Agents |
| Exploration | Research Agents |
| Coding Agents | OpenAI Agents SDK / Claude Code |
— Dedicated to Israr Alam -Hamza