输入user_id和session_id插入memories
curl -X POST "http://localhost:1995/api/v1/memories" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_001",
    "session_id": "default",
    "messages": [
      {
        "message_id": "msg_007",
        "timestamp": 1778724000000,
        "role": "user",
        "content": "我喜欢喝拿铁，不喜欢美式。"
      }
    ]
  }'

{"data":{"request_id":"4535506c-26b6-4741-be62-3723db7a552c","message_count":1,"status":"accumulated","message":"Messages accepted"}


status=accumulated 表示先缓存了，等待边界检测；status=extracted 才表示已经触发记忆提取。
如果想强制触发总结/提取：调用 flush


curl -X POST "http://localhost:1995/api/v1/memories/flush"   -H "Content-Type: application/json"   -d '{
    "user_id": "user_001",
    "session_id": "default"
  }'

{"data":{"request_id":"cc3e24be-9127-41aa-aefe-2ee80eacd054","status":"extracted","message":"Flush completed"}}


curl -X POST "http://localhost:1995/api/v1/memories/search" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Tom 喜欢喝什么咖啡？",
    "method": "hybrid",
    "memory_types": ["episodic_memory", "profile"],
    "filters": {
      "user_id": "user_001"
    },
    "top_k": 10,
    "include_original_data": true
  }'

{"data":{"episodes":[],"profiles":[{"id":"6a058e72e0fcbba549ae94d8","user_id":"user_001","group_id":"gen_solo_669f08bf6134","profile_data":{"item_type":"explicit_info","embed_text":"饮食偏好: 喜欢喝拿铁，不喜欢美式咖啡"},"scenario":"solo","memcell_count":1,"score":0.7263925671577454}],"raw_messages":[],"agent_memory":null,"query":{"text":"Tom 喜欢喝什么咖啡？","method":"hybrid","filters_applied":{"user_id":"user_001"}},"original_data":{"episodes":{},"profiles":{}}}}


按用户/群组/时间拉取记忆：
curl -X POST "http://localhost:1995/api/v1/memories/get" \
  -H "Content-Type: application/json" \
  -d '{
    "memory_type": "episodic_memory",
    "filters": {
      "user_id": "user_001"
    },
    "page": 1,
    "page_size": 20,
    "rank_by": "timestamp",
    "rank_order": "desc"
  }'

{"data":{"episodes":[{"id":"6a058e5de0fcbba549ae94d6","user_id":"user_001","group_id":"gen_solo_669f08bf6134","session_id":"default","timestamp":"2026-05-14T02:00:00Z","participants":["user_001"],"sender_ids":["user_001"],"summary":"2026年5月14日（星期四）凌晨02:00 UTC，汤姆明确表达了自己的咖啡偏好。他陈述喜爱饮用拿铁咖啡，同时明确表示不偏好美式咖啡。","subject":"汤姆于2026年5月14日凌晨表达咖啡口味偏好","episode":"2026年5月14日（星期四）凌晨02:00 UTC，汤姆明确表达了自己的咖啡偏好。他陈述喜爱饮用拿铁咖啡，同时明确表示不偏好美式咖啡。","type":"Conversation","parent_type":"memcell","parent_id":"6a058e46e0fcbba549ae94d3"}],"profiles":[],"agent_cases":[],"agent_skills":[],"total_count":1,"count":1}}


查 profile 画像：
(OpenViking) tom@tom:~$ curl -X POST "http://localhost:1995/api/v1/memories/get" \
  -H "Content-Type: application/json" \
  -d '{
    "memory_type": "profile",
    "filters": {
      "user_id": "user_001"
    },
    "page": 1,
    "page_size": 20
  }'

{"data":{"episodes":[],"profiles":[{"id":"6a058e71e0fcbba549ae94d7","user_id":"user_001","group_id":"gen_solo_669f08bf6134","profile_data":{"id":null,"memory_type":"profile","user_id":"user_001","user_name":null,"timestamp":"2026-05-14T08:57:00.574433+00:00","group_id":"gen_solo_669f08bf6134","explicit_info":[{"category":"饮食偏好","description":"喜欢喝拿铁，不喜欢美式咖啡","evidence":"2026年5月14日用户明确表示“我喜欢喝拿铁，不喜欢美式。”","sources":["6a058e46e0fcbba549ae94d3"]}],"implicit_traits":[],"last_updated":"2026-05-14T08:57:21.222404+00:00","processed_episode_ids":["6a058e46e0fcbba549ae94d3"]},"scenario":"solo","memcell_count":1}],"agent_cases":[],"agent_skills":[],"total_count":1,"count":1}}
