Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Agentic Architectures

Thirty-five production-grade agentic AI patterns. End to end.

A library and a living textbook — real LLM outputs, provider-agnostic, deterministic-picker discipline throughout, and a comparative benchmark leaderboard that ranks every architecture against every relevant task.


CI Docs PyPI License


Quickstart Documentation Architectures Benchmarks Open in Codespaces



  35  

ARCHITECTURES

  283  

PASSING TESTS

  17  

BENCHMARK TASKS

  9  

LLM PROVIDERS

  0  

MOCKED RUNS


Overview

A single Python library that packages every major agentic AI pattern from the literature as a runnable Architecture class with a uniform contract. Each pattern ships with a fully executed Jupyter notebook whose theory is written against the captured run — not synthetic examples. The library is multi-provider (Nebius, OpenAI, Anthropic, Groq, Ollama, Together, Fireworks, Mistral, Google) and built on top of LangGraph state machines.

The central technical discipline of the repository is the deterministic-picker pattern — every LLM-as-Scorer surface has the LLM commit to categorical features (booleans, enums) and lets Python compose the deciding signal. This is the universal escape from the LLM-as-Scorer flat-band pathology, applied in 13 of 35 architectures; 9 more are architecturally immune by design.


Quickstart

pip install "agentic-architectures[nebius,faiss,tavily]"
from agentic_architectures import get_llm from agentic_architectures.architectures import Reflection arch = Reflection(llm=get_llm(), max_iterations=2, target_score=8) result = arch.run("Write a haiku about a glacier.") print(result.output) print("score:", result.metadata["final_score"], "/ 10")

Same .run(task) interface across all 35 architectures. Same ArchitectureResult return shape. Swap the class, swap the pattern — your downstream code does not change.

Set up a virtualenv from a fresh clone
git clone https://github.com/FareedKhan-dev/all-agentic-architectures cd all-agentic-architectures python -m venv .venv .venv\Scripts\activate # Windows source .venv/bin/activate # macOS / Linux pip install -e ".[dev,test,docs,nebius,faiss,tavily,networkx]" cp .env.example .env # then fill in NEBIUS_API_KEY etc. pytest -q # 283 tests pass in ~30s

Architecture families

Reasoning & Reflection

Self-critique loops that drive answer quality up through iteration.

Reflection · Reflexion · Chain-of-Verification · Self-Discover · Constitutional AI

Sampling & Search

Sample many paths or grow a tree with rewards.

Self-Consistency · Tree of Thoughts · LATS · Mental Loop · Ensemble

Retrieval (RAG)

Ground every claim — five retrieval shapes.

Agentic RAG · Corrective RAG · Self-RAG · Adaptive RAG · GraphRAG

Memory

Learn across calls — pick the storage shape.

Episodic + Semantic · Graph Memory · MemGPT · Voyager · Agent Workflow Memory

Tools & Actions

From one search tool to a real Chromium browser.

Tool Use · ReAct · Planning · PEV · SWE-Agent · BrowserAgent

Multi-Agent

Specialists, debate, multi-perspective research.

Multi-Agent · Blackboard · Debate · STORM · Meta-Controller

Safety & Routing

Categorical actions through deterministic Python gates.

Dry-Run · Reflexive Metacognitive · Computer Use

Specialty

Patterns with a unique shape.

RLHF Self-Improvement · Cellular Automata

Cross-cutting

Patterns that appear across families.

Deterministic-picker · Memory variants


The 35 architectures

Reasoning & Reflection
ArchitecturePatternReference
ReflectionGenerate → critique → refineMadaan 2023
ReflexionVerbal reflections in episodic memoryShinn 2023
Chain-of-Verification (CoVe)Verify each baseline claim independentlyDhuliawala 2023
Self-DiscoverSELECT → ADAPT → IMPLEMENT → SOLVEZhou 2024
Constitutional AIPer-rule pass/fail → reviseBai 2022
Sampling & Search
ArchitecturePatternReference
Self-ConsistencySample N paths, majority-voteWang 2022
Tree of ThoughtsBeam search over thoughtsYao 2023
LATSMCTS tree with reward backupZhou 2024
Mental LoopSimulate → score (deterministic-picker)this repo
EnsembleN voters, weighted aggregationthis repo
Retrieval (RAG)
ArchitecturePatternReference
Agentic RAGAgent decides when & what to retrieveLangGraph reference
Corrective RAG (CRAG)Grade docs, fall back to webYan 2024
Self-RAGPer-doc reflection tokensAsai 2024
Adaptive RAGPre-route by query complexityJeong 2024
GraphRAGKG + community summariesMicrosoft 2024
Memory
ArchitectureStored unitReference
Episodic + SemanticConversation turns + triplesPark 2023
Graph Memory(subject, predicate, object) triplesthis repo
MemGPTOS-style context + archival tiersPacker 2023
VoyagerReusable Python skills (real subprocess)Wang 2023
Agent Workflow MemoryHigh-level workflow recipesWang 2024
Tools & Actions
ArchitecturePatternReference
Tool UseAgent with one toolLangChain reference
ReActThought → Action → ObservationYao 2022
PlanningDecompose → execute → replanWei 2022
Plan-Execute-Verify (PEV)Post-execution verification per stepthis repo
SWE-AgentSandboxed file-system agentYang 2024
BrowserAgentReal Playwright + safety gateAnthropic Computer-Use 2024
Multi-Agent
ArchitecturePatternReference
Multi-AgentSupervisor + specialistsLangGraph reference
BlackboardShared workspace + agentsclassical AI
DebateN agents × K roundsDu 2023
STORMMulti-perspective research → articleShao 2024
Meta-ControllerRouter over architecturesthis repo
Safety, Routing & Specialty
ArchitecturePatternReference
Dry-RunPropose → simulate → approval gatethis repo
Reflexive MetacognitiveSelf-aware capability routingthis repo
RLHF Self-ImprovementMulti-dim deterministic scoring + archivethis repo
Cellular AutomataLLM rules over a gridthis repo

