---
agent_auth:
  skill: "https://kusiai.es/auth.md"
  register_uri: "https://kusiai.es/auth/register"
  identity_types_supported:
    - "identity_assertion"
    - "email"
    - "anonymous"
  identity_assertion:
    assertion_types_supported:
      - "urn:ietf:params:oauth:token-type:id-jag"
      - "verified_email"
  credential_types_supported:
    - "bearer_token"
    - "api_key"
  claim_uri: "https://kusiai.es/auth/claim"
  revocation_uri: "https://kusiai.es/auth/revoke"
---

# auth.md - KusiAI Agent Registration and Authentication

This document specifies the registration, discovery, and authentication flows for autonomous AI agents interacting with KusiAI APIs and GEO intelligence nodes.

## 1. Automated Agent Registration

Agents can dynamically register by sending an HTTP POST request to the registration endpoint:

```http
POST /auth/register HTTP/1.1
Host: kusiai.es
Content-Type: application/json

{
  "agent_name": "AutonomousAgent/1.0",
  "identity_type": "email",
  "identity": "agent@example.com",
  "scopes": ["read", "data", "llms"]
}
```

### Registration Response

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "client_id": "agent_kusiai_live",
  "api_key": "kusi_sec_bearer_token",
  "token_type": "Bearer",
  "expires_in": 3600
}
```

## 2. Token Authentication

Authenticate all subsequent requests by supplying the Bearer token in the standard HTTP `Authorization` header:

```http
GET /api HTTP/1.1
Host: kusiai.es
Authorization: Bearer <YOUR_API_KEY>
Accept: application/json
```

## 3. Credential Claim & Verification

```http
POST /auth/claim HTTP/1.1
Host: kusiai.es
Content-Type: application/json
Authorization: Bearer <YOUR_API_KEY>

{
  "claim_type": "verified_agent",
  "did": "did:web:kusiai.es"
}
```

## 4. Revocation

To revoke an active token or credential:

```http
POST /auth/revoke HTTP/1.1
Host: kusiai.es
Content-Type: application/json
Authorization: Bearer <YOUR_API_KEY>

{
  "token": "<YOUR_API_KEY>"
}
```
