Memory Store を Identity と Template にマウントします。
既存の Memory Store を
Identity レベルの Service Account Token は自身の Identity のみ操作できます。別の Identity を操作すると
HTTP 200 OK
Memory Store マウントオブジェクトを返します。
複数の Store をマウントすると、Agent にはすべての Store の Memory が
(identity, template) にマウントします。その Identity が Template を使用して作成する Session には Store の Memory 内容が自動的に提供されます。
明示的にマウントした Store は常に read_only です。1 つの (identity, template) には、システム管理のデフォルト Store を除いて最大 10 個を明示的にマウントできます。
同じマウント操作は冪等です。 同じ Store を再度マウントすると既存のレコードが返され、created_at は最初のマウント時刻のままです。
パス
POST /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores
ヘッダー
| ヘッダー | 必須 | 説明 |
|---|---|---|
Authorization | はい | Bearer <PAT, admin SAT, or SAT for this Identity> |
Content-Type | はい | application/json |
403 が返されます。
パスパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
identity_id | string | はい | Identity ID(idn_...)。 |
template_id | string | はい | Template ID(tmpl_...)。 |
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
memory_store_id | string | はい | マウントする Memory Store ID(memstore_...)。呼び出し元から参照できる active 状態の Store である必要があります。 |
リクエスト例
レスポンス例
HTTP 200 OK
レスポンス
Memory Store マウントオブジェクトを返します。
注意事項
複数の Store をマウントすると、Agent にはすべての Store の Memory が path で統合されたフラットな名前空間として見えます。同じ path は互いに隠れる可能性があります。Session 内での見え方を参照してください。
エラー
| HTTP | Type | 発生条件 |
|---|---|---|
| 400 | invalid_request_error | memory_store_id がない、Store がアーカイブ済み、または (identity, template) にすでに 10 個の明示的なマウントがあります。 |
| 401 | authentication_error | 認証トークンがないか無効です。 |
| 403 | permission_error | Identity レベルの SAT が別の Identity を操作しようとしました。 |
| 404 | not_found_error | Identity、Template、Memory Store のいずれかが存在しないか参照できません。 |
| 500/502/503 | api_error | Forward または依存サービスでエラーが発生しました。 |