Perplexity launches Search as Code for AI agents, CEO Aravind Srinivas explains why

Perplexity launches Search as Code for AI agents, CEO Aravind Srinivas explains why

By Storyboard18
Publication Date: 2026-06-03 04:22:00

Perplexity has introduced a new search architecture for its AI agents, replacing traditional search tool calls with a code-driven approach that generates Python scripts to interact directly with the company’s search infrastructure.

Chief Executive Officer Aravind Srinivas said the company is moving toward what he described as “search as codegen”, a model designed for a future in which code execution plays a central role in knowledge-based work. In a post on X, Srinivas said Perplexity is moving away from treating search as a web-fetch tool call and instead using code generation as the foundation for search workflows.

Also Read: Perplexity is sending free Mac Minis to select creators; here’s why

The change follows the launch of Perplexity’s “Search as Code” system. According to the company, the system generates Python code that can access its search stack directly. Instead of making a series of separate tool or function calls, the generated code can combine multiple search operations and actions into a single workflow.

Perplexity said the capability is now available through its Agent API and has also become the default search method inside Computer, the company’s agent-based product. The company believes the architecture can help agents handle more complex and multi-step tasks with fewer intermediate actions.

Explaining the rationale behind the shift, Srinivas said the code-based approach allows AI agents to compose multi-step operations more naturally and adapt more easily to…