首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Agents & Muti-Agents

Agents & Muti-Agents

原创
作者头像
happywei
修改2025-06-23 11:01:10
修改2025-06-23 11:01:10
2210
举报

Building effective agents

Agent的定义有多种。一些客户将Agent定义为完全自主的系统,能够在较长时间内独立运行,使用各种工具完成复杂任务。另一些客户则用该术语来描述遵循预定义工作流程的更具规范性的实现。(博客介绍了6种agent范式)

  • Workflows are systems where LLMs and tools are orchestrated through predefined code paths.
  • Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.

How we built our multi-agent research system

The essence of search is compression: distilling insights from a vast corpus. Subagents facilitate compression by operating in parallel with their own context windows, exploring different aspects of the question simultaneously before condensing the most important tokens for the lead research agent. Each subagent also provides separation of concerns—distinct tools, prompts, and exploration trajectories—which reduces path dependency and enables thorough, independent investigations.

一.

Our Research system uses a multi-agent architecture with an orchestrator-worker pattern, where a lead agent coordinates the process while delegating to specialized subagents that operate in parallel.

When a user submits a query, the lead agent analyzes it, develops a strategy, and spawns subagents to explore different aspects simultaneously. As shown in the diagram above, the subagents act as intelligent filters by iteratively using search tools to gather information, in this case on AI agent companies in 2025, and then returning a list of companies to the lead agent so it can compile a final answer.

Traditional approaches using Retrieval Augmented Generation (RAG) use static retrieval. That is, they fetch some set of chunks that are most similar to an input query and use these chunks to generate a response. In contrast, our architecture uses a multi-step search that dynamically finds relevant information, adapts to new findings, and analyzes results to formulate high-quality answers.

二.

流程图展示了我们多智能体研究系统的完整工作流程。当用户提交查询时,系统会创建一个 LeadResearcher 智能体,并进入迭代研究流程。LeadResearcher 首先会仔细思考方法,并将其计划保存到内存中以持久化上下文,因为如果上下文窗口超过 200,000 个标记,它将被截断,因此保留计划至关重要。然后,它会创建专门的子智能体(此处显示两个,但数量可以任意),并执行特定的研究任务。每个子智能体独立执行网络搜索,使用交叉思维评估工具结果,并将结果返回给 LeadResearcher。LeadResearcher 会综合这些结果,并决定是否需要进一步研究——如果需要,它可以创建其他子智能体或改进其策略。一旦收集到足够的信息,系统就会退出研究循环,并将所有结果传递给 CitationAgent,CitationAgent 会处理文档和研究报告,以确定引用的具体位置。这确保所有声明都正确归属于其来源。最终的研究结果(包括引文)将返回给用户。

P.S.

langchain :

更多是 linear chain,链式顺序执行。 LCEL(LangChain Expression Language)

langgraph:

可以有分支/判断(是否到达 AgentFinisl),有循环。ReAct(Reasoning&Acting),其实本质上也不是linear chain了;

所有节点的输入都是 state,输出会附加一些信息到新的 state 里

state 沿着 edge 从一个 node 到另一个 node 时,state 会发生变化(携带上一个 node 的执行输出信息)

ref:

https://www.anthropic.com/engineering/building-effective-agents

https://www.anthropic.com/engineering/built-multi-agent-research-system

https://www.bilibili.com/video/BV1xqXGYDELg?spm_id_from=333.788.videopod.sections&vd_source=e3c9783779056c386793c407337419a9

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Building effective agents
  • How we built our multi-agent research system
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档