diqierjia/StrataGate-AgentMemory
Local-first cross-session memory for DeepSeek Harness (DSH): automatic capture, Event/Element cards, evidence-gated recall, source tracing. 本地跨会话长期记忆。
Install
In this structure:
- `mentionedAt` is when the event was mentioned in the conversation;
- `happenedStart` / `happenedEnd` describe when it actually happened or is expected to happen;
- `status` distinguishes completed, planned, cancelled, and ongoing events;
- `supersedesEventIds` and `conflictsWithEventIds` preserve corrections and conflicts.
Separating mention time from occurrence time prevents the system from treating a message timestamp as the event timestamp. It also gives the system enough information to resolve relative expressions such as “last week” and “next month.”
Event extraction is delayed: after block `N` is sealed, precise extraction waits until block `N+1` exists. The extractor can read neighboring blocks as context, but every new fact and source reference must come from target block `N`.
This reduces the chance that context is cut at a block boundary while preventing facts from neighboring conversations from being written into the wrong event.
### 3. Element cards and auditable hybrid retrieval
Event cards preserve what happened. Element cards materialize what is currently true about a person, project, organization, tool, or place. Their facts have `state`, `set`, or `relation` semantics, valid intervals, and source event IDs.
Element projection is an independent persisted job. A failed projection can be retried without extracting its events again. The projector may propose changes, but StrataGate applies a fact only when every cited event belongs to the claimed projection batch. Updating a state supersedes the old fact and closes its validity interval; it never rewrites the source event.
`searchEvents()` and `searchElements()` use deterministic BM25 lexical ranking plus structured rankings such as participant, event type, element name, element type, and time. Reciprocal-rank fusion combines those lists. Element search returns fact-level hits instead of an entire potentially large card, and a lexical zero match returns no arbitrary candidates. This evaluated path does not use vector or semantic retrieval.
### 4. Evidence gate: relevant does not mean sufficient
A conventional retrieval system often hands several similar results directly to the answer model. StrataGate inserts a fixed protocol between retrieval and answering:
Add diqierjia/StrataGate-AgentMemory to your DSH config (web profile) to enable.
README
Expand full README Collapse
README is empty.
tt-a1i/archify
strukto-ai/mirage
liustack/modlens
omdsh-dev/DSH-better-sidebar
agentrq/agentrq
GanyuanRan/Aegis
dsh-market/dsh-market
toby-bridges/api-relay-audit