Overview
OpenClaw is an open-source AI agent that runs in your terminal and connects to multiple LLM providers, featuring support for Perplexity as a web search provider for real-time information retrieval. When configured as a provider, Perplexity Search API returns structured results (title, url, snippet) that the agent can process and reason over.
Setup
Install OpenClaw
If you haven’t installed OpenClaw yet:Verify the installation:For Docker, Podman, Nix, or other installation methods, see the OpenClaw install documentation.
- macOS / Linux
- Windows (PowerShell)
Configure Perplexity as the Search Provider
The quickest way to configure Perplexity is the interactive setup wizard:Select Perplexity when prompted for a search provider, then paste your API key.Alternatively, set the environment variable and OpenClaw will auto-detect it:
- macOS / Linux
- Windows (PowerShell)
Configuration
Config file
Add Perplexity to youropenclaw.json (run openclaw config file to locate it):
Environment variable
SetPERPLEXITY_API_KEY in the gateway environment. For daemon installs, add it to ~/.openclaw/.env:
provider: "perplexity" is configured but no valid key is found, OpenClaw will fail fast at startup with a clear error.
Tool Parameters
When OpenClaw invokesweb_search with Perplexity as the provider, these parameters are available:
| Parameter | Description |
|---|---|
query | Search query (required) |
count | Number of results (1–10, default: 5) |
country | ISO 3166-1 alpha-2 country code (e.g., US, DE) |
language | ISO 639-1 language code (e.g., en, fr) |
freshness | Time filter: day, week, month, or year |
date_after | Results published after this date (YYYY-MM-DD) |
date_before | Results published before this date (YYYY-MM-DD) |
domain_filter | Domain allowlist or denylist (max 20 entries) |
max_tokens | Total content budget (default: 25,000, max: 1,000,000) |
max_tokens_per_page | Per-page token limit (default: 2,048) |
Links & Resources
Search API Quickstart
Full Perplexity Search API documentation
OpenClaw Perplexity Docs
OpenClaw’s Perplexity Search provider documentation
OpenClaw Repository
OpenClaw source code on GitHub
API Console
Generate and manage your API keys