智能代理系统

一个基于LLM的智能代理系统,支持子代理生成、工作流编排和自主决策,适用于复杂任务的自动化处理。

  • by ThibautMelen
  • 本地部署
  • 326 星标
  • 更新于
在 GitHub 查看 ThibautMelen/agentic-workflow-patterns

使用说明

代理人工智能系统🐔

用鸡来解释代理系统——因为人工智能编排不一定很可怕

主代理像母鸡和小鸡一样孵化次级代理🐔🪺🐦

🦄 基础 • ⚙️ 工作流 • 🐔 自主 • 📜 作为代码 • 🛠️ 实现 • 🗺️ 指南


概述

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8b5cf6', 'primaryTextColor': '#fff', 'primaryBorderColor': '#7c3aed', 'lineColor': '#a78bfa', 'secondaryColor': '#ec4899', 'tertiaryColor': '#6366f1', 'noteTextColor': '#fff', 'noteBkgColor': '#8b5cf6', 'textColor': '#fff' }}}%%
mindmap
  root((🐔 Agentic Systems))
    🦄 Foundations
      Augmented LLM
      What Changed 2026
    ⚙️ Workflows
      🏎️ Baseline
      ⛓️ Chaining
      🚦 Routing
      🛤️ Parallel
      🦑 Orchestrator
      🩻 Evaluator
    🐔 Autonomous Agent
      The Alternative
      Multi-Window
    🛠️ Implementation
      🐦 Subagent
      🦴 Command
      📚 Skill
      🪝 Hook
    📜 Patterns as Code
      Check before
      Trace after

[!提示] 2026年版新增 — 🗞️ 2025-2026年发生了什么变化 (过时的地图:上下文工程、多代理辩论、AGENTS.md·SKILL.md·MCP堆栈、线束工程)和 📜 模式即代码 (每个模式都作为一个可运行的文件-在每次推送时检查CI,不需要API密钥)。

⬆️ real capture: a repeated prompt graduates into a checked, runnable file — every pattern in this repo works this way · and three of them run a real campaign daily 🛰️

🗺️ 导航

🦄 基础

一切的基石

🦄 增强LLM LLM+检索+工具+内存
🗞️ 2025-2026年发生了什么变化 情境工程·技能/MCP堆栈·线束时代

⚙️ 工作流

预定义编排——代码控制流程

# 工作流 使用时间
0 🏎️ 基线 简单的一步式任务
1 ⛓️ 快速链接 顺序步骤
2 🚦 路由 分类和调度
3 🛤️ 并行化 独立任务
4 🦑 协调器 专家代表团
5 🩻 评估者 质量迭代

🐔 自主智能体

动态自主——LLM控制流量

模式 使用时
🐔 自主智能体 开放式问题
🖥️ 多窗口 跨会话状态(变体)

🛠️ 实现

Claude代码组件和架构

组件 位置
🐦 子代理 .claude/agents/*.md
🦴 命令 .claude/commands/*.md
📚 技能 .claude/skills/*/SKILL.md
🪝 钩子 .claude/settings.json

🗺️ 指南 & 📖 参考

资源 描述
选型指南 选择正确的图案
📜 模式即代码 每个模式都是一个可运行、可检查的文件
用例 6个验证示例
词汇表 A-Z定义
视觉标准 颜色和表情符号

快速决定

%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
flowchart LR
    START((🎯 Task)) --> DEST{Destructive?}
    DEST -->|Yes| WIZ[🧙 Wizard]
    DEST -->|No| COMP{Complex?}
    COMP -->|No| BASE[🏎️ Baseline]
    COMP -->|Yes| PRED{Predictable<br/>steps?}
    PRED -->|Yes| WORK{Need<br/>specialists?}
    PRED -->|No| AGENT[🐔 Autonomous]
    WORK -->|No| CHAIN[⛓️ Chain]
    WORK -->|Yes| ORCH[🦑 Orchestrator]

    classDef default fill:#f8fafc,stroke:#64748b,stroke-width:1px,color:#1e293b
    classDef decision fill:#fef3c7,stroke:#f59e0b,stroke-width:2px,color:#92400e
    classDef baseline fill:#64748b,stroke:#475569,stroke-width:2px,color:#ffffff
    classDef wizard fill:#14b8a6,stroke:#0d9488,stroke-width:2px,color:#ffffff
    classDef workflow fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#ffffff
    classDef agent fill:#ec4899,stroke:#db2777,stroke-width:2px,color:#ffffff

    START:::decision
    DEST:::decision
    COMP:::decision
    PRED:::decision
    WORK:::decision
    BASE:::baseline
    WIZ:::wizard
    CHAIN:::workflow
    ORCH:::workflow
    AGENT:::agent
