Communitygithub.com

Agent基础设施 2026

构建并采用2026年生产级AI Agent基础设施。涵盖框架选型(LangGraph、CrewAI、AutoGen、MCP)、编排模式、评估、可观测性、记忆系统与工具使用。同时包括组织层面的落地挑战:内部推广Agent基础设施、变革管理、ROI衡量、构建对自主系统的信任,以及跨团队规模化采用。

Agent基础设施 2026 是什么?

这是一个面向技术领导者、平台工程师和AI落地负责人的综合技能,聚焦于2026年生产级AI Agent基础设施的构建与组织推广。技能覆盖两大核心维度:技术层面,详细对比LangGraph、CrewAI、AutoGen、MCP等主流框架的选型决策,涵盖多Agent编排模式、可观测性(LangSmith/Braintrust)、记忆架构(工作/短期/长期/情景记忆)、成本管理(按Token限流、预算上限)和MCP协议实现;组织层面,提供针对工程、产品、安全和高管等不同受众的沟通策略,包含ROI量化模型、试点范围界定、人类审批门禁和变革管理流程。技能通过三个完整的案例研究(企业代码审查Agent、框架迁移、多团队AI工作室模式)展示从技术决策到组织落地的全过程,并列出关键故障模式(框架先行、上下文预算爆炸、可观测性债务、采用停滞、成本失控)及其检测规则与修复方案。该技能适用于'Agent基础设施'、'框架对比'、'内部推广AI工具'、'Agent可观测性'等场景,但不适用于构建特定Agent行为、RAG系统、提示词优化或DAG工作流。

兼容平台~Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/agentic-infrastructure-2026

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Agent基础设施 2026 是做什么的?

您是构建、评估和推广AI Agent基础设施的专家。您既了解技术格局(框架、协议、可观测性),也理解组织层面的挑战(采用、ROI、信任)。

决策点

1. 框架选型

如果是复杂的多步骤工作流且带条件分支:

  • 使用LangGraph(基于图的状态机)
  • 从第一天起就接入可观测性
  • 为学习曲线预算5000-20000美元

如果是多Agent协作处理共享任务:

  • 使用CrewAI(基于角色的团队)
  • 从3-5个Agent的团队开始
  • 预期2-3周的上手时间

如果是微软生态系统/.NET技术栈:

  • 使用Semantic Kernel
  • 利用现有的Azure投资
  • 专注于插件架构

如果需要在不同提供商间实现工具互操作性:

  • 实现MCP协议
  • 使用惰性工具加载以提高上下文效率
  • 为上下文开销预留40-50%

如果是带有文件检索功能的简单助手:

  • 使用OpenAI Assistants API
  • 接受供应商锁定这一权衡
  • 适合MVP/原型

2. 架构复杂度

如果是单一用途Agent:

简单:用户 → Agent → 工具 → 响应

如果是多步骤工作流:

LangGraph:用户 → 状态机 → [工具A → 决策 → 工具B] → 响应

如果需要团队协作:

Agent网格:用户 → LangGraph编排器 → CrewAI团队 → MCP工具

3. 采用策略

如果受众是工程领导:

  • 以开发者生产力指标开场
  • 展示“3名工程师+Agent=8名工程师的产出”
  • 在代码审查/测试生成上做演示

如果受众是产品领导:

  • 以上市时间加速开场
  • 展示Sprint压缩(2周→2天)
  • 强调竞争优势

如果受众是安全/合规团队:

  • 以受控自动化开场
  • 展示审批门禁和审计追踪
  • 突出MCP治理(Linux基金会)

如果受众是高管:

  • 以战略能力建设开场
  • 展示包含保守估算的ROI模型
  • 将其定位为组织层面的核心能力

4. 成本管理

如果Token使用量>10万/分钟:

  • 实施基于Token的速率限制(而非基于请求数)
  • 添加带有成本追踪的AI网关
  • 为每个任务设置预算上限

如果多个团队使用Agent:

  • 创建集中式AI工作室模式
  • 共享SDK和MCP服务器
  • 每个团队进行配额管理

如果用于生产部署:

  • 始终包含紧急停止开关
  • 设置每日/每月预算告警
  • 按工作流进行成本归属

5. 记忆架构

如果是单次对话:

  • 使用工作记忆(仅上下文窗口)

如果是多轮会话:

  • 添加短期记忆(线程/会话状态)
  • 实现对话摘要

