perplexity
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Perplexity AI API assistance covering sonar online models, search grounding, citations, and real-time web retrieval. Use when building search-augmented AI research and current event query pipelines.
- Reads credentials
8 other projects use a version of this.
Adopted by
Most recently taken up by
- rezkam/boring-but-goodtheir own version, first seen Nov 1, 2026
- imMamdouhaboammar/kaku-chatgpt-harnesstheir own version, first seen Oct 25, 2026
- Samueladewole/claude-skillstheir own version, first seen Oct 13, 2026
- Practice019/agent-skillstheir own version, first seen Sep 9, 2026
- Elnora-AI/elnora-websearch-toolstheir own version, first seen Jul 14, 2026
- FelipeAngeli/skillstheir own version, first seen Apr 10, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- refly-ai/refly-skills★ 204same name
- aiagenta2z/onekey-gateway★ 52same name
- FelipeAngeli/skills★ 2same name
- Elnora-AI/elnora-websearch-tools★ 1same name
- rezkam/boring-but-good★ 1same name
- imMamdouhaboammar/kaku-chatgpt-harness★ 0same name
- Practice019/agent-skills★ 0same name
- Samueladewole/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- service-meshSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 147
Use search_domain_filter to limit search to trusted corporate, scientific, or government websites.
- Distinctive: line 151
Use high temperature settings (> 0.3) if exact factual precision and strict web grounding are desired.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Perplexity
Perplexity is an AI search engine. For developers, the Sonar API provides grounded, cited answers for building search-enabled apps.
When to Use
- Real-Time Web-Augmented Search & Retrieval: Querying fresh, live web data with grounded, verifiable source citations.
- Fact-Checking & Research Automation: Generating comprehensive answers with linked URLs for financial, legal, and tech intelligence.
- Perplexity Sonar Models via API: Accessing
sonar-pro,sonar, and reasoning models for production AI assistants. - Recency-Filtered Search: Restricting search scope to the last day, week, or month for breaking developments.
Quick Start
from openai import OpenAI
# Perplexity uses OpenAI-compatible API format
client = OpenAI(
api_key="your-perplexity-api-key",
base_url="https://api.perplexity.ai"
)
response = client.chat.completions.create(
model="sonar-pro",
messages=[
{"role": "user", "content": "What were the major tech announcements this week?"}
]
)
print(response.choices[0].message.content)Core Concepts
Consuming Perplexity Sonar API with Citations
Querying live web search intelligence using OpenAI-compatible SDK:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai"
)
response = client.chat.completions.create(
model="sonar-pro",
messages=[
{"role": "system", "content": "You are a research analyst. Provide factual answers with explicit citations."},
{"role": "user", "content": "What are the latest developments in quantum computing error correction in 2026?"}
],
temperature=0.2,
)
answer = response.choices[0].message.content
citations = getattr(response, 'citations', [])
print("Answer:\n", answer)
print("\nSources / Citations:")
for i, url in enumerate(citations, 1):
print(f"[{i}] {url}")Search Domain & Recency Filtering
Restricting search context to authoritative domains and specific timeframes:
import requests
import json
url = "https://api.perplexity.ai/chat/completions"
headers = {
"Authorization": f"Bearer {os.environ.get('PERPLEXITY_API_KEY')}",
"Content-Type": "application/json"
}
payload = {
"model": "sonar",
"messages": [
{"role": "user", "content": "What were the key policy changes announced by the central bank this week?"}
],
"search_domain_filter": ["bloomberg.com", "reuters.com", "ft.com"],
"search_recency_filter": "week" # "day", "week", "month", "year"
}
res = requests.post(url, json=payload, headers=headers)
data = res.json()
print(data['choices'][0]['message']['content'])Structured Output Formatting with Sonar
Directing the model to output verified markdown data tables:
response = client.chat.completions.create(
model="sonar",
messages=[
{"role": "user", "content": "Compare the top 3 open-source vector databases by license, GitHub stars, and vector indexing algorithm. Output as a Markdown table."}
],
temperature=0.1
)
print(response.choices[0].message.content)Common Patterns
Domain-Restricted Search Grounding
Problem: Retrieval results include low-quality blogs or outdated forum answers.
Solution:
Filter search sources using search_domain_filter:
response = client.chat.completions.create(
model="sonar",
messages=[{"role": "user", "content": "What is the latest RFC standard for HTTP/3?"}],
extra_body={
"search_domain_filter": ["ietf.org", "mozilla.org", "w3.org"],
"return_citations": True
}
)
print("Answer:", response.choices[0].message.content)
# Access citation URLs if enabled
citations = getattr(response, "citations", [])
print("Citations:", citations)Best Practices
Do:
- Target
sonar-profor deep analytical research andsonarfor fast, lightweight web queries. - Inspect and parse the
citationsarray to display clickable references in user-facing interfaces. - Apply
search_recency_filterwhen querying time-sensitive or breaking news topics. - Use
search_domain_filterto limit search to trusted corporate, scientific, or government websites.
Don't:
- Use high temperature settings (> 0.3) if exact factual precision and strict web grounding are desired.
- Assume web search is necessary for closed-domain math or pure coding tasks; standard LLMs are faster and cheaper.
- Hardcode
PERPLEXITY_API_KEYin scripts; load securely from environment variables.
Troubleshooting
| Error | Cause | Solution |
401 Unauthorized | Invalid or expired Perplexity API key. | Verify API key in Perplexity settings and set PPLX_API_KEY. |
Model not supported: ... | Using deprecated model tag (e.g. llama-3-sonar-8b). | Use active sonar models: sonar or sonar-pro. |
Base URL missing in client | Connecting to default api.openai.com instead of api.perplexity.ai. | Specify base_url="https://api.perplexity.ai". |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

