
Perplexity has launched 'Search as Code,' an architecture that lets AI models write Python scripts to customize their own search workflows rather than rely on fixed APIs. Instead of repeatedly querying a rigid search engine, models can now filter, deduplicate, and rerank results directly. In a test tracking 200 critical software vulnerabilities, the approach used 85 percent fewer tokens while competitors retrieved far less accurate data.
Summaries like this, in your inbox every morning.
Sign up free →What happened
Perplexity introduced 'Search as Code,' which lets AI models write Python scripts to run custom search pipelines instead of calling fixed search APIs. The model builds tailored workflows using basic search operations like filtering and reranking, all executed in a secure sandbox. The feature is now rolling out in Perplexity Computer and the Agent API.
Why it matters
Traditional search APIs force AI agents into rigid loops—query, get results, read, repeat—wasting tokens on irrelevant data. By writing code to filter and deduplicate programmatically, models stay focused and use fewer tokens. In a real-world test tracking 200 critical software vulnerabilities, the system used 85 percent fewer tokens than the standard pipeline while competitors retrieved less than a quarter of the correct data.
What to watch
Perplexity claims Search as Code led on four out of five internal benchmarks against OpenAI's Responses API and Anthropic's Managed Agents, with the largest gap on 'WANDR,' Perplexity's own broad research benchmark (to be released soon). The company frames this as part of a trend where frontier AI systems combine reasoning with deterministic code execution for stronger performance.
AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.
Free · takes 30 seconds · unsubscribe anytime
No comments yet. Be the first to share your thoughts!
Log in to join the discussion





Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.
Get Started FreeFree · takes 30 seconds · unsubscribe anytime
1 minute a day. The AI essentials.
200+ sources · Email / LINE / Slack