awesome-agentic-patterns Documentation

A curated catalogue of awesome agentic AI patterns

5,096 stars HTML HTML 4 files ยท ~7,765 tokens
RAW Doc

Technical Documentation: nibzard/awesome-agentic-patterns

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

Awesome Agentic Patterns

A curated catalogue of agentic AI patterns โ€” realโ€‘world tricks, workflows, and miniโ€‘architectures that help autonomous or semiโ€‘autonomous AI agents get useful work done in production.

Why?
Tutorials show toy demos. Real products hide the messy bits. This list surfaces the repeatable patterns that bridge the gap so we can all ship smarter, faster agents.


What counts as a pattern?

  • Repeatable โ€“ more than one team is using it.
  • Agentโ€‘centric โ€“ improves how an AI agent senses, reasons, or acts.
  • Traceable โ€“ backed by a public reference: blog post, talk, repo, or paper.

If your link ticks those boxes, it belongs here. Broader product strategy, team habits, and engineering-mindset essays live separately in principles/ so the pattern catalogue stays strictly technical.


๐ŸŒ Explore the Website

Visit: https://agentic-patterns.com

The website offers powerful discovery tools beyond this README:

  • Pattern Explorer: Browse, filter, and search all patterns by category, status, complexity, and more
  • Compare Tool: Side-by-side comparison of multiple patterns with shared attributes
  • Decision Explorer: Interactive guide to find the right pattern for your use case
  • Graph Visualization: Visual map of pattern relationships and connections
  • Pattern Packs: Curated collections of patterns for common agent architectures
  • Developer Guides: In-depth documentation on pattern selection and usage
  • Dark Mode: Full theme support for comfortable reading in any environment

Built with Astro, deployed on Vercel, source code in apps/web/.


Quick Tour of Categories

Category What you'll find
Context & Memory Sliding-window curation, vector cache, episodic memory
Feedback Loops Compilers, CI, human review, self-healing retries
Learning & Adaptation Agent RFT, skill libraries, variance-based RL
Orchestration & Control Task decomposition, sub-agent spawning, tool routing
Reliability & Eval Guardrails, eval harnesses, logging, reproducibility
Security & Safety Isolated VMs, PII tokenization, security scanning
Tool Use & Environment Shell, browser, DB, Playwright, sandbox tricks
UX & Collaboration Prompt hand-offs, staged commits, async background agents

Categories are fluid โ€” open a PR if you see a better slice!
The tables below are autoโ€‘generated from the patterns/ folder.


Context & Memory

Feedback Loops

Learning & Adaptation

Orchestration & Control

Reliability & Eval

Security & Safety

Tool Use & Environment

UX & Collaboration


For AI Assistants (llms.txt)

This project includes llms.txt, a machine-readable documentation file designed to help AI assistants and LLMs understand and recommend appropriate patterns.

What's included:

  • Pattern categories and their purposes
  • Key patterns with concise descriptions
  • Usage guidelines for AI assistants
  • Pattern selection strategies based on use case requirements

For developers building AI assistants:
The llms.txt file can be provided to LLMs as context to improve pattern recommendations. It's optimized for:

  • RAG systems indexing this catalogue
  • AI coding assistants suggesting patterns
  • LLM-powered tools that recommend agentic patterns

Access: https://agentic-patterns.com/llms.txt (also available in apps/web/public/llms.txt)


Contributing in 3 steps

  1. Fork & branch โ†’ git checkout -b add-my-pattern
  2. Add a pattern file under patterns/ using the template above.
  3. Run bun run build:data to refresh the generated README sections and site data.
  4. Open a PR titled Add: my-pattern-name.
  5. This repository is pattern-first: proposals that are primarily product announcements or promotions will be rejected, even if technically valid.

See CONTRIBUTING.md for the fine print.


Inspiration

This project started after the writeโ€‘up "What Sourcegraph learned building AI coding agents" (28 May 2025) and the ongoing Raising an Agent video diary. Many first patterns come straight from those lessons โ€” thanks to everyone sharing their journey in the open!


License

Apacheโ€‘2.0. See LICENSE.


Star History


Overview (`principles/README.md`)

Principles

Lessons from teams that build agent products: product strategy, team habits, developer learning, and general software architecture. They are not agent patterns.

Why this directory exists

patterns/ is for repeatable, agent-centric technical architectures and control loops. A pattern tells you how an AI agent senses, reasons, remembers, uses tools, or stays safe. The root README sets that bar: repeatable, agent-centric, traceable.

The entries here are valuable, and they came from building agent products, but they do not meet that bar. They describe how teams decide and work, or how to structure software in general. If they sat in patterns/, they would dilute the technical catalog, the Decision Explorer, and llms.txt.

Each entry keeps the front-matter and section structure of a pattern, so you can read it the same way. Where an entry depends on a technical pattern, it links to ../patterns/. Add an entry here only when it fails the pattern bar but is still worth keeping.

Product & strategy

