> ## Documentation Index
> Fetch the complete documentation index at: https://adcp-docs-ja.pier1.co.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# si_initiate_session

ブランドエージェントとの会話セッションを開始します。ユーザーがブランドとのやり取りに興味を示したとき、ホストプラットフォームがこのタスクを呼び出します。

## リクエスト

| Field                    | Type   | Required | Description                           |
| ------------------------ | ------ | -------- | ------------------------------------- |
| `context`                | string | Yes      | ユーザー意図の自然言語記述                         |
| `identity`               | object | Yes      | 同意ステータスを含むユーザーアイデンティティ                |
| `media_buy_id`           | string | No       | 広告起点の場合の AdCP メディアバイ ID               |
| `placement`              | string | No       | セッションがトリガーされた場所（例: "chatgpt\_search"） |
| `offering_id`            | string | No       | 適用するブランド固有のオファー参照                     |
| `supported_capabilities` | object | No       | ホストプラットフォームがサポートする機能                  |
| `offering_token`         | string | No       | 相関用の `si_get_offering` からのトークン        |

### Offering Token

開始前にホストが [`si_get_offering`](./si_get_offering) 参照を行った場合、**セッション継続性** のためトークンを含めます:

```json theme={null}
{
  "offering_token": "offering_abc123xyz"
}
```

トークンは、ユーザーに何がどの順で提示されたかをブランドエージェントに伝えます。これにより自然な会話の流れが可能になります:

* ユーザーが見る: "Nike Pegasus ($89), Air Max ($129), Vomero (\$139)"
* ユーザーが言う: "真ん中のものについて詳しく教えて"
* ブランドエージェントはトークンに保存されたコンテキストを用いて「真ん中のもの」→ Air Max と解釈します

### Sponsored Context Receipt

ホストがセッション前の照会からのスポンサードコンテキストを受け入れた、または明示的に拒否した場合、ホストの境界決定をブランド/セラーに見えるようにするために `sponsored_context_receipt` を含めます。

```json theme={null}
{
  "offering_token": "offering_abc123xyz",
  "sponsored_context_receipt": {
    "sponsored_context": {
      "paying_principal": {
        "brand": { "domain": "acme-running.example" },
        "display_name": "Acme Running"
      },
      "context_use": "comparison_set",
      "disclosure_obligation": {
        "required": true,
        "label_text": "Sponsored results from Acme Running"
      }
    },
    "host_receipt": {
      "status": "accepted",
      "accepted_context_use": "comparison_set",
      "received_at": "2025-01-19T10:00:02Z",
      "host_surface": "assistant_comparison",
      "disclosure_commitment": {
        "status": "accepted",
        "label_text": "Sponsored results from Acme Running"
      }
    }
  }
}
```

レシートは、ホストがスポンサードコンテキストを受け入れたか拒否したかを記録します。受け入れられたレシートについては、ホストが尊重することをコミットした内容を記録します。AdCP が隠されたモデルの推論を検査できることを主張するものではありません。

| Receipt field                        | Description                                           |
| ------------------------------------ | ----------------------------------------------------- |
| `sponsored_context`                  | 承認される送信者宣言: 支払いプリンシパル、宣言された使用モード、開示義務                 |
| `host_receipt.status`                | ホストが宣言を尊重した場合は `accepted`。コンテキストを使わなかった場合は `rejected` |
| `host_receipt.accepted_context_use`  | 受け入れられたレシートで必須。宣言の `context_use` に一致しなければならない         |
| `host_receipt.disclosure_commitment` | 受け入れられたレシートで必須。ホストの開示コミットメントを記録                       |
| `host_receipt.rejection_reason`      | ホストがスポンサードコンテキストを拒否する場合の任意の説明                         |

受け入れられたレシートは、使用モードをダウンスコープしたり、必要な開示を辞退したりできません。いずれの条件も尊重できないホストは、代わりにスポンサードコンテキストを拒否します。拒否されたレシートは `accepted_context_use` と `disclosure_commitment` を省略しなければなりません。

### Identity オブジェクト

`consent_granted` が `true` の場合:

| Field                         | Type    | Required | Description          |
| ----------------------------- | ------- | -------- | -------------------- |
| `consent_granted`             | boolean | Yes      | `true` 固定            |
| `consent_timestamp`           | string  | Yes      | 同意の ISO 8601 タイムスタンプ |
| `consent_scope`               | array   | Yes      | ユーザーが共有に同意したフィールド    |
| `privacy_policy_acknowledged` | object  | No       | ユーザーが承諾したブランドポリシー    |
| `user`                        | object  | Yes      | ユーザーの PII            |

