coach
Training Coach — the experience corpus, run diagnosis with in-whitelist proposals, and programme planning. Every claim cites a card.
GET /v1/coach/doctrine
The coach's doctrine (numbered methodology rules)
The distilled methodology the Training Coach reasons with, as numbered rules with the cases that taught them. Public: it is the corpus that makes the coach's advice citable, and a claim nobody can check is not worth making. Cite a rule as doctrine-{number}.
Responses
| Status | Description | Body |
|---|---|---|
200 | The doctrine. | CoachDoctrine |
401 | Missing or invalid credentials. | Problem |
503 | A service this endpoint needs is not configured in this deployment (M0's boot guarantee: the API boots with zero secrets, and an endpoint that needs one says so instead of returning a stack trace). | Problem |
GET /v1/coach/cards
Search the experience corpus
Keyword + tag search over the experience cards (no vector index in v0). q is scored against card id, title, rule, trigger conditions, tags and symptom with inverse-document-frequency weighting, so a term common to the whole corpus contributes nothing. tags is a conjunction — tags=reward-shaping,curriculum returns cards carrying both. With no q the result is every matching card ordered by id, which is what the corpus browser lists.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
q | query | string | Free-text query. |
tags | query | string | Comma-separated tags; a card must carry all of them. |
task | query | string | Task line filter: walk | omni | run | recovery | arm | infra. |
phase | query | string | Pipeline phase filter (plant-calibration, reward-shaping, …). |
confidence | query | CardConfidence | |
limit | query | integer | Page size (tree listings allow larger pages). |
cursor | query | string | Opaque cursor from the previous page's |
Responses
| Status | Description | Body |
|---|---|---|
200 | Page of cards, most relevant first. | ExperienceCardPage |
422 | Request failed validation. | Problem |
503 | A service this endpoint needs is not configured in this deployment (M0's boot guarantee: the API boots with zero secrets, and an endpoint that needs one says so instead of returning a stack trace). | Problem |
GET /v1/coach/cards/{card_id}
Get one experience card
The full card including its provenance quote — what a citation in an advice report expands to.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
card_id | path | CardId | Experience card slug, e.g. |
Responses
| Status | Description | Body |
|---|---|---|
200 | The card. | ExperienceCard |
404 | Resource not found (or hidden from the caller). | Problem |
503 | A service this endpoint needs is not configured in this deployment (M0's boot guarantee: the API boots with zero secrets, and an endpoint that needs one says so instead of returning a stack trace). | Problem |
POST /v1/coach/advice
Diagnose a training run
Reads a training run — by run_id, or inlined — and returns a structured AdviceReport: diagnosis, in-whitelist proposals, an experiment plan, and flags for anything that would need a contract change. When parent_run_id is set (or the run has one), the resolved-config diff against the parent goes into the prompt as attribution evidence.
Four things are enforced in code, on the model's output, not asked for in the prompt: every proposal's category is in the whitelist; every proposal cites at least one card or doctrine rule that exists in the corpus; every PASS gate found in the scorecard is echoed under experiment_plan.constraints; and no proposal touches the policy contract, observation space, action space or robot description — those may appear only in flags. An invalid report is retried once and then fails with 502 carrying the validation errors.
This endpoint spends model dollars, so it needs key:train like the other compute endpoints, and is additionally capped by a per-account daily quota — every key, session, plan and agent session of the user shares one (429 with X-Coach-Quota-* headers when exhausted).
Request body
| Field | Type | Description |
|---|---|---|
run_id | Id | null | |
inline | AdviceInline | null | |
parent_run_id | Id | null | |
robot_repo | string | null | Robot repo |
question | string | null | What the team actually wants to know. |
Responses
| Status | Description | Body |
|---|---|---|
201 | Report produced and persisted. | AdviceSession |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
502 | The model's report failed validation twice. | Problem |
503 | A service this endpoint needs is not configured in this deployment (M0's boot guarantee: the API boots with zero secrets, and an endpoint that needs one says so instead of returning a stack trace). | Problem |
POST /v1/coach/plan
Plan a training programme from a task brief
The zero-runs path. From a task brief (and a robot repo's card, when given) returns the contract to freeze, the plant measurements to take before any training, a minimal reward table, a DR baseline, a ladder outline of one-variable rungs, and a first acceptance battery — every item cited to the corpus. Spends model dollars: key:train, same daily quota as advice.
Request body
| Field | Type | Description |
|---|---|---|
task_brief | string | |
robot_repo | string | null | Robot repo |
Responses
| Status | Description | Body |
|---|---|---|
201 | Plan produced and persisted. | AdviceSession |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
502 | The model's plan failed validation twice. | Problem |
503 | A service this endpoint needs is not configured in this deployment (M0's boot guarantee: the API boots with zero secrets, and an endpoint that needs one says so instead of returning a stack trace). | Problem |
GET /v1/coach/sessions
List coach sessions
Sessions visible to the caller, newest first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run_id | query | Id | Only sessions about this run. |
limit | query | integer | Page size. |
cursor | query | string | Opaque cursor from the previous page's |
Responses
| Status | Description | Body |
|---|---|---|
200 | Page of sessions. | AdviceSessionPage |
401 | Missing or invalid credentials. | Problem |
GET /v1/coach/sessions/{session_id}
Get a coach session
Parameters
| Name | In | Type | Description |
|---|---|---|---|
session_id | path | Id | Coach session id ( |
Responses
| Status | Description | Body |
|---|---|---|
200 | The session. | AdviceSession |
401 | Missing or invalid credentials. | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
POST /v1/coach/sessions/{session_id}/feedback
Rate a coach report
Thumbs up or down, with an optional note. Feedback is a corpus candidate: a report plus a verdict plus the run that actually followed is the raw material of the next experience card. Idempotent — the last verdict wins.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
session_id | path | Id | Coach session id ( |
Request body
| Field | Type | Description |
|---|---|---|
verdict | string | |
note | string | null |
Responses
| Status | Description | Body |
|---|---|---|
200 | Feedback recorded; the session is returned. | AdviceSession |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
Schemas (26)
The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.
CoachDoctrine
| Field | Type | Description |
|---|---|---|
rules | array of DoctrineRule | |
markdown | string | The doctrine as written, for rendering. |
card_count | integer | |
tags | array of CardTag |
CardConfidence
How well the card's mechanism is established. observed-once — it happened once, mechanism plausible. replicated — the same effect at least twice. mechanism-understood — cause demonstrated by a targeted experiment. hypothesis — inferred by the corpus author, not demonstrated. A proposal resting only on hypothesis cards must say so in its risk.
ExperienceCardPage
| Field | Type | Description |
|---|---|---|
items | array of ExperienceCard | |
next_cursor | string | null | |
total | integer | Cards matching the query across all pages. |
CardId
Experience card slug — stable, never renumbered.
ExperienceCard
One distilled sim2real / RL-training lesson.
| Field | Type | Description |
|---|---|---|
id | CardId | |
title | string | |
robot | string | |
task | string | walk | omni | run | recovery | arm | infra |
phase | string | plant-calibration | reward-shaping | dr-tuning | attribution | ... |
symptom | string | |
context | string | |
change | string | |
outcome | string | |
mechanism | string | |
rule | string | The transferable one-liner. Robot-agnostic by construction. |
applies_when | array of string | |
tags | array of CardTag | |
confidence | CardConfidence | |
conflicts | string | null | |
provenance | CardProvenance | null | |
score | number | null | Search relevance; null when the listing is unscored. |
AdviceRequest
Exactly one of run_id or inline. parent_run_id overrides the run's stored parent for this call.
| Field | Type | Description |
|---|---|---|
run_id | Id | null | |
inline | AdviceInline | null | |
parent_run_id | Id | null | |
robot_repo | string | null | Robot repo |
question | string | null | What the team actually wants to know. |
AdviceSession
One persisted coach call. Retained even when the user throws the report away: a report plus a verdict plus the run that actually followed is the raw material of the next experience card.
| Field | Type | Description |
|---|---|---|
id | Id | |
kind | string | |
run_id | Id | null | |
run_ref | string | The subject: a run id, |
report | AdviceReport | null | Present when |
plan | CoachPlan | null | Present when |
cited_card_details | array of ExperienceCard | The full cards this report cites, so a client can expand a citation to its provenance quote without a second round trip. |
retrieved_cards | array of CardId | Card ids put in front of the model (≤15). |
model | string | |
backend | string |
|
usage | AdviceUsage | |
feedback | string | null | |
feedback_note | string | null | |
created_at | string (date-time) |
CoachPlanRequest
| Field | Type | Description |
|---|---|---|
task_brief | string | |
robot_repo | string | null | Robot repo |
AdviceSessionPage
| Field | Type | Description |
|---|---|---|
items | array of AdviceSession | |
next_cursor | string | null |
AdviceFeedback
| Field | Type | Description |
|---|---|---|
verdict | string | |
note | string | null |
DoctrineRule
| Field | Type | Description |
|---|---|---|
id | string | Citation form: |
number | integer | |
title | string | |
statement | string | |
case | string | The episode that taught the rule. |
application | string | How the coach applies it. |
cited_cards | array of CardId |
CardTag
Controlled retrieval vocabulary (see assets/experience/schema.json).
CardProvenance
Where the card's claim comes from. This is what a citation in a report expands to in the UI — the point of the corpus is that every number is traceable to a sentence somebody actually wrote at the time.
| Field | Type | Description |
|---|---|---|
file | string | |
section | string | |
quote | string | |
extra | array of object | Additional corroborating citations. |
file | string | |
section | string | |
quote | string |
AdviceInline
A run snapshot supplied by value, for a run not on the hub.
| Field | Type | Description |
|---|---|---|
config_yaml | string | The run's RESOLVED training config (YAML or JSON). |
metrics_summary | string | Metrics as text — a CSV tail, a table, or prose. |
scorecard_json | object | null | Acceptance results. PASS/FAIL rows are read from a |
parent_config_yaml | string | The parent run's resolved config, for the attribution diff. |
AdviceReport
| Field | Type | Description |
|---|---|---|
summary | string | |
diagnosis | array of Diagnosis | |
proposals | array of Proposal | |
experiment_plan | ExperimentPlan | |
flags | array of AdviceFlag |
CoachPlan
| Field | Type | Description |
|---|---|---|
contract_checklist | array of string | |
plant_calibration_checklist | array of string | |
reward_baseline | array of CoachRewardTerm | |
dr_baseline | array of CoachDRTerm | |
ladder_outline | array of ExperimentRung | |
acceptance_battery_draft | array of CoachAcceptanceRow | |
cited_cards | array of string | |
notes | string |
AdviceUsage
What this call cost. Metered per session, retries included.
| Field | Type | Description |
|---|---|---|
input_tokens | integer | |
output_tokens | integer | |
cache_read_tokens | integer | |
cache_write_tokens | integer | |
cost_usd | number | USD to 6 decimal places; 0 when the model has no rate row. |
priced | boolean | False means usage was recorded but the model is unpriced. |
attempts | integer | Model calls made, including the retry after a validation failure. |
Diagnosis
| Field | Type | Description |
|---|---|---|
symptom | string | |
likely_mechanism | string | |
confidence | string | |
missing_evidence | array of string | What would settle it. The most valuable field in the report. |
cited_cards | array of string |
Proposal
One in-whitelist parameter change. Guaranteed in code: category is in the whitelist, cited_cards is non-empty and every entry resolves in the corpus, and param_path touches nothing contract-, observation-, action- or robot-description-shaped.
| Field | Type | Description |
|---|---|---|
param_path | string | Dotted path in the run's config, e.g. |
from | string | null | Current value as text; null when the key is absent today. |
to | string | |
category | ProposalCategory | |
rationale | string | |
cited_cards | array of string | Card ids and/or |
risk | string | What this could cost. When every cited card is |
ExperimentPlan
| Field | Type | Description |
|---|---|---|
rungs | array of ExperimentRung | |
stop_rules | array of string | Hit any one, stop. Frozen before training. |
constraints | array of string | Standing regression constraints. Every PASS gate in the scorecard appears here — enforced in code, not requested in the prompt. |
AdviceFlag
A suspicion that lands outside the whitelist. Contract, observation space, action space and robot description changes appear here and nowhere else: they need a versioned profile, a fingerprint update and a checker extension in the same change, none of which a coach can promise.
| Field | Type | Description |
|---|---|---|
concern | string | |
param_path | string | null | |
why_out_of_whitelist | string | |
cited_cards | array of string |
CoachRewardTerm
| Field | Type | Description |
|---|---|---|
name | string | |
purpose | string | |
starting_weight | string | null | |
cited_cards | array of string |
CoachDRTerm
| Field | Type | Description |
|---|---|---|
name | string | |
range | string | |
measured_from | string | How the nominal and the band were measured (never guessed). |
cited_cards | array of string |
ExperimentRung
One ladder rung — exactly one variable, read off a pre-registered table.
| Field | Type | Description |
|---|---|---|
name | string | |
variable | string | The single thing this rung changes. |
expected_reading | string | How each plausible outcome will be read, written before it runs. |
stop_after | string | null |
CoachAcceptanceRow
| Field | Type | Description |
|---|---|---|
name | string | |
metric | string | |
threshold | string | |
kind | string | task | posture | margin | assist-stripped | chirality |
ProposalCategory
What a proposal is allowed to touch. Two whitelists exist by design and this is the wider one — a human reads the report and pulls the trigger, so hyperparameters and calibration are in scope. The future auto-loop (agent pulls the trigger) uses the same validator configured down to reward | domain_rand | command.