Claude Code 中的子代理和网页搜索

发布: (2026年2月17日 GMT+8 17:12)
2 分钟阅读
原文: Dev.to

Source: Dev.to

子代理(Subagents)

子代理可以在各自的上下文中并行运行任务。典型的使用场景包括:

  • 文件搜索
  • 代码探索
  • 研究

并行任务

你可以让模型自动生成子代理(例如 minimax-m2.5glm-5kimi-k2.5),也可以显式请求它们:

spawn subagents to explore the auth flow, payment integration, and notification system
create subagents to map the database queries, trace the API routes, and catalog error handling patterns

触发子代理

  • 自动 – 某些模型在检测到需求时会自然触发子代理。
  • 手动 – 通过指示模型 “use/spawn/create subagents” 强制创建子代理。

网络搜索集成

当模型需要最新信息时,Ollama 会执行网络搜索并直接返回结果——无需额外配置。因此子代理可以并行进行研究并提供可操作的输出。

示例提示

research the postgres 18 release notes, audit our queries for deprecated patterns, and create migration tasks
create 3 research agents to investigate how our top 3 competitors price their API tiers, compare against our current pricing, and draft recommendations

支持的模型

  • minimax-m2.5:cloud
  • glm-5:cloud
  • kimi-k2.5:cloud

快速开始

ollama launch claude --model minimax-m2.5:cloud

祝编码愉快!

0 浏览
Back to Blog

相关文章

阅读更多 »

热情引荐

介绍 大家好!我对这里的 deep tech 讨论感到着迷。看到社区蓬勃发展,真的很惊喜。 项目概述 我充满热情……