labs-perplexity

A command that sends a research question to Perplexity's experimental Labs mode through an automated browser session.

In plain words
What is it for?
Use it to investigate a topic or analyse a software project using the current session context.
Why use it?
It lets you run longer research queries using your existing Perplexity login, without setting up an API key.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/intellegix/intellegix-code-agent-toolkit/labs-perplexity
Clone the repo
git clone --depth 1 https://github.com/intellegix/intellegix-code-agent-toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,868 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01868
Opus 5 $0.00000 $0.00934
Sonnet 5 $0.00000 $0.00374
Haiku 4.5 $0.00000 $0.00187

Measured 2d ago against content hash 47188c299f6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

labs-perplexity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/labs-perplexity.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/labs-perplexity — Labs Query via Perplexity

Run a query using Perplexity's /labs mode via Playwright browser automation. Similar to /research-perplexity but uses Perplexity's experimental labs mode with a longer 15-minute timeout for complex queries.

No API keys required — uses Perplexity login session only.

CRITICAL: Do NOT ask the user questions before completing Step 0 and Step 1. Compile context silently, build the query, and execute. Only ask questions if $ARGUMENTS is empty AND you cannot determine a useful research focus from the compiled context.

Input

$ARGUMENTS = The research question or topic to investigate. If empty, defaults to a general project analysis.

Workflow

Step 0: Compile Session Context — MANDATORY, SILENT

Before doing ANYTHING else, compile the current session state. Do NOT ask the user any questions during this step — proceed silently and autonomously.

  1. Read project memory: Read the project's MEMORY.md from the auto-memory directory to understand what's been worked on, recent patterns, and known issues
  2. Recent commits: Run git log --oneline -10 to see recent work
  3. Uncommitted work: Run git diff --stat to see what's in progress
  4. Active tasks: Check TaskList for any active/pending tasks
  5. Synthesize: Form a 1-paragraph internal "current state" summary — do NOT output this to the user, just hold it in context for Step 1

Do NOT present findings. Do NOT ask questions. Proceed directly to Step 0.5.

Step 0.5: Explore Codebase — MANDATORY, SILENT

After compiling session context (Step 0), explore the actual codebase:

  1. Find key files: Use Glob for main source files (*.py, *.ts, *.js) in project root and src/
  2. Read recently modified: Run git diff --name-only HEAD~5 HEAD, read up to 10 files (first 100 lines each)
  3. Read structural files: README.md, pyproject.toml, package.json if they exist
  4. Synthesize: Form internal "codebase summary" — key files, purposes, connections

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 142 lines · 0 tokens per session scan A 47188c299f6d

Subscribe to this mod's changes

labs-perplexity is a command published in the GitHub repository intellegix/intellegix-code-agent-toolkit (57 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,868 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.