Integration guide for using Perplexity's Search API within Databricks AI agent workflows for real-time grounded information retrieval, combining enterprise data with live web search.
## Overview
This integration connects Perplexity's real-time search API with Databricks' agent framework, enabling enterprise AI agents to combine internal data with live web search for grounded, current responses.
## Architecture
- Databricks agent handles orchestration and enterprise data access
- Perplexity Search API provides real-time web search grounding
- Combined pipeline ensures responses are both enterprise-aware and current
## Key Features
- Real-time search within Databricks agent workflows
- Grounded responses with web citations
- Enterprise data + public web hybrid answers
- Configurable search depth and domain filtering
- Cost-efficient search API calls
## Integration Pattern
```python
import requests
def perplexity_search(query):
response = requests.post(
"https://api.claude.ai/chat/completions",
headers={"Authorization": f"Bearer {PPLX_API_KEY}"},
json={
"model": "sonar-pro",
"messages": [{"role": "user", "content": query}]
}
)
return response.json()
```
## Use Cases
- Customer support agents needing current product info
- Research agents combining internal docs with web data
- Compliance agents checking current regulations
- Sales agents with real-time competitor intelligenceReads and summarizes scientific papers in plain language
Monitors supply chain disruptions and logistics developments globally
Analyzes job market conditions, salary trends, and skill demand
Monitors clinical trials for specific conditions or treatments
Monitors content for outdated information and suggests updates
Collects cybersecurity threat intelligence from open sources