全部 engram Engram

Time_awareness Scroll 1.2+

按调用选择的交付形式。在支持形式的模型(Scroll 1.2 及以上)的任意调用中传入 form - memoirarchive - 该次响应就会以对应方式呈现:普通搜索、recall 或任何 engram。SDK 中是与 tz 一样的 form 字段;HTTP 中是 X-WOS-Form 请求头。Memoir 读起来像人的回忆;Archive 保持精确的记录 - 两者的差异最明显地体现在时间的写法上。

Memoir

form: "memoir"
如人所忆 · 一段叙事

讲述发生了什么、一个瞬间如何引向下一个,带着人回忆时那种柔和的时间感 - 读起来是经历,而不是清单。

Archive

form: "archive"
作为记录保存 · 精确时间

以精确记录的形式返回匹配 - 精确的经过时间和绝对时间锚点,结构化到模型可以直接读取。

它只呈现您已存储的记忆 - 不会创造记忆。每条记忆都是在某个 user_id 下的一次 store / add 调用(那个 user_id那个人的存储库)。先存储;之后任何召回 - 包括下面的普通搜索 - 都会带上时间标注。存储方法见快速上手
# the memoir form on a plain search — and on recall, the LLM's one-call context
r   = mem.search("what does Alice drink?", user_id="alice", model="scroll-1.2", form="memoir", tz=9)
ctx = mem.recall("what does Alice drink?", user_id="alice", model="scroll-1.2", form="memoir", tz=9)
# every memory's .time reads "a couple weeks ago" (archive → "2 weeks ago (Jun 09)") — the LLM sees human time
// the memoir form on search — and on recall, the LLM's one-call context
const s = await mem.withModel("scroll-1.2").search("what does Alice drink?", "alice", 10, { form: "memoir", tz: 9 });
const ctx = await mem.withModel("scroll-1.2").recall("what does Alice drink?", "alice", { form: "memoir", tz: 9 });
// form on search AND recall — the _with helpers merge extra fields into the body
let s = mem.with_model("scroll-1.2").search_with("what does Alice drink?", "alice", 10, json!({"form": "memoir", "tz": 9})).await?;
let ctx = mem.with_model("scroll-1.2").recall_with("what does Alice drink?", "alice", json!({"form": "memoir", "tz": 9})).await?;
# same X-WOS-Form header on /search, /recall, or /engram/run
curl -X POST https://api.wontopos.com/api/v1/memory/recall \
  -H "X-API-Key: wos-live-..." -H "X-WOS-Model: scroll-1.2" -H "X-WOS-Form: memoir" -H "X-WOS-Timezone: 9" \
  -d '{"user_id":"alice","query":"what does Alice drink?"}'
# every memory comes back with a "time" field; use X-WOS-Form: archive for exact time

tz 是调用方的 UTC 偏移小时数 - 这样“今天早上”和凌晨 4 点的日界线都落在用户的本地时间。省略则为 UTC;HTTP 下对应 X-WOS-Timezone 请求头。按地区粗略对照:美国东部 -5、美国中部 -6、美国西部 -8 · 英国 / 里斯本 0 · 中欧 +1 · 东欧 +2 · 印度 +5.5 · 中国 / 新加坡 +8 · 韩国 / 日本 +9 · 悉尼 +10。(均为标准时间 - 夏令时会让部分地区 +1;请传用户实际所处的偏移。)

同一次搜索,两种形式 - 记忆完全相同,只有 time 不同:

结果 · form: memoir
{ "count": 3, "memories": [
  { "content": "Alice prefers tea over coffee", "time": "a couple weeks ago" },
  { "content": "met Alice at the cafe downtown",  "time": "yesterday afternoon" },
  { "content": "Alice moved to Brooklyn",          "time": "about half a year ago" }
] }
结果 · form: archive
{ "count": 3, "memories": [
  { "content": "Alice prefers tea over coffee", "time": "2 weeks ago (Jun 09)" },
  { "content": "met Alice at the cafe downtown",  "time": "yesterday at 14:00" },
  { "content": "Alice moved to Brooklyn",          "time": "6 months ago (Dec 2025)" }
] }
经过时间MemoirArchive
3 分钟a few minutes ago3 minutes ago
14 分钟about 15 minutes ago14 minutes ago
30 分钟half an hour ago30 minutes ago
50 分钟about an hour ago50 minutes ago
2 小时a couple hours ago2 hours ago, at 13:10
8 小时this morning8 hours ago, at 07:10
昨天下午yesterday afternoonyesterday at 14:00
昨晚last night17 hours ago, at 22:00
2 天a couple days ago2 days ago (Tue 15:10)
6 天several days ago6 days ago (Fri 15:10)
9 天about a week agolast week (Jun 16)
16 天a couple weeks ago2 weeks ago (Jun 09)
35 天about a month agolast month (May 21)
60 天a couple months ago2 months ago (Apr 2026)
180 天about half a year ago6 months ago (Dec 2025)
380 天about a year agolast year (Jun 2025)
800 天a couple years ago2 years ago (Apr 2024)
1500 天about 4 years ago4 years ago (May 2022)

上表每个值都是渲染器的真实输出。看看两行“昨天”:Memoir 把昨天下午和昨晚分开 - 一天以一次睡眠为界 - 而 Archive 只写一个钟点,不划分白天与黑夜。

两种模式如何解读时间

Memoir - 人们实际的说法。近期时刻保持相当清晰(大约 15 分钟半小时),越往前措辞越宽泛 - 两周左右大约半年两三年前 - 就像记忆本身随着距离而松弛。在一天之内,它舍弃钟点而使用时间地标:今天早上昨晚昨天下午。而且一天以一次睡眠为界,不按日历跳变:日界线大约在本地时间凌晨 4 点,因此深夜仍算同一个晚上,而不是已经到了明天。

Archive - 精确,且始终带锚点。每一行都带有精确的经过时间和可供模型计算的绝对参照,而且越近锚点越细:今天用钟点(8 小时前,07:10),本周用星期加钟点(2 天前(周二 15:10)),本月用日期(上周(6 月 16 日)),更早则用年月(6 个月前(2025 年 12 月))。绝不含糊,绝不出错。

Memoir 与 Archive 会渲染响应中的每一次召回 - 普通搜索、recall 或 engram 都适用。模型层级(Tablet → Scroll → Book)决定引擎做多少事;形式(memoir / archive)决定时间怎么写。Scroll 1.2 及以上可用。