Runtime Connections
Perplexity Sonar
Official · RCBuilt-innpm: @loop-engine/adapter-perplexityProvider: Perplexity
Archetype: AI (Tool) — implements ToolAdapter.invoke(...) for grounded retrieval with citations.
What it does
@loop-engine/adapter-perplexity implements ToolAdapter.invoke() against the Sonar chat API. You get answer text plus structured citations for audit and evidence attachment. Use it where provenance matters more than open-ended generation.
When to use it
- Regulatory or policy research with domain allowlists
- Supplier, market, or news checks inside a governed Loop
- Any step where you must show which sources justified the output
Quick setup
-
Install
1npm install @loop-engine/adapter-perplexity -
Create the adapter
1import { PerplexityAdapter } from "@loop-engine/adapter-perplexity";23const perplexity = new PerplexityAdapter({4 apiKey: process.env.PERPLEXITY_API_KEY!,5 defaultModel: "sonar-pro",6 defaultSearchRecency: "month",7}); -
Invoke from your Loop step
See the full API, metadata keys, and error table on the package reference.