
Advanced
一个多步智能体,会搜索、阅读、比较,交回一份带出处的简报,而不是一段自信的话。
定义三个工具:搜索、抓取页面、保存发现。让智能体循环,直到它有了足够的证据,然后在 UI 里渲染工具时间线,好让用户能审计每一步。
零件
- 带步数上限的工具调用
- 带来源 URL 的发现表
- 工具活动时间线 UI
- 导出到 markdown
怎么赚钱
按报告收费。市场调研、竞品拆解和尽调简报,都能当作一次性的交付物来卖。
搭建耗时
两个晚上
Build a research agent with tool calling. Tools: web_search(query), fetch_page(url), save_finding(claim, source_url, confidence). Give each tool a narrow input schema and a short description. Loop: allow at least fifty steps, stop when the agent has five saved findings or decides the question is answered. Never let the agent answer without at least two independent sources. Output: a brief with a one paragraph answer, a bullet list of findings, and a sources section. Save the brief to a "reports" table. UI: stream the answer, render every tool call as a timeline row with its input and a compact result, and add a copy button plus markdown export.
#tools#agent-loop#research