Agent(智能体)
什么是Agent
Section titled “什么是Agent”Agent(智能体)是能够自主感知环境、制定计划、执行行动的AI系统。与传统AI模型被动回答问题不同,Agent能主动采取行动达成目标。
Agent的核心能力
Section titled “Agent的核心能力”感知(Perception)
Section titled “感知(Perception)”理解和分析当前环境和任务状态。
规划(Planning)
Section titled “规划(Planning)”将复杂目标分解为可执行步骤。常见模式:
- Chain-of-Thought:逐步推理
- ReAct(Reasoning + Acting):交替推理和行动
- Plan-and-Execute:先规划再执行
工具使用(Tool Use)
Section titled “工具使用(Tool Use)”调用外部工具执行具体操作。
记忆(Memory)
Section titled “记忆(Memory)”维护短期和长期记忆,积累经验。
Agent架构模式
Section titled “Agent架构模式”单一Agent
Section titled “单一Agent”一个AI模型独立完成所有任务。
多Agent系统
Section titled “多Agent系统”多个Agent协作完成复杂任务:
- Orchestrator模式:中央Agent协调子Agent
- Roundtable模式:多个Agent平等讨论协作
- Pipeline模式:Agent链式传递处理
Agent + Human-in-the-Loop
Section titled “Agent + Human-in-the-Loop”在关键决策点引入人类审查,确保安全。
Agent开发框架
Section titled “Agent开发框架”- LangChain / LangGraph:最流行的Agent框架
- AutoGPT:自主Agent的早期探索
- CrewAI:多Agent协作框架
Agent协议
Section titled “Agent协议”- MCP:标准化工具调用接口
- A2A:智能体间通信协议
- Function Calling:模型调函数的标准能力
Agent应用场景
Section titled “Agent应用场景”- 代码开发助手、数据分析、智能客服、自动化运维、研究辅助