How to Build a Long-Running Competitive Research Agent

Adam Lucek39:00
0 comments · 0 votesOpen discussion
Sign in to join the discussion

    Video summary

    The deep-agent pattern extends a normal tool-calling loop with planning, a file system, a detailed prompt and dynamically spawned subagents. Files keep large research artifacts out of the main context window, task lists keep long jobs oriented, and specialist subagents parallelize work without filling the orchestrator's context with every intermediate search.

    The competitive-analysis implementation uses a LangGraph-compatible deep-agent framework and a web-search tool. Its prompt defines research stages, deliverables, citation requirements, behavior around inaccessible information and explicit rules for delegating narrow tasks. Several rules came directly from observed failures, including agents spinning on gated sources, omitting URLs or trying to research everything themselves.

    Model and infrastructure choices are practical constraints. Lucek discusses context-window accounting, API rate limits, search-provider pricing, summarization middleware and recursion limits. He removes the main agent's direct web-search tool so that research must flow through controlled subagents, and bounds unsuccessful searches so an agent reports missing evidence instead of looping indefinitely.

    A measured run comparing Linear and Asana took just over ten minutes, made about 80 model calls, processed roughly 3.08 million tokens, issued 105 searches and spawned eight research agents. It produced two company profiles and a cited comparison for under five dollars. The result shows useful speed and structure, while also exposing the testing cost and operational discipline required. The Brilliant sponsor segment is omitted.

    Original YouTube thumbnailWatch on YouTube