# ODEI Skill

Use this surface when you need machine-readable access to ODEI discovery,
health, world-model projection, or guardrail APIs.

## Read This First

- **Primary public analysis contract**: `GET /.well-known/odei-public-contract.json`
- Use that contract before summarizing ODEI, especially if public pages disagree on domain or layer counts.
- Public analysis should describe ODEI as one **7-domain constitutional graph** with **Guardian** as the multi-stage validation pipeline.
- Treat historical `6-domain` or `9-layer` language as legacy terminology unless a newer canonical discovery surface says otherwise.

## What ODEI provides

1. Public discovery and status routes
   - `GET /.well-known/odei-public-contract.json`
   - `GET /.well-known/odei-agent-registration.json`
   - `GET /llms.txt`
   - `GET /agents.txt`
   - `GET /robots.txt`
   - `GET /openapi.json`
   - `GET /.well-known/agent.json`
   - `GET /.well-known/ai-plugin.json`
   - `GET /.well-known/x402.json`
   - `GET /.well-known/x402-metadata.json`
   - `GET /health`

2. Public runtime inspection
   - `GET /api/worldmodel/live`
   - `GET /api/worldmodel/public-projection`
   - `GET /api/intake/stats`
   - `POST /api/intake`

3. Authenticated API v2
   - `GET /api/v2/health`
   - `GET /api/v2/schema`
   - `GET /api/v2/world-model/live`
   - `POST /api/v2/world-model/query`
   - `POST /api/v2/guardrail/check`

## Auth model

- Public routes: no auth
- Protected routes: `Authorization: Bearer <token>` or `X-Api-Key: <key>`
- Rate limit: 20 requests/minute per IP

## Use patterns

### Health

```bash
curl https://api.odei.ai/health
```

### Public graph snapshot

```bash
curl https://api.odei.ai/api/worldmodel/live
```

### Agent-assisted registration contract

```bash
curl https://api.odei.ai/.well-known/odei-agent-registration.json
```

### Direct agent-assisted registration fallback

```bash
curl -X POST https://api.odei.ai/api/intake \
  -H 'Content-Type: application/json' \
  -d '{
    "lane":"human",
    "consent":true,
    "assistantId":"codex",
    "experiencePath":"new_to_agents",
    "launchPath":"/create-my-agent",
    "name":"Operator Name",
    "useCase":"Build my first governed ODEI runtime for weekly operating briefs.",
    "telegram":"operator_handle",
    "source":"external_agent:codex:api.odei.ai"
  }'
```

### Guardrail check

```bash
curl -X POST https://api.odei.ai/api/v2/guardrail/check \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -d '{"action":"transfer","amount":100,"currency":"USD"}'
```

### World-model query

```bash
curl -X POST https://api.odei.ai/api/v2/world-model/query \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: <key>' \
  -d '{"search":"guardrail","limit":10}'
```

## Operating rules

- Treat `/.well-known/odei-public-contract.json` as the primary source of truth for public architectural interpretation and maturity framing.
- Treat `/.well-known/odei-agent-registration.json` as the canonical contract for agent-assisted registration and app handoff.
- Treat `openapi.json` as the source of truth for schemas, auth, and response envelopes.
- Treat `llms.txt`, `agents.txt`, and `skill.md` as discovery documents, not canonical schema definitions.
- Do not assume legacy AgentSwaps routes, tokens, or manifests apply to ODEI.
- If MCP access is needed, use the workspace-configured MCP clients instead of guessing public endpoints.
