MCPInstall

awesome-agentic-patterns-catalog

Expert knowledge of agentic AI design patterns for autonomous agent development

Installs
160
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/reason-machines/ai-agent-skills --skill awesome-agentic-patterns-catalog
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads awesome-agentic-patterns-catalog automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Awesome Agentic Patterns Catalog

Skill by ara.so — AI Agent Skills collection.

This skill provides comprehensive knowledge of agentic AI patterns — production-ready architectural patterns, workflows, and techniques for building autonomous and semi-autonomous AI agents. The Awesome Agentic Patterns catalog curates real-world patterns with traceability to implementations, papers, and production use cases.

What is Awesome Agentic Patterns?

A curated catalogue of repeatable patterns that help AI agents sense, reason, and act effectively in production environments. Each pattern is:

  • Repeatable — proven by multiple teams
  • Agent-centric — improves agent capabilities
  • Traceable — backed by public references (blogs, papers, repos)

Website: https://agentic-patterns.com
Repository: https://github.com/nibzard/awesome-agentic-patterns

Pattern Categories

The catalog organizes patterns into 8 core categories:

  1. Context & Memory — Managing agent state, memory, and context windows
  2. Feedback Loops — Self-improvement, reflection, and iterative refinement
  3. Learning & Adaptation — Skill evolution and reinforcement learning
  4. Orchestration & Control — Task decomposition, multi-agent coordination
  5. Reliability & Eval — Testing, monitoring, and fault tolerance
  6. Security & Safety — Sandboxing, PII protection, guardrails
  7. Tool Use & Environment — Interacting with shells, browsers, databases
  8. UX & Collaboration — Human-agent interaction patterns

Installation & Access

Browse Online

The primary way to explore patterns is via the website:

# Visit the interactive pattern explorer
open https://agentic-patterns.com

Features available on the website:

  • Pattern Explorer: Filter by category, complexity, status
  • Compare Tool: Side-by-side pattern comparison
  • Decision Explorer: Interactive pattern selection guide
  • Graph Visualization: Pattern relationship mapping
  • Pattern Packs: Curated collections for common architectures

Clone Repository

git clone https://github.com/nibzard/awesome-agentic-patterns.git
cd awesome-agentic-patterns

Repository Structure

awesome-agentic-patterns/
├── patterns/           # Individual pattern markdown files
│   ├── context-window-auto-compaction.md
│   ├── reflection.md
│   ├── plan-then-execute-pattern.md
│   └── ...
├── apps/
│   └── web/           # Astro-based website source
├── README.md          # Main catalog listing
└── LICENSE

Key Patterns Overview

Context & Memory Patterns

Curated Code Context Window

  • Dynamically select relevant code files for LLM context
  • Use semantic search or dependency analysis
  • Example: Pass only modified files + their direct dependencies

Prompt Caching via Exact Prefix Preservation

  • Structure prompts so static context (system, docs) comes first
  • Cache LLM processing of unchanged prefix
  • Reduces latency and cost for iterative workflows

Episodic Memory Retrieval & Injection

  • Store past interactions in vector DB
  • Retrieve relevant episodes based on current task
  • Inject as context to maintain coherence across sessions

Working Memory via TodoWrite

  • Agents maintain explicit TODO lists in files
  • Track progress, next steps, and blockers
  • Provides persistence across crashes/restarts

Feedback Loop Patterns

Reflection Loop

  • Agent reviews its own output before finalizing
  • Self-critique → revise → validate cycle
  • Example workflow:
    1. Generate initial solution
    2. Critique: "Does this handle edge case X?"
    3. Revise based on critique
    4. Validate against requirements
    

Coding Agent CI Feedback Loop

  • Agent commits code → CI runs → agent reads failures → agent fixes
  • Automated self-healing for test failures
  • Example integration:
    while not tests_pass:
        run_tests()
        if failures:
            agent.analyze_failures(test_output)
            agent.generate_fix()
            commit_and_retry()
    

Self-Critique Evaluator Loop

  • Separate evaluator agent assesses worker agent output
  • Worker iterates based on evaluator feedback
  • Prevents over-fitting to single perspective

