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 work.
The approach represents a departure from traditional AI workflows, where models typically rely on separate web searches, tool calls or function executions to retrieve information. By generating executable code, agents can coordinate multiple operations within a single process and adapt more dynamically to changing requirements.
Perplexity believes this method will make it easier for agents to manage multi-step tasks, execute workflows and interact with search systems in a more flexible manner.
Focus on the next generation of AI agents
The announcement comes as AI companies increasingly invest in autonomous agents capable of performing actions and completing tasks rather than simply responding to prompts.
Perplexity argues that advances in large language models are making code generation a practical foundation for agent behaviour. As AI models become more proficient at writing and executing code, the company expects their ability to orchestrate searches, analyse information and carry out workflows to improve as well.
With the introduction of Search as Code, Perplexity is positioning code generation at the centre of how AI agents discover information, reason through problems and execute complex processes. The move reflects a broader industry trend toward building AI systems that can operate more independently and manage increasingly sophisticated digital tasks.
See What’s Next in Tech With the Fast Forward Newsletter
Tweets From @varindiamag
Nothing to see here - yet
When they Tweet, their Tweets will show up here.




