Agentic Patterns
Source: https://github.com/nibzard/awesome-agentic-patterns at
87538fdeccf6
License: Apache-2.0
Read the English original
This edition is an AI-assisted translation.
Awesome Agentic Patterns
Section titled “Awesome Agentic Patterns”
精选的智能体 AI 模式目录,收录帮助自主或半自主 AI 智能体在生产环境中完成工作的真实技巧、工作流和小型架构。
为什么? 教程展示的是玩具示例,真实产品则隐藏着复杂细节。本列表汇集可重复使用的模式,弥合两者之间的差距,帮助大家交付更智能、更快速的智能体。
什么算作一种模式?
Section titled “什么算作一种模式?”- 可重复——不止一个团队正在使用。
- 以智能体为中心——改善 AI 智能体的感知、推理或行动方式。
- 可追溯——有公开资料作为依据:博客文章、演讲、代码库或论文。
如果你的链接符合这些条件,就适合收录在这里。
🌐 探索网站
Section titled “🌐 探索网站”访问: https://agentic-patterns.com
该网站还提供 README 之外的强大探索工具:
- Pattern Explorer:按类别、状态、复杂度等浏览、筛选和搜索所有模式
- Compare Tool:并排比较多个模式的共同属性
- Decision Explorer:交互式指南,帮助你为用例找到合适的模式
- Graph Visualization:以图形方式展示模式之间的关系和连接
- Pattern Packs:为常见智能体架构精选的模式集合
- Developer Guides:深入介绍模式选择与使用的文档
- Dark Mode:完整主题支持,在任何环境下都能舒适阅读
使用 Astro 构建,部署在 Vercel,源代码位于 apps/web/。
| 类别 | 内容 |
|---|---|
| 上下文与记忆 | 滑动窗口筛选、向量缓存、情景记忆 |
| 反馈循环 | 编译器、CI、人工审查、自愈重试 |
| 学习与适应 | Agent RFT、技能库、基于方差的 RL |
| 编排与控制 | 任务分解、生成子智能体、工具路由 |
| 可靠性与评估 | 护栏、评估框架、日志记录、可复现性 |
| 安全与防护 | 隔离虚拟机、PII 令牌化、安全扫描 |
| 工具使用与环境 | Shell、浏览器、数据库、Playwright、沙箱技巧 |
| 用户体验与协作 | 提示移交、暂存提交、异步后台智能体 |
类别并非一成不变——如果你发现更合适的划分,欢迎提交 PR!
下方表格由 patterns/ 文件夹自动生成。
上下文与记忆
Section titled “上下文与记忆”- Agent-Powered Codebase Q&A / Onboarding
- Context Budget as a Governed Resource
- Context Window Anxiety Management
- Context Window Auto-Compaction
- Context-Minimization Pattern
- Cross-Agent Lesson Sharing via Git
- Curated Code Context Window
- Curated File Context Window
- Dynamic Context Injection
- Episodic Memory Retrieval & Injection
- Filesystem-Based Agent State
- Layered Configuration Context
- Memory Synthesis from Execution Logs
- Proactive Agent State Externalization
- Progressive Disclosure for Large Files
- Prompt Caching via Exact Prefix Preservation
- Schema-Guided Graph Retrieval for Multi-Hop Reasoning
- Self-Identity Accumulation
- Semantic Context Filtering Pattern
- Session-Scoped Context Runtime for Agent Tools
- Tool Search Lazy Loading
- Working Memory via TodoWrite
- AI-Assisted Code Review / Verification
- Background Agent with CI Feedback
- Coding Agent CI Feedback Loop
- Deterministic Grader in the Loop
- Dogfooding with Rapid Iteration for Agent Improvement
- Graph of Thoughts (GoT)
- Incident-to-Eval Synthesis
- Inference-Healed Code Review Reward
- Iterative Prompt & Skill Refinement
- Reflection Loop
- Rendered UI Finish Gate
- Rich Feedback Loops > Perfect Prompts
- Self-Critique Evaluator Loop
- Self-Discover: LLM Self-Composed Reasoning Structures
- Spec-As-Test Feedback Loop
- Tool Use Incentivization via Reward Shaping
- Agent Reinforcement Fine-Tuning (Agent RFT)
- Commitment Ledger with Reality-Gated Credit
- Compounding Engineering Pattern
- Frontier-Focused Development
- Memory Reinforcement Learning (MemRL)
- Persistent Test Memory Feedback Loop
- Shipping as Research
- Skill Library Evolution
- Variance-Based RL Sample Selection
- 402-First Machine Payments (Price-Before-Work Tool Purchases)
- Action-Selector Pattern
- Agent Modes by Model Personality
- Agent-Driven Research
- Artifact-Driven Analysis Pipeline Orchestration
- Autonomous Workflow Agent Architecture
- Board-Mediated Async Inter-Agent Coordination
- Budget-Aware Model Routing with Hard Cost Caps
- Burn the Boats
- Capability-Escrow-Receipt
- Classify-Then-Act for Background Agents
- Conditional Parallel Tool Execution
- Continuous Autonomous Task Loop Pattern
- Cross-Cycle Consensus Relay
- Cross-Domain Agent Conflict Resolution
- Custom Sandboxed Background Agent
- Declarative Multi-Agent Topology Definition
- Design-Time File Partition as Concurrency Control
- Deterministic Zero-LLM Orchestration
- Discrete Phase Separation
- Disposable Scaffolding Over Durable Features
- Distributed Execution with Cloud Workers
- Dual LLM Pattern
- Dual-Rail Message Delivery
- Economic Value Signaling in Multi-Agent Networks
- Explicit Posterior-Sampling Planner
- Factory over Assistant
- Feature List as Immutable Contract
- Hybrid LLM/Code Workflow Coordinator
- Inference-Time Scaling
- Initializer-Maintainer Dual Agent Architecture
- Inversion of Control
- Iterative Multi-Agent Brainstorming
- Lane-Based Execution Queueing
- Language Agent Tree Search (LATS)
- LLM Map-Reduce Pattern
- Markdown Polis — Multi-Vendor Agent Coordination via Filesystem Constitution
- Multi-Model Orchestration for Complex Edits
- Non-Generative Judgment Routing with Typed Escalation
- Opponent Processor / Multi-Agent Debate Pattern
- Oracle and Worker Multi-Model Approach
- Parallel Tool Call Learning
- Plan-Then-Execute Pattern
- Planner-Worker Separation for Long-Running Agents
- Progressive Autonomy with Model Evolution
- Progressive Complexity Escalation
- Recursive Best-of-N Delegation
- Self-Rewriting Meta-Prompt Loop
- Signal-Driven Agent Activation
- Specification-Driven Agent Development
- Stop Hook Auto-Continue Pattern
- Sub-Agent Spawning
- Subject Hygiene for Task Delegation
- Swarm Migration Pattern
- Three-Stage Perception Architecture
- Tool Capability Compartmentalization
- Tool Selection Guide
- Tracker-as-Desired-State Reconciliation
- Tree-of-Thought Reasoning
- Workspace-Native Multi-Agent Orchestration
可靠性与评估
Section titled “可靠性与评估”- Action Caching & Replay Pattern
- Adaptive Sandbox Fan-Out Controller
- Agent Circuit Breaker
- Anti-Reward-Hacking Grader Design
- Asynchronous Coding Agent Pipeline
- Canary Rollout and Automatic Rollback for Agent Policy Changes
- CriticGPT-Style Code Review
- Dead-Man’s Switch for Scheduled Agent Jobs
- Evidence-Layered Evaluation for Interactive Agents
- Extended Coherence Work Sessions
- Failover-Aware Model Fallback
- Lethal Trifecta Threat Model
- LLM Observability
- Merged Code + Language Skill Model
- No-Token-Limit Magic
- Orchestration Prompt-Writing Benchmark
- Out-of-Process Provider-Boundary Replay
- Output Verification Loop
- Own-Check Fault Injection
- Reasoning-Token Firewall
- Reliability Problem Map Checklist for RAG and Agents
- RLAIF (Reinforcement Learning from AI Feedback)
- Schema Validation Retry with Cross-Step Learning
- Skill Activation as a Precision/Recall Measurement
- Structured Output Specification
- Subagent Compilation Checker
- Tier Auto-Apply by Mechanical Impact
- Versioned Constitution Governance
- Workflow Evals with Mocked Tools
- Authenticated Authority Channel
- Black-Box Skill Invocation
- Consequence-Family Coverage Audit
- Cryptographic Governance Audit Trail
- Denial Tracking & Permission Escalation
- Deterministic Security Scanning Build Loop
- Deterministic Threat Rule Scanning
- Evidence Questions, Not Verdict Questions
- Exact-Action Authorization Binding
- External Credential Sync
- Hook-Based Safety Guard Rails for Autonomous Code Agents
- Isolated VM per RL Rollout
- Local-First Credential Broker
- Non-Custodial Spending Controls
- One OS User per Agent
- PII Tokenization
- Policy-Gated Tool Proxy
- Sandboxed Tool Authorization
- Soulbound Identity Verification
- Transitive Vouch-Chain Trust
- Zero-Knowledge Verified Agent Egress
- Zero-Trust Agent Mesh
工具使用与环境
Section titled “工具使用与环境”- Agent SDK for Programmatic Control
- Agent-First Tool Discovery
- Agent-First Tooling and Logging
- Agentic Search Over Vector Embeddings
- AI Web Search Agent Loop
- CLI-First Skill Design
- CLI-Native Agent Orchestration
- Code Mode MCP Tool Interface Improvement Pattern
- Code-Over-API Pattern
- Code-Then-Execute Pattern
- Cross-Protocol Agent Discovery
- Dual-Use Tool Design
- Dynamic Code Injection (On-Demand File Fetch)
- Egress Lockdown (No-Exfiltration Channel)
- Filesystem-Mediated Host Delegation
- Intelligent Bash Tool Execution
- LLM-Friendly API Design
- MCP Pattern Injection
- Multi-Platform Communication Aggregation
- Multi-Platform Webhook Triggers
- Patch Steering via Prompted Tool Selection
- Precomputed Code Graph Lookup
- Progressive Tool Discovery
- Shell Command Contextualization
- Static Service Manifest for Agents
- Tool Use Steering via Prompting
- Unified Tool Gateway
- Virtual Machine Operator Agent
- Visual AI Multimodal Integration
用户体验与协作
Section titled “用户体验与协作”- Abstracted Code Representation for Review
- Agent-Assisted Scaffolding
- Agent-Friendly Workflow Design
- AI-Accelerated Learning and Skill Development
- Chain-of-Thought Monitoring & Interruption
- Codebase Optimization for Agents
- Democratization of Tooling via Agents
- Dev Tooling Assumptions Reset
- Human-in-the-Loop Approval Framework
- Latent Demand Product Discovery
- Milestone Escrow for Agent Resource Funding
- Proactive Trigger Vocabulary
- Seamless Background-to-Foreground Handoff
- Spectrum of Control / Blended Initiative
- Team-Shared Agent Configuration as Code
- Verbose Reasoning Transparency
面向 AI 助手(llms.txt)
Section titled “面向 AI 助手(llms.txt)”本项目包含 llms.txt,这是一个机器可读的文档文件,旨在帮助 AI 助手和 LLM 理解并推荐合适的模式。
包含内容:
- 模式类别及其用途
- 附有简明说明的关键模式
- 面向 AI 助手的使用指南
- 根据用例需求选择模式的策略
面向构建 AI 助手的开发者:
可将 llms.txt 文件作为上下文提供给 LLM,以改进模式推荐。该文件针对以下场景进行了优化:
- 为本目录建立索引的 RAG 系统
- 推荐模式的 AI 编程助手
- 推荐智能体模式的 LLM 工具
访问: https://agentic-patterns.com/llms.txt (也可在 apps/web/public/llms.txt 中查看)
三步参与贡献
Section titled “三步参与贡献”- Fork 并创建分支 →
git checkout -b add-my-pattern - 使用上方模板在
patterns/下添加模式文件。 - 运行
bun run build:data,刷新 README 自动生成的章节和站点数据。 - 提交 PR,标题为
Add: my-pattern-name。 - 本仓库以模式为核心:即使提案在技术上有效,如果主要是产品公告或推广,也会被拒绝。
详细要求请参阅 CONTRIBUTING.md。
本项目始于文章 “Sourcegraph 在构建 AI 编程智能体时的经验”(2025 年 5 月 28 日)以及持续更新的 Raising an Agent 视频日志。许多早期模式直接源自这些经验——感谢所有公开分享历程的人!
Apache‑2.0。请参阅 LICENSE。
Star 历史
Section titled “Star 历史”HagiCode
HagiCode 是面向项目开发的 AI 编码工作台:丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。
丰富、便捷的界面交互,让规划、Agent 执行与项目工作更容易上手和跟进。
- 智能OpenSpec 工作流把意图转化为从提案、设计、任务到交付的可执行路径。
- 高效多 Agent 并行推进调研、实现与审阅,并支持多仓库变更和你熟悉的 Agent CLI。
- 有趣丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。
下载 Windows 版
分享 HagiCode
让想法变成真正交付的软件。
HagiCode 是面向项目开发的 AI 编码工作台:用 OpenSpec 工作流规划变更,多 Agent 并行执行,再由 Hero Scenario 让进度一目了然,把想法变成真正交付的软件。
- 智能
- OpenSpec 工作流把意图变成从提案到交付的可执行路径。
- 高效
- 多 Agent 并行推进调研、实现与审阅。
- 有趣
- 丰富、便捷的界面交互,让规划、Agent 执行和项目工作更容易跟进。
© 2026 HagiCode | Powered By hagilight-starlight@0.21.0 | Branch: main | Commit: 745b50b | Built:

