:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(autoresearch): add short headlines to training runs and experiments (#116617)
posthog[bot]2bd3cc934f0b
diff --git a/products/autoresearch/backend/facade/api.py b/products/autoresearch/backend/facade/api.pyindex b7c02956de45..473f931dd098 100644--- a/products/autoresearch/backend/facade/api.py+++ b/products/autoresearch/backend/facade/api.py@@ -451,6 +451,7 @@ def _iteration_trail_entry(row: AutoresearchIteration) -> IterationTrailEntry:train_score=row.train_score,agent_description=row.agent_description,summary=row.summary,+ headline=row.headline,model_spec=row.model_spec or {},recipe_snapshot=row.recipe_snapshot or {},)@@ -469,6 +470,7 @@ def _training_run_to_contract(row: AutoresearchTrainingRun) -> TrainingRun:best_holdout_score=row.best_holdout_score,summary=row.summary or None,reader_summary=row.reader_summary,+ headline=row.headline,next_steps=row.next_steps,iterations=[_iteration_trail_entry(i) for i in row.iterations.all()],error=row.error,@@ -492,6 +494,7 @@ def _iteration_to_contract(row: AutoresearchIteration) -> Iteration:status=row.status,agent_description=row.agent_description,summary=row.summary,+ headline=row.headline,agent_confidence=row.agent_confidence,parent_suggestion=row.parent_suggestion_id,created_at=row.created_at,@@ -1488,6 +1491,7 @@ def record_iteration("status": fields["status"],"agent_description": fields.get("agent_description", ""),"summary": fields.get("summary") or None,+ "headline": fields.get("headline") or None,"agent_confidence": fields.get("agent_confidence"),}# A re-send that omits parent_suggestion keeps the attribution it recorded the first@@ -1548,6 +1552,7 @@ def complete_run(distillation: str = "",report_notebook_short_id: str = "",reader_summary: str | None = None,+ headline: str | None = None,next_steps: list[str] | None = None,) -> TrainingRun:"""Finalize a run. Promotion is server-side, so an agent cannot set the champion."""@@ -1570,6 +1575,7 @@ def complete_run(distillation=distillation or "",report_notebook_short_id=report_notebook_short_id or "",reader_summary=reader_summary or None,+ headline=headline or None,next_steps=next_steps or None,)except PromotionError as exc:diff --git a/products/autoresearch/backend/facade/contracts.py b/products/autoresearch/backend/facade/contracts.pyindex a93491ed0eee..d8150caae397 100644--- a/products/autoresearch/backend/facade/contracts.py+++ b/products/autoresearch/backend/facade/contracts.py@@ -192,6 +192,7 @@ class IterationTrailEntry:train_score: float | Noneagent_description: strsummary: str | None+ headline: str | Nonemodel_spec: dict[str, Any]recipe_snapshot: dict[str, Any]@@ -235,6 +236,7 @@ class TrainingRun:best_holdout_score: float | Nonesummary: dict[str, Any] | Nonereader_summary: str | None+ headline: str | Nonenext_steps: list[str] | Noneiterations: list[IterationTrailEntry]error: str@@ -259,6 +261,7 @@ class Iteration:status: stragent_description: strsummary: str | None+ headline: str | Noneagent_confidence: float | Noneparent_suggestion: UUID | Nonecreated_at: datetimediff --git a/products/autoresearch/backend/migrations/0006_headlines.py b/products/autoresearch/backend/migrations/0006_headlines.pynew file mode 100644index 000000000000..1d91855d9977--- /dev/null+++ b/products/autoresearch/backend/migrations/0006_headlines.py@@ -0,0 +1,22 @@+# Generated by Django 5.2.18 on 2026-10-13 20:59++from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [+ ("autoresearch", "0005_write_person_property"),+ ]++ operations = [+ migrations.AddField(+ model_name="autoresearchiteration",+ name="headline",+ field=models.TextField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="autoresearchtrainingrun",+ name="headline",+ field=models.TextField(blank=True, null=True),+ ),+ ]diff --git a/products/autoresearch/backend/migrations/max_migration.txt b/products/autoresearch/backend/migrations/max_migration.txtindex e6d6fe49140b..5144920d5934 100644--- a/products/autoresearch/backend/migrations/max_migration.txt+++ b/products/autoresearch/backend/migrations/max_migration.txt@@ -1 +1 @@-0005_write_person_property+0006_headlinesdiff --git a/products/autoresearch/backend/models.py b/products/autoresearch/backend/models.pyindex 17a55da989fb..122e07600abf 100644--- a/products/autoresearch/backend/models.py+++ b/products/autoresearch/backend/models.py@@ -322,6 +322,7 @@ class AutoresearchTrainingRun(PipelineScopedModel):summary = models.JSONField(default=dict, blank=True)# Written for people who read the Agent research tab. The agent's own notes stay in `summary`.reader_summary = models.TextField(null=True, blank=True)+ headline = models.TextField(null=True, blank=True)next_steps = models.JSONField(null=True, blank=True)started_at = models.DateTimeField(null=True, blank=True)@@ -368,6 +369,7 @@ class AutoresearchIteration(PipelineScopedModel):status = models.CharField(max_length=20, choices=Status.choices)agent_description = models.TextField(blank=True, default="")summary = models.TextField(null=True, blank=True)+ headline = models.TextField(null=True, blank=True)agent_confidence = models.FloatField(null=True, blank=True, validators=UNIT_INTERVAL_VALIDATORS, help_text="Agent's self-assessed confidence 0–1")diff --git a/products/autoresearch/backend/presentation/views/serializers.py b/products/autoresearch/backend/presentation/views/serializers.pyindex ecd8eb85a013..7e876e33030b 100644--- a/products/autoresearch/backend/presentation/views/serializers.py+++ b/products/autoresearch/backend/presentation/views/serializers.py@@ -51,6 +51,7 @@ TARGET_EVENT_MAX_LENGTH = 255AGENT_DESCRIPTION_MAX_LENGTH = 2000ITERATION_SUMMARY_MAX_LENGTH = 300RUN_READER_SUMMARY_MAX_LENGTH = 600+HEADLINE_MAX_LENGTH = 60NEXT_STEPS_MAX_ITEMS = 5NEXT_STEP_MAX_LENGTH = 80OBJECT_JSON_MAX_BYTES = 64 * 1024@@ -219,6 +220,20 @@ class FiniteFloatField(serializers.FloatField):return value+class HeadlineField(serializers.CharField):+ """A one-line headline. Collapses whitespace and cuts to length, so a long headline never fails a run."""++ def __init__(self, **kwargs: Any) -> None:+ kwargs.setdefault("required", False)+ kwargs.setdefault("allow_null", True)+ kwargs.setdefault("allow_blank", True)+ super().__init__(**kwargs)++ def to_internal_value(self, data: Any) -> str:+ value = " ".join(super().to_internal_value(data).split())+ return value[:HEADLINE_MAX_LENGTH].rstrip()++@extend_schema_field({"oneOf": [@@ -1220,6 +1235,11 @@ class IterationTrailSerializer(DataclassSerializer):allow_null=True,help_text="Plain-language sentence on what this experiment tried and what happened, for people. Null if not written.",)+ headline = serializers.CharField(+ read_only=True,+ allow_null=True,+ help_text="Short title for this experiment, for people. Null if not written.",+ )model_spec = ModelSpecField(help_text="Model class and hyperparameters tried in this iteration.")class Meta:@@ -1231,6 +1251,7 @@ class IterationTrailSerializer(DataclassSerializer):"train_score","agent_description","summary",+ "headline","model_spec",]@@ -1291,6 +1312,11 @@ class AutoresearchTrainingRunSerializer(DataclassSerializer):allow_null=True,help_text="One or two plain sentences on what this run learned, for people. Null if not written.",)+ headline = serializers.CharField(+ read_only=True,+ allow_null=True,+ help_text="Short title for this run, for people. Null if not written.",+ )next_steps = serializers.ListField(child=serializers.CharField(),read_only=True,@@ -1326,6 +1352,7 @@ class AutoresearchTrainingRunSerializer(DataclassSerializer):"best_holdout_score","summary","reader_summary",+ "headline","next_steps","iterations","error",@@ -1358,6 +1385,11 @@ class AutoresearchIterationSerializer(DataclassSerializer):allow_null=True,help_text="Plain-language sentence on what this experiment tried and what happened, for people.",)+ headline = serializers.CharField(+ required=False,+ allow_null=True,+ help_text="Short title for this experiment, for people.",+ )agent_confidence = serializers.FloatField(required=False, allow_null=True, help_text="Agent's self-assessed confidence 0–1")@@ -1383,6 +1415,7 @@ class AutoresearchIterationSerializer(DataclassSerializer):"status","agent_description","summary",+ "headline","agent_confidence","parent_suggestion","created_at",@@ -1894,6 +1927,12 @@ class RecordIterationSerializer(serializers.Serializer):f"Max {ITERATION_SUMMARY_MAX_LENGTH} characters."),)+ headline = HeadlineField(+ help_text=(+ f"A short title for people, at most {HEADLINE_MAX_LENGTH} characters, on what this experiment tried. "+ "Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected."+ ),+ )agent_confidence = FiniteFloatField(required=False,allow_null=True,@@ -1989,6 +2028,12 @@ class CompleteTrainingRunSerializer(serializers.Serializer):f"Max {RUN_READER_SUMMARY_MAX_LENGTH} characters."),)+ headline = HeadlineField(+ help_text=(+ f"A short title for people, at most {HEADLINE_MAX_LENGTH} characters, on what this run learned. "+ "Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected."+ ),+ )next_steps = serializers.ListField(child=serializers.CharField(max_length=NEXT_STEP_MAX_LENGTH),required=False,diff --git a/products/autoresearch/backend/presentation/views/views.py b/products/autoresearch/backend/presentation/views/views.pyindex c2c8adc2df69..61ed6cb748eb 100644--- a/products/autoresearch/backend/presentation/views/views.py+++ b/products/autoresearch/backend/presentation/views/views.py@@ -1001,6 +1001,7 @@ class AutoresearchTrainingRunViewSet(TeamAndOrgViewSetMixin, _FacadePaginationMidistillation=data.get("distillation") or "",report_notebook_short_id=data.get("report_notebook_short_id") or "",reader_summary=data.get("reader_summary"),+ headline=data.get("headline"),next_steps=data.get("next_steps"),)except TrainingRunNotFound:diff --git a/products/autoresearch/backend/training/AGENTS.md b/products/autoresearch/backend/training/AGENTS.mdindex e1d0f7b1127b..5d1850607136 100644--- a/products/autoresearch/backend/training/AGENTS.md+++ b/products/autoresearch/backend/training/AGENTS.md@@ -35,6 +35,7 @@ The other half is `../inference/`, which consumes what this package produces andThe bundle is written once per run, so a losing iteration can overwrite it: the uploaded `features.sql` must match the `feature_sql` recorded by the selected iteration, whitespace aside, or promotion raises rather than publishing a champion whose recipe and score describe other code.`complete_training_run()` reads the bundle and enters the run's `team_scope()` before it opens the transaction, because the `TaskRun` safety net calls it from a worker thread with no request scope, and object-storage calls must not run under the row lock.The agent's `report_notebook_short_id` goes into the run summary only if that notebook exists in the run's team. A bad id or a failed check stores an empty value and never fails completion.+ The run and each iteration carry an optional `headline` for the Agent research tab. The write serializers collapse its whitespace and cut it to `HEADLINE_MAX_LENGTH` (60) characters rather than reject it, so a long or missing headline never fails a run.A promoted bundle-backed model is fitted. A bundle-backed challenger is fitted only when it enters the shadow set (see `shadow_set.py`). The fit runs after commit and never changes the completion result.A successful challenger fit sets `metrics.model_fitted`, and a failed one only logs. A challenger without `model_fitted` stays out of the shadow set.After a champion fit, `check_scorability()` runs the bundle's `features.sql` against today's inference anchors under `BATCH_QUERY`. A passing check records `scorability_elapsed_s` and `scorability_rows_read` in the model metrics and sets `model_fitted`.diff --git a/products/autoresearch/backend/training/promotion.py b/products/autoresearch/backend/training/promotion.pyindex 38568dfeb687..8880cbd093fe 100644--- a/products/autoresearch/backend/training/promotion.py+++ b/products/autoresearch/backend/training/promotion.py@@ -320,6 +320,7 @@ def complete_training_run(distillation: str = "",report_notebook_short_id: str = "",reader_summary: str | None = None,+ headline: str | None = None,next_steps: list[str] | None = None,) -> dict[str, Any]:"""Finalize a run: pick the best iteration, decide champion vs challenger, persist the model."""@@ -341,6 +342,7 @@ def complete_training_run(distillation=distillation,report_notebook_short_id=_verified_report_notebook(current, report_notebook_short_id),reader_summary=reader_summary,+ headline=headline,next_steps=next_steps,)@@ -561,6 +563,7 @@ def _finalize_under_lock(distillation: str,report_notebook_short_id: str,reader_summary: str | None,+ headline: str | None,next_steps: list[str] | None,) -> dict[str, Any]:# Re-fetch under lock and re-check status inside the transaction. Both callers (the@@ -684,6 +687,7 @@ def _finalize_under_lock(report_notebook_short_id=report_notebook_short_id,)training_run.reader_summary = reader_summary+ training_run.headline = headlinetraining_run.next_steps = next_stepstraining_run.save(update_fields=[@@ -692,6 +696,7 @@ def _finalize_under_lock("best_holdout_score","summary","reader_summary",+ "headline","next_steps","completed_at",]diff --git a/products/autoresearch/backend/training/runner.py b/products/autoresearch/backend/training/runner.pyindex ccfe30cd26af..54347798c2e6 100644--- a/products/autoresearch/backend/training/runner.py+++ b/products/autoresearch/backend/training/runner.py@@ -525,7 +525,7 @@ def build_agent_description(`pipeline_id = "{pipeline.pk}"`, `id = "{training_run_id}"`, the iteration_number,recipe_snapshot (`{{"feature_sql": "..."}}`), model_spec (`{{"model_class": "...", "model_params": {{...}}}}`),holdout_score (the AUC you computed), status (`"kept"` if it beats your best AUC so far, else- `"discarded"`), a one-line agent_description, and a one-sentence `summary`. Do NOT batch these up to record at the end —+ `"discarded"`), a one-line agent_description, a one-sentence `summary`, and a short `headline`. Do NOT batch these up to record at the end —the user watches the iteration trail stream in live as you work, so each must land as it happens.Judge `status` against your best-so-far at the time you record; if a later iteration wins, thatis simply reflected by the climbing scores, not by rewriting earlier ones. These also drive@@ -539,6 +539,11 @@ def build_agent_description(better than total activity."- Weak: "LogReg on dash_open_7d + log1p(evt_cnt), holdout AUC 0.81 vs 0.78, kept."+ `headline` is the row title for the experiment. Keep it to 60 characters or fewer, in the same+ plain words as `summary`, and say what the experiment tried or learned.+ - Good: "Moved training cutoffs to midnight to match scoring"+ - Good: "Coding-task activity became the strongest signal"+### Step 4 — IterateTry at least {min_iters} distinct hypotheses — vary which events you count, recency vs@@ -691,8 +696,10 @@ def build_agent_description(- `recommended_next`: concretely what a future run should try next given what you found.{notebook_field}The backend derives the rest of the summary (the kept ladder and dead-ends) from yourrecorded iterations, so keep these two fields to judgment only — do not restate the ladder.- These two fields are your notes and can stay as dense as is useful. Also pass two fields+ These two fields are your notes and can stay as dense as is useful. Also pass three fieldsfor people, in the same plain words as each iteration's `summary`:+ - `headline`: the run title, 60 characters or fewer, on what this run learned, in the same+ style as each iteration's `headline`.- `reader_summary`: one or two sentences on what this run learned about user behavior.- `next_steps`: a short list (at most 5) of what to try next, a few words each.Also pass `model_explanation`, which the model card charts. Use exactly this shape:diff --git a/products/autoresearch/backend/training/test_agent_recorded_training.py b/products/autoresearch/backend/training/test_agent_recorded_training.pyindex 0509a7fdca75..a049bc4c5a20 100644--- a/products/autoresearch/backend/training/test_agent_recorded_training.py+++ b/products/autoresearch/backend/training/test_agent_recorded_training.py@@ -20,6 +20,7 @@ from products.autoresearch.backend.models import ()from products.autoresearch.backend.presentation.views.serializers import (AGENT_DESCRIPTION_MAX_LENGTH,+ HEADLINE_MAX_LENGTH,ITERATION_SUMMARY_MAX_LENGTH,MODEL_SPEC_MAX_BYTES,NEXT_STEP_MAX_LENGTH,@@ -80,6 +81,7 @@ class TestAgentRecordedTraining(TeamScopedTestMixin, APIBaseTest):recipe: dict[str, Any] | None = None,runs_url: str | None = None,summary: str | None = None,+ headline: str | None = None,) -> Any:return self.client.post(f"{runs_url or self.runs_url}/{run_id}/iterations/",@@ -91,6 +93,7 @@ class TestAgentRecordedTraining(TeamScopedTestMixin, APIBaseTest):"holdout_score": holdout,"agent_description": "test iteration",**({"summary": summary} if summary is not None else {}),+ **({"headline": headline} if headline is not None else {}),},format="json",)@@ -341,6 +344,35 @@ class TestAgentRecordedTraining(TeamScopedTestMixin, APIBaseTest):assert listed_run["reader_summary"] == data["reader_summary"]assert listed_run["iterations"][0]["summary"] == "Recent visits helped."+ @parameterized.expand(+ [+ ("stored", "Moved training cutoffs to midnight", "Moved training cutoffs to midnight"),+ (+ "trimmed_and_capped",+ " Coding-task activity\nbecame the strongest signal " + "x" * HEADLINE_MAX_LENGTH,+ ("Coding-task activity became the strongest signal " + "x" * HEADLINE_MAX_LENGTH)[:HEADLINE_MAX_LENGTH],+ ),+ ("missing", None, None),+ ]+ )+ def test_headline_round_trips_on_iteration_and_run(+ self, _name: str, headline: str | None, expected: str | None+ ) -> None:+ run_id = self._open_run()+ recorded = self._record(run_id, number=0, status_value="kept", holdout=0.8, headline=headline)+ assert recorded.status_code == status.HTTP_201_CREATED, recorded.json()+ assert recorded.json()["headline"] == expected+ resp = self.client.post(+ f"{self.runs_url}/{run_id}/complete/",+ {"headline": headline} if headline is not None else {},+ format="json",+ )+ assert resp.status_code == status.HTTP_200_OK, resp.json()+ assert resp.json()["headline"] == expected+ listed_run = next(r for r in self.client.get(f"{self.runs_url}/").json()["results"] if r["id"] == run_id)+ assert listed_run["headline"] == expected+ assert listed_run["iterations"][0]["headline"] == expected+def test_complete_that_loses_the_race_to_failure_is_refused(self):run_id = self._open_run()self._record(run_id, number=0)diff --git a/products/autoresearch/frontend/agentSearch.test.ts b/products/autoresearch/frontend/agentSearch.test.tsindex e717d7726ae2..2dae4471ed05 100644--- a/products/autoresearch/frontend/agentSearch.test.ts+++ b/products/autoresearch/frontend/agentSearch.test.ts@@ -65,20 +65,42 @@ describe('buildAgentSearch', () => {it.each([[- 'the agent summary when there is one',+ 'the agent headline when there is one',+ 'Fewer features',+ 'Tried fewer features.',+ 'Dropped 12 features. AUC fell.',+ 'Fewer features',+ ],+ [+ 'the agent summary when there is no headline',+ null,'Tried fewer features.','Dropped 12 features. AUC fell.','Tried fewer features.',],['the first sentence of the description otherwise',+ undefined,null,'Dropped 12 features (v1.2). AUC fell.','Dropped 12 features (v1.2).',],- ['the whole description when it has no sentence end', undefined, 'Dropped 12 features', 'Dropped 12 features'],- ])('shows %s as the one-line summary', (_, summary, agent_description, expected) => {- const it = { ...iteration(0, 'kept', 0.7), summary, agent_description } as IterationTrailApi+ [+ 'the first clause of the description, cut to length',+ null,+ null,+ `Dropped ${'very '.repeat(12)}weak features, AUC fell.`,+ `Dropped ${'very '.repeat(10).trim()}…`,+ ],+ [+ 'the whole description when it has no sentence end',+ undefined,+ undefined,+ 'Dropped 12 features',+ 'Dropped 12 features',+ ],+ ])('shows %s as the one-line summary', (_, headline, summary, agent_description, expected) => {+ const it = { ...iteration(0, 'kept', 0.7), headline, summary, agent_description } as IterationTrailApiconst { points } = buildAgentSearch([run('run-1', '2026-01-01T00:00:00Z', [it])], null)expect(points[0].summary).toEqual(expected)})@@ -94,6 +116,23 @@ describe('experimentLogGroups', () => {[1, [1, 0]],])})++ it.each([+ [+ 'the run headline',+ { headline: 'Recency won', reader_summary: 'Recent visits mattered. More later.' },+ 'Recency won',+ ],+ [+ 'the first sentence of the reader summary',+ { headline: null, reader_summary: 'Recent visits mattered. More later.' },+ 'Recent visits mattered.',+ ],+ ['the run number', {}, 'Run 1'],+ ])('falls back to %s', (_, overrides, expected) => {+ const runs = [run('run-1', '2026-01-01T00:00:00Z', [], overrides as Partial<AutoresearchTrainingRunApi>)]+ expect(experimentLogGroups(runs, buildAgentSearch(runs, null), 'all')[0].headline).toEqual(expected)+ })})describe('latestAgentNotes', () => {diff --git a/products/autoresearch/frontend/agentSearch.ts b/products/autoresearch/frontend/agentSearch.tsindex 4e2f362d8d2a..0125661b11aa 100644--- a/products/autoresearch/frontend/agentSearch.ts+++ b/products/autoresearch/frontend/agentSearch.ts@@ -15,7 +15,7 @@ export interface SearchPoint {iterationNumber: numberstatus: AutoresearchIterationStatusEnumApiholdoutScore: number | null- /** One plain line for people: the agent's `summary`, else the first sentence of its description. */+ /** One plain line for people: the agent's `headline`, else its `summary`, else the first clause of its description. */summary: stringagentDescription: stringmodelSpec: IterationTrailApiModelSpec@@ -47,6 +47,8 @@ export type ExperimentLogFilter = 'all' | 'kept' | 'discarded' | 'crashed'export interface ExperimentLogGroup {run: AutoresearchTrainingRunApirunNumber: number+ /** The run's `headline`, else the first sentence of its `reader_summary`, else "Run N". */+ headline: string/** Newest first, after the filter. */entries: SearchPoint[]}@@ -62,6 +64,7 @@ export interface AgentNotes {/** Fields for people that older runs and iterations do not have. */interface ReaderFields {+ headline?: string | nullsummary?: string | nullreader_summary?: string | nullnext_steps?: string[] | null@@ -73,6 +76,21 @@ function firstSentence(text: string): string {return match ? match[0] : trimmed}+const HEADLINE_MAX_LENGTH = 60++function firstClause(text: string): string {+ const clause = firstSentence(text).split(/[,;:]\s/)[0]+ if (clause.length <= HEADLINE_MAX_LENGTH) {+ return clause+ }+ return `${clause.slice(0, HEADLINE_MAX_LENGTH).replace(/\s+\S*$/, '')}…`+}++function runHeadline(run: AutoresearchTrainingRunApi, runNumber: number): string {+ const { headline, reader_summary } = run as ReaderFields+ return headline?.trim() || firstSentence(reader_summary ?? '') || `Run ${runNumber}`+}+function oldestFirst(runs: AutoresearchTrainingRunApi[]): AutoresearchTrainingRunApi[] {return [...runs].sort((a, b) => a.created_at.localeCompare(b.created_at))}@@ -121,7 +139,10 @@ export function buildAgentSearch(iterationNumber: it.iteration_number,status: it.status,holdoutScore: score,- summary: (it as ReaderFields).summary?.trim() || firstSentence(it.agent_description ?? ''),+ summary:+ (it as ReaderFields).headline?.trim() ||+ (it as ReaderFields).summary?.trim() ||+ firstClause(it.agent_description ?? ''),agentDescription: it.agent_description ?? '',modelSpec: it.model_spec,bestBefore,@@ -170,6 +191,7 @@ export function experimentLogGroups(.map((run, index) => ({run,runNumber: index + 1,+ headline: runHeadline(run, index + 1),entries: [...(pointsByRun.get(run.id) ?? [])].reverse(),})).reverse()diff --git a/products/autoresearch/frontend/generated/api.schemas.ts b/products/autoresearch/frontend/generated/api.schemas.tsindex 485279344701..3f1515e25f1e 100644--- a/products/autoresearch/frontend/generated/api.schemas.ts+++ b/products/autoresearch/frontend/generated/api.schemas.ts@@ -910,6 +910,11 @@ export interface IterationTrailApi {* @nullable*/readonly summary: string | null+ /**+ * Short title for this experiment, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null/** Model class and hyperparameters tried in this iteration. */model_spec: IterationTrailApiModelSpec}@@ -961,6 +966,11 @@ export interface AutoresearchTrainingRunApi {* @nullable*/readonly reader_summary: string | null+ /**+ * Short title for this run, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null/*** Short plain-language next steps for people, at most 5. Null if not written.* @nullable@@ -1101,6 +1111,11 @@ export interface CompleteTrainingRunApi {* @nullable*/reader_summary?: string | null+ /**+ * A short title for people, at most 60 characters, on what this run learned. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.+ * @nullable+ */+ headline?: string | null/*** Short next steps for people, at most 5 items of a few words each (max 80 characters per item).* @maxItems 5@@ -1205,6 +1220,11 @@ export interface RecordIterationApi {* @nullable*/summary?: string | null+ /**+ * A short title for people, at most 60 characters, on what this experiment tried. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.+ * @nullable+ */+ headline?: string | null/*** Agent's self-assessed confidence (0-1) that this iteration helps.* @minimum 0@@ -1279,6 +1299,11 @@ export interface AutoresearchIterationApi {* @nullable*/summary?: string | null+ /**+ * Short title for this experiment, for people.+ * @nullable+ */+ headline?: string | null/*** Agent's self-assessed confidence 0–1* @nullable@@ -1395,6 +1420,11 @@ export interface IterationTrailWithRecipeApi {* @nullable*/readonly summary: string | null+ /**+ * Short title for this experiment, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null/** Model class and hyperparameters tried in this iteration. */model_spec: IterationTrailWithRecipeApiModelSpec/** The recipe this iteration tried: its feature_sql and transforms, so a later run can reuse them. */diff --git a/products/autoresearch/frontend/generated/api.zod.ts b/products/autoresearch/frontend/generated/api.zod.tsindex 92675665a24c..93db9727c815 100644--- a/products/autoresearch/frontend/generated/api.zod.ts+++ b/products/autoresearch/frontend/generated/api.zod.ts@@ -345,6 +345,12 @@ export const AutoresearchTrainingRunsCompleteCreateBody = /* @__PURE__ */ zod.max(autoresearchTrainingRunsCompleteCreateBodyReaderSummaryMax).nullish().describe('One or two plain sentences for people on what this run learned. Max 600 characters.'),+ headline: zod+ .string()+ .nullish()+ .describe(+ 'A short title for people, at most 60 characters, on what this run learned. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.'+ ),next_steps: zod.array(zod.string().max(autoresearchTrainingRunsCompleteCreateBodyNextStepsItemMax)).max(autoresearchTrainingRunsCompleteCreateBodyNextStepsMax)@@ -445,6 +451,12 @@ export const AutoresearchTrainingRunsIterationsCreateBody = /* @__PURE__ */ zod.describe('One plain sentence for people on what this experiment tried and what happened. Max 300 characters.'),+ headline: zod+ .string()+ .nullish()+ .describe(+ 'A short title for people, at most 60 characters, on what this experiment tried. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.'+ ),agent_confidence: zod.number().min(autoresearchTrainingRunsIterationsCreateBodyAgentConfidenceMin)diff --git a/products/autoresearch/mcp/tools.yaml b/products/autoresearch/mcp/tools.yamlindex 40d0761590bd..c13208ba9b0b 100644--- a/products/autoresearch/mcp/tools.yaml+++ b/products/autoresearch/mcp/tools.yaml@@ -557,9 +557,10 @@ tools:model card. Also pass distillation (1–2 sentences on what this run learned) and recommended_next (what afuture run should try next) — these are stored in the run summary and read back by the next run duringorientation; the backend derives the rest of the summary (kept ladder, dead-ends) from your recorded- iterations. Pass reader_summary (one or two plain sentences) and next_steps (at most 5 short items) for- people who read the run; keep column names, SQL and AUC numbers out of them. If you built a report notebook- for this run, pass its short_id as report_notebook_short_id.+ iterations. Pass headline (a run title of at most 60 characters), reader_summary (one or two plain+ sentences) and next_steps (at most 5 short items) for people who read the run; keep column names, SQL and+ AUC numbers out of them. If you built a report notebook for this run, pass its short_id as+ report_notebook_short_id.feature_flag: autoresearchresponse:include:@@ -633,7 +634,8 @@ tools:completion time to choose the champion. If this iteration was spawned from a pending steering suggestion,pass parent_suggestion = the suggestion's ID — that links the iteration to the suggestion for attributionand marks the suggestion 'acted_on'. Pass summary, one plain sentence for people on what the experiment- tried and what happened; agent_description stays your own notes.+ tried and what happened, and headline, a title of at most 60 characters in the same plain words;+ agent_description stays your own notes.feature_flag: autoresearchresponse:include:diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 22ec1420ff1f..0e1cbeee767e 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -1360,7 +1360,7 @@"feature_flag": "autoresearch"},"autoresearch-training-runs-complete-create": {- "description": "Finalize a training run. The backend selects the kept iteration with the highest holdout_score. best_iteration_id only breaks a tie at that top score and never overrides the ranking, so upload the bundle of the highest-scoring iteration. The backend then decides champion vs challenger via the promotion ladder (cold-start preliminary, anti-thrash margin for an existing champion), and persists the model. Agents cannot set the champion directly — promotion is server-only. Call autoresearch-models-list afterwards to see the resulting champion/challenger. Optionally pass model_explanation (top features and directionality) for the model card. Also pass distillation (1–2 sentences on what this run learned) and recommended_next (what a future run should try next) — these are stored in the run summary and read back by the next run during orientation; the backend derives the rest of the summary (kept ladder, dead-ends) from your recorded iterations. Pass reader_summary (one or two plain sentences) and next_steps (at most 5 short items) for people who read the run; keep column names, SQL and AUC numbers out of them. If you built a report notebook for this run, pass its short_id as report_notebook_short_id.",+ "description": "Finalize a training run. The backend selects the kept iteration with the highest holdout_score. best_iteration_id only breaks a tie at that top score and never overrides the ranking, so upload the bundle of the highest-scoring iteration. The backend then decides champion vs challenger via the promotion ladder (cold-start preliminary, anti-thrash margin for an existing champion), and persists the model. Agents cannot set the champion directly — promotion is server-only. Call autoresearch-models-list afterwards to see the resulting champion/challenger. Optionally pass model_explanation (top features and directionality) for the model card. Also pass distillation (1–2 sentences on what this run learned) and recommended_next (what a future run should try next) — these are stored in the run summary and read back by the next run during orientation; the backend derives the rest of the summary (kept ladder, dead-ends) from your recorded iterations. Pass headline (a run title of at most 60 characters), reader_summary (one or two plain sentences) and next_steps (at most 5 short items) for people who read the run; keep column names, SQL and AUC numbers out of them. If you built a report notebook for this run, pass its short_id as report_notebook_short_id.","category": "Autoresearch","feature": "autoresearch","summary": "Complete a training run",@@ -1405,7 +1405,7 @@"feature_flag": "autoresearch"},"autoresearch-training-runs-iterations-create": {- "description": "Record one iteration of an open training run. Idempotent on iteration_number — re-sending the same number updates that iteration in place. The recipe is validated server-side: feature_sql in recipe_snapshot must be a read-only SELECT that outputs the anchor key exactly once as a.person_id AS distinct_id, and every events join must be bounded by e.timestamp < fromUnixTimestamp(a.cutoff_ts) and exclude NOT startsWith(e.event, 'autoresearch_'), the model's own prediction events. The validator cannot prove either rule, and without them the features see the outcome window or the model's own past scores, and the holdout AUC is leaked. model_class in model_spec is informational when you upload your own train.py and predict.py bundle; it must be in the sklearn/xgboost allowlist only when the run completes without a bundle. Use status='kept' if the iteration beats the best AUC so far in this run (the first scored iteration is always kept, whatever the current champion scores), 'discarded' otherwise, 'crashed' on failure. Iterations are picked up at completion time to choose the champion. If this iteration was spawned from a pending steering suggestion, pass parent_suggestion = the suggestion's ID — that links the iteration to the suggestion for attribution and marks the suggestion 'acted_on'. Pass summary, one plain sentence for people on what the experiment tried and what happened; agent_description stays your own notes.",+ "description": "Record one iteration of an open training run. Idempotent on iteration_number — re-sending the same number updates that iteration in place. The recipe is validated server-side: feature_sql in recipe_snapshot must be a read-only SELECT that outputs the anchor key exactly once as a.person_id AS distinct_id, and every events join must be bounded by e.timestamp < fromUnixTimestamp(a.cutoff_ts) and exclude NOT startsWith(e.event, 'autoresearch_'), the model's own prediction events. The validator cannot prove either rule, and without them the features see the outcome window or the model's own past scores, and the holdout AUC is leaked. model_class in model_spec is informational when you upload your own train.py and predict.py bundle; it must be in the sklearn/xgboost allowlist only when the run completes without a bundle. Use status='kept' if the iteration beats the best AUC so far in this run (the first scored iteration is always kept, whatever the current champion scores), 'discarded' otherwise, 'crashed' on failure. Iterations are picked up at completion time to choose the champion. If this iteration was spawned from a pending steering suggestion, pass parent_suggestion = the suggestion's ID — that links the iteration to the suggestion for attribution and marks the suggestion 'acted_on'. Pass summary, one plain sentence for people on what the experiment tried and what happened, and headline, a title of at most 60 characters in the same plain words; agent_description stays your own notes.","category": "Autoresearch","feature": "autoresearch","summary": "Record a training iteration",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 669a86777538..9f32153ce04a 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -1375,7 +1375,7 @@"feature_flag": "autoresearch"},"autoresearch-training-runs-complete-create": {- "description": "Finalize a training run. The backend selects the kept iteration with the highest holdout_score. best_iteration_id only breaks a tie at that top score and never overrides the ranking, so upload the bundle of the highest-scoring iteration. The backend then decides champion vs challenger via the promotion ladder (cold-start preliminary, anti-thrash margin for an existing champion), and persists the model. Agents cannot set the champion directly — promotion is server-only. Call autoresearch-models-list afterwards to see the resulting champion/challenger. Optionally pass model_explanation (top features and directionality) for the model card. Also pass distillation (1–2 sentences on what this run learned) and recommended_next (what a future run should try next) — these are stored in the run summary and read back by the next run during orientation; the backend derives the rest of the summary (kept ladder, dead-ends) from your recorded iterations. Pass reader_summary (one or two plain sentences) and next_steps (at most 5 short items) for people who read the run; keep column names, SQL and AUC numbers out of them. If you built a report notebook for this run, pass its short_id as report_notebook_short_id.",+ "description": "Finalize a training run. The backend selects the kept iteration with the highest holdout_score. best_iteration_id only breaks a tie at that top score and never overrides the ranking, so upload the bundle of the highest-scoring iteration. The backend then decides champion vs challenger via the promotion ladder (cold-start preliminary, anti-thrash margin for an existing champion), and persists the model. Agents cannot set the champion directly — promotion is server-only. Call autoresearch-models-list afterwards to see the resulting champion/challenger. Optionally pass model_explanation (top features and directionality) for the model card. Also pass distillation (1–2 sentences on what this run learned) and recommended_next (what a future run should try next) — these are stored in the run summary and read back by the next run during orientation; the backend derives the rest of the summary (kept ladder, dead-ends) from your recorded iterations. Pass headline (a run title of at most 60 characters), reader_summary (one or two plain sentences) and next_steps (at most 5 short items) for people who read the run; keep column names, SQL and AUC numbers out of them. If you built a report notebook for this run, pass its short_id as report_notebook_short_id.","category": "Autoresearch","feature": "autoresearch","summary": "Complete a training run",@@ -1420,7 +1420,7 @@"feature_flag": "autoresearch"},"autoresearch-training-runs-iterations-create": {- "description": "Record one iteration of an open training run. Idempotent on iteration_number — re-sending the same number updates that iteration in place. The recipe is validated server-side: feature_sql in recipe_snapshot must be a read-only SELECT that outputs the anchor key exactly once as a.person_id AS distinct_id, and every events join must be bounded by e.timestamp < fromUnixTimestamp(a.cutoff_ts) and exclude NOT startsWith(e.event, 'autoresearch_'), the model's own prediction events. The validator cannot prove either rule, and without them the features see the outcome window or the model's own past scores, and the holdout AUC is leaked. model_class in model_spec is informational when you upload your own train.py and predict.py bundle; it must be in the sklearn/xgboost allowlist only when the run completes without a bundle. Use status='kept' if the iteration beats the best AUC so far in this run (the first scored iteration is always kept, whatever the current champion scores), 'discarded' otherwise, 'crashed' on failure. Iterations are picked up at completion time to choose the champion. If this iteration was spawned from a pending steering suggestion, pass parent_suggestion = the suggestion's ID — that links the iteration to the suggestion for attribution and marks the suggestion 'acted_on'. Pass summary, one plain sentence for people on what the experiment tried and what happened; agent_description stays your own notes.",+ "description": "Record one iteration of an open training run. Idempotent on iteration_number — re-sending the same number updates that iteration in place. The recipe is validated server-side: feature_sql in recipe_snapshot must be a read-only SELECT that outputs the anchor key exactly once as a.person_id AS distinct_id, and every events join must be bounded by e.timestamp < fromUnixTimestamp(a.cutoff_ts) and exclude NOT startsWith(e.event, 'autoresearch_'), the model's own prediction events. The validator cannot prove either rule, and without them the features see the outcome window or the model's own past scores, and the holdout AUC is leaked. model_class in model_spec is informational when you upload your own train.py and predict.py bundle; it must be in the sklearn/xgboost allowlist only when the run completes without a bundle. Use status='kept' if the iteration beats the best AUC so far in this run (the first scored iteration is always kept, whatever the current champion scores), 'discarded' otherwise, 'crashed' on failure. Iterations are picked up at completion time to choose the champion. If this iteration was spawned from a pending steering suggestion, pass parent_suggestion = the suggestion's ID — that links the iteration to the suggestion for attribution and marks the suggestion 'acted_on'. Pass summary, one plain sentence for people on what the experiment tried and what happened, and headline, a title of at most 60 characters in the same plain words; agent_description stays your own notes.","category": "Autoresearch","feature": "autoresearch","summary": "Record a training iteration",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 1f432a8cb54c..86036e83dc78 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -13837,6 +13837,11 @@ export namespace Schemas {* @nullable*/summary?: string | null;+ /**+ * Short title for this experiment, for people.+ * @nullable+ */+ headline?: string | null;/*** Agent's self-assessed confidence 0–1* @nullable@@ -14587,6 +14592,11 @@ export namespace Schemas {* @nullable*/readonly summary: string | null;+ /**+ * Short title for this experiment, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null;/** Model class and hyperparameters tried in this iteration. */model_spec: IterationTrailModelSpec;}@@ -14638,6 +14648,11 @@ export namespace Schemas {* @nullable*/readonly reader_summary: string | null;+ /**+ * Short title for this run, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null;/*** Short plain-language next steps for people, at most 5. Null if not written.* @nullable@@ -24690,6 +24705,11 @@ export namespace Schemas {* @nullable*/reader_summary?: string | null;+ /**+ * A short title for people, at most 60 characters, on what this run learned. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.+ * @nullable+ */+ headline?: string | null;/*** Short next steps for people, at most 5 items of a few words each (max 80 characters per item).* @maxItems 5@@ -60487,6 +60507,11 @@ export namespace Schemas {* @nullable*/readonly summary: string | null;+ /**+ * Short title for this experiment, for people. Null if not written.+ * @nullable+ */+ readonly headline: string | null;/** Model class and hyperparameters tried in this iteration. */model_spec: IterationTrailWithRecipeModelSpec;/** The recipe this iteration tried: its feature_sql and transforms, so a later run can reuse them. */@@ -94612,6 +94637,11 @@ export namespace Schemas {* @nullable*/summary?: string | null;+ /**+ * A short title for people, at most 60 characters, on what this experiment tried. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.+ * @nullable+ */+ headline?: string | null;/*** Agent's self-assessed confidence (0-1) that this iteration helps.* @minimum 0diff --git a/services/mcp/src/generated/autoresearch/api.ts b/services/mcp/src/generated/autoresearch/api.tsindex 5d3acca9d311..5e6b71341eaf 100644--- a/services/mcp/src/generated/autoresearch/api.ts+++ b/services/mcp/src/generated/autoresearch/api.ts@@ -522,6 +522,12 @@ export const AutoresearchTrainingRunsCompleteCreateBody = () => zod.max(autoresearchTrainingRunsCompleteCreateBodyReaderSummaryMax).nullish().describe('One or two plain sentences for people on what this run learned. Max 600 characters.'),+ headline: zod+ .string()+ .nullish()+ .describe(+ 'A short title for people, at most 60 characters, on what this run learned. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.'+ ),next_steps: zod.array(zod.string().max(autoresearchTrainingRunsCompleteCreateBodyNextStepsItemMax)).max(autoresearchTrainingRunsCompleteCreateBodyNextStepsMax)@@ -632,6 +638,12 @@ export const AutoresearchTrainingRunsIterationsCreateBody = () => zod.describe('One plain sentence for people on what this experiment tried and what happened. Max 300 characters.'),+ headline: zod+ .string()+ .nullish()+ .describe(+ 'A short title for people, at most 60 characters, on what this experiment tried. Use plain words, with no column names, SQL or model jargon. Longer text is cut, not rejected.'+ ),agent_confidence: zod.number().min(autoresearchTrainingRunsIterationsCreateBodyAgentConfidenceMin)diff --git a/services/mcp/src/tools/generated/autoresearch.ts b/services/mcp/src/tools/generated/autoresearch.tsindex db1202108e9d..8019441bec13 100644--- a/services/mcp/src/tools/generated/autoresearch.ts+++ b/services/mcp/src/tools/generated/autoresearch.ts@@ -698,6 +698,9 @@ const autoresearchTrainingRunsCompleteCreate = (): ToolBase<if (params.reader_summary !== undefined) {body['reader_summary'] = params.reader_summary}+ if (params.headline !== undefined) {+ body['headline'] = params.headline+ }if (params.next_steps !== undefined) {body['next_steps'] = params.next_steps}@@ -824,6 +827,9 @@ const autoresearchTrainingRunsIterationsCreate = (): ToolBase<if (params.summary !== undefined) {body['summary'] = params.summary}+ if (params.headline !== undefined) {+ body['headline'] = params.headline+ }if (params.agent_confidence !== undefined) {body['agent_confidence'] = params.agent_confidence}