Perplexity introduces code-driven search architecture for

Perplexity introduces code-driven search architecture for

By @varindiamag
Publication Date: 2026-06-03 00:00:00

The new framework enables AI agents to generate and execute Python code that interacts directly with Perplexity’s search infrastructure, aiming to improve efficiency in handling complex, multi-step tasks and workflows.

 

 

Perplexity has unveiled a new search architecture that shifts the way AI agents access and process information, replacing conventional search tool calls with a code-generation approach designed to streamline complex tasks.

The company said its newly launched “Search as Code” framework allows AI agents to generate Python scripts that interact directly with Perplexity’s search infrastructure. Rather than relying on a sequence of individual search requests and tool invocations, the generated code can combine multiple search operations and actions into a single workflow.

The capability has been integrated into Perplexity’s Agent API and is now the default search mechanism within Computer, the company’s agent-based platform. According to Perplexity, the new architecture is intended to help AI systems perform sophisticated tasks more efficiently by reducing the number of intermediate steps required to gather and process information.

Moving beyond traditional search calls

Explaining the strategy behind the development, Perplexity CEO Aravind Srinivas said the company is moving toward what he describes as “search as codegen,” a model that treats code generation as the core mechanism for search and knowledge…