Cohorts API
Base URL: /api/builder/v1. Authentication and X-Account-ID follow the existing
Builder contract. Restrictive API keys require inference:execute.
| Method | Path | Role | Notes |
|---|---|---|---|
| GET | /cohorts/capabilities?endpoint_id={uuid} | viewer | Effective endpoint capability; use this form in UI/client preflight. |
| GET | /cohorts/health | operator | Content-free aggregate registry/residency/fabric health and admissible capacity. |
| POST | /cohorts:plan | viewer | Read-only dry run. |
| POST | /cohorts:run | operator | Creates a durable root; supports Idempotency-Key. |
| GET | /tasks/{task_id}/cohort | viewer | Redacted summary. |
| GET | /tasks/{task_id}/cohort/events | viewer | Cursor JSON or SSE by Accept. |
| GET | /tasks/{task_id}/cohort/explanation | viewer | Redacted factors. |
| POST | /tasks/{task_id}/cohort:cancel | operator | Idempotent terminal cancellation. |
Execution policy fields are mode, fallback, trace, max_members,
latency_budget_ms and cost_budget_credits. The initial executable topology caps
max_members at two even though future-compatible schemas may accept a higher
server-bound value.
Cohort is opt-in and endpoint-scoped. It is currently admitted only for explicitly
assigned causal/autoregressive text-generation LLM endpoints. Omitting execution
continues to use Classic.
This API controls the production two-member hidden-state lane. It does not expose the R4-M textual-memory intervention, install a memory policy, or turn memory on for an endpoint. R4-CEM and R4-M run through separately frozen research harnesses; they do not establish a hidden-state, KV-cache or memory-by-multi-agent efficacy claim.
All errors use the stable Builder envelope. No endpoint returns raw intermediate representations or physical topology. Operational health contains counts and component booleans only: no node, model, container, peer or tenant identifiers.