Skip to content

Add Agent API support to Perplexity MCP tools - #120

Draft
gleb-reshetnev wants to merge 1 commit into
perplexityai:mainfrom
gleb-reshetnev:psi/api-3381-agent-api-support
Draft

Add Agent API support to Perplexity MCP tools#120
gleb-reshetnev wants to merge 1 commit into
perplexityai:mainfrom
gleb-reshetnev:psi/api-3381-agent-api-support

Conversation

@gleb-reshetnev

Copy link
Copy Markdown

Motivation

The official MCP server currently routes Claude Code, Cursor, Antigravity, and other MCP clients through legacy Sonar Chat Completions with hardcoded models. This moves the three generative tools onto the Agent API so those clients can use Agent presets and provider/model selection through the integration we own.

Linear: API-3381

What changed

  • route perplexity_ask, perplexity_research, and perplexity_reason through streaming POST /v1/agent requests
  • add Zod schemas for Agent requests, Responses output items, and SSE events
  • assemble streamed output text and citations from all search_results batches
  • expose optional model and preset tool parameters, with fast, medium, and low defaults by tool
  • translate existing search filters and reasoning effort to Agent API request shapes
  • keep perplexity_search on the Search API
  • bump package and registry metadata to 0.10.0

Rollout

Merging the version bump publishes 0.10.0 through the repository release workflow. The public API docs update is intentionally separate and should land after that package is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant