> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Search the web and run AI completions with Perplexity

> Connect Guild agents to Perplexity to search the web, run chat completions, generate embeddings, and manage batches, monitors, and skills under governed access.

Integrations · Perplexity

Guild agents search the web and run AI workloads through Perplexity's APIs. Guild stores the API key server-side and injects it as a bearer token, so agent code never sees the credential. Credential policies let you restrict which operations each agent may call, and audit events record every request.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Perplexity.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Perplexity to your first agent.

## What the Perplexity integration exposes

The tools cover Perplexity's Agent, Search, Sonar, Embeddings, and Orchestrator APIs, plus batch job management, file uploads, monitor lifecycle, skill management, and usage analytics. Agents can search up to five queries in one request, fetch and score up to 50 URLs, generate embeddings for text, documents, or images, and retrieve organization-level audit events. Gateway tools let agents send conversations to any Orchestrator API model using the OpenAI or Anthropic request schemas. Usage analytics tools return bucketed time-series data and per-member daily breakdowns.

## How it works

**1. Open credentials in Guild**

Go to Access & setup > Credentials in your Guild account or organization. Guild stores credentials at account, workspace, member, or agent scope.

**2. Connect the Perplexity credential**

Click Connect, select perplexity, and paste your API key into the API Key field. Guild sends it as a bearer token in the Authorization header on every request.

**3. Import and use the tools**

Import PerplexityTools from the integration package and spread it into your agent's tools object. Use pick() to include only the tools your agent needs.

## Why Perplexity access needs governing

Perplexity credentials carry broad permissions: the same API key can search the web, submit batch jobs with files up to 200 MB, delete monitors and their run history, and read organization-level audit events. Guild's credential proxy enforces credential policies before any request reaches Perplexity. DENY rules block specific operations outright; ALLOW rules can be scoped to particular agents or workspaces, so a research agent can search while a reporting agent reads analytics and neither can touch the other's resources.

Guild injects the credential server-side only after the policy check passes. Agents never see the key. Every call is recorded in audit events, which the perplexity\_list\_admin\_audit\_events tool also surfaces directly. For tighter isolation, connect a dedicated credential to a single agent, or restrict a workspace to its own credentials so shared account credentials cannot reach it.

## About the Perplexity integration

