# Auth.md — Agent Registration for 8gentz / SAGP

## Authentication Model

8gentz uses **x402 cryptographic wallet micro-payments** for agent authentication.

There are **no user accounts**, **no OAuth tokens**, and **no API keys to manage**.
Authentication is handled entirely at the transport layer via the x402 protocol.

---

## How Agents Connect

### Step 1 — Send any request to the gateway

```http
GET https://gateway.8gentz.io/v1/tools
```

### Step 2 — Receive HTTP 402 Payment Required

```http
HTTP/1.1 402 Payment Required
X-Payment-Required: eip155:8453/erc20:0xUSDC
X-Payment-Amount: 1
X-Payment-Recipient: 0xSAGP_VAULT_ADDRESS
X-SAGP-Op: discovery.tools.list
X-SAGP-Cost-µUSDC: 1
```

### Step 3 — Sign the micro-payment and retry

Your agent signs the payment from its DID-compatible wallet (TheoID or any EIP-4361 wallet).
The gateway verifies the signature and grants access. The operation executes.
The transaction hash is committed to the Autheo onchain audit log.

---

## Identity Requirements

- **Wallet type**: DID-compatible (TheoID preferred) or EIP-4361 compatible
- **Network**: Base (eip155:8453)
- **Currency**: USDC (µUSDC micro-denominations)
- **No pre-registration**: Wallets are self-sovereign — connect and pay, no signup

---

## Supported Protocols

Your agent can connect via any of the following protocols:

| Protocol | Endpoint |
|---|---|
| MCP (Anthropic) | `https://gateway.8gentz.io/mcp` |
| A2A (Google) | `https://gateway.8gentz.io/a2a` |
| ANP | `https://gateway.8gentz.io/anp` |
| ACP (Coinbase) | `https://gateway.8gentz.io/acp` |
| UCP | `https://gateway.8gentz.io/ucp` |
| MPP | `https://gateway.8gentz.io/mpp` |
| OpenAI | `https://gateway.8gentz.io/v1/openai` |

---

## Cost Reference

All costs in µUSDC (micro-USDC). See full table at [8gentz.io/#pricing](https://8gentz.io/#pricing).

| Operation | Cost |
|---|---|
| Read (per KB) | 0.5 µUSDC |
| Write (per KB) | 2 µUSDC |
| Atomic Rollback | 0 µUSDC |
| Light Compute (per 100ms CPU) | 10 µUSDC |
| Heavy Compute (per 100ms GPU) | 150 µUSDC |
| Vector Search (per query) | 5 µUSDC |
| Protocol Routing (per hop) | 1 µUSDC |
| Audit Proof (zk-STARK) | 25 µUSDC |

---

## Discovery Endpoints

```
MCP Server Card:    https://8gentz.io/.well-known/mcp/server-card.json
Agent Skills:       https://8gentz.io/.well-known/agent-skills/index.json
API Catalog:        https://8gentz.io/.well-known/api-catalog
DID Document:       https://8gentz.io/.well-known/did.json
Agent Card (A2A):   https://8gentz.io/.well-known/agent.json
```

---

*8gentz — Sovereign Agentic Gateway Proxy. Built with Rust. Secured with NIST PQC. Audited on Autheo.*
