메인 콘텐츠로 건너뛰기

인증

모든 엔드포인트에는 다음 헤더가 필요합니다:
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": "메모리 설정이 성공적으로 업데이트되었습니다",
  "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": "사용자는 간결한 기술적 답변을 선호합니다.",
        "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}특정 사용자와 에이전트의 승인된 메모리 레코드를 반환합니다.응답 예시:
[
  {
    "id": "memory_abc",
    "agent_id": "agent_123",
    "user_id": "user_123",
    "memory_content": "사용자는 간결한 기술적 답변을 선호합니다.",
    "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": "사용자는 간결한 기술적 답변을 선호합니다.",
    "memory_type": "preference",
    "confidence_score": 0.92,
    "source_message": "답변을 짧고 기술적으로 유지해 주세요.",
    "created_at": 1710000000,
    "expires_at": 1710604800
  }
]
POST /memory-approvals/{memory_id}/action대기 중인 메모리 레코드를 승인하거나 거부합니다.요청 본문:
{
  "action": "approve"
}
응답 예시:
{
  "success": true,
  "message": "메모리가 성공적으로 승인되었습니다",
  "memory_id": "memory_abc"
}
DELETE /memories/{memory_id}메모리 레코드를 거부됨으로 표시하여 삭제합니다.응답 예시:
{
  "success": true,
  "message": "메모리가 성공적으로 삭제되었습니다",
  "memory_id": "memory_abc"
}