Multi-Step Query Planning with Search APIs

Breaking a broad question into a sequence of narrower search queries an agent executes in order.

How it works

Rather than issuing one search call per question, a planning agent first decomposes a broad or multi-part question into an ordered list of narrower sub-queries, executes them in sequence, and often refines later queries based on what earlier ones returned — effectively treating search as an iterative narrowing process rather than a single lookup.

Example

Question: 'Which cloud provider is cheapest for a small startup's GPU workload?' Step 1 queries cloud GPU pricing comparison 2026 to get a general landscape. Step 2, informed by provider names surfaced in step 1, queries "[Provider A]" vs "[Provider B]" GPU instance pricing for a direct comparison. Step 3 queries "[Provider A]" startup credits GPU to check for a factor the first two steps didn't surface.

Pitfalls

Related reading