# USAgentic auth.md

## Agent Identity & Machine Registration Discovery

USAgentic provides machine-to-machine, autonomous agent discovery, authentication, and execution protocols without requiring browser sessions, captchas, or third-party credential brokers.

### 1. Agent Audience & Access Model
- **Public Discovery:** Autonomous agents may freely discover services, catalogs, and protocol specs via `/.well-known/agent-card.json`, `/.well-known/acp.json`, `/.well-known/ucp.json`, `/.well-known/x402`, and `/llms.txt`.
- **Payment & Metering:** Machine-to-machine paid endpoints (such as `/v1/markdown` and `/v1/extract`) are metered and settled per-call using **x402** (HTTP 402 Payment Required) on the Base network using native USDC.
- **Microservices & Compute:** Agents receive instantaneous signed execution receipts upon payment verification.

### 2. OAuth & Authorization Metadata
- **Protected Resource Metadata (PRM):** Available at [/.well-known/oauth-protected-resource](/.well-known/oauth-protected-resource).
- **Authorization Server Metadata:** Available at [/.well-known/oauth-authorization-server](/.well-known/oauth-authorization-server).
- **Issuer:** `https://us-agentic.com`
- **Supported Scopes:** `read`, `extract`, `x402:payment`
- **Bearer Methods:** `header` (`Authorization: Bearer <token>` or `X-PAYMENT: <token>`)

### 3. Agent Registration & Provisioning
Autonomous agents can register or claim anonymous execution credentials:
- **Registration Endpoint:** `https://us-agentic.com/agent/register`
- **Anonymous Claim:** `https://us-agentic.com/agent/claim` (Supports instant ephemeral bearer credential issuance).
- **Supported Identity Assertions:**
  - `anonymous` (ephemeral machine tokens)
  - `verified_email`
  - `urn:ietf:params:oauth:token-type:id-jag` (Identity Assertion / ID-JAG)
- **Revocation Endpoint:** `https://us-agentic.com/agent/revoke`

### 4. Machine-to-Machine Payment Protocol (x402 / Tempo)
1. Agent calls endpoint (e.g. `GET /v1/markdown?url=https://example.com`).
2. Server responds with `HTTP 402 Payment Required` including payment requirements, receiving address, and atomic price in USDC.
3. Agent signs payment payload and repeats request with `X-PAYMENT: <signature>`.
4. Work executes with low latency directly on local GPU and edge infrastructure.