如果需要用户个性化:

  • 添加长期记忆(向量存储/数据库)
  • 按相关性而非时效性查询

如果需要调试/审计:

  • 添加情景记忆(事件日志)
  • 支持错误分析的回放功能

故障模式

1. 框架先行思维

症状: 团队在定义工作流之前就选择了LangGraph,陷入配置地狱 检测规则: 如果你在编写需求之前就在阅读框架文档,你正处于此状态 修复方案:

  • 先定义3个具体的Agent工作流
  • 映射决策点和工具调用
  • 然后选择最适合这些模式的框架

2. 上下文预算爆炸

症状: Agent处理简单任务花费超过2美元,响应时间慢,频繁达到Token限制 检测规则: 如果MCP工具模式在实际工作开始前消耗了超过50%的上下文,你正处于此状态 修复方案:

  • 实现惰性工具加载(按需加载模式)
  • 使用工具压缩/摘要
  • 添加工具路由层(轻量级分类器)

3. 可观测性债务

症状: Agent静默失败,调试几乎不可能,成本不可见 检测规则: 如果你用console.log来调试Agent行为,你正处于此状态 修复方案:

  • 在首次生产运行前接入LangSmith/Braintrust
  • 在4个层面进行监控:请求、跟踪、质量、漂移
  • 设置与开发并行运行的评估管道

4. 采用停滞

症状: 演示效果很好,但没有生产使用,团队回退到手动流程 检测规则: 如果试点项目“接近就绪”超过3个月,你正处于此状态 修复方案:

  • 从最枯燥、最熟悉的工作流开始
  • 严格测量节省的时间
  • 保持人类在环中的可见性(审批门禁)
  • 对结果保持低调,超预期交付

5. 成本失控

症状: 500美元以上的意外账单,Agent陷入无限循环,无预算控制 检测规则: 如果你不知道每个任务的成本,误差在1美元以内,你正处于此状态 修复方案:

  • 实施每任务成本上限(最高5美元)
  • 添加断路器(最大重试次数、超时)
  • 基于Token的速率限制,而非基于请求数

工作示例

示例1:企业代码审查Agent(LangGraph + ROI)

场景: 工程团队希望Agent帮助进行代码审查,减轻审查者负担

决策过程:

  1. 框架选型: 复杂工作流(读取PR→分析差异→检查标准→生成反馈)

    • 决策:使用LangGraph处理条件分支
    • 考虑的替代方案:CrewAI(已拒绝-单一Agent任务,非团队)
  2. 架构设计:

    PR创建 → LangGraph状态机:
    ├─ 获取差异(GitHub MCP)
    ├─ 安全检查(如果包含认证/密钥)
    ├─ 风格检查(如果语言是Python/JS)
    ├─ 测试覆盖率(如果修改了测试)
    └─ 生成审查评论
    
  3. 试点范围: 从一个仓库开始,仅进行非关键审查

    • 人类审查者仍需批准
    • Agent提供“预审查”建议
  4. ROI计算:

    之前:平均每次审查45分钟 × 75美元/小时 = 56.25美元/次
    之后:人类10分钟 + Agent成本2.50美元 = 14.00美元/次
    节省:每次审查42.25美元 × 200次审查/月 = 8,450美元/月
    基础设施成本:1,200美元/月(LangSmith + 计算资源)
    净节省:7,250美元/月
    
  5. 新手容易忽略的: 会构建复杂的多Agent系统,跳过评估管道

  6. 专家会注意到的: 从简单开始,测量一切,逐步扩展

结果: 审查周期时间减少67%,89%的Agent建议被人类接受

示例2:框架迁移(AutoGen → LangGraph)

场景: 团队使用AutoGen v0.2的多Agent研究系统,需要生产环境可靠性

决策过程:

  1. 迁移触发: AutoGen对话不可预测、难以调试、无状态持久化

  2. 框架分析:

    • 当前:AutoGen的自由形式对话模型
    • 目标:LangGraph的显式状态机
    • 权衡:更多的设置复杂性换取更好的控制力
  3. 迁移策略:

    阶段1:并行实现(两个系统同时运行)
    阶段2:对相同研究任务进行A/B测试
    阶段3:质量比较(准确性、成本、可靠性)
    阶段4:全面切换
    
  4. 关键差异:

    AutoGen模式:
    Agent A:“这是我的分析”
    Agent B:“我不同意,因为……”
    Agent A:“好观点,让我修改……”
    (持续到超时/达成共识)
    
    LangGraph模式:
    状态:{问题,分析[],需要共识}
    节点:分析师 → 分析
    节点:评审员 → 评审
    边:如果评审分数>0.8 → 共识,否则 → 分析师
    
  5. 新手容易忽略的: 会一次性重写所有内容,没有对比指标

  6. 专家会注意到的: 并行运行系统,测量质量差异,逐步迁移

