ダッシュボード
メモリ

キャプチャと取得

メモリの書き込みと読み取りのためのダイレクト REST フロー。

バックエンドがメモリの書き込みと読み取りを明示的に制御する場合は、REST API を使用します。どちらの操作も、プロジェクトのsk- クライアント キーを使用して認証します。

#キャプチャ

curl -X POST https://api.agihalo.com/api/v1/memory/capture \
  -H "Authorization: Bearer $HALO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectKey": "customer-product",
    "endUserKey": "user_123",
    "sessionData": {
      "messages": [
        {
          "role": "user",
          "content": "Keep my weekly reports short and send them in the morning."
        }
      ]
    },
    "response": {
      "role": "assistant",
      "content": "I will keep them concise and morning-ready."
    }
  }'

キャプチャは、生の交換を保存し、書き込み使用量を記録し、メモリ ワーカーのトピック分類と要約作業をキューに入れます。

#ダイレクト取得

curl -X POST https://api.agihalo.com/api/v1/memory/retrieve \
  -H "Authorization: Bearer $HALO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectKey": "customer-product",
    "endUserKey": "user_123",
    "topics": ["report_preferences"],
    "limit": 5,
    "includeRaw": true,
    "includeDisabledTopics": false
  }'
フィールド目的
topics明示的なトピック キーに制限する
limitバインドされて返された生のレコード
includeRawリンクされたソース交換を含める
includeDisabledTopics通常の取得が無効になっているトピックを含める

#エンドポイントの概要

POST/api/v1/memory/capture
POST/api/v1/memory/retrieve
POST/api/v1/memory/functions/halo_retrieve_end_user_memory
POST/api/v1/memory/delete

#処理の一貫性