option
Home
News
Perplexity unveils Search-as-Code, letting AI agents build search pipelines autonomously

Perplexity unveils Search-as-Code, letting AI agents build search pipelines autonomously

June 21, 2026
81

The traditional blue link list, optimized for human browsing, has become a bottleneck for AI agents striving for efficiency. When handling complex research tasks, AI systems are forced into manual, multi-turn API calls with rigid term adjustments, suffering from architectural inflexibility and context windows cluttered with irrelevant information.

To overcome this, Perplexity introduced a new architecture: Search as Code (SaC). Instead of relying on pre-built monolithic search APIs, this approach lets AI models dynamically construct and execute custom search workflows using Python code.

Perplexity SaC architecture diagram

The Three Core Architecture Layers

Perplexity's SaC architecture is organized vertically into three layers:

Model Layer (Top Layer): Handles complex task comprehension and devises high-level search strategies.

Safety Sandbox (Middle Layer): Offers a secure runtime for code execution, complete with a file system for intermediate state storage.

Intelligent Search SDK (Bottom Layer): Encapsulates atomic operations—retrieval, expansion, filtering, deduplication, re-ranking, and field parsing—into primitive functions, giving generated code component-level access to the search infrastructure.

This design allows AI agents to run parallel queries, programmatically discard irrelevant data, and feed only highly relevant, refined results into the context window—preserving thought continuity in long-form research tasks.

Real-World CVE Vulnerability Research: Performance Boost and Token Reduction

To validate the architecture in practice, Perplexity tested it on a demanding cybersecurity task: tracking 200 critical CVEs released from 2023 to 2025 and accurately extracting official advisories, affected software, and patched versions.

Perplexity CVE research test results

With SaC, the AI model autonomously created a three-stage script: first, it ran parallel, customized searches for different vendors (e.g., Mozilla, Google) based on their announcement formats; then it automatically scanned results, identified missing data, and performed targeted follow-up queries; finally, it used schema validation to ensure complete alignment of vulnerability records.

Results showed the system completed the task using 85% fewer tokens than standard pipelines. Across Perplexity's internal benchmarks (DSQA, BrowseComp, HLE, WideSearch, and the new breadth research benchmark WANDR), SaC topped four out of five, outperforming the old architecture significantly. On WANDR specifically, the relative improvement hit 45%.

Code as the New Operational Layer for AI

Industry reports suggest that writing code is increasingly the default method for AI agents to interact with the physical world. Traditional software follows deterministic instructions, while advanced large models reason in token space. The most powerful systems combine both: they use large models for strategy, leverage deterministic environments for batch processing and filtering, and treat the search infrastructure as an I/O layer.

Currently, the "Search as Code" feature is being rolled out in Perplexity Computer

Related article
U.S. Stocks Hit Historic Milestone as AI and Aerospace Giants Prepare for Trillion-Dollar Debut U.S. Stocks Hit Historic Milestone as AI and Aerospace Giants Prepare for Trillion-Dollar Debut Elon Musk, Sam Altman, and Dario Amodei, three titans of the technology sector, are advancing toward initial public offerings for their respective ventures. With SpaceX, OpenAI, and Anthropic—three industry behemoths nearing trillion-dollar valuation
Swedish AI Startup Lovable Eyes $13.2 Billion Valuation After Major Funding Round Swedish AI Startup Lovable Eyes $13.2 Billion Valuation After Major Funding Round As AI-driven coding tools gain traction, Swedish startup Lovable has secured a major funding round. The company aims to raise $3 billion, potentially boosting its valuation to $13.2 billion—double the $6.6 billion recorded last December. Menlo Ventur
Google Tests Remy AI Agent for Gemini as Focus Shifts to User Control Google Tests Remy AI Agent for Gemini as Focus Shifts to User Control According to Business Insider, Google is testing Remy, a new AI personal agent for Gemini. This tool aims to execute tasks on behalf of users, streamlining both professional workflows and daily routines.Currently, Remy is undergoing testing in an int
Related Special Topic Recommendations
writing Best AI Outline Generators for Long-Form SEO Articles
Best AI Outline Generators for Long-Form SEO Articles

2026 Latest Best Top-Rated AI Outline Generators for Long-Form SEO Articles, meticulously curated by XIX.AI. These powerful tools offer game-changing assistance in creating high-quality content quickly, boosting writing efficiency significantly. Get a free vs paid comparison along with real-world tests and detailed rankings to help you find the must-try option that suits your needs. Explore now to unlock your AI edge.

8 tools
xix.ai
Education and Learning AI Study Tools for Homework and Exam Prep
AI Study Tools for Homework and Exam Prep

2026 Latest Best AI Study Tools for Homework and Exam Prep! XIX.AI curates a top-rated list of powerful, game-changing tools that help students boost productivity, streamline homework completion, and ace exams through real-world tests. Get a free vs paid comparison, detailed rankings, and must-try options to unlock your AI edge. Explore now!

10 tools
xix.ai
Music composition AI Vocal Demo Tools for Songwriters, Hooks, Toplines, and Multilingual Draft Sessions
AI Vocal Demo Tools for Songwriters, Hooks, Toplines, and Multilingual Draft Sessions

2026 Latest Best AI Vocal Demo Tools for Songwriters, Hook Creators, and Multi-Language Content Teams! XIX.AI has curated a top-rated list of powerful game-changing tools that go through rigorous real-world tests. You’ll find detailed free vs paid comparison data, comprehensive rankings, and must-try options to help you boost writing efficiency and unlock your creative potential. Explore now to discover your perfect tool for all your content needs!

9 tools
xix.ai
Business Best AI Competitive Research Tools for Small Businesses
Best AI Competitive Research Tools for Small Businesses

2026 Latest Best Top-rated AI Competitive Research Tools for Small Businesses! XIX.AI has curated a highly powerful game-changing collection, updated weekly with rigorous real-world tests and detailed rankings. You can find a comprehensive free vs paid comparison to help you identify the must-try tools that boost your productivity and give you a competitive edge. Explore now to discover your perfect tool!

9 tools
xix.ai
Image editing Photoshop AI Retouch Tools for Ecommerce Apparel, Skin Cleanup, and Color Consistency
Photoshop AI Retouch Tools for Ecommerce Apparel, Skin Cleanup, and Color Consistency

2026 Latest Best Photoshop AI retouch tools for ecommerce apparel, skin cleanup, and color consistency! This top-rated curated list features powerful game-changing solutions that help you boost writing efficiency, streamline content creation, and achieve perfect visual results effortlessly. Each tool has undergone real-world tests through weekly updated rankings, complete with free vs paid comparison details. Backed by XIX.AI, it’s the must-try guide for anyone aiming to unlock your AI edge. Explore now!

10 tools
xix.ai
Prompt Best AI Prompt Libraries for ChatGPT Workflows
Best AI Prompt Libraries for ChatGPT Workflows

2026 Latest Best Top-Rated AI Prompt Libraries for optimizing all types of ChatGPT workflows. XIX.AI has curated a powerful, game-changing collection that goes through rigorous real-world tests to ensure top performance. You can find detailed free vs paid comparisons and expert rankings to help you choose the must-try tools that boost your productivity and unlock your AI edge. Explore now!

11 tools
xix.ai
Comments (0)
0/500
OR