| Example | Description |
|---|---|
| Perplexity Basic | Run a basic Perplexity sonar-pro agent and print sync, streaming, and async responses. |
| Knowledge | Answer questions from a PDF knowledge base in PgVector using a Perplexity sonar-pro agent. |
| Memory | Persist Perplexity sonar-pro user memories and session summaries in Postgres across multiple runs. |
| Retry | Review retry settings and why invalid model IDs cannot reliably exercise the retry path. |
| Perplexity Structured Output | Return a typed MovieScript from Perplexity sonar-pro with a Pydantic output schema. |
| Perplexity Web Search | Use Perplexity sonar-pro’s native web search to answer a current news question. |
Perplexity
Perplexity
Index of Perplexity sonar-pro agent examples: basic runs, knowledge, memory, retries, structured output, and web search.