data
Perplexity MCP, CLI, and Lua Integration for AI Agents
Perplexity integration docs for AI agents: MCP gateway setup, Perplexity CLI commands, Lua API reference, credentials, and function schemas.Perplexity for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Agent Surfaces
Machine-Readable Metadata
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
perplexity.perplexity_chat | Read read | 17 | Create a Perplexity Sonar chat completion. Supports multi-turn conversations, web search controls, citations, images, and related questions. |
perplexity.perplexity_ask | Read read | 16 | Ask Perplexity a one-shot question through the Sonar chat endpoint and get an answer with citations and optional search metadata. |
perplexity.perplexity_search | Read read | 11 | Search the web with Perplexity Search API and return relevant page results. Use this when you need sources/content, not a generated answer. |
perplexity.perplexity_create_async_sonar | Read read | 8 | Submit an asynchronous Sonar chat completion request and return the request id/status for later polling. |
perplexity.perplexity_list_async_sonar | Read read | 0 | List asynchronous Sonar chat completion requests for the configured Perplexity account. |
perplexity.perplexity_get_async_sonar | Read read | 1 | Retrieve status and response data for a Perplexity asynchronous Sonar request. |
perplexity.perplexity_agent | Read read | 6 | Create a Perplexity Agent API response for an input prompt with optional model and tool configuration. |
perplexity.perplexity_embeddings | Read read | 4 | Create Perplexity embeddings for a string or array of strings. |
perplexity.perplexity_contextualized_embeddings | Read read | 4 | Create contextualized embeddings for document chunks grouped by source document. |
perplexity.perplexity_list_models | Read read | 0 | List Perplexity Agent API models. Returns model IDs in OpenAI-compatible list format. |