Skip to main content

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 native Perplexity 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

The 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

The default model is sonar. Pass any Perplexity model id via the id parameter — sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro, or sonar-deep-research.

Parameters

The Perplexity model accepts the standard OpenAI parameters plus a few Perplexity-specific options: All OpenAI-compatible parameters (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 through Perplexity 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.

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?