# PAT (Perplexity as a Tool) > PAT connects your own Perplexity Pro or Max subscription to local AI coding and research agents (Claude Code, Cursor, Antigravity). Cloud queries and heterogeneous model reasoning (Layer A) run separately from local computation, privacy gates, verified citation ledgers, and publication-grade rendering (Layer B). ## Agent First-Step Protocol (When the User Says "调用 PAT MCP" or "use PAT MCP") If PAT MCP is already installed locally, call `guide(edition="auto", goal=...)` FIRST before doing anything else. If you are reading this manual remotely: 1. **Zero jargon**: Do not dump CLI flags, port numbers, or long skill lists onto the user. 2. **Ask at most 2–3 plain-language questions** when the goal is broad: - What outcome do you want (quick cited research, multi-model critique/Council, academic paper/thesis, financial earnings/valuation, or medical cohort/review/grant)? - What local files are involved (draft `.md`, `.pdf`, Excel/CSV tables)? - What deliverable format should be saved locally (chat answer, Markdown report, mobile HTML via `pat render`, `.docx`, or `.xlsx`)? 3. **Run Layer A + Layer B and report honestly**: Call the appropriate PAT MCP tools + local skills, inspect the saved files under `research//`, and always mention if a query reports `substituted` (model quota fallback). Never fabricate citations, financial numbers, or clinical statistics. ## MCP Tools Quick Reference - `guide(edition="auto", goal="", lang="zh")`: Built-in onboarding & goal router (auto-detects Core / Education / Finance / Medical Pro). Also exposed via resources `pat://guide` and `pat://guide/{edition}`. - `search(query, topic="", model="", sources="web", max_chars=6000, keep_citations=False, files=None)`: Single cited search saved to `research//`. `sources`: `web`, `scholar`, `social`. - `council(query, topic="", models=None, files=None, sources="web", thinking=False, keep_citations=False, synthesize=False, chair_model=None)`: V2.2 Model Council — fans out 1 prompt to 2–5 heterogeneous models in parallel under `research//council/`. Default Mode A synthesizes locally (zero extra synthesis quota); `synthesize=True` triggers Mode B Chair synthesis. - `batch_search(queries, topic="", model="", sources="web", preview_chars=700, keep_citations=False)`: Concurrent multi-query retrieval. - `reason(query, topic="", model="", max_chars=6000, keep_citations=False)`: Extended multi-step reasoning. - `deep_research(query, topic="", max_chars=4000, keep_citations=False)`: Deep Research (1–5 min, weekly Research quota; use only when deep coverage is requested). - `status()` / `models()`: Local engine readiness, session health, and accepted model IDs. - `coding_plan` / `coding_start` / `coding_consult` / `coding_pack` / `coding_review`: PAT Coding V2 governance workflow — call ONLY when the user explicitly requests `pat-coding`. - Medical Pro extras (when Medical Pro is installed): `med_workbench(goal=...)` and `med_run_tool(...)`. ## Tiered Local File Delivery (`files` / `-f`) - Up to **5 local files**, **<= 20 MiB** per file and total, never silently truncated. - **Tier 1** (`<= 24,000` chars UTF-8 `.txt/.md/.markdown/.csv/.json`): Injected inline safely. - **Tier 2** (images, `> 24,000` char text, `.pdf/.rtf/.doc/.docx/.xlsx/.pptx`): Uploaded once and reused across Council seats. For very long PDFs/filings, chunk locally by section before querying. - **Tier 3**: Credentials, keys, oversized inputs, and unsupported types fail closed. ## Edition Playbooks - [PAT Core V2.2 Playbook](/agent/core.md): General research, Model Council, local file attachments, `pat render`, and PAT Coding V2. - [PAT Education Edition Playbook](/agent/education.md): Academic Skill Hub (port `8895`), 7-stage thesis/paper skills, `.pat-academic/verified_refs.json` L1/L2/L3 anti-fabrication ledger, GB/T 7714 / IEEE / APA / CNKI. - [PAT Finance Edition Playbook](/agent/finance.md): Finance Skill Hub (port `8896`), 7 research & valuation skills, `.pat-finance/verified_facts.json`, offline MNPI/holdings isolation, objective non-advisory rules. - [PAT Medical Pro Playbook](/agent/medical.md): `pat-med` router & `Med Workbench` (`8893/med`), 6 clinical research packs, 100% offline 18-category PHI gate, PubMed/Crossref Retraction Watch grounding, deterministic biostats. ## Optional Full Single-File Bundle - [Complete Agent Manual (/llms-full.txt)](/llms-full.txt): Combined index + all four edition playbooks in a single Markdown/text file.