📊 Full opportunity report: Search as Code: Perplexity Is Right About the Future — Just Not First to It on ThorstenMeyerAI.com — validation score, market gap, and execution plan.
TL;DR
Perplexity has unveiled Search as Code (SaC), a new approach that allows AI systems to assemble custom search pipelines using modular primitives. This innovation aims to improve retrieval accuracy and efficiency for AI agents, marking a significant step forward. However, some claims are based on proprietary benchmarks, and broader validation is pending.
Perplexity has introduced Search as Code (SaC), a new architecture that enables AI agents to assemble custom retrieval pipelines by writing code, rather than relying on fixed search endpoints. This development aims to address limitations in traditional search systems, especially for complex, multi-step AI tasks, and could significantly enhance retrieval accuracy and efficiency.
On June 1, 2026, Perplexity’s research team published a detailed explanation of SaC, arguing that traditional search methods are ill-suited for agent-based AI workflows that require hundreds or thousands of retrieval operations per minute. SaC exposes core search functions—retrieval, filtering, ranking, and rendering—as atomic, composable primitives within a Python SDK, allowing models to generate and execute code to tailor search pipelines dynamically.
The approach involves three layers: the language model as the control plane, a sandbox for deterministic execution, and the primitive set of retrieval functions. This design enables models to fetch, filter, and assemble data more flexibly, filling gaps where predefined APIs fall short. Their case study on identifying high-severity vulnerabilities reported 100% accuracy while reducing token usage by 85%, outperforming other systems by a wide margin.
Perplexity reports SaC leading on four out of five benchmarks, tying for first on a fifth, and delivering up to 2.5× better results on their proprietary WANDR benchmark. The system’s cost-performance ratio also favors lower-cost configurations, suggesting practical advantages for deployment.
Search as Code
Perplexity says agents shouldn’t call a search engine — they should program one, composing atomic primitives into a bespoke pipeline in a sandbox. The thesis is right. It’s also the search-shaped version of an idea the field has been converging on since 2024.
Monolithic search

JCTLIYXG Multi Surface Pipe Profiling Tool, Pipe Cutting Template Multi Functional Shape Duplicator, Lightweight and Wear-Resistant Fiberglass Material for Tiles Floors DIY Pro Plumbing (0-6" Pipes)
Multi-Surface Shaping with Precision: Achieve accurate pipeline shaping and surface shaping at any angle. This pipe profile tool…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Programmable primitives
Directionally right, genuinely engineered — the rebuilt-from-atoms search stack is the part rivals can’t cheaply copy. But it’s a strong execution of an industry-wide idea, validated mostly on benchmarks Perplexity ran itself. The moat is the infrastructure and the tuning loops, not the architecture.
Python SDK search primitives
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Potential Impact of Search as Code on AI Search Strategies
This development signals a shift toward more flexible, programmable search architectures that give AI systems greater control over data retrieval processes. If validated broadly, SaC could enable AI agents to perform complex, multi-step information gathering tasks more accurately and efficiently, impacting fields from cybersecurity to research automation. However, the reliance on proprietary benchmarks and the overlap with prior ideas in the field mean broader adoption and validation are needed before the full impact is clear.

Pro Tools Perpetual License NEW 1-year software download with updates + support for a year
Full version, permanent License of Avid Pro Tools. Includes 1-Year of software updates and upgrades.
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Previous Advances and the Evolution Toward Programmable Search
The concept of treating tools and retrieval functions as programmable components has been explored by other researchers, such as the CodeAct framework (ICML 2024) and Anthropic’s MCP system (November 2025). These approaches emphasize turning tools into executable code within sandboxed environments, achieving significant reductions in context size and improvements in success rates. Perplexity’s innovation lies in re-architecting its own search stack into atomic primitives, a complex engineering feat that sets it apart from simply wrapping external APIs.
While the core idea of code-driven tool invocation is not new, applying it specifically to search infrastructure at this scale and complexity represents a notable advancement. Nonetheless, claims about performance are primarily based on internal benchmarks and proprietary data, which warrants cautious interpretation.
“Perplexity’s Search as Code could fundamentally change how AI systems retrieve and process information, offering unprecedented control and efficiency.”
— Thorsten Meyer, AI researcher

Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Broader Adoption of Search as Code
Most of the performance claims are based on proprietary benchmarks developed by Perplexity, such as WANDR, which has not been independently validated. The comparison models also vary in the underlying AI models used, complicating direct assessment. Additionally, the concept of programmable search is not new, and prior work has demonstrated similar principles, raising questions about the novelty and incremental value of SaC. Broader industry adoption and real-world testing remain pending, making the long-term impact uncertain.
Next Steps for Validation and Industry Adoption
Independent researchers and industry peers are likely to attempt replicating Perplexity’s benchmarks to verify performance claims. Broader testing in real-world applications will determine how effectively SaC scales and integrates into existing AI workflows. Perplexity may also release more detailed technical documentation and open benchmarks to facilitate external validation. The broader AI community will watch for how this approach influences future search architectures and agent design strategies.
Key Questions
What is Search as Code (SaC)?
SaC is an architecture that allows AI systems to assemble custom search pipelines by writing and executing code, rather than relying on fixed search endpoints. It exposes core search functions as modular primitives that can be combined dynamically.
How does SaC improve over traditional search methods?
SaC provides greater control, flexibility, and efficiency by enabling models to tailor retrieval pipelines on the fly, reducing token usage and increasing accuracy in complex tasks.
Are the performance claims independently verified?
No, most claims are based on proprietary benchmarks developed by Perplexity. External validation and real-world testing are still pending.
Is this idea entirely new?
The concept of turning tools into executable code for AI is not new, with prior work by CodeAct and Anthropic. SaC’s novelty lies in applying these principles specifically to search infrastructure at scale.
What are the potential risks or downsides?
Risks include reliance on proprietary benchmarks, limited independent validation, and potential implementation complexity that could hinder widespread adoption.
Source: ThorstenMeyerAI.com