> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snorbe.deskrex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# エージェント実行詳細取得

> エージェント実行の詳細情報（プロセスタイムライン、リンクされたソース・エンティティを含む）を取得します

# エージェント実行詳細取得

エージェント実行の完全な詳細情報を返します。プロセスタイムライン全体、リンクされたソース、リンクされたエンティティを含みます。[軽量ステータスエンドポイント](/ja/api-reference/get-run-status)とは異なり、プロセスイベント配列全体を返します。

## リクエスト

```
GET /api/v1/agent/run/{runId}
```

### パスパラメータ

| パラメータ   | 型        | 説明          |
| ------- | -------- | ----------- |
| `runId` | `string` | エージェント実行 ID |

### ヘッダー

| ヘッダー            | 必須 | 説明                             |
| --------------- | -- | ------------------------------ |
| `Authorization` | はい | `Bearer snorbe_...` 形式の API キー |

<Note>
  ワークスペースは API キーに紐づくものが自動的に使用されます。`workspaceId` パラメータは不要です。
</Note>

<Warning>
  このエンドポイントはプロセスタイムライン全体を返すため、長時間実行されたエージェントでは応答が大きくなる可能性があります。軽量なステータスポーリングには[実行ステータス取得](/ja/api-reference/get-run-status)エンドポイントを使用してください。
</Warning>

## レスポンス

```json theme={null}
{
  "id": "clrun001",
  "status": "completed",
  "process": [],
  "createdAt": "2026-04-01T09:00:00.000Z",
  "updatedAt": "2026-04-01T09:05:00.000Z",
  "agentId": "clagent001",
  "agentName": "research-agent",
  "linkedSources": [
    {
      "id": "clsrc001",
      "url": "https://example.com/paper",
      "title": "Research Paper",
      "sourceType": "public"
    },
    {
      "id": "clsrc002",
      "url": "https://example.com/report",
      "title": "Industry Report",
      "sourceType": "private"
    }
  ],
  "linkedEntityIds": ["clxxx001", "clxxx002", "clxxx003"],
  "linkedEntities": [
    {
      "id": "clxxx001",
      "label": "Lithium-Ion Battery",
      "category": "technology",
      "kind": "entity"
    },
    {
      "id": "clxxx002",
      "label": "Solid-State Electrolyte",
      "category": "technology",
      "kind": "material"
    }
  ],
  "images": [
    {
      "imageUrl": "https://example.com/photo-1.jpg",
      "thumbnailUrl": "https://example.com/thumb-1.jpg",
      "title": "リチウムイオン電池の構造図",
      "link": "https://example.com/article-1"
    }
  ]
}
```

エージェント実行が見つからない場合は `null` を返します。

### レスポンスフィールド

| フィールド                        | 型                     | 説明                                                                  |
| ---------------------------- | --------------------- | ------------------------------------------------------------------- |
| `id`                         | `string`              | エージェント実行 ID                                                         |
| `status`                     | `string`              | 実行ステータス（`completed`, `running`, `error` 等）                          |
| `process`                    | `object[]`            | エージェント実行のプロセスイベント配列                                                 |
| `createdAt`                  | `string`              | 実行の作成日時（ISO 8601）                                                   |
| `updatedAt`                  | `string`              | 実行の更新日時（ISO 8601）                                                   |
| `agentId`                    | `string`              | この実行を行ったエージェント ID                                                   |
| `agentName`                  | `string`              | エージェント名                                                             |
| `linkedSources`              | `object[]`            | このエージェント実行で使用されたソース                                                 |
| `linkedSources[].id`         | `string`              | ソース ID                                                              |
| `linkedSources[].url`        | `string`              | ソース URL                                                             |
| `linkedSources[].title`      | `string`              | ソースタイトル                                                             |
| `linkedSources[].sourceType` | `string`              | ソース種別（`public` または `private`）                                       |
| `linkedEntityIds`            | `string[]`            | このエージェント実行にリンクされたエンティティ ID                                          |
| `linkedEntities`             | `object[]`            | このエージェント実行にリンクされたエンティティのサマリー                                        |
| `linkedEntities[].id`        | `string`              | エンティティ ID                                                           |
| `linkedEntities[].label`     | `string`              | エンティティ名                                                             |
| `linkedEntities[].category`  | `string`              | エンティティカテゴリ                                                          |
| `linkedEntities[].kind`      | `string`              | エンティティ種別                                                            |
| `images`                     | `object[]`            | process から抽出された画像配列。検索画像 SERP・スキル成果物・ソース要約の bodyLinks 画像を統合（重複排除済み） |
| `images[].imageUrl`          | `string`              | 画像 URL                                                              |
| `images[].thumbnailUrl`      | `string \| undefined` | サムネイル URL（Serper 経由のみ存在）                                            |
| `images[].title`             | `string \| undefined` | 画像タイトル / alt                                                        |
| `images[].link`              | `string \| undefined` | 元ページの URL                                                           |

<Note>
  `process` フィールドは、エージェント実行中に収集されたプロセスイベントの配列です。イベントタイプとペイロードの完全な一覧は、[SSE ストリーミングのドキュメント](/ja/api-reference/stream-agent-run)を参照してください。
</Note>

## 使用例

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://app.snorbe.deskrex.ai/api/v1/agent/run/clrun001" \
    -H "Authorization: Bearer snorbe_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://app.snorbe.deskrex.ai/api/v1/agent/run/clrun001",
      headers={"Authorization": "Bearer snorbe_your_api_key_here"},
  )
  data = resp.json()
  if data:
      print(f"Run: {data['id']} ({data['status']})")
      print(f"Agent: {data['agentName']}")
      print(f"Sources: {len(data['linkedSources'])}")
      print(f"Entities: {len(data['linkedEntities'])}")
      print(f"Process events: {len(data['process'])}")
  else:
      print("Agent run not found")
  ```

  ```typescript TypeScript theme={null}
  const resp = await fetch(
    "https://app.snorbe.deskrex.ai/api/v1/agent/run/clrun001",
    { headers: { Authorization: "Bearer snorbe_your_api_key_here" } },
  );
  const data = await resp.json();
  if (data) {
    console.log(`Run: ${data.id} (${data.status})`);
    console.log(`Agent: ${data.agentName}`);
    console.log(`Sources: ${data.linkedSources.length}`);
    console.log(`Entities: ${data.linkedEntities.length}`);
    console.log(`Process events: ${data.process.length}`);
  }
  ```
</CodeGroup>

## エラーレスポンス

| HTTP ステータス | 説明                                |
| ---------- | --------------------------------- |
| 401        | API キーが無効、期限切れ、または未指定             |
| 404        | エージェント実行が見つかりません（`null` ボディを返します） |