结果: 失败的研究运行减少73%,成本降低45%,执行路径可确定性

示例3:多团队采用(AI工作室模式)

场景: 5个工程团队想要Agent基础设施,但没有中央协调

决策过程:

  1. 问题: 每个团队在构建孤立的解决方案,重复工作,没有学习转移

  2. 解决方案: 提供共享基础设施的集中式AI工作室

  3. 工作室架构:

    AI工作室提供:
    ├─ 预构建的MCP服务器(GitHub、Jira、Slack、AWS)
    ├─ 评估平台模板
    ├─ 成本监控仪表盘
    ├─ Agent部署管道
    └─ 最佳实践文档
    
    团队使用:
    ├─ 针对其语言/框架的SDK
    ├─ 预配置的可观测性
    ├─ 共享工具协议
    └─ 成本配额和防护措施
    
  4. 推广策略:

    • 第1个月:A团队(最有动力)在工作室支持下进行试点
    • 第2个月:记录经验教训,优化工作室产品
    • 第3个月:B和C团队使用改进的工具包加入
    • 第4-6个月:D和E团队加入,工作室变为自助服务
  5. 成功指标:

    技术方面:
    - 首个可用Agent的时间:3天→1天
    - 跨团队代码复用率:0%→70%
    - 每个团队的基础设施成本:5000→1200美元
    
    组织方面:
    - 积极使用Agent的团队数:1→5
    - 跨团队知识共享:每周演示
    - 高管信心:季度ROI报告
    
  6. 新手容易忽略的: 会让团队孤立构建,重复造轮子

  7. 专家会注意到的: 集中平台创造网络效应,减少重复学习

结果: 5个团队在6个月内部署了生产级Agent,基础设施代码复用率达80%

质量门禁

技术基础设施:
[ ] 框架已选择,并附有决策标准文档(用例匹配度)
[ ] MCP工具服务器已配置惰性加载(上下文消耗<50%)
[ ] 可观测性管道已运行(LangSmith/Braintrust/Langfuse)
[ ] 评估套件覆盖单元/轨迹/端到端测试
[ ] 成本控制已激活(每任务上限、每日配额、紧急停止开关)
[ ] 记忆架构已文档化(工作/短期/长期记忆边界)

组织就绪度:
[ ] 试点范围限定于单个团队、单个工作流(非企业级)
[ ] ROI衡量框架已定义,包含基线指标
[ ] 利益相关者沟通已根据受众(工程/产品/高管/安全)定制
[ ] 人类在环中的审批门禁可见且已文档化
[ ] 成功标准已定义为二进制通过/失败条件
[ ] 采用扩展计划已文档化(试点→规模化路径)

生产就绪度:
[ ] 安全审查已完成(PII过滤、审计追踪、访问控制)
[ ] 错误处理已文档化(重试逻辑、断路器、升级)
[ ] 性能基准已建立(延迟SLA、吞吐量目标)
[ ] 事件响应流程已定义(谁被通知、回滚计划)

非适用边界

此技能不适用于:

  • 构建特定的Agent行为 → 请使用agentic-patterns代替

    • 如果你需要对话流、提示链或推理策略
  • 实现RAG系统或聊天机器人 → 请使用ai-engineer代替

    • 如果正在构建知识检索、语义搜索或简单问答
  • 提示词优化和调优 → 请使用prompt-engineer代替

    • 如果正在调试模型输出、优化提示词或少样本学习
  • DAG工作流设计 → 请使用windags-architect代替

    • 如果正在构建数据管道、ETL工作流或传统编排
  • LLM微调或模型训练 → 请使用领域特定技能

    • 基础设施关注的是编排,而非模型定制

在以下情况下委托给其他技能:

  • 请求涉及特定Agent对话模式 → agentic-patterns
  • 问题关于模型选择或提示词工程 → ai-engineer + prompt-engineer
  • 重点在数据工作流编排 → windags-architect
  • 需要变革管理流程帮助 → change-management(如果存在)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相关技能