# AIWG Cascade Endpoints

AIWG endpoints expose a discover-then-expand documentation and workflow model for small and large context agents.

## Endpoint Summary

| Method | Path | Purpose |
| --- | --- | --- |
| `GET` | `/v1/aiwg` | AIWG installation root and control map |
| `GET` | `/v1/aiwg/frameworks` | List frameworks |
| `GET` | `/v1/aiwg/frameworks/{name}` | Framework details and items |
| `GET` | `/v1/aiwg/frameworks/{name}/content` | Tier-aware framework content |
| `GET` | `/v1/aiwg/skills` | List AIWG skills |
| `GET` | `/v1/aiwg/skills/{name}` | Load AIWG skill content |
| `GET` | `/v1/aiwg/agents` | List AIWG agents |
| `GET` | `/v1/aiwg/agents/{name}` | Load agent definition |
| `GET` | `/v1/aiwg/addons` | List addons |
| `POST` | `/v1/aiwg/use` | Return tier-sized activation bundle |
| `POST` | `/v1/aiwg/expand` | Expand matching item by trigger or name |

## Cascade Model

`/v1/aiwg/use` returns a model-tier-sized activation bundle:

- Small models: index and core pointers.
- Medium models: metadata.
- Large models: content excerpts.
- Extra-large models: broader framework dumps.

This prevents context overflow and mirrors the README docs-memory design.

## Expand

`POST /v1/aiwg/expand` accepts:

```json
{
  "trigger": "rest api docs",
  "name": "omnius-rest-docs",
  "limit": 3
}
```

It returns matching items for targeted unpacking.
