Documentation Index
Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Agno is an open-source Python framework for building agents, teams, and workflows with first-class support for 40+ model providers. Agno ships a nativePerplexity model class so you can drop Perplexity’s web-grounded Sonar models into any Agno Agent with a single import.
Agno provides a unified
Agent abstraction, a tools system, and a multi-agent team/workflow runtime. Learn more at agno.com.Installation
Perplexity model extends Agno’s OpenAI-compatible interface, so the openai SDK is required as a transitive dependency.
API Key Setup
Set your Perplexity API key as an environment variable:Get API Key
Generate your Perplexity API key from the API portal.
Quick Start
sonar. Pass any Perplexity model id via the id parameter — sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro, or sonar-deep-research.
Parameters
ThePerplexity model accepts the standard OpenAI parameters plus a few Perplexity-specific options:
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "sonar" | Perplexity model id |
api_key | Optional[str] | None | Falls back to PERPLEXITY_API_KEY |
base_url | str | "https://api.perplexity.ai/" | API base URL |
max_tokens | int | 1024 | Maximum tokens to generate |
top_k | Optional[float] | None | Top-K sampling |
retries | int | 0 | Retry attempts before raising ModelProviderError |
delay_between_retries | int | 1 | Seconds between retries |
exponential_backoff | bool | False | Double the delay on each retry |
temperature, top_p, frequency_penalty, etc.) are also supported.
Structured Output
Streaming
Notes on Tool Calling
Perplexity models support tool calling through Agno, but Sonar models do not natively expose function-calling in the same first-class way as some other providers. Tool use throughPerplexity may be less reliable than with OpenAIChat or Claude. For agent workflows that need rich tool orchestration on top of Perplexity-grounded answers, consider routing through the Agent API with web_search and fetch_url tools.
Links & Resources
Agno Perplexity Docs
Official Agno Perplexity provider documentation.
Agno API Reference
Full parameter reference for the
Perplexity model.Perplexity Models
Available Perplexity models and capabilities.
Agno Docs
Learn more about agents, teams, and workflows in Agno.
Support
Need help with the integration?- Browse the Agno documentation
- Review our FAQ