Skip to content

feat request: add Perplexity as a web search provider #135

@FnSK4R17s

Description

@FnSK4R17s

Add support for Perplexity as an alternative web search provider alongside Exa and Tavily.

Current state: Dexter conditionally enables web_search based on available API keys (configured in src/tools/registry.ts): Exa (EXASEARCH_API_KEY, preferred) or Tavily (TAVILY_API_KEY, fallback).

Proposed changes:

  • Create a perplexitySearch tool in src/tools/search/ implementing the same web_search interface
  • Add PERPLEXITY_API_KEY environment variable support
  • Update the priority chain in getToolRegistry(): Exa → Perplexity → Tavily (or make it configurable)
  • Update env.example with the new key

Notes: Perplexity returns grounded, citation-backed answers rather than raw search results, which could reduce the need for follow-up web_fetch calls and lower total token usage. Its API is OpenAI-compatible (chat completions with model: "sonar"), making integration straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions