Perplexity Agent API adds Code Mode: model writes JS to call tools in parallel
AravSrinivas · x · 2026-12-04
Arav Srinivas of Perplexity argues standard tool calling treats the LLM like a slow, expensive for-loop: every search, page fetch, or API call forces a full model round-trip and dumps raw payloads (HTML, transcripts, JSON) into the context window. A wide research task burns dozens of forward passes and fills working memory with raw text just to gather inputs.
Perplexity's Agent API now adds Code Mode (programmatictoolcalling): instead of calling tools one JSON turn at a time, the model writes a short JavaScript script that runs tools in parallel, processes the outputs, and returns only what it needs back into the context.
Related event: Perplexity CEO Explains Code Mode Design Philosophy(4 posts)→
More from coding & agent
- Cognition raises $3B+ at $78B valuation as revenue hits $1.4B run-rate — ns123abc · 2026-12-04
- GitHub launches public preview of SHA-256 Git repositories, a more secure default-to-be — 0xkarasy · 2026-12-04
- Datadog engineers watch Luna and Claude Opus play RollerCoaster Tycoon — dylan_ebert_ · 2026-12-04
- Claude only reads secondhand page summaries — Elicit's fix: give the model full texts — jungofthewon · 2026-12-04
- "One ephemeral environment per command or test": why median cloud env lifetime is under a minute — charliermarsh · 2026-12-04
- Code Mode exposes all Agent API tools through a single typed tools.* interface — AravSrinivas · 2026-12-04