---
title: "Attach Agent Training Run"
method: POST
path: "/api/v1/agents/{agent_id}/training-runs"
tags: ["agents"]
---

# Attach Agent Training Run

`POST /api/v1/agents/{agent_id}/training-runs`

Claim an unassigned training run without changing existing ownership.

## Path parameters

- `agent_id` string, required

## Request body

- AttachAgentTrainingRunRequest
  - `training_run_id` string, required

## Response `200`

Successful Response

- TrainingRunResponse
  - `agent_id` string, nullable, required — Persisted owner; null for unassigned legacy runs.
  - `parent_checkpoint_id` string, nullable
  - `training_run_id` string, required
  - `pipeline_run_id` string, nullable, required
  - `display_name` string, nullable, required — User-facing training run name; null for legacy rows.
  - `xid` string, nullable
  - `status` 'pending' | 'running' | 'cancel_signaled' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled', required
  - `bench_id` string, nullable, required
  - `base_model_id` string, required
  - `training_options` object, required
  - `created_by` string, required
  - `created_at` string, date-time, required
  - `failure` AsyncFailure
    - `type` string, required — Stable category used for exception mapping.
    - `code` string, required — Stable programmatic reason for the asynchronous failure.
    - `message` string, required — Human-readable explanation for this failure occurrence.
    - `context` object — Machine-readable values specific to this failure code.
  - `has_training_execution` boolean, required — Whether a training execution has been assigned.

## Changes

- **2026-09-28** `1efa21f7aeb8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/trajectory/apis/trajectory-api/changes/api/v1/agents/:agent_id/training-runs/post.md)

---

[API](https://skmtc.dev/trajectory/apis/trajectory-api.md) · [All operations](https://skmtc.dev/trajectory/apis/trajectory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trajectory/apis/trajectory-api/revisions/8331f8435ce8?raw)