Provider compatibility

ProviderInstall extraNotes
Nebius  (default)[nebius]Llama-3.3-70B + Qwen3-Thinking; cheapest for the included demos
OpenAI[openai]All architectures work; highest quality for reasoning patterns
Anthropic[anthropic]Strong on long context; required for production Computer-Use
Groq[groq]Fast inference; great for high-volume Self-Consistency
Ollama  (local)[ollama]No API key; tool calling depends on the model
Together[together]Wide model catalogue
Fireworks[fireworks]Function-calling first-class
Mistral[mistral]EU-hosted option
Google[google]Gemini 2.x via Generative AI API

Switch via LLM_PROVIDER + the corresponding key in .env. No code changes.


Benchmarks

A 17-task suite runs every architecture and scores results. Most recent run, real Nebius Llama-3.3-70B, ~25 min, ~$1.50 in tokens:

OutcomeArchitectures
Strong  2/2 or 3/3Reflection  SelfConsistency  SelfDiscover  BrowserAgent
Perfect on attempted  1/121 more — see leaderboard
Pattern-fit failuresLATS on arithmetic (wrong shape) · Debate + Ensemble on Sally trick (group-think) · Reflexion + AWM on raw-fact recall (wrong memory shape)
Overall33 / 42 correct  78%

Full leaderboard with per-task answer excerpts: docs/benchmarks.md


Learning paths

Four curated reading orders, depending on what you're trying to do.

PathForOrder
BeginnerMental modelReflection → Tool Use → ReAct → Planning → Self-Consistency
RAG-focusedProduction retrievalAgentic RAG → CRAG → Self-RAG → Adaptive RAG → GraphRAG
Multi-agentCoordinationMulti-Agent → Blackboard → Debate → STORM → Meta-Controller
SafetyGuardrailsDry-Run → Constitutional AI → Reflexive Metacognitive → BrowserAgent (safety gate)

Star history


Tested

pytest -q
283 passed, 37 skipped (env-gated integration), 1 warning in ~30s
SuiteCoverage
Registry sweepAll 35 architectures (metadata + instantiate + build)
Pure-Python helpersHaiku checker, composite scorers, subprocess executor, safety gate, sandbox path
Notebook integrityAll 35 notebooks executed, no error outputs, §9 commentary tailored from real captured runs
Integration  (env-gated)One real-LLM happy-path per architecture, gated via RUN_INTEGRATION=1

Documentation

Full docs siteDark-mode site with embedded notebooks  (live after first deploy)
QuickstartOne-command install, 8-line example
Switching providersCapability matrix; one env var to swap
Add your own architecture5-step contributor recipe
Deterministic-picker patternThe central technical pattern, explained once
Memory variantsComparison of all 7 memory shapes
API referencemkdocstrings auto-gen from docstrings  (live after first deploy)
BenchmarksFull per-task leaderboard with answer excerpts

Contributing

Contributions welcome. Two paths:

  1. Add a new architecture — follow the 5-step recipe. The PR template includes a deterministic-picker checklist.
  2. Improve an existing one — bug fix, prompt tuning, performance, scoring rubric. Open an issue first to discuss scope.

See CONTRIBUTING.md for the dev setup, code style, and commit-message convention (Conventional Commits — release-please auto-generates the CHANGELOG).


Citation

@misc{khan2026agentic, title = {Agentic Architectures: A Library of 35 Production-Grade Agentic AI Patterns}, author = {Khan, Fareed}, year = {2026}, howpublished = {\url{https://github.com/FareedKhan-dev/all-agentic-architectures}}, note = {MIT licensed Python library and runnable textbook} }

License

MIT — © 2026 Fareed Khan.


Built on LangGraph  ·  Docs powered by Material for MkDocs  ·  Default LLM via Nebius



★ Star  ·  Fork  ·  Open an issue  ·  Discuss

关于 About

Implementation of 17+ agentic architectures designed for practical use across different stages of AI system development.
agentic-aiai-agentslangchainlanggraphlangsmithllm

语言 Languages

Jupyter Notebook100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
5
Total Commits
峰值: 5次/周
Less
More

核心贡献者 Contributors