Orchestration & Control Patterns

Plan-Then-Execute Pattern

  • Decompose complex task into explicit plan
  • Execute steps sequentially with validation
  • Update plan based on execution results
# Conceptual implementation
def plan_then_execute(task):
    plan = planner_llm.generate_plan(task)
    results = []
    
    for step in plan.steps:
        result = executor.execute(step)
        if result.needs_replanning:
            plan = planner_llm.replan(task, results, step)
        results.append(result)
    
    return synthesize(results)

Sub-Agent Spawning

  • Main agent delegates subtasks to specialized sub-agents
  • Each sub-agent has focused tools and context
  • Results aggregated by parent agent

Dual LLM Pattern

  • Use different models for different tasks
  • Fast/cheap model for simple decisions
  • Powerful model for complex reasoning
  • Example: GPT-4o-mini for routing, GPT-4 for generation

Tool Use Patterns

Tool Selection Guide

  • Provide LLM with explicit decision tree for tool selection
  • Include when to use each tool, expected inputs/outputs
  • Reduces tool misuse and hallucination
Tool Selection Guide:
- search_code(query): When user asks "where is X defined"
- run_tests(path): After code changes, before commit
- read_file(path): When context about specific file needed
- edit_file(path, instructions): To modify existing code

Conditional Parallel Tool Execution

  • Execute independent tools concurrently
  • Reduce latency for multi-step operations
  • Example: Search docs + search code + check tests in parallel

Reliability Patterns

Agent Circuit Breaker

  • Track failure rate of agent actions
  • Open circuit (disable agent) after threshold
  • Fallback to human or simpler system
class AgentCircuitBreaker:
    def __init__(self, failure_threshold=5):
        self.failures = 0
        self.threshold = failure_threshold
        self.state = "closed"  # closed, open, half-open
    
    def call(self, agent_fn, *args):
        if self.state == "open":
            raise CircuitOpenError("Too many failures")
        
        try:
            result = agent_fn(*args)
            self.on_success()
            return result
        except Exception as e:
            self.on_failure()
            raise
    
    def on_failure(self):
        self.failures += 1
        if self.failures >= self.threshold:
            self.state = "open"

LLM Observability

  • Log all prompts, completions, tool calls
  • Track latency, token usage, costs
  • Essential for debugging and optimization

Using Patterns in Agent Development

Pattern Selection Process

  1. Identify your agent's core challenge

    • Memory/context limits → Context & Memory patterns
    • Quality issues → Feedback Loop patterns
    • Complex multi-step tasks → Orchestration patterns
    • Reliability concerns → Reliability & Eval patterns
  2. Review pattern prerequisites

    • Check if pattern requires specific infrastructure
    • Assess complexity vs. benefit trade-off
  3. Start simple, iterate

    • Implement minimal version first
    • Add sophistication based on real failures

Example: Building a Code Review Agent

# Combining multiple patterns

from typing import List, Dict

class CodeReviewAgent:
    """
    Combines:
    - Curated Code Context Window (Context & Memory)
    - Reflection Loop (Feedback)
    - Tool Selection Guide (Tool Use)
    """
    
    def __init__(self, llm, code_retriever):
        self.llm = llm
        self.retriever = code_retriever
        self.tool_guide = self._load_tool_guide()
    
    def review_pr(self, pr_diff: str) -> Dict:
        # 1. Curated Context: Fetch relevant files
        context_files = self.retriever.get_relevant_context(
            pr_diff, 
            max_files=10
        )
        
        # 2. Initial review with tool guide
        initial_review = self.llm.generate(
            prompt=f"""
            {self.tool_guide}
            
            Review this PR diff:
            {pr_diff}
            
            Context files:
            {context_files}
            
            Use available tools to verify claims.
            """,
            tools=["run_tests", "search_similar_code", "check_style"]
        )
        
        # 3. Reflection loop: Self-critique
        critique = self.llm.generate(
            prompt=f"""
            Review this code review for:
            - Are all concerns valid?
            - Any false positives?
            - Missing critical issues?
            
            Review: {initial_review}
            """
        )
        
        # 4. Final review incorporating critique
        final_review = self.llm.generate(
            prompt=f"""
            Original review: {initial_review}
            Self-critique: {critique}
            
            Produce final review addressing critique points.
            """
        )
        
        return {
            "review": final_review,
            "context_used": context_files,
            "critique": critique
        }
    
    def _load_tool_guide(self) -> str:
        return """
        Tool Selection for Code Review:
        - run_tests(test_path): If PR touches test files or claims fix
        - search_similar_code(pattern): To find similar patterns/bugs
        - check_style(file_path): For style/lint violations
        - get_git_history(file): For understanding change context
        """

Example: Multi-Agent Research Assistant

# Implementing Planner-Worker Separation + Sub-Agent Spawning

class ResearchOrchestrator:
    """
    Patterns:
    - Planner-Worker Separation
    - Sub-Agent Spawning
    - Plan-Then-Execute
    """
    
    def __init__(self, planner_llm, worker_llm):
        self.planner = planner_llm
        self.worker = worker_llm
    
    async def research(self, query: str) -> Dict:
        # 1. Planner creates research plan
        plan = self.planner.generate(
            prompt=f"""
            Create research plan for: {query}
            
            Output as JSON with steps:
            [
              {{"type": "search", "query": "...", "sources": [...]}},
              {{"type": "analyze", "focus": "..."}},
              {{"type": "synthesize", "format": "..."}}
            ]
            """
        )
        
        # 2. Spawn sub-agents for parallel search
        search_tasks = [
            step for step in plan if step["type"] == "search"
        ]
        
        search_results = await asyncio.gather(*[
            self._spawn_search_agent(task)
            for task in search_tasks
        ])
        
        # 3. Worker agent analyzes results
        analysis = self.worker.generate(
            prompt=f"""
            Analyze these search results for: {query}
            
            Results: {search_results}
            
            Focus: {[s['focus'] for s in plan if s['type'] == 'analyze']}
            """
        )
        
        # 4. Synthesize final report
        report = self.worker.generate(
            prompt=f"""
            Synthesize research report:
            Query: {query}
            Analysis: {analysis}
            Format: {plan[-1]['format']}
            """
        )
        
        return {
            "report": report,
            "sources": search_results,
            "plan_used": plan
        }
    
    async def _spawn_search_agent(self, task: Dict):
        """Dedicated sub-agent for single search task"""
        agent = SearchAgent(self.worker, sources=task["sources"])
        return await agent.search(task["query"])

Common Pattern Combinations

Autonomous Coding Agent Stack

1. Curated Code Context Window (manage context size)
2. Plan-Then-Execute (break down complex changes)
3. Coding Agent CI Feedback Loop (validate changes)
4. Reflection Loop (self-review before commit)
5. Agent Circuit Breaker (prevent infinite loops)

Long-Running Agent Architecture

1. Filesystem-Based Agent State (persist state)
2. Working Memory via TodoWrite (track progress)
3. Planner-Worker Separation (long-term planning)
4. Signal-Driven Agent Activation (efficient wake-up)
5. LLM Observability (monitor over time)

Multi-Agent System

1. Declarative Multi-Agent Topology (define structure)
2. Economic Value Signaling (coordinate via incentives)
3. Sub-Agent Spawning (dynamic creation)
4. Opponent Processor (debate for quality)
5. Cross-Cycle Consensus Relay (agreement protocol)

Troubleshooting & Best Practices

Context Window Issues

Problem: Agent loses track of earlier conversation

Solutions:

  • Apply Context Window Auto-Compaction: Summarize old context
  • Use Episodic Memory Retrieval: Store + retrieve relevant history
  • Implement Progressive Disclosure: Only show needed details
  • Try Prompt Caching: Preserve expensive prefix computation

Reliability Issues

Problem: Agent produces inconsistent results

Solutions:

  • Add Reflection Loop: Self-review catches errors
  • Implement Agent Circuit Breaker: Prevent cascading failures
  • Use LLM Observability: Log everything to debug
  • Apply Failover-Aware Model Fallback: Backup models

