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, because this corpus is what makes the coach's advice citable. Anyone can check a citation against it. 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. The API boots with zero secrets. 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. Scoring uses 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. That 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. The API boots with zero secrets. 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. A citation in an advice report expands to this card.
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. The API boots with zero secrets. 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. 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.
The hub enforces four things in code on the model's output. It does not rely on the prompt for them:
- every proposal's
categoryis 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 - 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. The call is billed to the Anthropic key of the workspace that owns the run (listModelKeys). A workspace with no key answers 402, unless the hub serves it with its own key.
Calls the hub's own key pays for are also capped by a per-account daily quota. Every key, session, plan and agent session of the user shares that one quota. When it is exhausted, the call answers 429 with X-Coach-Quota-* headers.
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 |
402 | This workspace has no key the hub may use for the model's vendor, or a limit is reached: its own key's monthly cap, or the workspace's limit. | 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. The API boots with zero secrets. 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. Takes a task brief (and a robot repo's card, when given) and 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
- a first acceptance battery
Every item is cited to the corpus. Spends model dollars: key:train. It is billed to your own workspace's Anthropic key, with the same daily quota as advice when the hub's key pays.
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 |
402 | This workspace has no key the hub may use for the model's vendor, or a limit is reached: its own key's monthly cap, or the workspace's limit. | 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. The API boots with zero secrets. 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, its verdict and the run that actually followed are 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 (27)
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 and the mechanism is plausible. replicated: the same effect at least twice. mechanism-understood: a targeted experiment demonstrated the cause. hypothesis: the corpus author inferred it, and it has not been 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. A slug is stable and is 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. It is kept even when the user throws the report away. A report, its verdict and the run that actually followed are 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. 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 | |
billed_to | ModelBilledTo | |
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. A citation in a report expands to this in the UI. The corpus is built so every number traces 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 | |
summary_line | string | null | One sentence of at most 200 characters for the run page. It names no joint, torque or gain. Every new report carries one, and the hub rejects a report whose line breaks a rule. Null on reports made before the field existed. |
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. |
ModelBilledTo
Who paid for an AI model call. workspace is the workspace's own Anthropic key. hub is the hub's key, used for the hub's own workspaces and for recorded demos.
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:
categoryis in the whitelist.cited_cardsis non-empty and every entry resolves in the corpus.param_pathtouches 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. This is enforced in code. It does not depend on the AI model following 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. A coach can promise none of these.
| 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. They are 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 on purpose, 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. stop_rule proposes a stop rule on the next run's sim tests (stop_on_pass, patience). It fits a run that kept training after it passed, or sat on a plateau.