`consent_granted` が `false` の場合:

| Field                  | Type    | Required | Description     |
| ---------------------- | ------- | -------- | --------------- |
| `consent_granted`      | boolean | Yes      | `false` 固定      |
| `anonymous_session_id` | string  | Yes      | この匿名セッションの一意 ID |

### Supported Capabilities オブジェクト

ホストプラットフォームがレンダリングできるものを宣言します:

```json theme={null}
{
  "modalities": {
    "conversational": true,
    "voice": { "providers": ["elevenlabs", "openai"] },
    "video": false,
    "avatar": false
  },
  "components": {
    "standard": ["text", "link", "image", "product_card", "carousel", "action_button"],
    "extensions": {
      "chatgpt_apps_sdk": "1.0"
    }
  },
  "commerce": {
    "acp_checkout": true
  }
}
```

## レスポンス

| Field                     | Type   | Description        |
| ------------------------- | ------ | ------------------ |
| `session_id`              | string | このセッションの一意識別子      |
| `response`                | object | ブランドエージェントの初回レスポンス |
| `negotiated_capabilities` | object | ブランドとホストの機能の交差集合   |

### Response オブジェクト

| Field         | Type   | Description          |
| ------------- | ------ | -------------------- |
| `message`     | string | ブランドエージェントからのテキスト応答  |
| `ui_elements` | array  | レンダリングするビジュアルコンポーネント |

## 例

### リクエスト

```json theme={null}
{
  "context": "User wants to fly to Boston next Tuesday morning on flight 632 at 6 AM.",
  "media_buy_id": "delta_q1_premium_upgrade",
  "placement": "chatgpt_search",
  "offering_id": "delta_chatgpt_3313",
  "identity": {
    "consent_granted": true,
    "consent_timestamp": "2026-01-18T10:30:00Z",
    "consent_scope": ["name", "email"],
    "privacy_policy_acknowledged": {
      "brand_policy_url": "https://delta.com/privacy",
      "brand_policy_version": "2026-01"
    },
    "user": {
      "email": "jane@example.com",
      "name": "Jane Smith",
      "locale": "en-US"
    }
  },
  "supported_capabilities": {
    "modalities": {
      "conversational": true,
      "voice": true
    },
    "components": {
      "standard": ["text", "link", "image", "product_card", "carousel", "action_button"]
    },
    "commerce": {
      "acp_checkout": true
    }
  }
}
```

### レスポンス

```json theme={null}
{
  "session_id": "sess_abc123",
  "response": {
    "message": "Hi Jane! I found DL632 departing at 6:15 AM next Tuesday. Great news—as a SkyMiles Gold member, you qualify for our free Premium Economy upgrade on this flight.",
    "ui_elements": [
      {
        "type": "product_card",
        "data": {
          "title": "DL632 to Boston - Tue Jan 27",
          "subtitle": "6:15 AM → 9:42 AM (3h 27m)",
          "price": "$199",
          "badge": "Free Premium Economy Upgrade",
          "image_url": "https://delta.com/images/premium-economy.jpg",
          "cta": { "label": "Book with Upgrade", "action": "checkout" }
        }
      }
    ]
  },
  "negotiated_capabilities": {
    "modalities": {
      "conversational": true,
      "voice": true
    },
    "components": {
      "standard": ["text", "link", "image", "product_card", "carousel", "action_button"]
    },
    "commerce": {
      "acp_checkout": true
    }
  }
}
```

## キーポイント

1. **コンテキストは会話ハンドオフ** - ホストがブランドエージェントにユーザーのニーズを伝え、ブランドエージェントが自然に会話を続けます。

2. **ブランドがロイヤルティデータを参照** - Jane のメールが認識されれば、Delta が SkyMiles ステータスを自動取得します。ホストはロイヤルティ番号を保持しません。

3. **offering\_id はブランド固有** - ブランドがこの参照を解釈し、プロモーションや割引、ロイヤルティ特典を適用します。ホストはオファーの意味を理解せずに渡すだけです。

4. **機能ネゴシエーション** - レスポンスの `negotiated_capabilities` には、このセッションで利用できる機能（ブランドとホストの交差）が示されます。

5. **明示的同意のある PII 受け渡し** - `consent_granted` が true の場合、実際のメール/名前が渡されます（ハッシュなし）。これは同意に基づく直接のハンドオフです。
