Perplexity announced Code Mode for its Agent API on 3 December 2026, via its Perplexity Developers account, with full details in a company post. The feature lets a model write one short script that calls search and other tools together, rather than returning to the model after every call. On Perplexity's own WANDR research benchmark, the company reported that its xhigh effort level rose from 78.7% to 80.5% while average cost per task fell 31%, from $5.57 to $3.85.
That is a vendor benchmark covering wide and deep research, not ordinary consumer searches. Still, if agents can fan out more searches and fetch more pages for less money, the pages they cite may change. It sits alongside how sites control AI crawlers with llms.txt and robots.txt, because cheaper research usually means more retrieval.
What Perplexity shipped
Code Mode, exposed as programmatic_tool_calling, is now used by default in Perplexity's updated high, xhigh and ultra effort levels, and developers can enable it in custom requests. Instead of a model round-trip after each search, fetch or API call, the model writes JavaScript that calls enabled tools directly, runs independent calls in parallel, deduplicates and filters the raw payloads, and returns only the results that matter to the model.
Scripts run in an embedded QuickJS WebAssembly runtime inside the agent loop, with no sandbox container to boot. Any enabled tool can be called through one interface, including web_search, fetch_url, people_search, finance_search, MCP servers and sandbox tools.
The benchmark numbers, and their limits
Perplexity measured two changes in sequence on WANDR: first a model upgrade, then Code Mode with those same models. That separation matters, because headline savings against November combine both.
| Effort level | Before Code Mode | With Code Mode |
|---|---|---|
| high | Direct tool calls | 47.7% at $0.38 per task, up 2.9 points |
| xhigh | 78.7% at $5.57 per task | 80.5% at $3.85 per task |
| ultra | 88.5% at $12.12 per task | 89.4% at $10.30 per task |
Perplexity evaluated the first 100 of WANDR's 500 tasks, using soft recall with partial credit. Against 5 November presets, xhigh was 47% cheaper and ultra 53% cheaper, but that includes a model upgrade. The cleaner Code Mode-only comparison is 31% at xhigh and about 15% at ultra. No independent replication was published.
Why high effort is the notable change
Until now, code execution was limited to xhigh and ultra. Earlier mid-tier experiments scored lower and cost more, as models made syntax mistakes and misread tool outputs. With newer models, high plus Code Mode reached 47.7% at $0.38 per task, up 2.9 points, without hand-crafted workflows.
A second feature, exec_wait, returns partial output after 10 seconds while a script keeps running in the background. In paired WANDR runs at identical spend, Perplexity reported median duration down 12.5% to 25.3 minutes, the 95th percentile down 40.9%, and the maximum down 56.6%. These are long research jobs, not typical marketing queries.
Why it matters for SEO and GEO
For publishers and marketers, Code Mode does not change Perplexity's consumer ranking or citation rules. The impact is indirect: cheaper parallel research makes it more economical for API agents to check multiple sources and compare prices or specifications before answering. That favours fetchable, clearly structured, consistent pages.
It also reinforces a point in research on how slowly AI crawlers fetch new pages: being indexed is not the same as being retrieved well. Check that key facts survive a plain fetch, using our JavaScript SEO guide for AI crawlers. None of this guarantees citations.
Frequently asked questions
When did Perplexity announce Code Mode?
Perplexity Developers announced it on 3 December 2026, and Perplexity published the detailed post explaining the feature, benchmark method and setup. Sulat AI & Tech News reported the launch on 4 December 2026. The feature is described as available now in the updated effort levels.
How much cheaper is Code Mode, according to Perplexity?
On WANDR, xhigh fell from $5.57 to $3.85 per task, a 31% reduction, while its score rose to 80.5%. Ultra fell from $12.12 to $10.30 per task, about 15%, with its score rising to 89.4%. These are Perplexity's own benchmark figures, not independently verified results.
Which tools can a Code Mode script call?
Perplexity says any enabled Agent API tool marked for programmatic calling, including web search, page fetch, people search, finance search, MCP servers and sandbox tools. Developers enable it by adding programmatic_tool_calling and setting allowed_callers on each tool a script may use.
Does Code Mode change Perplexity consumer search results?
Perplexity has not said that it does. Code Mode is an Agent API execution change for developers building research agents. Any effect on citations would be indirect, through agents searching more broadly or filtering sources differently, and that has not been measured publicly.
What it means
Code Mode is best read as an efficiency release with search consequences, not a ranking update. If Perplexity's numbers hold on real workloads, deep research agents get cheaper and slightly better at the same time, which usually leads to more retrieval per question. For site owners, the sensible response is unglamorous: make key pages easy to fetch, keep facts current and consistent, and measure agent referrals before spending on speculative optimisation.
Sources: Perplexity, 3 December 2026; Sulat AI & Tech News, 4 December 2026.


