メインコンテンツへスキップ

認証

すべてのエンドポイントには以下のヘッダーが必要です:
x-api-key: <your-api-key>
x-api-secret: <your-api-secret>
Content-Type: application/json

エンドポイント

GET /agents/{agent_id}/memory-settingsエージェントの現在のメモリ設定を返します。レスポンス例:
{
  "memory_enabled": true,
  "max_memories": 50,
  "auto_approve": false,
  "memory_types": ["preference", "fact", "context"]
}
PUT /agents/{agent_id}/memory-settingsエージェントのメモリ設定を有効化、無効化、または更新します。リクエストボディ:
{
  "memory_enabled": true,
  "max_memories": 50,
  "auto_approve": false,
  "memory_types": ["preference", "fact", "context"]
}
レスポンス例:
{
  "success": true,
  "message": "Memory settings updated successfully",
  "settings": {
    "memory_enabled": true,
    "max_memories": 50,
    "auto_approve": false,
    "memory_types": ["preference", "fact", "context"]
  }
}
GET /agents/{agent_id}/memoriesユーザー別にグループ化された、エージェントのすべての承認済みメモリを返します。レスポンス例:
{
  "memories_by_user": {
    "user_123": [
      {
        "id": "memory_abc",
        "agent_id": "agent_123",
        "user_id": "user_123",
        "memory_content": "User prefers concise technical answers.",
        "memory_type": "preference",
        "confidence_score": 0.92,
        "status": "approved",
        "created_at": 1710000000,
        "updated_at": 1710000100,
        "approved_at": 1710000100,
        "source_message_id": "msg_123"
      }
    ]
  },
  "total_users": 1,
  "total_memories": 1
}
GET /agents/{agent_id}/memories/user/{user_id}1人のユーザーと1つのエージェントの承認済みメモリレコードを返します。レスポンス例:
[
  {
    "id": "memory_abc",
    "agent_id": "agent_123",
    "user_id": "user_123",
    "memory_content": "User prefers concise technical answers.",
    "memory_type": "preference",
    "confidence_score": 0.92,
    "status": "approved",
    "created_at": 1710000000,
    "updated_at": 1710000100,
    "approved_at": 1710000100,
    "source_message_id": "msg_123"
  }
]
GET /memory-approvals/pending認証済みユーザーの保留中のメモリ承認を返します。オプションで?agent_id={agent_id}を使用してエージェントでフィルタできます。レスポンス例:
[
  {
    "id": "memory_abc",
    "agent_id": "agent_123",
    "user_id": "user_123",
    "memory_content": "User prefers concise technical answers.",
    "memory_type": "preference",
    "confidence_score": 0.92,
    "source_message": "Please keep answers short and technical.",
    "created_at": 1710000000,
    "expires_at": 1710604800
  }
]
POST /memory-approvals/{memory_id}/action保留中のメモリレコードを承認または却下します。リクエストボディ:
{
  "action": "approve"
}
レスポンス例:
{
  "success": true,
  "message": "Memory approved successfully",
  "memory_id": "memory_abc"
}
DELETE /memories/{memory_id}メモリレコードを却下としてマークして削除します。レスポンス例:
{
  "success": true,
  "message": "Memory deleted successfully",
  "memory_id": "memory_abc"
}