perplexity-sonar

Use Perplexity Sonar API for real-time, citation-backed answers. Ideal for up-to-date information and quick synthesis. Requires PERPLEXITY_API_KEY

Best use case

perplexity-sonar is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use Perplexity Sonar API for real-time, citation-backed answers. Ideal for up-to-date information and quick synthesis. Requires PERPLEXITY_API_KEY

Teams using perplexity-sonar should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/perplexity-sonar/SKILL.md --create-dirs "https://raw.githubusercontent.com/closedloop-technologies/awesome-deep-researchers/main/.claude/skills/perplexity-sonar/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/perplexity-sonar/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How perplexity-sonar Compares

Feature / Agentperplexity-sonarStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use Perplexity Sonar API for real-time, citation-backed answers. Ideal for up-to-date information and quick synthesis. Requires PERPLEXITY_API_KEY

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Perplexity Sonar Skill

This skill utilizes the Perplexity Sonar API to provide synthesized answers backed by real-time web sources. It uses the OpenAI Python library for compatibility.

## Setup

1. **Dependencies:**

    ```bash
    pip install openai python-dotenv
    ```

2. **API Key Configuration:** The skill requires the `PERPLEXITY_API_KEY`. Ensure it is set in a `.env` file in the project root.

    ```bash
    # If the script fails due to a missing key, run the following:
    echo "It seems the Perplexity API key is not set up."
    read -p "Enter your Perplexity API key: " PPLX_KEY
    echo "PERPLEXITY_API_KEY=$PPLX_KEY" >> .env
    # Ensure .env is ignored by git
    if [ -f .gitignore ] && ! grep -q ".env" .gitignore; then echo ".env" >> .gitignore; fi
    echo "API key saved to .env."
    ```

## Usage

Use the `scripts/ask.py` script to query the Sonar API.

### Command

```bash
python3 scripts/ask.py --prompt "<your_research_question>" [--model <model_name>]
````

### Parameters

* `--prompt` (Required): The research question.
* `--model` (Optional): Defaults to `sonar-medium-online`. Use `sonar-large-online` for comprehensive analysis.

### Example

```bash
python3 scripts/ask.py --prompt "What are the latest developments in the EV market in Q4 2025?" --model sonar-large-online
```

## Output

The script outputs the synthesized answer directly to stdout, with citations integrated by the Perplexity model.

Related Skills

xai-grok

7
from closedloop-technologies/awesome-deep-researchers

Use xAI Grok API with Agent Tools for real-time web and X (Twitter) search and synthesis. Requires XAI_API_KEY.

tavily-search

7
from closedloop-technologies/awesome-deep-researchers

Use Tavily Search API for optimized, real-time web search results for RAG. Requires TAVILY_API_KEY.

stanford-storm

7
from closedloop-technologies/awesome-deep-researchers

Run Stanford STORM (knowledge-storm) to generate comprehensive, Wikipedia-style articles with citations. Requires LLM and Search API keys (Bing or You.com).

smolagents

7
from closedloop-technologies/awesome-deep-researchers

Use Hugging Face Smolagents framework for code-based agentic research with tool support. Supports multiple LLM providers and web search.

openai-deep-research

7
from closedloop-technologies/awesome-deep-researchers

Use OpenAI's Deep Research API (o3 / o4 models) to automate multi-step, citation-backed research workflows.

langchain-deep-research

7
from closedloop-technologies/awesome-deep-researchers

Run LangChain Open Deep Research agent for iterative web research and comprehensive reports. Requires LLM API keys and search API (e.g., OPENAI_API_KEY, TAVILY_API_KEY).

jina-ai

7
from closedloop-technologies/awesome-deep-researchers

Use Jina AI APIs for converting URLs to LLM-friendly Markdown (Reader) and searching the web (Search).

gpt-researcher

7
from closedloop-technologies/awesome-deep-researchers

Run the GPT Researcher autonomous agent to generate comprehensive deep research reports. Requires LLM and Search API keys (e.g., OPENAI_API_KEY, TAVILY_API_KEY).

exa-research

7
from closedloop-technologies/awesome-deep-researchers

Use Exa AI for neural search, content retrieval, and automated deep research. Requires EXA_API_KEY.

perplexity-search

24269
from davila7/claude-code-templates

Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model's knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.

perplexity

24269
from davila7/claude-code-templates

Web search and research using Perplexity AI. Use when user says "search", "find", "look up", "ask", "research", or "what's the latest" for generic queries. NOT for library/framework docs (use Context7) or workspace questions.

perplexity

3891
from openclaw/skills

Auto-generated skill for perplexity tools via OneKey Gateway.