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

相关文章

阅读更多 »

AI 编码工具:为什么开发者意见不合

AI‑Coding“辩论”并非真正的辩论 你会听到两个截然不同的故事: 朋友的创业公司创始人——“我们的团队现在使用 AI,功能发布速度提升了一倍。我是 e...”

谁在招聘 — 2026年2月

在以开发者为先的公司开放职位:产品工程师、Developer advocates 或 Community builders?以全新的 dev tools 机会开启新的一年。