Skip to main content

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. You can configure OpenClaw to use Perplexity’s Agent API models as your agent, and the Perplexity Search API for web search tool calls. This allows you to leverage Perplexity’s powerful models and up-to-date search results directly within OpenClaw’s agent framework.

Get a Perplexity API Key

Navigate to the API Console and generate a new key to use with OpenClaw.

Search API Setup (Use Perplexity as your Web Search Provider)

Use Perplexity Search API as OpenClaw’s web search backend for real-time information retrieval.
1

Install the Perplexity plugin

The Perplexity search provider ships as a separate OpenClaw plugin. Install it before you configure a key:
2

Configure the Search Provider

3

Start using OpenClaw with Perplexity Search

Start OpenClaw and ask anything that requires web search:
OpenClaw will use Perplexity Search API to retrieve structured results and incorporate them into its response.

Search Tool Parameters

When OpenClaw invokes web_search with Perplexity as the provider, these parameters are available:
Domain filters support allowlists (["nature.com", "science.org"]) and denylists (["-reddit.com", "-pinterest.com"]), but you cannot mix both in the same request. See the domain filter guide for details.

Agent API Setup (Use Perplexity as your LLM Provider)

Use Perplexity’s Agent API to run frontier models from Anthropic, OpenAI, Google, and others through a single API key.
1

Get Your API Key

Generate API Key

Navigate to the API Console and generate a new key.
2

Install OpenClaw

If you haven’t installed OpenClaw yet:
For Docker, Podman, Nix, or other installation methods, see the OpenClaw install documentation.
3

Apply the required configuration

Perplexity’s Agent API runs its own server-side built-in tools. To use it as an OpenClaw model provider, disable OpenClaw’s managed web_search in openclaw.json so the model uses Perplexity’s built-in search instead:
See Reserved tool names below for the full list of names Perplexity’s Agent API reserves for its server-side tools.
4

Configure Perplexity as an LLM Provider

5

Start using OpenClaw

Launch OpenClaw and your agent will use Perplexity:

Reserved tool names

Perplexity’s Agent API reserves these function names for its own server-side built-in tools; do not define custom functions with these names:
  • web_search
  • fetch_url
  • people_search
  • finance_search
The required configuration in the setup steps above disables OpenClaw’s managed web_search so the model uses Perplexity’s server-side search instead. Perplexity’s web_search runs inside the model’s response, invoked automatically by the model at $0.0025 per call, and returns grounded results with citations. To force it on for a request, add {"type": "web_search"} to the request’s tools array as a built-in tool rather than a function. To remove any other reserved-name tool from the outbound tool catalog, disable it through its own config toggle, or use OpenClaw’s general tool policy:

MCP Server Setup (Use Perplexity as a Tool Provider)

OpenClaw can also reach Perplexity through the Model Context Protocol, which exposes perplexity_search, perplexity_ask, perplexity_research, and perplexity_reason as MCP tools your agent can call. This complements the Agent API setup above: the Agent API drives the model, MCP gives the model access to Perplexity’s search and research surfaces.
The MCP tools have names like perplexity_search, so they do not collide with Perplexity’s Agent API reserved names. If you use both the Agent API setup and the MCP setup together, keep the tools.web.search.enabled: false entry from the Agent API section in place.
MCP tools respect OpenClaw’s tool profiles and allow/deny policy. Filter which Perplexity tools your agent can call with mcp.servers.perplexity.toolFilter.include. See the OpenClaw MCP guide for the full field list.

Agent API Configuration Tips

Perplexity’s Agent API primary endpoint is POST https://api.perplexity.ai/v1/agent. It also accepts requests at POST https://api.perplexity.ai/v1/responses as an OpenAI-Responses-compatible alias, which is what OpenClaw uses when api is "openai-responses".Set api: "openai-responses" at both the provider level and each model entry in openclaw.json. Using "openai-completions" will not work because the Agent API does not implement /v1/chat/completions.
Perplexity’s Agent API primary endpoint is POST /v1/agent, and POST /v1/responses is its OpenAI-Responses-compatible alias. OpenClaw’s openai-responses client sends to whatever base URL you give it with /responses appended, so the base URL must be https://api.perplexity.ai/v1 for OpenClaw to hit the alias at /v1/responses.
In the config, model IDs under a provider block omit the provider prefix. The full model reference adds it:
  • Config model ID: anthropic/claude-sonnet-4-6
  • Full model reference: perplexity/anthropic/claude-sonnet-4-6
Add "perplexity/*": {} to agents.defaults.models to have OpenClaw call GET https://api.perplexity.ai/v1/models and register every returned model automatically. You keep detailed entries under models.providers.perplexity.models only for the ones you want to pin, and the rest fall through to live discovery. Verify with openclaw models list --provider perplexity.
For the latest model list and pricing, see the Agent API models page and pricing page.

Agent API Quickstart

Use third-party models with built-in tools and function calling

Agent API Models

Full list of available models and pricing

MCP Server

Perplexity’s remote and local MCP servers, tools, and auth

Perplexity CLI

Terminal companion for search and page snippets from shell or agent scripts

Search API Quickstart

Full Perplexity Search API documentation

OpenAI Compatibility

How the Agent API works with OpenAI-compatible clients

OpenClaw Documentation

OpenClaw’s official documentation

API Console

Generate and manage your API keys