now, episodes, lessons, intentions
The briefing reads every part at once. Each part can also be read on its own, for a dashboard, a status page or an agent that needs one thing.
now: where things stand
for state in mem.now("checkout"):
print(state["goal"], state["focus"], [x["text"] for x in state["open"]])for (const s of await mem.now("checkout")) console.log(s.goal, s.focus, s.open.map((x) => x.text));One state per project: its goal, its focus, its status (where the work stands in one sentence: what works,
what fails, what it waits on), what is open (each with since), the decisions made (each with why and
when), the next_steps in the order they were said, blockers, and what is done (each with when and, when
known, by: the words that settled it). It moves as each new stretch of work is read: an open item closes when
something later finishes it, leaving it for later keeps it open, and a goal stays until a later one replaces it.
Leave the project out for every project, most recent first.
episodes: what happened
for e in mem.episodes("checkout", limit=10):
print(e["title"], "->", e["outcome"])for (const e of await mem.episodes({ project: "checkout", limit: 10 })) console.log(e.title, "->", e.outcome);Stories, newest first: what_happened, how it ended (outcome), what it led_to, the people in it, the
decisions made with their reasons, when it started and ended, and the source it came from. A session is cut
into episodes where its story turns (a new task, a failure, a decision), not into chunks of a fixed size.
lessons: what was learned
for lesson in mem.lessons("checkout"):
print(lesson["statement"], "| when:", lesson["applies_when"], "| why:", lesson["why"])for (const l of await mem.lessons({ project: "checkout" })) console.log(l.statement, l.applies_when, l.why);Rules, how-tos and lessons, each with the situation it applies to and the reason behind it. Learned again in a
later session, a lesson grows stronger (strength) instead of repeating, and keeps every source it came from. A
lesson or a promise names the five sources it came from last in sources, the oldest of them first, and how many
there are in all in sources_total.
intentions: what was promised
for i in mem.intentions():
print(i["what"], i["owner"], i["at"] or i["when"])
mem.set_intention(7, "done")for (const i of await mem.intentions()) console.log(i.what, i.owner, i.at ?? i.when);
await mem.setIntention(7, "done");Promises and plans, the person's own and those made to them, with their trigger: a time (at), or words such
as "when testing ends" (when). One that a later conversation moved says when it was due before in moved_from,
oldest first, each with its at and when. status is open, done or dropped; pass status to list the
others, and set_intention() to mark one kept.
memory health: how well it answers about its own work
h = mem.memory_health()
print(h["health"], h["tested_at"]) # 0.9, the night it last tested itselfconst { health, items } = await mem.memoryHealth();Each night, once a memory has taken in something new and gone quiet, it writes questions from what it read, answers
them the way your questions are answered, and marks the answers. health is the share it got right (a partly right
answer counts half), and items are the questions, what was expected, its answers and their marks. It is null
before the first night.
Forgetting reaches every part
Deleting a source takes the episodes read from it with it, and the lessons and promises that rested only on it. Forgetting a person removes them from every part. Correct and forget works the same way it does for memories.