strands-perplexity
strands-perplexity is a real-time web search tool powered by the Perplexity Search API with citation support, regional filtering, and multi-query capabilities.
Installation
Section titled “Installation”pip install strands-perplexityfrom strands import Agentfrom strands_perplexity import perplexity_search
agent = Agent(tools=[perplexity_search])
# Search the webagent("What are the latest developments in AI?")
# Research a topicagent("Find recent papers on quantum computing breakthroughs")
# Get current informationagent("What happened in tech news today?")Key Features
Section titled “Key Features”- Real-time Web Search: Access ranked web search results from Perplexity’s continuously refreshed index
- Citations Included: Every result includes URLs for proper attribution
- Regional Search: Filter results by country using ISO country codes
- Language Filtering: Filter results by language using ISO 639-1 codes
- Domain Filtering: Include or exclude specific domains from results
- Multi-query Support: Execute up to 5 related queries in a single request
Configuration
Section titled “Configuration”PERPLEXITY_API_KEY=your_api_key # RequiredGet your API key at: Perplexity API Settings