📊 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 announced a new approach called Search as Code, allowing AI systems to build custom retrieval pipelines dynamically. This innovation aims to enhance accuracy and control in AI search tasks, marking a significant step forward in agent-based AI systems.
Perplexity has introduced Search as Code (SaC), a new framework that transforms how AI systems perform search operations. This approach allows models to assemble and execute custom retrieval pipelines dynamically, moving beyond traditional fixed search endpoints. The development is significant because it addresses the control and flexibility issues faced by AI agents performing complex, multi-step retrieval tasks.
In a publication dated June 1, 2026, Perplexity’s research team detailed how traditional search systems, including those optimized for AI, rely on a fixed pipeline that limits control and adaptability for AI agents executing multi-hour or multi-step tasks. SaC replaces monolithic search endpoints with a modular stack of primitives—retrieval, ranking, filtering, and rendering—that can be orchestrated by the AI model through generated code in a secure sandbox environment.
The system uses a three-layer architecture: the model as the control plane, a sandbox for deterministic execution, and the primitive set called the Agentic Search SDK. This design enables models to fetch, filter, and assemble search results more precisely, reducing token usage and increasing accuracy. For example, in a case study involving high-severity vulnerability identification, SaC achieved 100% accuracy while reducing token consumption by 85%, outperforming conventional systems significantly.
Benchmark results show SaC leading in four out of five tests, including DSQA, BrowseComp, WideSearch, and WANDR, and tying with OpenAI on HLE. The approach also demonstrated a 2.5× performance improvement on WANDR compared to previous systems. These results highlight the potential of code-based retrieval pipelines to enhance AI search capabilities, especially in complex, multi-step scenarios.
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

Hands-On Agentic AI with LangChain, RAG, and Ollama:: Build Modular Local AI Agents, Retrieval Pipelines, Tool-Using Workflows, and Production-Ready Applications
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.

Custom Search – Discover more:: A Complete Guide to Google Programmable Search Engines
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Agent Control
This development matters because it marks a shift toward more flexible, controllable, and efficient AI search architectures. By enabling models to generate and execute code that dynamically manages retrieval pipelines, SaC enhances the ability of AI agents to perform complex tasks with higher accuracy and lower resource consumption. This approach could influence future AI system designs, especially in domains requiring precise and adaptable information retrieval, such as cybersecurity, legal research, and scientific discovery.

Competitive Programming 4 – Book 1: The Lower Bound of Programming Contests in the 2020s
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Techniques in AI
Traditional search systems have relied on fixed pipelines designed for human users, not AI agents. In recent years, there has been a push to adapt search for AI, with innovations like AI-optimized search engines and answer-focused retrieval. The idea of using code to orchestrate search operations is not new; prior research, including the 2024 ICML paper on CodeAct, demonstrated that models trained on code perform better at executing complex retrieval strategies. Similarly, Anthropic’s 2025 work on code execution with MCP showed that turning tools into sandboxed code APIs drastically reduces context overhead.
Perplexity’s contribution lies in re-architecting its search stack into atomic primitives that can be composed by the model, a step beyond merely wrapping external APIs. While the concept of code-based tool use has been explored, applying it specifically to search pipelines within a dedicated SDK represents a notable engineering advance, though the core idea predates the company’s work.
“Search as Code fundamentally shifts how AI systems can control and optimize retrieval processes, making them more adaptable and precise.”
— Thorsten Meyer, AI researcher
modular search primitives for AI
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Unverified Claims and Benchmark Limitations
While Perplexity reports impressive results, some claims are based on proprietary benchmarks like WANDR, which has not yet been independently validated. The benchmarks where SaC shows the largest advantage are self-authored, raising questions about reproducibility. Additionally, comparisons involve different models (GPT-5.5 vs. Opus 4.7), complicating direct assessment of architecture impact. The broader applicability of SaC beyond tested scenarios remains to be seen, and the long-term robustness of the approach is still under evaluation.
Next Steps for Validation and Adoption
Further independent testing and replication of Perplexity’s benchmarks are needed to confirm the claimed advantages of SaC. Industry adoption will depend on how well this approach scales across diverse tasks and whether competitors develop similar architectures. Perplexity plans to release more detailed technical documentation and possibly open-source components to facilitate external validation. Watching how the broader AI community responds and tests SaC’s effectiveness will be crucial in assessing its future impact.
Key Questions
What is Search as Code and how does it differ from traditional search?
Search as Code (SaC) allows AI models to generate and run custom retrieval pipelines by writing code, replacing fixed search endpoints. Traditional search returns static results based on a query, while SaC enables dynamic, programmable control over search processes.
What are the main benefits of SaC according to Perplexity?
SaC improves search accuracy, reduces token usage, and provides greater control and flexibility for AI agents performing complex retrieval tasks, especially in multi-step scenarios.
Has SaC been independently validated outside of Perplexity?
No, the benchmarks and claims are currently limited to Perplexity’s internal testing. Independent validation and replication are still pending.
Will SaC be available for other AI systems to adopt?
Perplexity has not announced open-sourcing SaC yet, but future releases and technical documentation are expected to facilitate broader adoption and testing.
What are the limitations or risks of the SaC approach?
Potential limitations include reliance on proprietary benchmarks, unverified performance outside tested scenarios, and the complexity of integrating code-based pipelines into existing systems. Long-term robustness remains uncertain.
Source: ThorstenMeyerAI.com