OpenAI Agents SDK missed live Amazon prices — fixed with search + rendering-fetch tool split
InsideDebt6345 · reddit · 2026-09-02
While building a product research agent with the OpenAI Agents SDK, the author found WebSearchTool returns indexed content, not the fully rendered page — and on retail sites, price and availability only appear after JavaScript runs, so the agent confidently reported prices as invisible.
The fix: split into two tools.
- WebSearchTool for discovery and finding product URLs;
- A functiontool fetching the fully rendered content of a known URL (built with ZenRows auto mode + Markdown output; Firecrawl or Playwright would work too).
Tool descriptions were the make-or-break detail: the agent kept choosing search even after it had a URL, until the descriptions made explicit that fetch is for current content from known URLs and search is for discovery. The flow now: search to find pages, fetch rendered pages for live fields like price and stock. The author asks the community: do you let the model decide when to fetch, or enforce a fetch step once a URL is in hand?
More from coding & agent
- Claude Code generates Raspberry Pi case in minutes via AgentCad — shekitup · 2026-09-02
- Why Prime Agent Chose RLM Trajectories Over Prompt Tuning — CShorten30 · 2026-09-02
- Rohan Paul: Use Auth0 over generated auth code in the Vibe coding era — rohanpaul_ai · 2026-09-02
- Kernel rewrites Go proxy for agents, speeding up wakeups by 92% — ycombinator · 2026-09-02
- Rewriting LibreOffice for Better Agent Compatibility — peterjliu · 2026-09-02
- Longer AI agents may just mean more cascading failures to debug — OverAgentRoger · 2026-09-02