Why I combined fetching and extraction in one agent tool

Reddit r/AI_Agents Tools

Summary

作者分享在用 OpenAI Agents SDK 和 ZenRows 构建线索生成 agent 时,将抓取与抽取合并为单一工具以避免 540K 字符上下文溢出的实践,包括确定性管线设计、错误处理策略与性能结果。

I’ve been building a lead-generation agent with the OpenAI Agents SDK and ZenRows. It takes a plain-language ICP and a directory URL, extracts companies, checks their websites, and returns a ranked JSON list with a score and reasoning. The first version exposed fetching and extraction as separate agent tools. That failed on a real directory page because the fetched Markdown was about 540K characters. Passing it from fetch_page into extract_leads meant putting the entire document into the model context, which caused a context overflow. I combined those steps into one tool: discover_leads = fetch page → extract companies → return compact Lead records The model receives the records, not the full page. Enrichment and scoring had a similar issue. Website excerpts were large enough that the model started summarizing them before scoring, so I moved those steps into a second tool: qualify_lead = enrich one lead → score it → return reasoning The four underlying functions still exist and can be tested independently. Large intermediate results stay in Python, and a failed enrichment can retry a single lead without restarting the run. A few other changes helped: A 429 returns a retry instruction, while a 403 tells the agent not to retry. One bad URL no longer ends the entire run. The agent follows a fixed sequence: discover, qualify leads with websites, sort, and return. On one Clutch page, the pipeline extracted 78 companies and scored the first 10 in under 20 seconds each. The reasoning was more useful than the score because it showed what evidence was missing, such as case studies without named clients. For multi-step agents, where do you draw the line between model orchestration and deterministic code? How much of the workflow should the model control once the data-processing steps are reliable?
Original Article

Similar Articles

This article systematically reviews AI Agent architecture and engineering practices, covering control flow, context engineering, tool design, memory, multi-agent organization, evaluation, tracing, and security. It is based on the OpenClaw implementation and emphasizes the critical role of Harness (testing and validation infrastructure) for system stability.

X AI KOLs

This article systematically reviews AI Agent architecture and engineering practices, covering control flow, context engineering, tool design, memory, multi-agent organization, evaluation, tracing, and security. It is based on the OpenClaw implementation and emphasizes the critical role of Harness (testing and validation infrastructure) for system stability.

@AxtonLiu: https://x.com/AxtonLiu/status/2073791557547794579

X AI KOLs Timeline

This article discusses the concept of Agent OS, emphasizing the division of tasks into multiple workstations (fetch, refine, verify, confirm) through specialization, each managed by an independent Agent to achieve controllable automation. The author uses the example of digesting browser tabs to demonstrate how specialization isolates context, responsibility, and risks, ensuring the accuracy and reliability of AI output.

Deep Research Tools for Agents: The Alternatives I Found

Reddit r/ArtificialInteligence

作者对比了 11 种可在编码 Agent 内运行或由 Agent 驱动的深度研究工具,涵盖报告生成、表格输出、来源聚合与审计层等类别,并讲述了自己 fork 其中一个项目后进行改造的过程与发现。

@knoYee_: https://x.com/knoYee_/status/2062780637677752366

X AI KOLs Timeline

The author reviews three months of experience using multi-agent collaboration, summarizing five main pain points (such as conflicts between agents, ignoring boundary conditions, self-censorship failure, difficulty in merging decisions, and exposing harder problems after compressed execution) and two insights (the high value of read-only review agents, and that agent conflicts expose ambiguous requirements), emphasizing the core decision-making role of humans in AI collaboration.