Learning resourcesReviewed · Perplexity

Perplexity Agent API Prompt Guide

Perplexity’s Agent API Prompt Guide teaches developers to guide web-search agents, with the catch that custom instructions replace an effort level’s built-in system prompt. It explains where to put questions, behavior rules and search constraints, and how to extract source URLs from structured responses.

Researched 25 Nov 2026

In short.

Perplexity’s Agent API Prompt Guide is a practical guide for developers building search-based AI applications, with the catch that custom instructions replace the selected effort level’s built-in system prompt. Its most useful details cover persistent instructions, search-specific inputs, structured source extraction and disabling tools. One displayed response conflicts with its domain-filter example, so that example does not establish filter enforcement. Nothing was executed; application reliability and current API costs remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete supplied page at [https://docs.perplexity.ai/docs/agent-api/prompt-guide.md], including its warnings, tool-disabling tip, code examples and embedded responses. Linked documentation, the documentation index and external sites appearing in example search results are excluded. No code or API request was executed. Live filtering, response compatibility, accuracy, latency and costs remain unassessed.

The overview

identity

This is Perplexity’s documentation page about writing prompts for its Agent API. It teaches how to configure an agent that can search, read tool results and decide whether to continue or answer. The resource is a guide, rather than an application, downloadable agent or model.

The source address is [https://docs.perplexity.ai/docs/agent-api/prompt-guide.md].

assessment

The guide is useful when integrating the Agent API or diagnosing vague searches, weak grounding and unreliable source links. It connects prompting choices to specific request fields instead of relying only on general writing advice.

Its strongest contribution is explaining configuration traps: overriding an effort level’s prompt, expecting an empty tools array to disable tools, and treating model-written URLs as authoritative. It does not establish measured improvements in accuracy, latency or cost.

users

The clearest audience is developers building applications that answer questions using web sources. Beginners get an explanation of the agent loop and examples in three request styles. Experienced developers get details about system-prompt replacement, search constraints, streaming events and source identifiers.

Readers seeking a complete introduction to authentication, deployment or application security will need additional documentation; those subjects are not covered here.

capabilities

The guide explains how instructions controls role, tone, language, formatting and grounding rules, while input supplies the question and strongly influences the first search. It recommends specific vocabulary, context that resolves ambiguity and explicit limits on requested list lengths.

It also describes web_search filters for retrieval constraints, max_steps for bounding the loop, response_format for schema-based output and clear descriptions and parameter schemas for custom function tools. These are documented configuration options, not capabilities independently demonstrated here.

Using it

requirements

Running the examples requires authenticated Perplexity API access and either the illustrated Python SDK, TypeScript SDK or an HTTP client. The HTTP example uses a bearer credential supplied through PERPLEXITY_API_KEY and sends JSON to [https://api.perplexity.ai/v1/agent].

SDK installation commands, supported runtime versions, credential provisioning, account eligibility and billing setup are not established by this page. Understanding basic API requests and JSON will help readers apply it.

mechanism

The Agent API is described as a bounded loop: the model can call a tool, read its result and then continue or answer. Instructions are applied on every turn, so they influence tool behavior as well as the final response. The guide recommends keeping them focused because repeated instructions add overhead across turns.

Supplying instructions alongside an effort level replaces that level’s system prompt, including its existing tool-use and citation guidance. Without an effort level, instructions is the only system prompt described. The guide places hard retrieval constraints in request parameters because prose constraints depend on the model interpreting them.

setup

Start with an effort level’s default behavior unless the application needs custom instructions. Put the actual question and relevant context in input. If overriding instructions, account for the default behavior being replaced and explicitly include any grounding or formatting rules the application needs.

Configure retrieval restrictions through web_search filters and bound the loop with max_steps. Use response_format when a consumer needs schema-shaped output. To run without tools, the page specifies tools_disabled: true; tools: [] leaves the effort level’s default tools active.

example

The Python example creates a Perplexity client and calls client.responses.create with effort set to low. Its input asks about hosted language-model API pricing and context limits. Its custom instructions request concise research and explicit acknowledgment when searches cannot find relevant information. It then prints response.output_text.

Equivalent TypeScript and HTTP examples show the same request pattern. The embedded response illustrates search results, answer text and usage fields. It does not establish a guaranteed model, search-result set, answer quality or repeatable charge. None of these examples was executed here.

Assessment & evidence

limitations

The guide acknowledges that repeated searching does not eliminate unsupported answers. Private or login-protected material, paywalls, indexing delays and related but non-matching results can leave the agent without adequate evidence. Instructions to disclose missing results or mismatches are mitigations, not guarantees.

There is a concrete inconsistency in the examples: the preferred request sets a Wikipedia-only domain filter, but its displayed search_results include several other sites. The page does not explain the mismatch. This prevents that example from establishing that domain restrictions were enforced; it does not independently prove how the live API behaves.

reasoning

The guide’s useful organizing principle is to separate persistent behavior, the current question and enforceable request settings. This helps developers decide whether a problem calls for clearer wording, different configuration or better handling of returned evidence.

Its source-handling advice is especially practical: display URLs from structured search results rather than trusting the model to reproduce them accurately. This follows the documented response structure, but its effect on a particular application remains unassessed.

alternatives

Within the documented API, retaining an effort level’s built-in prompt is an alternative to writing a replacement. For machine-readable output, response_format is presented as an alternative to lengthy formatting instructions. For source restrictions, search parameters are preferred over prose.

The page does not compare competing agent services or prompting guides. Relative quality, migration effort and comparative cost cannot be determined from this source.

evidence

The evidence consists of the complete supplied Perplexity Prompt Guide, including explanatory text, request examples and embedded response payloads. Those payloads are documentation examples, not independently verified execution records.

For non-streaming responses, the guide says to collect every response.output item whose type is search_results and read results[].url. Search results across those items share a citation identifier space. For streaming, it identifies response.reasoning.search_results events as the source of search metadata.

Access & freshness

costs

Current API pricing is unknown from this page. One embedded response reports 7,705 total tokens and a total cost of USD 0.04294, with separate input, output, cache-read and tool-call cost fields. Those figures describe a documentation example, not a price quotation or a measured result from this assessment.

The page warns that instructions are reread across the loop, which makes their length relevant to request overhead. It provides no current tariff, free allowance or reliable workload estimate.

rights

The supplied page does not state a reuse licence for its documentation or code samples. Permission to redistribute those materials, commercial reuse conditions and attribution requirements are therefore unknown.

API terms, output ownership and data-retention commitments are also not established here. The presence of examples does not resolve those questions.

freshness

The supplied page was captured on November 25, 2026. Its text does not establish a publication date, last revision date or SDK version. Dates and timestamps inside example responses do not establish when the surrounding guidance was updated.

Current model availability, prices and compatibility with subsequently changed SDKs are unknown from this page.

actions

Use the guide to structure an initial integration: keep questions specific, preserve default effort behavior where suitable and make missing evidence explicit. Implement source extraction across all search_results items rather than taking only the first set of results.

Before depending on retrieval restrictions, verify them against returned source metadata, particularly given the inconsistent domain-filter example. Consult the linked output-control, filter and effort documentation for complete schemas, and establish current pricing and applicable terms separately. These follow-up actions were not performed.

Evidence for this report

selected-page.txtselected · checked 2026-11-25