One agent, many runs
Create the agent once with a stable name, then run it per batch.agent_name on agents.run creates the agent on the first call and reuses it on every later call. Override sources or output_schema per run only when a batch needs it; the agent’s stored configuration is unchanged.
Batch sizes
Discovery, then enrichment
Two agents beat one wide one. The first finds entities and returns identity fields (name, domain, one or two filters). The second takes those rows asinput_data and fills the columns. Each stays narrow, each can be re-run on its own, and the join key is yours.
An orchestration loop
The shape of a loop that finishes. Adapt the storage and retry policy to your stack.Python
- Concurrency below the account limit, leaving room for other traffic. Default limits are 30 concurrent agents and 200 runs per day.
- A stuck threshold. Runs that stay active past 30 minutes at
highare rare and usually a platform issue. Resubmit once; do not loop forever. - Idempotent submission. The agent name is stable, so a retried batch hits the same agent with the same configuration.
- A ledger keyed on your identifier, not on run ids. The API reports runs, not coverage of your list.
- Dedupe after every merge. Duplicate rows across runs happen.
Carry state between runs
Pass what you already have back in asinput_data with an instruction: “exclude the domains in input_data” for discovery, or the completed rows for an enrichment top-up. Do not paste lists into the prompt. previous_interaction_id continues a research thread on one entity; it is not a way to carry a dataset forward.
What Jobs does today
Extract Jobs schedule Extract Templates over an input list and deliver to S3, Databricks or a warehouse. They do not run Web Search Agents yet. For a scheduled agent job, run the loop above from your scheduler.Next Steps
Effort and Cost
Size the job before you run it
Evaluating Results
Canaries and ground truth
Rate Limits
Account defaults and how to raise them