Introducing Search as Code, our new search architecture for AI agents. It writes Python that calls our search stack directly, instead of looping through function calls one at a time. Available in the Perplexity Agent API, and now default in Computer. https://t.co/ut6GGWQTVO

@PPLXDevs The traditional tool-calling approach suffers from high latency, manual control flow, and context pollution. With Search as Code, the model composes search primitives: fanning out queries asynchronously, deduping, filtering, joining, and ranking before results hits its context.

We tested Search as Code on deep research (DSQA, BrowseComp, HLE) and wide research benchmarks (WideSearch, WANDR). It matches or beats every competing system across all five.

It also sets a new cost-performance frontier. On DSQA it scores 0.871, ahead of Anthropic's 0.815, at nearly half the cost per task. On WideSearch it leads on score while running cheaper.


Having the model compose search in code rather than loop through tool calls cuts latency and keeps raw results out of , and the reported numbers show it matching or beating competing systems at roughly half the cost per task.
Checking sign-in…
Loading comments…