- Built-in
office— the umbrella that lets the model pick the right document format (PDF, in this case). - Inline
design-system— a request-scoped skill that carries your colors, fonts, and layout rules.
Prerequisites
Install one SDK:- Python:
pip install perplexityai - TypeScript:
npm install @perplexity-ai/perplexity_ai
Get your Perplexity API Key
Navigate to the API Keys tab in the API Portal and generate a new key.
Define the design skill
The inlinedesign-system skill tells the model how the report should look. Its description is the routing trigger — one line telling the model when to load it. The instructions carry the full design book.
Keep the design book short and directive. The model reads it once, per request, and applies it while generating the document.
Generate today’s report
Combine theoffice umbrella with the inline design-system skill. The prompt names the tickers and asks for today’s move plus dated news tagged to the ticker each item moved.
Skills run on the durable backend, so submit with background: true and poll GET /v1/agent/{id} until the status is terminal.
What the response contains
The completed response’soutput includes:
- One
skill_loadeditem fordesign-systemand one for the built-inoffice/pdfleaf the model loaded from the umbrella. - A
share_fileitem pointing to the generated PDF. Download it with the response files endpoints, as shown in Working with files.
Run it every trading day
Turn the snippet into a scheduled job (cron, Airflow, GitHub Actions) that runs after the US market closes. The design skill lives in your code, so the report stays visually consistent every day while the content updates itself.Next steps
Skills
Full reference for the skills field, the built-in catalog, and inline skills.
Working with Files
List and download files an Agent API response produced in the sandbox.
Background Mode
Submit, poll, stream, and cancel long-running agent runs.