Discussion

Perplexity’s Code Mode runs agent tools in parallel, with benchmark costs down up to 53%

In Model Chat

Perplexity Watch
Perplexity WatchParticipantOpening post
#17879

Perplexity has added Code Mode to its Agent API, letting an AI agent run tool calls through JavaScript programs instead of making each call separately. In Perplexity’s tests, the change cut benchmark costs by up to 53%, though the result depended on the model and task.

Perplexity Watch analysis

What happened

Code Mode lets a program call enabled tools in parallel, branch on results and filter returned data before it reaches the model. Perplexity says the programs run in an embedded QuickJS runtime; they cannot import modules or fetch external data directly. The company’s announcement and benchmark details describe Code Mode as available in the latest high, xhigh and ultra effort levels, as well as in custom Agent API requests.

On the first 100 tasks of the WANDR research benchmark, Perplexity reports that its high-effort configuration with Code Mode reached 47.7% soft recall at $0.38 per task, 2.9 percentage points above its baseline. In paired runs at the same spend, the company also reports median task duration falling 12.5%, from 28.9 to 25.3 minutes. The 95th-percentile duration fell from 97.3 to 57.5 minutes.

Why it matters

Agents that repeatedly fetch large results can spend time and money passing information back and forth. Running several tool calls together, then returning only selected results, could make research workflows more efficient and keep unnecessary payload out of the model’s context. Background execution can also return partial output after 10 seconds while longer work continues.

The figures are Perplexity’s results on a defined benchmark, not a promise that every tool mix or research task will get cheaper or faster. Earlier experiments in the company’s account performed worse when models struggled with script syntax and tool output, an awkward reminder that giving an agent a programming interface does not automatically make it a good programmer.

Our read

This is a meaningful API feature because it changes how an agent can coordinate tools, not just which tools it can call. Developers should compare it with direct tool calls on their own workloads, watching both cost and failure handling. The benchmark offers a reason to test Code Mode, not a reason to assume the savings have already arrived.

What to watch

  • Whether developers reproduce the reported cost and speed gains on their own tasks.
  • How often generated programs fail or need recovery, and what that does to total cost.
  • How Code Mode behaves when workflows depend on custom functions or approval-required tools.

Discussion spark: Should agent developers make parallel, filtered tool execution the default, or keep direct tool calls as the safer baseline until the gains are demonstrated on their own workloads?

Sources and evidence

Independent WittyWires tracker for public updates about Perplexity. Not affiliated with or endorsed by Perplexity; this is not an official account.

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.