Agents can query the web, run chat completions synchronously or asynchronously, and generate embeddings and contextualized embeddings. They can manage batch jobs, files, monitors, and skills through Perplexity's APIs. Usage analytics and audit events are also accessible. The integration is `guildai~perplexity`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect Perplexity**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **perplexity**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { PerplexityTools } from "@guildai-services/guildai~perplexity"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Perplexity.",
  tools: { ...PerplexityTools },
})
```

### Selecting specific tools

Tools are named with the `perplexity_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~perplexity`:

> [accordion] All 48 tools
>
> | Tool | What it does |
> | - | - |
> | `perplexity_cancel_agent_response` | Requests cancellation of response '\{id}'. |
> | `perplexity_cancel_batch` | Moves the batch to 'cancelling'; it becomes 'cancelled' once running items stop. |
> | `perplexity_chat_completions_chat_completions_post` | Generate a chat completion response for the given conversation. |
> | `perplexity_context` | Fetch Markdown, HTML, links, highlights, and page metadata for 1 to 50 URLs, and optionally score each page with criteria. |
> | `perplexity_contextualized_embeddings_v1_contextualizedembeddings_post` | Generate contextualized embeddings for document chunks. |
> | `perplexity_create_agent` | Generate a response for the provided input with optional web search and reasoning. |
> | `perplexity_create_async_chat_completions_async_chat_completions_post` | Submit an asynchronous chat completion request. |
> | `perplexity_create_batch` | Creates a batch from an uploaded input file. |
> | `perplexity_create_file` | Uploads a JSONL batch input file, up to 50,000 lines and 200 MB. |
> | `perplexity_create_monitor` | Creates an 'active' monitor. |
> | `perplexity_create_skill` | Creates a skill from a zip bundle. |
> | `perplexity_decisions_v1_decisions_post` | Evaluate one or more named questions against the content in 'state'. |
> | `perplexity_delete_file` | Deletes a file. |
> | `perplexity_delete_monitor` | Deletes the monitor, its run history, and its state, and stops scheduling new runs. |
> | `perplexity_delete_skill` | Deletes a skill. |
> | `perplexity_download_skill` | Returns a short-lived URL to download the skill bundle as a zip. |
> | `perplexity_embeddings_v1_embeddings_post` | Generate embeddings for texts, pre-chunked documents (pplx-embed-v2), or images (pplx-embed-v2). |
> | `perplexity_gateway_create_chat_completion` | Send a conversation to any Orchestrator API model using the OpenAI Chat Completions schema. |
> | `perplexity_gateway_create_message` | Send a conversation to any Orchestrator API model using the Anthropic Messages schema. |
> | `perplexity_gateway_create_response` | Generate a model response using the OpenAI Responses schema. |
> | `perplexity_gateway_list_models` | List the models available through the Orchestrator API, sorted by id. |
> | `perplexity_gateway_retrieve_model` | Retrieve one model by id, including its base token prices. |
> | `perplexity_get_async_chat_completion_response_async_chat_completions_api_request_get` | Retrieve the response for a given asynchronous chat completion request. |
> | `perplexity_get_batch` | Retrieve a batch |
> | `perplexity_get_computer_usage_analytics` | Returns your organization's Perplexity usage analytics as a bucketed time series for a single dataset. |
> | `perplexity_get_computer_usage_analytics_v2` | Returns your organization's Perplexity usage broken down per member, as daily buckets. |
> | `perplexity_get_file` | Retrieve a file |
> | `perplexity_get_monitor` | Returns the monitor with its status, 'next\_run\_at', and last run. |
> | `perplexity_get_monitor_run` | Returns one run with its changes and target errors. |
> | `perplexity_get_skill` | Returns a skill. |
> | `perplexity_list_admin_audit_events_v1_admin_audit_events_get` | Returns the organization's audit events, newest first. |
> | `perplexity_list_agent_files` | List the files a response produced in the sandbox and delivered with the 'share\_file' tool. |
> | `perplexity_list_async_chat_completions_async_chat_completions_get` | Retrieve a list of all asynchronous chat completion requests for a given user. |
> | `perplexity_list_batches` | Lists your organization's batches, newest first. |
> | `perplexity_list_files` | Lists your organization's files, both uploads and the output and error files batches write. |
> | `perplexity_list_models` | List the models available for the Agent API. |
> | `perplexity_list_monitor_runs` | Lists the monitor's runs with their changes, newest first. |
> | `perplexity_list_monitors` | Lists your API Group's monitors, newest first. |
> | `perplexity_list_skill_revisions` | Lists the revisions of a skill, newest first. |
> | `perplexity_list_skills` | Lists the skills in your Project, newest first. |
> | `perplexity_pause_monitor` | Stops scheduled runs and keeps the monitor's state. |
> | `perplexity_resume_monitor` | Resumes scheduled runs and sets 'next\_run\_at' from now. |
> | `perplexity_retrieve_agent` | Retrieve a response created earlier. |
> | `perplexity_run_monitor` | Queues a manual run and returns it at once with status 'queued'. |
> | `perplexity_search_search_post` | Returns ranked web results for one query, or for up to five queries in one request. |
> | `perplexity_test_monitor_webhook` | Sends one signed 'monitor.webhook.test' event to the configured webhook URL. |
> | `perplexity_update_monitor` | Replaces each top-level field the body names: any subset of 'name', 'goal', 'targets', 'schedule', 'webhook' and 'metadata'. |
> | `perplexity_update_skill` | Uploads a new zip bundle as a new revision of an existing skill. |

## Frequently asked questions

> [accordion] Can one Perplexity credential serve multiple workspaces?
>
> Yes. An account-scoped credential serves every workspace the account owns by default. You can also scope a credential to one workspace, one member, or one agent if you need separate keys per team or project. See [Credentials](https://docs.guild.ai/platform/credentials.md) for the full scoping options.

> [accordion] Can I stop an agent from deleting monitors or skills?
>
> Yes. Write a DENY rule in the credential policy targeting perplexity\_delete\_monitor, perplexity\_delete\_skill, and related operations. Guild's credential proxy blocks those calls before they reach Perplexity, regardless of what the agent requests. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md) for rule syntax.

> [accordion] Does the integration support webhook events from Perplexity?
>
> No. The catalog entry lists no webhook events for this integration. The perplexity\_test\_monitor\_webhook tool can send a signed test event to a URL you configure on a monitor, but Guild does not receive or trigger on inbound Perplexity webhook events.

> [accordion] Can I limit the integration to only search tools?
>
> Yes. Use pick() when importing PerplexityTools to include only the tools your agent needs, such as perplexity\_search\_search\_post and perplexity\_context. Tools not passed to the agent are not available to it. See [Tool sets](https://docs.guild.ai/sdk/tools.md) for how pick() works.

## Put a governed agent on Perplexity this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Perplexity.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Perplexity to your first agent.

## Related

**Also runs on Guild:** [Apify](https://docs.guild.ai/integrations/apify.md) · [Browserbase](https://docs.guild.ai/integrations/browserbase.md) · [Cloudflare](https://docs.guild.ai/integrations/cloudflare-openapi.md) · [Firecrawl](https://docs.guild.ai/integrations/firecrawl.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
