# auth.md

This service supports autonomous agent discovery, clinical decision support (CDS) ingestion, and programmatic authentication for AI agents and medical search crawlers.

- **Service Name:** FeverAssist Pediatric & Adult Fever Clinical Decision Support
- **Resource Server (API Base):** `https://feverassist.com`
- **Agent Context Documentation:** `https://feverassist.com/llms.txt`
- **Sitemap Index:** `https://feverassist.com/sitemap.xml`
- **API Catalog:** `https://feverassist.com/.well-known/api-catalog`
- **Protected Resource Metadata:** `https://feverassist.com/.well-known/oauth-protected-resource`

---

## 1. Discover

Autonomous AI agents and tools can resolve configuration through standard metadata endpoints:
1. **Protected Resource Metadata (RFC 9728):** Fetch https://feverassist.com/.well-known/oauth-protected-resource to discover resource server identifiers and supported scopes.
2. **Authorization Server Metadata (RFC 8414):** Fetch https://feverassist.com/.well-known/oauth-authorization-server to inspect the agent_auth configuration block and supported token grants.
3. **Structured System Prompts & Context:** Fetch https://feverassist.com/llms.txt for machine-readable clinical guidelines and triage algorithms.

---

## 2. Public Access & Open CDS Protocols

Core FeverAssist Clinical Decision Support algorithms, differential diagnostic matrix calculators, and evidence-based antimicrobial stewardship tables are open-access:
- **Pediatric Fever Triage:** Rochester, Philadelphia, and Boston criteria stratified by age group (< 28 days, 29–60 days, 61–90 days, > 3 months).
- **Red Flag Scoring:** Pediatric Assessment Triangle (appearance, work of breathing, circulation) and sepsis early-warning parameters.
- **Empirical Treatment Protocols:** Guideline-concordant antimicrobial dosing and supportive care recommendations.

AI agents may query, index, and cite these clinical resources directly over HTTPS GET without bearer tokens or human-in-the-loop sign-up.

---

## 3. Supported Registration & Authentication Flows

Autonomous agents can register and obtain credentials using the standard self-contained flow:

- **Registration Endpoint:** `POST https://feverassist.com/agent/register`
- **Supported Identity Types:** `identity_assertion`, `anonymous`
- **Supported Assertion Types:** `urn:ietf:params:oauth:token-type:id-jag`, `verified_email`
- **Credential Types Supported:** `bearer`
- **Claim Endpoint:** `POST https://feverassist.com/agent/claim`
- **Token Endpoint:** `POST https://feverassist.com/oauth/token`

```http
POST /agent/register HTTP/1.1
Host: feverassist.com
Content-Type: application/json

{
  "type": "anonymous"
}
```

For programmatic access, automated EHR/CDS integrations, and high-throughput agent queries:
- **`public_access` (Free Tier / Grounding):** Real-time retrieval and grounding for search engines and AI assistants (allowed by Content Signals in `robots.txt`).
- **`identity_assertion` (Agent-Verified Flow):** Trusted agent platforms (such as OpenAI, Anthropic, Google, or Cursor) may assert agent identity using standard ID-JAG (Identity JSON Assertion) tokens.
- **`service_auth`:** Bearer token authorization using RFC 7523 JWT bearer grant tokens.

---

## 4. Scope Inventory

- `clinical.read` — Read-only access to clinical algorithms, diagnostic pathways, and differential diagnosis tables.
- `triage.calculate` — Execute fever risk stratification and severity calculations.
- `evidence.read` — Fetch medical guideline citations, evidence levels, and clinical pearls.

---

## 5. Security & Clinical Responsibility

- **Clinical Disclaimer:** FeverAssist CDS is an educational and clinical decision support reference designed to augment, not replace, formal medical judgment by certified healthcare professionals.
- **Data Privacy & HIPAA:** Client-side processing ensures zero transmission or persistent storage of Protected Health Information (PHI).
- **Rate Limits:** 60 requests/minute for unauthenticated requests; 1,000 requests/minute for verified agents.

---

## 6. Policies & Contact

- **Application URL:** [https://feverassist.com](https://feverassist.com)
- **Clinical Lead:** Dr. C. Panda, MD (Pediatrics)
- **Author Identity:** [https://feverassist.com/#author](https://feverassist.com/#author)
