Buckets:

download
raw
1.23 kB
"""
Perplexity Search Tools
=============================
Demonstrates Perplexity Search tools for web search.
"""
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.perplexity import PerplexitySearch
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# Example 1: Basic search with default settings
agent = Agent(
model=OpenAIChat(id="gpt-5.6-luna"),
tools=[PerplexitySearch()],
markdown=True,
)
# Example 2: Search with recency and domain filters
agent_filtered = Agent(
model=OpenAIChat(id="gpt-5.6-luna"),
tools=[
PerplexitySearch(
max_results=10,
search_recency_filter="week",
search_domain_filter=["cnbc.com", "reuters.com", "bloomberg.com"],
show_results=True,
)
],
markdown=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
agent.print_response("What are the latest developments in AI agents?", stream=True)

Xet Storage Details

Size:
1.23 kB
·
Xet hash:
84b5d17144e2d8c82442d7d61a9e2d0aaef6ed960074febe312e30fea221d67b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.