Perplexity has added Code Mode to its Agent API, allowing AI models to write JavaScript scripts that run tools in parallel outside the context window. The update reduces redundant round-trips and keeps raw data out of context, improving both accuracy and cost.