| MCP (Model Context Protocol) | lib/mcp/server.ts + /api/public/mcp-discovery | public | Read-only tools (compliance registry, intelligence manifest, public stats). No write tools exposed publicly. |
|---|
| A2A (Agent-to-Agent) | /.well-known/agent.json (skill: compliance-standards) | public | Agent card with seven example prompts and the canonical machine-readable registry endpoint. |
|---|
| Intelligence manifest | /api/public/intelligence-manifest | public | Discovery surface for agentic clients: compliance, country pages, public APIs, and routing intents. |
|---|
| Deterministic micro-router | /api/public/ai-routing?q=… | public | Natural-language → URL routing for high-confidence intents. Falls back to suggestions for low-confidence. |
|---|
| On-device WebLLM | Service-worker-cached /api/public/intelligence-manifest + answer corpora | public | Stale-while-revalidate caching; answers can be drafted in-browser without sending the user's question to a remote model. |
|---|
| On-device WebLLM polish | components/local-assist/assist-polish-button.tsx — surface families: compliance_console, partner_console, member_console, telemedicine, marketing_public | authenticated | Bundled SmolLM2 (or pinned successor) runs entirely in the browser via WebLLM. Polishes user-typed text for grammar and clarity only. The system prompt forbids inventing facts, dates, or regulatory claims. Deterministic regex fallback kicks in when the engine is unavailable. Feature-flagged via NEXT_PUBLIC_LOCAL_ASSIST_ENGINE. |
|---|
| On-device WebLLM draft starter | lib/local-ai/independence-applicant-reply-draft.ts — applicant reply on /p/clinicians/independence | authenticated | Generates a SHORT starter reply for an applicant responding to a compliance 'request more information' note on their independent-practice application. Receives ONLY the info-requested note text — no patient, clinical, or financial context. Output uses placeholders like [INSERT YOUR INDEMNITY CERTIFICATE NUMBER] so the model never invents document numbers, dates, or regulatory claims. Deterministic template fallback when the engine is unavailable. Same on-device privacy posture as the polish surfaces; bundled SmolLM2 weights cached in the service worker for offline use. |
|---|
| Compliance Co-Pilot | /api/compliance/kyc-reviews/[id]/copilot-draft | authenticated | Drafts a recommended decision for borderline KYC reviews. Reviewer must accept, override, or request more evidence. |
|---|