First-party app
Perplexity

Perplexity

Web-grounded chat completions, search, and embeddings via the Perplexity API.

stable AI & Machine Learning

About

Perplexity ships in the w6w first-party pack. It declares 5 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.perplexity
Version
0.1.1
Author
w6w
Licence
MIT
Categories
AI & Machine Learning

Overview

Perplexity puts web-grounded AI into a workflow — a multi-provider chat/agent call that can optionally search the web as a tool, a standalone ranked web search that returns extracted page content, and text embeddings. The chat surface covers both the current Agent API and the older Sonar chat-completions endpoint it is replacing; Sonar keeps working for existing integrations through its documented retirement date, while new work should reach for the Agent API action instead.

The two chat actions differ in more than name: the Agent API accepts models from multiple providers, or a small set of stable presets that bundle a model and configuration, only searches the web when a search tool is explicitly attached and the model chooses to call it, and only returns inline citation markers when the prompt asks for them. Sonar, by contrast, searches by default and always returns citations. Both expose the same search filters — domain, recency, date range — just nested differently in the request.

A few response shapes are easy to misread: embeddings never come back as a plain numeric array, only as base64-encoded packed bytes that the caller decodes; and the model-listing action enumerates the Agent API’s own catalog, not Sonar’s fixed model names, since Sonar’s models aren’t a queryable list at all.

Build with Perplexity

Three routes to the same 5 actions. The Workflow tab is generated from Perplexity's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Agent Response

agent-response

Generate a response using Perplexity's Agent API — the documented successor to Sonar chat completions (see `chat-completion`), with multi-provider models, optional web search, and an OpenAI-Responses-style `output[]` result. Prefer this action for new work.

Chat Completion (Sonar — retiring 2026-09-27)

chat-completion

Generate a web-grounded chat completion from a Sonar model, with citations and search results. Sonar is deprecated by Perplexity in favor of the Agent API, effective 2026-09-27 — use the `agent-response` action for new work. See the README.

Create Embeddings

create-embeddings

Generate embeddings for one or more input strings. The returned vectors are base64-encoded, not plain float arrays — see the README.

List Agent API Models

list-models

List the third-party and Perplexity models available through the Agent API (POST /v1/agent). Does not include the Sonar chat-completion models.

Web Search

web-search

Search the web and retrieve ranked results with extracted page content.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Perplexity's real ids.

{
  "manifestVersion": "2",
  "name": "perplexity-example",
  "steps": [
    {
      "id": "agent-response",
      "uses": {
        "app": "io.w6w.perplexity",
        "action": "agent-response",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "input": "<input>"
      }
    }
  ]
}

Here are some of the things you can do

  • Agent Response

    perform
    agent-response
  • Chat Completion (Sonar — retiring 2026-09-27)

    perform
    chat-completion
  • Create Embeddings

    perform
    create-embeddings
  • List Agent API Models

    read
    list-models
  • Web Search

    search
    web-search

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Perplexity, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Perplexity. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "agent-response",
  payload: {
    input: "<value>",
    // instructions: "<value>",
    // preset: "<value>",
    // model: "<value>",
    // models: "<value>",
    // reasoningEffort: "<value>",
    // maxOutputTokens: "<value>",
    // maxSteps: "<value>",
    // jsonSchema: "<value>",
    // languagePreference: "<value>",
    // previousResponseId: "<value>",
    // store: "<value>",
    // temperature: "<value>",
    // topP: "<value>",
    // enableWebSearch: "<value>",
    // webSearchContextSize: "<value>",
    // webSearchMaxResults: "<value>",
    // webSearchMaxTokens: "<value>",
    // webSearchMaxTokensPerPage: "<value>",
    // searchDomainFilter: "<value>",
    // searchRecencyFilter: "<value>",
    // searchAfterDateFilter: "<value>",
    // searchBeforeDateFilter: "<value>",
    // lastUpdatedAfterFilter: "<value>",
    // lastUpdatedBeforeFilter: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action agent-response --payload '{"input":"<value>"}'

Give an AI agent Perplexity — without giving it Perplexity's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.perplexity#agent-response",
    "input": {
      "input": "<input>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Perplexity connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Perplexity's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Perplexity itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Perplexity declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Perplexity platform status

Instatus per-component status for status.perplexity.com. The verdict tracks the `API` component; `Website` and `Computer` are reported for attribution only. Unauthenticated and unsigned.

quota

API quota headroom

Not exposed: no response carries a rate-limit header, and the only usage-metering endpoints require a separate organization analytics key this app does not collect.