GET /memory/{id}

通过 ID 获取一条记忆条目的完整信息。

GET /cells/{cellID}/memory/{id}

认证

Authorization: Bearer $TOKEN

路径参数

参数类型必填说明
cellIDstring✅Cell ID
idstring✅记忆条目 ID

查询参数

参数类型必填说明
actorstring否仅 admin token 有效,非 admin 一律取 token 中的 actor

请求示例

curl "http://localhost:9091/cells/dept-legal/memory/mem-abc123" \
  -H "Authorization: Bearer $TOKEN"

响应

成功(200 OK)

{
  "id": "mem-abc123",
  "layer": "about_me",
  "kind": "preference",
  "content": "我喜欢使用 Vim 键位的编辑器",
  "namespace": "",
  "actor": "alice",
  "key": "",
  "trust": 3,
  "created_at": "2026-09-20T10:30:00Z",
  "accessed_at": "2026-09-21T08:15:00Z",
  "recall_count": 5
}

响应字段

字段类型说明
idstring条目唯一 ID
layerstring所属层
kindstring记忆类别
contentstring记忆内容
namespacestring命名空间
actorstring归属 actor
keystring去重键
trustint信任等级
created_atstring创建时间(RFC 3339)
accessed_atstring最近访问时间(RFC 3339)
recall_countint被召回次数

未找到(404 Not Found)

{
  "error": "not_found",
  "message": "memory entry not found"
}

注意事项

错误码

HTTP错误说明
404—条目不存在,或不属于当前 actor(两者不区分)
401—Token 缺失或无效
403—Token 权限不足

相关端点