Skip to content

Build AI Agents with Perplexity

AI models with built-in web search, providing always-current answers with citations.

Available Perplexity Models

ModelID
Sonar Large (Online)llama-3.1-sonar-large-128k-online
Sonar Small (Online)llama-3.1-sonar-small-128k-online

Why use Perplexity for AI agents?

Built-in web search
Always current
Source citations
Real-time information

Best use cases

  • Research agents
  • Fact-checking
  • News monitoring
  • Current events analysis

Quick start code

agent.py
from agno.agent import Agent
from agno.models.perplexity import Perplexity

agent = Agent(
    name="My Perplexity Agent",
    model=Perplexity(id="llama-3.1-sonar-large-128k-online"),
    instructions=["You are a helpful assistant."],
    markdown=True,
)

agent.print_response("Hello! What can you help me with?")

Install: pip install agno Then set PERPLEXITY_API_KEY

Contact Us

Press Ctrl+Enter to send