Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Our 15 AI experts built the most comprehensive, practical, 90+ lesson courses to master AI Engineering - we have pathways for any experience at Towards AI Academy. Cohorts still open - use COHORT10 for 10% off.

Publication

Agentic Patterns: The Building Blocks of Reliable AI Agents
Artificial Intelligence   Latest   Machine Learning

Agentic Patterns: The Building Blocks of Reliable AI Agents

Last Updated on August 26, 2025 by Editorial Team

Author(s):

Originally published on Towards AI.

Agentic Patterns: The Building Blocks of Reliable AI Agents
Photo by Eric Krull on Unsplash

Over the last few months, I’ve been diving deep into the world of AI agents. And honestly, it feels like the field is moving at the same pace as when deep learning first started to explode.

The idea is simple yet powerful: instead of static models that just return outputs, we can now build agents that can reason, act, and interact with the world. But once you start building these systems, you quickly realize it’s not enough to just connect a large language model (LLM) to a few APIs.

That’s where Agentic Patterns come in.

Just like software engineering has design patterns (Observer, Factory, Singleton…), the agent world is now developing its own set of reusable blueprints for building robust, reliable, and general-purpose agents.

In this blog, I’ll explain what these patterns are, why they matter, and show you some real examples. I’ll also share some references that helped me learn this faster.

Why Do We Even Need Agentic Patterns?

When I first built a basic chatbot, the structure looked like this:

User → Model → Response

Pretty straightforward.

But the moment I tried to extend this to something more useful, like an AI job scheduling agent (a side project I worked on recently) things got messy:

  • The agent needed to reason about tasks before deciding.
  • It had to call multiple APIs in sequence.
  • It sometimes gave wrong answers, so it needed self-checks.
  • Some parts of the workflow required specialized knowledge, not just general LLM reasoning.

This was the first time I realized:
Without structure,
agents collapse under complexity.

That’s why researchers and builders started looking at recurring solutions, which became known as agentic patterns.

Think of them as the “engineering discipline” behind agents, helping us avoid reinventing the wheel every time.

AI Generated: Made with Napkin AI

Core Agentic Patterns

Let’s look at some of the most important patterns. I’ll use simple language, but we’ll also dive into how they’re used in real projects and research.

1. ReAct (Reason + Act)

Probably the most famous pattern is ReAct, introduced in a Google research paper (Yao et al., 2022).

The intuition is:

  • LLMs don’t just spit out answers.
  • They should reason step by step.
  • And then act by calling tools, APIs, or performing actions.
  • The results of those actions feed back into reasoning.

Example:

Let’s say you ask an agent: “Find me the cheapest flight from Mumbai to Paris next week and book it.”

  • The agent first reasons:
    “I need flight options, then I need to select the cheapest, then I need to call the booking API.”
  • It acts: calls the flight API.
  • It observes the results.
  • It reasons again:
    “Cheapest flight is X. Now I should call booking API with those details.”

This back-and-forth is much closer to human problem-solving than a single-shot output.

2. Self-Reflection Pattern

When I experimented with agents that write code (similar to Code Interpreter in ChatGPT), I noticed something:

  • The model often generated wrong code on the first attempt.
  • But if I manually asked it to “fix errors,” it usually succeeded.

That’s the reflection pattern: let the agent critique its own work.

In practice, it looks like:

  1. Generate an initial answer.
  2. Check it (e.g., run the code, validate facts, simulate the plan).
  3. Reflect on what went wrong.
  4. Improve the answer.

This is similar to how humans debug or edit their work.

Real-world Example:

  • Reflexion framework (Shinn et al., 2023) uses reflection loops to drastically improve agent performance in reasoning tasks.
  • GitHub Copilot-like tools also benefit from running generated code, seeing the error trace, and retrying.

3. Multi-Agent Collaboration

I’m personally very interested in this one because it feels closest to how real teams work.

Instead of building one super-agent that tries to do everything, you build multiple specialized agents that collaborate.

Example (Startup Idea Validation Crew):

  • Idea Evaluator: judges feasibility.
  • Customer Persona Builder: identifies target audience.
  • MVP Recommender: suggests minimum viable product.

These agents can pass tasks to each other or work in parallel. Tools like CrewAI or LangGraph make this easier today.

Why this works:

  • Each agent is simpler (narrow focus).
  • Collaboration reduces errors.
  • It’s modular; you can swap agents in/out.

4. Memory Patterns

This one is obvious but crucial. Agents without memory feel like talking to someone who forgets everything after 2 minutes.

Different kinds of memory exist:

  • Short-term memory: stores recent conversation turns.
  • Long-term memory: stores facts in a vector DB (e.g., Pinecone, Weaviate, Chroma).
  • Episodic memory: remembers entire sessions (like “last time we solved algebra, you struggled with quadratic equations”).

Real-world Example:

  • Personal AI assistants (like Mem.ai or PI) rely heavily on long-term memory.
  • LangChain’s ConversationBufferMemory and VectorStoreRetrieverMemory implement these patterns in code.

Without memory, agents just can’t scale to real-life applications.

5. Critic-Helper Pattern

This one excites me because it mirrors human workflows, like one person creates and another reviews.

The pattern:

  • Generator agent produces output.
  • Critic agent checks correctness/quality.
  • If flaws exist, generator retries.

Example:

  • Generator writes a blog draft.
  • Critic checks for factual accuracy.
  • Generator revises based on feedback.

This is already used in alignment research (red-teaming LLMs) and can be applied in production for higher reliability.

AI Generated

How These Patterns Combine in Practice

In real projects, you don’t use just one pattern. You compose them.

For example, let’s say I’m building a customer support AI agent:

  1. ReAct: To fetch product details step by step.
  2. Reflection: To double-check answers against the knowledge base.
  3. Memory: To remember user history and preferences.
  4. Critic-Helper: To filter bad responses before showing them.
  5. Multi-agent setup: One agent for billing, another for technical issues.

That’s when the system feels like a real assistant, not just a chatbot with fancy words.

AI Generated: Made with Napkin AI

References & Further Reading

  • Yao et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models.
  • Shinn et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning.
  • Park et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior.
  • LangGraph docs: LangGraph — Patterns for LLM Applications.
  • CrewAI framework: CrewAI Website.

Final Thoughts

Agentic patterns are not just academic concepts, they’re becoming blueprints for the next generation of AI apps.

When I first started working with LLMs, I treated them like supercharged autocomplete engines. But as soon as I started layering patterns like reasoning, reflection, memory, and collaboration, the results became much more reliable.

If you’re building agents today, don’t just rely on prompts. Think in patterns.
That’s what separates toy demos from production-ready systems.

I’m curious, which of these patterns do you find most exciting? Should I write a dedicated deep dive (with code) on one of them next?

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.