GET /memory/counts

获取每层的记忆条目数量。键覆盖全部七层,含值为 0 的层。

GET /cells/{cellID}/memory/counts

认证

Authorization: Bearer $TOKEN

查询参数

参数类型必填说明
actorstring否指定 actor 统计。仅 admin token 有效,非 admin 一律取 token 中的 actor
namespacestring否按命名空间过滤统计

请求示例

获取当前用户的记忆计数:

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

管理员查看指定用户的计数:

curl "http://localhost:9091/cells/dept-legal/memory/counts?actor=alice" \
  -H "Authorization: Bearer $TOKEN"

响应

成功(200 OK)

{
  "environment": 12,
  "consensus": 3,
  "about_me": 25,
  "agent_memory": 48,
  "session": 0,
  "working": 0,
  "unknown": 0
}

响应字段

字段类型说明
environmentint环境信息层(宿主感知器产出)
consensusint部门/Cell 级共识层
about_meint关于我(个人偏好与事实)
agent_memoryint角色记忆(按 Agent 命名空间隔离)
sessionint会话记忆(运行时态)
workingint工作缓存(运行时态)
unknownint未识别层(引擎兜底出口)

注意事项

错误码

HTTP错误说明
401—Token 缺失或无效
403—Token 权限不足

相关端点