Define the run - Perplexity
Summary
The Perplexity Agent API allows users to define and control agent runs through several key parameters. Each run requires an engine, configurable via a single "model" (e.g., "openai/gpt-5.5"), a "models" fallback chain of up to five options, or a "preset" which bundles a model, system prompt, search configuration, and tools. "models" takes precedence over "model", and "preset" offers a tuned starting point. Users set "instructions" to define system-level rules like role and tone, which override a preset's prompt. The "max_steps" parameter bounds the agent's iterative loop, capping how many times it can reason and call tools; examples include "1" for a single pass or "10"+ for deep research. Additionally, "background: true" enables asynchronous execution for longer, non-blocking runs.
Key takeaway
For AI Engineers designing agentic workflows, precisely configuring Perplexity Agent API runs is crucial for performance and control. You should explicitly define your agent's engine using "model" or "models" for flexibility, or "preset" for rapid deployment. Carefully craft "instructions" for system-level guidance, remembering they override preset prompts. Crucially, set "max_steps" to balance latency and depth, preventing runaway loops and optimizing resource use for your specific task. Consider "background: true" for long-duration research agents.
Key insights
The Perplexity Agent API offers granular control over agent execution through explicit model selection, instruction setting, and loop bounding.
Principles
- Prioritize "models" over "model" for fallback chains.
- "preset" offers a tuned agent configuration.
- Keep "instructions" lean to optimize token processing.
Method
Define an agent run by selecting an engine ("model", "models", or "preset"), setting system "instructions", and bounding iterations with "max_steps".
In practice
- Use "preset" for quick starts, then "model" for control.
- Set "max_steps: 1" for single-pass tool execution.
- Employ "background: true" for long-running agent tasks.
Topics
- Perplexity Agent API
- Agent Configuration
- Large Language Models
- System Prompts
- Tool-Use Agents
- Asynchronous API
Best for: AI Engineer, Machine Learning Engineer, Prompt Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by perplexity.ai via Google News.