全部 engram Engram

deep_recall

多跳召回。顺着记忆之间的关联往下走,带回单次搜索会遗漏的关联上下文。当记忆相互引用时效果最佳(一个人 → 其项目 → 具体细节)。最多返回约 12 条。

out = mem.engram("deep_recall", "what should I know about Alice?", user_id="alice")
const out = await mem.engram("deep_recall", "what should I know about Alice?", "alice");
let out = mem.engram("deep_recall", "what should I know about Alice?", "alice").await?;
curl -X POST https://api.wontopos.com/api/v1/engram/run \
  -H "X-API-Key: wos-live-..." -H "Content-Type: application/json" \
  -d '{"name":"deep_recall","user_id":"alice","query":"what should I know about Alice?"}'
响应
{ "engram": "deep_recall", "hops": 2, "count": 12,
  "memories": [ ... ],
  "usage": { "input_tokens": 200, "output_tokens": 589 } }
按 token 计量 - 每次调用都返回 usage(输入 + 输出),使用与 API 其他部分相同的分词器统计;没有隐藏的按 engram 收费。需要同时使用多个?并发调用即可 - 每个 engram 都是独立请求。