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.
npx agentmods add instructions/jamie950315/pplx-proxy/agents-mdgit clone --depth 1 https://github.com/jamie950315/pplx-proxyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/jamie950315/pplx-proxy/agents-md)<a href="https://agentmods.dev/instructions/jamie950315/pplx-proxy/agents-md"><img src="https://agentmods.dev/badge/instructions/jamie950315/pplx-proxy/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.07415 | $0.07415 |
| Opus 5 | $0.03707 | $0.03707 |
| Sonnet 5 | $0.01483 | $0.01483 |
| Haiku 4.5 | $0.00741 | $0.00741 |
Grade B, and why
pplx-proxy AGENTS.md scanned grade B with 2 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 today.
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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
curl -X POST /admin/update-models -d '{"models":{"new":["pro","pref"]},"merge":true}' Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -X POST /admin/update-models -d '{"models":{"new":["pro","pref"]},"merge":true}' How it starts
The opening of the file, as written. The whole thing — 647 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
What This Is
pplx-proxy is a self-hosted reverse proxy for Perplexity.ai. Uses your Pro/Max subscription cookie to access all models through OpenAI-compatible REST API and MCP server.
Architecture
Single FastAPI app (server.py, ~1750 lines) that:
- Receives OpenAI-format chat/completions or MCP requests
- Translates to Perplexity's internal SSE (
POST /rest/sse/perplexity_ask) - Uses
curl_cffiwith Chrome TLS fingerprinting to bypass Cloudflare - Streams responses back in OpenAI SSE or MCP format
- Background tasks: session keep-alive (6h) + model discovery (24h)
Critical parameter: search_focus: "internet" must be set in requests to Perplexity. Without it, Perplexity defaults to "writing" mode and models will say "I cannot access real-time data" even though search results are found.
Key Concepts
Account Tiers (ACCOUNT_TYPE in .env):
free: onlyautopro: all models except Opusmax: all models including Opus- Tier filtering applies to API, MCP, model listing, and discovery
Model Map: dict of {model_id: (mode, internal_pref)}. Loaded from .models.json (persisted) or defaults. Filtered by tier at runtime.
Thinking Variants: activated via thinking: true or reasoning_effort != "none". Maps from _THINKING_MAP (e.g., gpt → gpt56_terra_thinking, sonnet → claude50sonnetthinking). Perplexity does NOT expose internal thinking blocks — reasoning_content is populated from search steps (queries, URLs, plan goals).
Context Management: request payloads are assembled as JSON with instructions / history / query. Total query capped at 96K chars (~32K tokens). Consecutive same-role messages deduped (keeps last — fixes LibreChat branch artifacts). Generic clients still use whitelist-filtered system prompts from .prompt_whitelist.txt, but LobeHub requests now discard upstream system/developer prompt content entirely and prepend local CUSTOM_PROMPTS on every turn.
Session Continuity: the proxy tracks Perplexity's backend_uuid per conversation turn. On follow-up turns (detected by hashing conversation history), only the raw user query is sent with last_backend_uuid — no instructions, no history. Perplexity's server-side session memory handles context. Sessions expire after 1 hour. Falls back to full payload on cache miss.
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.
- today Changed · +8 lines · +212 tokens per session cc1ce8197fe1
- 4d ago First seen · 639 lines · 7,203 tokens per session scan B 88f4b0fc4795
pplx-proxy AGENTS.md is an instructions file published in the GitHub repository jamie950315/pplx-proxy (22 stars, last pushed yesterday), licensed MIT. It adds 7,415 tokens to every session, about $0.0371 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.