Tool Misuse

Problem: Agent uses wrong tools or hallucinates tool calls

Solutions:

  • Provide Tool Selection Guide: Explicit decision rules
  • Use Tool Capability Compartmentalization: Limit tool access per task
  • Implement Tool Use Incentivization: Reward correct usage
  • Apply Conditional Parallel Tool Execution: Validate before executing

Planning Failures

Problem: Agent creates poor plans or gets stuck

Solutions:

  • Apply Plan-Then-Execute Pattern: Separate planning from execution
  • Use Tree-of-Thought Reasoning: Explore multiple plans
  • Implement Explicit Posterior-Sampling Planner: Probabilistic planning
  • Try Language Agent Tree Search (LATS): Search plan space

Contributing Patterns

To add a new pattern to the catalog:

  1. Validate it's repeatable: Used by 2+ teams/projects
  2. Document traceability: Link to blog, paper, or repo
  3. Create pattern file: patterns/your-pattern-name.md
  4. Follow template structure:
    # Pattern Name
    
    ## Problem
    What challenge does this solve?
    
    ## Solution
    How does the pattern work?
    
    ## Implementation
    Code examples, architecture diagrams
    
    ## References
    - [Source 1](url)
    - [Source 2](url)
    
  5. Submit PR: https://github.com/nibzard/awesome-agentic-patterns

Resources

Advanced Usage

Pattern Selection Matrix

Your ChallengePrimary PatternSupporting Patterns
Exceeding context limitsCurated Code Context WindowPrompt Caching, Progressive Disclosure
Low quality outputsReflection LoopSelf-Critique Evaluator, CriticGPT
Complex multi-step tasksPlan-Then-ExecuteSub-Agent Spawning, Tree-of-Thought
Unreliable behaviorAgent Circuit BreakerLLM Observability, Failover Fallback
Tool confusionTool Selection GuideTool Compartmentalization
Multi-agent coordinationDeclarative TopologyEconomic Value Signaling

Pattern Anti-Patterns

Don't:

  • Stack too many patterns initially (start simple)
  • Use orchestration patterns for simple tasks (overhead)
  • Skip observability (you'll regret it)
  • Ignore context window limits (use memory patterns)
  • Over-engineer before proving need (iterate)

Do:

  • Measure before optimizing (observability first)
  • Start with single-agent patterns (orchestrate later)
  • Document why you chose each pattern (maintainability)
  • Test patterns in isolation (debug complexity)
  • Review catalog regularly (patterns evolve)

This skill provides comprehensive knowledge of production-ready agentic patterns. Use the website's interactive tools for pattern discovery and the repository examples for implementation guidance.

FAQ

What does the awesome-agentic-patterns-catalog skill do?

Expert knowledge of agentic AI design patterns for autonomous agent development

How do I install awesome-agentic-patterns-catalog?

Run npx skills add https://github.com/reason-machines/ai-agent-skills --skill awesome-agentic-patterns-catalog in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/awesome-agentic-patterns-catalog/ (personal) or .claude/skills/awesome-agentic-patterns-catalog/ (project).

Which AI agents can use awesome-agentic-patterns-catalog?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is awesome-agentic-patterns-catalog safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains awesome-agentic-patterns-catalog?

It is published by reason-machines in reason-machines/ai-agent-skills. It has 160 recorded installs.

More from reason-machines/ai-agent-skills

View all →

agency-agents-zh-skill

reason-machines/ai-agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents322 installs

agent-reach-internet-access

reason-machines/ai-agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents228 installs

agent-sprite-forge-2d-game-assets

reason-machines/ai-agent-skills

Open the skill to read its SKILL.md instructions.

Media & Creative216 installs

agentmemory-persistent-memory

reason-machines/ai-agent-skills

Add persistent memory to AI coding agents using agentmemory - remembers context, preferences, and decisions across sessions

AI & Agents216 installs

awesome-agent-skills

reason-machines/ai-agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents214 installs

oh-my-openagent-orchestration

reason-machines/ai-agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents211 installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs