Perplexity AI
The robomotion perplexity CLI connects to Perplexity AI for search-augmented AI responses. It provides chat completions grounded in real-time web data with source citations, combining LLM reasoning with live search results.
When to use
- Search the web with AI-powered answers and citations
- Run chat completions with real-time web data grounding
- Get up-to-date factual responses backed by sources
Prerequisites
robomotionCLI installed- Package installed:
robomotion install perplexity - Perplexity API key configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install perplexity - Connect with session:
robomotion perplexity perplexity_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion perplexity perplexity_chat --client-id "<client-id>" --messages <json> --session-id "<session-id>" --output json - Disconnect when done:
robomotion perplexity perplexity_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion perplexity perplexity_connect --session --output jsonConnects to Perplexity AI and returns a client ID for subsequent operationsrobomotion perplexity perplexity_disconnect --client-id --session-id "<session-id>" --output jsonCloses the Perplexity connection and releases resourcesrobomotion perplexity perplexity_chat_completion --client-id --user-message --system-message --messages [--model] [--search-context-size] [--search-recency-filter] [--search-mode] [--search-domain-filter] [--max-tokens] [--temperature] [--120] --session-id "<session-id>" --output jsonGenerates an AI response with real-time web search using Perplexity Sonar modelsrobomotion perplexity perplexity_search --client-id --query [--10] [--search-recency-filter] [--search-domain-filter] [--language-filter] [--country] [--60] --session-id "<session-id>" --output jsonSearches the web using Perplexity and returns ranked results with snippets
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)