Principle Summary
Burn the Boats Removes working but obsolete features on a hard, announced deadline so the team and users move to the new approach
Frontier-Focused Development Targets only state-of-the-art models, picks the best model per use case with no user model selector, and expects to rework the product every few months
Latent Demand Product Discovery Builds hackable, extensible products, watches how power users repurpose them, and turns the most frequent workarounds into supported features
Shipping as Research Releases reversible, instrumented features to learn whether they work, then doubles down or removes them based on usage data and feedback

Team & workflow habits

Principle Summary
Dev Tooling Assumptions Reset Audits dev tools for human-effort assumptions and replaces tickets, PR ceremony, and sprints with immediate agent dispatch, variations, and automated tests
Dogfooding with Rapid Iteration for Agent Improvement The agent team uses its own agent for daily work, collects feedback in low-friction channels, and ships features internally first to validate or discard them
No-Token-Limit Magic Removes hard token limits during prototyping to learn what good behavior needs, then compresses context only after quality is stable and measured

Industry & learning

Principle Summary
AI-Accelerated Learning and Skill Development Uses AI assistants as tutors that explain errors and concepts, offer alternatives, and fade support as the developer gains skill
Democratization of Tooling via Agents Non-programmers describe a tool in natural language and iterate with an AI agent that generates and fixes the code for dashboards, scripts, or small apps

General software architecture

Principle Summary
Shared Core with Native Shells Keeps application state and behavior in a shared core, uses native front ends for each platform, and checks that shells and the CLI expose the core consistently

See also


Overview (`research/README.md`)

Research

This directory holds long-form research artifacts that support the pattern catalogue in patterns/. The pattern files are the source of truth for pattern content. This directory is for the verified work behind them.

What belongs here

Add a file to this directory only if it is one of these two types:

  • A verified catalogue audit. A complete examination of patterns/ that documents its method and gives a verdict for each pattern.
  • A synthesis of primary research. A document that synthesizes primary sources (papers, engineering write-ups, postmortems) for one topic that spans many patterns.

A maintainer must examine and approve each file. Each citation must resolve to a real source. Each statistic must have a source that you can link.

Do not add these files here:

  • Per-pattern reports that an AI agent generates without source verification.
  • Raw verification output, such as API response dumps, run trackers, and logs.

scripts/claude-research-loop.sh writes its output to this directory. Do not commit that output unless a maintainer has verified it.

Contents

Why the earlier reports were deleted

In February and March 2026, an automated research loop generated approximately 230 per-pattern research files in this directory (*-report.md, *-analysis.md, *-summary.md, *-relationships.md, and related JSON verification files). We deleted these files in November 2026.

The October 2026 audit found these defects in the generated reports:

  • Fabricated citations.
  • Misattributed arXiv identifiers.
  • Statistics with no source.

For example, reflection-report.md attributed Self-Refine to Shinn et al. 2023 (arXiv:2303.11366, which is the identifier of Reflexion) and reported a "100x" RLAIF cost reduction that no source supports.

The follow-up pull requests corrected the pattern entries in patterns/. The old reports did not change, so each report continued to contradict the audited catalogue and could supply incorrect data to readers and to tools that ingest the repository.

How to read a deleted report

Git history before November 2026 contains each deleted report. To find the commit that removed them, run:

bash
git log --diff-filter=D --summary -- research/

To read one report at the commit before that deletion, run git show <commit>^:research/<file>. Treat the content as unverified.


Overview (`scripts/README.md`)

Claude Research Loop

Run from repo root:

bash
make research_loop
scripts/claude-research-loop.sh --bootstrap-only
scripts/claude-research-loop.sh --once
scripts/claude-research-loop.sh
scripts/claude-research-loop.sh --pattern plan-then-execute-pattern
make research_loop PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34"
PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34" scripts/claude-research-loop.sh --once

# Update pattern files from existing research
make update_patterns_from_research
make update_patterns_from_research PATTERN=action-selector-pattern
scripts/update-patterns-from-research.sh
scripts/update-patterns-from-research.sh --pattern action-selector-pattern
TEMPLATE_LINK="https://github.com/nibzard/awesome-agentic-patterns/blob/main/TEMPLATE.md" \
  scripts/update-patterns-from-research.sh --pattern action-selector-pattern

scripts/update-patterns-from-research.sh now injects a template reference URL into the Claude prompt.
Override it with TEMPLATE_LINK=... if you want a different template source.

Requirements:

bash
jq
rg
claude (in PATH) -- latest global is preferred

Optional pinned fallback for this project (used when claude is unavailable):

bash
PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34" scripts/claude-research-loop.sh --once

Pinning Note

This loop now prefers the global claude binary by default.

PROJECT_PINNED_CLAUDE_BIN can be used as a fallback path if needed.

Project-only pin:

  • make research_loop uses global claude when available.
  • You can still force a specific binary with CLAUDE_BIN=....
  • You can force the project pin fallback with PROJECT_PINNED_CLAUDE_BIN=....

Revert your global claude to the latest published build:

bash
latest="$(npm dist-tag ls @anthropic-ai/claude-code | awk '/^latest:/ {print $2}')"
~/.local/bin/claude install "$latest" --force
ln -sf "$HOME/.local/share/claude/versions/$latest" "$HOME/.local/bin/claude"

Verify:

bash
readlink -f ~/.local/bin/claude
~/.local/bin/claude --version

--- METRICS ---