# Perplexity adds Code Mode, letting models write JavaScript that runs tools in parallel

> Perplexity says Code Mode lets models write JavaScript that runs tools in parallel and filters outputs before they enter context.

- Status: reported (One outlet, not independently verified yet.)
- Topic: Products
- Published: 2026-12-04T04:48:11+00:00
- Updated: 2026-12-04T06:09:53.370144+00:00
- Web page: https://ai-news.ikangai.com/story/perplexity-adds-code-mode-letting-models-write-javascript-that-runs-tools-in-par/
- Seen in: Latent Space
- Change: capability (New capability)

## What changed

Perplexity added Code Mode to its agent API, in which the model writes JavaScript that calls tools in parallel.

Perplexity has added a Code Mode to its agent API, in which the model writes JavaScript that calls tools in parallel.

It appears in a list of agent API changes alongside a Gemini API step that alters instructions or tools mid-session without invalidating the cache, and an Anthropic Terraform provider now in public beta.

## Why it matters

Filtering tool output before it reaches the model can cut context costs for agents that call many tools.

## What you can do

If you build agents on Perplexity's API, test whether Code Mode lowers token use on your multi-tool workflows.

---

AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it.

Cite as: IKANGAI AI News, "Perplexity adds Code Mode, letting models write JavaScript that runs tools in parallel", 2026-12-04, https://ai-news.ikangai.com/story/perplexity-adds-code-mode-letting-models-write-javascript-that-runs-tools-in-par/
