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/。
類別快速導覽
Section titled “類別快速導覽”| 類別 | 內容 |
|---|---|
| 情境與記憶 | 滑動視窗整理、向量快取、情節記憶 |
| 回饋迴圈 | 編譯器、CI、人工審查、自我修復重試 |
| 學習與調適 | Agent RFT、技能庫、依變異數選樣的 RL |
| 協調與控制 | 工作分解、產生子代理、工具路由 |
| 可靠性與評估 | 防護措施、評估框架、記錄、可重現性 |
| 安全與防護 | 隔離 VM、個人資料識別碼權杖化、安全掃描 |
| 工具使用與環境 | 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。
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:

