Introducing Search as Code, our new search architecture for AI agents.

TL;DR · AI Summary
Perplexity introduces 'Search as Code' — an architecture enabling AI agents to generate Python code that directly calls our search stack, replacing manual function call loops.
Key Takeaways
- AI agents now generate Python code to directly invoke Perplexity's search stack,
- The architecture is available via the Perplexity Agent API and enabled by defaul
- Designed to boost search efficiency and simplify agent development.
Outline
Jump quickly between sections.
Perplexity releases Search as Code to address inefficiencies in traditional AI agent search workflows.
AI agents generate Python code that directly calls the search stack, bypassing iterative function calls.
The architecture is now available in the Perplexity Agent API and enabled by default in Computer.
Mindmap
See how the topics connect at a glance.
查看大纲文本(无障碍 / 无 JS 友好)
- Search as Code 架构
- 核心机制
- 直接生成 Python 调用
- 产品集成
- Agent API 支持
- Computer 默认启用
Highlights
Key sentences worth saving and sharing.
It writes Python that calls our search stack directly, instead of looping through function calls one at a time.
Available in the Perplexity Agent API, and now default in Computer.
This architecture aims to improve search efficiency and reduce programming complexity for AI agents.
It writes Python that calls our search stack directly, instead of looping through function calls one at a time.
Available in the Perplexity Agent API, and now default in Computer.
https://t.co/ut6GGWQTVO https://t.co/jrF2nQE3bC" / X

Introducing Search as Code, our new search architecture for AI agents. It writes Python that calls our search stack directly, instead of looping through function calls one at a time. Available in the Perplexity Agent API, and now default in Computer. research.perplexity.ai/articles/rethi