With this, your mind can answer "when did we decide that?" from GitHub, Slack, mail, texts and its own repo, instead of asking you.
Why. Agents forget between conversations. People do too. One store that holds what happened beats every agent paging through logs.
How it works. processEvent in worker.ts sees every durable event of the mind. Its first line hands each one to the indexer, which writes one document per event under a key, so a repeat overwrites instead of piling up:
await indexEvent(itx, event); // search.ts; a failure never fails the delivery
A schedule rolls Slack threads up every two minutes, and a backfill brings in history. Two calls cover most searches:
// meaning: a vague memory
await mx("/stores/search", { query: "why did we pick that vendor", store_identifiers: ["iterate"], search_options: { rerank: true } });
// an exact word, a PR number, an error
await mx("/stores/grep", { store_identifiers: ["iterate"], pattern: "worker-update-failed" });
Our files:
search.ts: what goes in, as one document per event, with metadata to filter on (source,repo,kind,channelName,at); the Slack rollup; the backfill.search.md: the agents' guide: which call for which question, the filters, and how to read around a hit.AGENTS.md: its first line, "Look things up in search first."
What never goes in: secrets, any mail or text with a sign-in code, private channels and direct messages.
What it needs. A Mixedbread account and a store; its API key in /secrets/mixedbread, pinned to api.mixedbread.com. At Mixedbread's list prices a reranked search costs about $7.50 per thousand and a grep about $0.10 per thousand, so tell your agents to grep when they know the word.
What surprised us. Grep matters as much as search. Agents usually know the exact word and only need to know where it was.