📊 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 announced a new approach called Search as Code (SaC), allowing AI agents to build custom search pipelines dynamically. This development aims to address limitations in traditional search methods, with early results showing significant accuracy and efficiency gains. However, some claims are preliminary, and independent validation is pending.
On June 1, 2026, Perplexity’s research team announced a new approach called Search as Code (SaC), designed to overhaul how AI systems perform search in the agent era. This method enables AI models to construct custom retrieval pipelines dynamically, moving beyond traditional fixed search endpoints. The development could significantly improve AI’s ability to handle complex, multi-step tasks that require multiple retrieval operations, making it a notable advance in AI search technology.
Perplexity’s SaC approach exposes the components of the search stack—retrieval, filtering, ranking, and rendering—as atomic, programmable primitives within a Python SDK. The AI model acts as the control plane, generating code that orchestrates these components in real-time, allowing for tailored search pipelines per task. This contrasts with traditional search APIs, which treat search as a monolithic, fixed process.
The company demonstrated SaC’s effectiveness through a case study involving the identification and characterization of over 200 high-severity vulnerabilities (CVEs). The system achieved 100% accuracy while reducing token usage by 85%. Benchmarks across multiple tests showed SaC outperforming existing systems, including OpenAI’s models, with a 2.5× margin on the WANDR benchmark. These results suggest SaC’s potential to significantly improve search precision and efficiency in AI applications.
Perplexity emphasizes that SaC is not merely wrapping an API but involves a fundamental re-architecture of the search process, enabling models to write and execute code that directly manipulates search primitives. This approach leverages the fact that models are trained extensively on code, making them better suited to orchestrate complex retrieval workflows.
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
AI search pipeline builder
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.
programmatic search API tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Agent Capabilities
This development matters because it addresses a core bottleneck in AI-powered search: control over retrieval processes. By enabling models to craft custom, multi-stage pipelines, SaC could improve the accuracy, adaptability, and efficiency of AI agents performing complex tasks, such as security vulnerability analysis or enterprise data retrieval. If validated independently, this approach could reshape how search systems are built for AI agents, moving away from static APIs toward dynamic, code-driven pipelines.
However, the claims are still early, and the full impact depends on further validation, wider adoption, and whether other systems can replicate the engineering advancements involved in re-architecting the search stack.
search as code SDK
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures in AI Agents
The idea of turning tools into executable code for AI agents is not new. Prior work, such as the CodeAct framework (ICML 2024), demonstrated that models perform better when orchestrating tools through code rather than predefined tool calls. Similarly, Anthropic’s MCP system (November 2025) showed how turning tools into sandboxed code APIs reduces context size and improves agent performance. Perplexity’s SaC builds on this trend but applies it specifically to search, re-architecting its search stack into composable primitives for the first time at this scale.
While the engineering behind SaC is novel, the conceptual foundation is shared with earlier approaches, emphasizing code-based tool orchestration as a key to scaling agent capabilities. The main difference is the focus on search primitives, which allows for more flexible and precise retrieval workflows.
“Perplexity’s Search as Code represents a significant step forward in how AI systems can dynamically control search processes, potentially transforming agent capabilities.”
— Thorsten Meyer, AI researcher
AI retrieval pipeline software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Adoption Challenges for SaC
While early results are promising, independent replication of the benchmarks, especially the proprietary WANDR test, is pending. The comparison involves different models and configurations, raising questions about the robustness of the performance claims. Additionally, the engineering effort required to re-architect search stacks at this level may limit widespread adoption in the near term. It remains unclear how quickly other organizations will adopt or replicate this approach, and whether SaC will scale effectively across diverse applications.
Next Steps for Validation and Integration
Further independent testing and replication are needed to confirm SaC’s performance claims. Perplexity is likely to release more detailed benchmarks and potentially open-source parts of their SDK, enabling broader experimentation. Industry observers will watch for adoption by other AI developers and integration into larger systems. Additionally, research into extending code-based search orchestration to other domains may accelerate, as the approach gains validation.
Key Questions
What is Search as Code (SaC)?
SaC is an approach where AI models dynamically assemble search pipelines by writing and executing code that manipulates search primitives, enabling more flexible and precise retrieval workflows.
How does SaC differ from traditional search methods?
Traditional search treats search as a fixed, monolithic process, while SaC exposes internal components as programmable primitives, allowing models to build custom retrieval pipelines on the fly.
What are the early results of SaC’s performance?
In initial case studies, SaC achieved 100% accuracy on a vulnerability identification task while reducing token usage by 85%, outperforming existing systems in benchmarks.
What are the main challenges facing SaC’s broader adoption?
Validation by independent researchers, the engineering effort to re-architect search stacks, and the need for widespread implementation are key hurdles to adoption.
Will SaC replace existing search APIs?
It is too early to say, but SaC’s approach offers a more flexible and controllable paradigm that could complement or eventually replace traditional fixed search APIs in AI agent systems.
Source: ThorstenMeyerAI.com