情况 → Use
简单任务(1步) 🏎️ 基线
顺序(2-4步) ⛓️ 快速链接
对输入进行分类 🚦 路由
独立子任务 🛤️ 并行化
多名专家 🦑 编排工人
质量迭代 🩻 评估器优化器
开放式/未知步骤 🐔 自主智能体
破坏性行动 🧙 男巫
长跑(>10分钟) 🖥️ 多窗口上下文

人类分类学

%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
flowchart LR
    subgraph WORKFLOWS["⚙️ WORKFLOWS"]
        direction TB
        W1[🏎️ Baseline]
        W2[⛓️ Prompt Chaining]
        W3[🚦 Routing]
        W4[🛤️ Parallelization]
        W5[🦑 Orchestrator]
        W6[🩻 Evaluator]
    end

    subgraph AGENTS["🐔 AUTONOMOUS AGENT"]
        direction TB
        A1[🐔 The Alternative]
        A2[🖥️ Multi-Window variant]
    end

    CODE[📝 Code controls] --> WORKFLOWS
    WORKFLOWS --> LLM[🧠 LLM controls]
    LLM --> AGENTS

    classDef workflowBox fill:#ede9fe,stroke:#8b5cf6,stroke-width:2px,color:#5b21b6
    classDef agentBox fill:#fce7f3,stroke:#ec4899,stroke-width:2px,color:#9d174d
    classDef control fill:#f1f5f9,stroke:#64748b,stroke-width:1px,color:#475569

    WORKFLOWS:::workflowBox
    AGENTS:::agentBox
    CODE:::control
    LLM:::control

主要区别: 工作流具有预定义的路径(代码控件)。代理决定自己的路径(LLM控制)。


关键规则

%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
flowchart LR
    U1[🙋‍♀️ User] -->|request| MA[🐔 Main Agent]
    MA -->|🪺 spawn| SA1[🐦 Subagent]
    MA -->|🪺 spawn| SA2[🐦 Subagent]
    SA1 -->|result| MA
    SA2 -->|result| MA
    MA -->|response| U2[💁‍♀️ User]

    SA1 x--x|"❌ CANNOT spawn"| SA3[🐦]

    classDef user fill:#6366f1,stroke:#4f46e5,stroke-width:2px,color:#ffffff
    classDef main fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#ffffff
    classDef sub fill:#ec4899,stroke:#db2777,stroke-width:2px,color:#ffffff
    classDef blocked fill:#ef4444,stroke:#dc2626,stroke-width:2px,color:#ffffff,stroke-dasharray: 5 5

    U1:::user
    U2:::user
    MA:::main
    SA1:::sub
    SA2:::sub
    SA3:::blocked

🐦 子代理不能产生其他子代理🐦 次级代理。 所有代表团都通过🐔 主要代理人。


存储库结构

.
├── README.md                      # 🏠 You are here
│
├── foundations/                   # 🦄 Core concepts
│   └── augmented-llm.md
│
├── workflows/                     # ⚙️ Predefined orchestration
│   ├── 00-baseline.md
│   ├── 01-prompt-chaining.md
│   ├── 02-routing.md
│   ├── 03-parallelization.md
│   ├── 04-orchestrator-workers.md
│   └── 05-evaluator-optimizer.md
│
├── agents/                        # 🐔 Autonomous Agent (the alternative)
│   ├── autonomous.md              # The pattern
│   └── multi-window.md            # Variant
│
├── implementation/                # 🛠️ Claude Code specifics
│   ├── components/                # 🐦🦴📚🪝
│   └── architecture/              # 5-layer system
│
├── guides/                        # 🗺️ Selection & use cases
│   └── use-cases/                 # 6 validated examples
│
└── reference/                     # 📖 Glossary, standards

参考文献

资源 链接
构建高效代理 anthropic.com/engineering
克劳德代码文档 docs.anthopic.com
代理SDK docs.anthopic.com/agent-sdk
人类烹饪书 github/anthropics
代理技能规范 agentskills.io 网站
代理人工智能基金会(MCP·AGENTS.md·goose) aaif.io
模式作为可运行文件(此仓库) 模式即代码/

贡献

欢迎投稿!看 贡献.md.

要求: 官方来源•代码示例•美人鱼图•既定格式


用克劳德代码构建|基于人类学文献|2025-2026
独立社区资源——不隶属于Anthropic


 ❤️   🏴‍☠️