Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,26 @@ flowchart TB
Quick comparison snapshot (objective/high-level).
This table compares capability coverage, not overall project quality.

| Capability | ELF | OpenViking | mem0 | qmd | claude-mem | memsearch |
| ---------- | --- | ---------- | ---- | --- | ---------- | --------- |
| Local-first self-hosted workflow | ✅ | ✅ | ✅ (OpenMemory) | ✅ | ✅ | ✅ |
| MCP integration | ✅ | — | ✅ (OpenMemory) | ✅ | ✅ | ⚠️ |
| CLI-first developer workflow | — | ✅ | — | ✅ | ⚠️ | ✅ |
| HTTP API service surface | ✅ | ✅ | ✅ | ⚠️ (MCP Streamable HTTP) | ✅ | — |
| Query expansion or query rewriting | ✅ | ✅ | ⚠️ | ✅ | — | — |
| LLM reranking stage | ✅ | ⚠️ | ⚠️ | ✅ | — | — |
| Hybrid dense + sparse retrieval | ✅ | ✅ | ⚠️ | ✅ | ✅ | ✅ |
| Progressive disclosure style retrieval | ✅ | ✅ | — | — | ✅ | ⚠️ |
| Evidence-bound memory writes | ✅ | — | — | — | — | — |
| Deterministic and LLM-ingestion boundary | ✅ | ⚠️ | ⚠️ | — | — | — |
| Source-of-truth + rebuildable derived index | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ | ✅ |
| Hierarchical/recursive retrieval strategy | ⚠️ (in progress) | ✅ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
| Progressive context loading (L0/L1/L2 style) | ⚠️ (in progress) | ✅ | ⚠️ | — | ⚠️ | — |
| Built-in web memory inspector/viewer | — | — | ✅ (OpenMemory) | — | ✅ | — |
| Hosted managed option | — | — | ✅ | — | — | — |
| Multi-tenant scope semantics | ✅ | ⚠️ | ✅ | — | — | — |
| TTL/lifecycle policy controls | ✅ | ⚠️ | ✅ | — | ⚠️ | — |
| Graph memory mode | ⚠️ (graph-lite: structured relations persisted; optional search `relation_context`) | ⚠️ (URI-link relations) | ✅ (optional) | — | — | — |
| Capability | ELF | agentmemory | OpenViking | mem0 | qmd | claude-mem | memsearch |
| ---------- | --- | ----------- | ---------- | ---- | --- | ---------- | --------- |
| Local-first self-hosted workflow | ✅ | ✅ | ✅ | ✅ (OpenMemory) | ✅ | ✅ | ✅ |
| MCP integration | ✅ | ✅ | — | ✅ (OpenMemory) | ✅ | ✅ | ⚠️ |
| CLI-first developer workflow | — | ✅ | ✅ | — | ✅ | ⚠️ | ✅ |
| HTTP API service surface | ✅ | ✅ | ✅ | ✅ | ⚠️ (MCP Streamable HTTP) | ✅ | — |
| Query expansion or query rewriting | ✅ | ⚠️ | ✅ | ⚠️ | ✅ | — | — |
| LLM reranking stage | ✅ | ⚠️ | ⚠️ | ⚠️ | ✅ | — | — |
| Hybrid dense + sparse retrieval | ✅ | ✅ | ✅ | ⚠️ | ✅ | ✅ | ✅ |
| Progressive disclosure style retrieval | ✅ | ⚠️ | ✅ | — | — | ✅ | ⚠️ |
| Evidence-bound memory writes | ✅ | — | — | — | — | — | — |
| Deterministic and LLM-ingestion boundary | ✅ | ⚠️ | ⚠️ | ⚠️ | — | — | — |
| Source-of-truth + rebuildable derived index | ✅ | ⚠️ | ✅ | ⚠️ | ⚠️ | ⚠️ | ✅ |
| Hierarchical/recursive retrieval strategy | ⚠️ (in progress) | ⚠️ | ✅ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
| Progressive context loading (L0/L1/L2 style) | ⚠️ (in progress) | ⚠️ | ✅ | ⚠️ | — | ⚠️ | — |
| Built-in web memory inspector/viewer | — | ✅ | — | ✅ (OpenMemory) | — | ✅ | — |
| Hosted managed option | — | — | — | ✅ | — | — | — |
| Multi-tenant scope semantics | ✅ | ⚠️ | ⚠️ | ✅ | — | — | — |
| TTL/lifecycle policy controls | ✅ | ⚠️ | ⚠️ | ✅ | — | ⚠️ | — |
| Graph memory mode | ⚠️ (graph-lite: structured relations persisted; optional search `relation_context`) | ⚠️ | ⚠️ (URI-link relations) | ✅ (optional) | — | — | — |

Legend: `✅` built-in and documented; `⚠️` partial, optional, or in-progress; `—` not a first-class documented capability.

Expand All @@ -144,6 +144,7 @@ Project signature strengths (what each does especially well):
| Project | Signature strengths | Potential ELF adoption value |
| ------- | ------------------- | ---------------------------- |
| ELF | Evidence-bound writes, deterministic ingestion boundary, SoT + rebuildable index, eval tooling | Keep as core differentiators while extending retrieval and UX |
| agentmemory | Cross-agent hooks, MCP/REST packaging, local viewer, iii console observability, coding-agent continuity benchmarks | Use as adapter/baseline and UX reference, not a replacement for ELF provenance semantics |
| OpenViking | Filesystem-like context model (`viking://`), hierarchical retrieval, staged retrieval trajectory | Improve query planning, recursive retrieval, and explainable stage outputs |
| mem0 | Broad ecosystem (SDK + hosted + OpenMemory), multi-entity scope, lifecycle + optional graph memory | Strengthen event/history APIs and additive graph context channel |
| qmd | High-quality local retrieval pipeline (query expansion + weighted fusion + rerank), strong CLI/MCP workflow | Borrow transparent routing/fusion knobs and local debugging ergonomics |
Expand All @@ -154,8 +155,9 @@ Detailed comparison, mechanism-level analysis, and source map:

- [Detailed External Comparison](docs/guide/research/comparison_external_projects.md)
- [Research Projects Inventory](docs/guide/research/research_projects_inventory.md)
- [Agent Memory Selection Research Run](docs/research/2026-06-08-agent-memory-selection.json)

Snapshot date in that document: February 17, 2026.
Latest external research refresh: June 8, 2026.

## Documentation

Expand Down
7 changes: 6 additions & 1 deletion docs/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The split between `spec` and `guide` is by task shape, not by reader type.
| --- | --- | --- | --- | --- |
| Spec | `docs/spec/` | What must be true? | Contracts, schemas, invariants, required behavior | Any behavior or schema change |
| Guide | `docs/guide/` | What should I do? | Runbooks, migrations, validation, troubleshooting | Any procedure or operational change |
| Research runs | `docs/research/` | Which evidence-backed research run reached what state? | Machine-readable hypotheses, evidence, trade-offs, challenge records, and terminal decision state | A research workflow needs durable replayable state |
| Plan artifacts | `docs/plans/` | Which saved plan artifact should a planning tool or execution workflow use? | Tool-managed planning outputs | As emitted or updated by the relevant tool |

## Placement rules
Expand All @@ -32,6 +33,8 @@ The split between `spec` and `guide` is by task shape, not by reader type.
- If a document defines actions, it belongs in `docs/guide/`.
- If a document is non-normative decision support, comparison, or research input, treat it
as guide-class material and store it under `docs/guide/`.
- If a research workflow requires a machine-readable run file with replayable events,
store that run file under `docs/research/` and link to it from the relevant guide.
- Do not treat `docs/plans/` as a general-purpose docs bucket.
- Use `docs/plans/` only for artifacts produced or consumed by planning tools or
workflows that explicitly depend on saved plan files.
Expand Down Expand Up @@ -85,7 +88,9 @@ When answering a repository question:
- "What must be true?" -> `docs/spec/index.md`
- "What should I do?" -> `docs/guide/index.md`
3. Read `Makefile.toml` when the task depends on repository automation or named tasks.
4. Use `docs/plans/` only when the task explicitly concerns a saved plan artifact used by
4. Use `docs/research/` only when the task explicitly concerns a machine-readable
research run file used by a research workflow.
5. Use `docs/plans/` only when the task explicitly concerns a saved plan artifact used by
a planning tool or execution workflow.

## Update workflow
Expand Down
87 changes: 87 additions & 0 deletions docs/guide/research/comparison_external_projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Outputs: A comparison matrix and trade-off summary suitable for follow-up design

Scope note: This document is intentionally detailed and source-heavy. Keep `README.md` concise and link here for full analysis.
For a full list of reviewed and pending projects, see `docs/guide/research/research_projects_inventory.md`.
For the June 2026 agentmemory and dreaming decision run, see
`docs/research/2026-06-08-agent-memory-selection.json`.

Comparison focuses on shared capabilities, ELF distinctives, and objective trade-offs. These projects solve adjacent problems, but their primary storage units and default workflows differ.

Expand All @@ -30,6 +32,91 @@ Legend:
Note: In this section, mem0 refers to the Mem0 ecosystem, including OpenMemory (an MCP memory server with a built-in UI).
OpenViking is included as a newly reviewed project with mechanism-level analysis.

## June 2026 Agentmemory And Dreaming Refresh

Snapshot date for this subsection: June 8, 2026.

This refresh re-evaluates ELF after the June 2026 hardening work and after the
appearance of [agentmemory](https://github.com/rohitg00/agentmemory) as a high-velocity
coding-agent memory project. It also records the current vendor direction around
dreaming-style background memory consolidation.

### Current ELF Position

ELF remains strongest as a high-trust memory service rather than a turnkey coding-agent
continuity plugin. The current main branch has:

- evidence-linked fact writes and quote-bound provenance;
- deterministic `add_note` separated from LLM-driven `add_event`;
- Postgres as source of truth and Qdrant as a rebuildable derived index;
- scoped HTTP/MCP service semantics, TTL/lifecycle policy, graph-lite relation context,
and retrieval evaluation tooling;
- recently restored local gates, stricter config presence, generated OpenAPI/Scalar docs,
and Docker Compose service dependencies.

### agentmemory

agentmemory is now important enough to track as a first-class comparison target. Its
public README advertises cross-agent support for Claude Code, Codex CLI, Cursor, Gemini
CLI, OpenCode, and generic MCP clients; MCP/REST access; hook-based capture; hybrid
BM25/vector/graph retrieval; consolidation/lifecycle behavior; a local viewer on `:3113`;
and iii console observability for traces, KV state, triggers, queues, and streams. Its
roadmap still lists benchmark CI, session replay UI, governance baseline, enterprise trust
features, and a v1.0 stability freeze as future work.

ELF implication: do not replace ELF with agentmemory. Treat it as:

- an optional capture/import adapter for coding-agent session observations;
- a benchmark and UX baseline for local continuity workflows;
- a source of product ideas around hooks, viewer, replay, audit, and tool breadth.

### Dreaming And Background Consolidation

OpenAI frames dreaming as background curation that synthesizes memory state, applies
preferences, and keeps memory current over time. Anthropic Claude Dreams is the strongest
safety reference: a dream reads an input memory store plus 1-100 sessions, produces a
separate output memory store, never modifies the input store, and leaves the output
reviewable, attachable, discardable, archivable, or deletable. Google examples add two
operator patterns: Always-On Memory Agent runs scheduled consolidation, while Gemini CLI
Auto Memory mines idle transcripts but writes reviewable patches and skill drafts to an
inbox before anything is applied.

ELF implication: dreaming should be a reviewed derived layer over authoritative evidence,
not a destructive rewrite path. The target shape is:

- immutable observations, notes, events, traces, and source pointers as input;
- asynchronous consolidation jobs that produce candidate derived memories, pages, graph
views, or skills;
- explicit lineage, diff, confidence, contradiction/staleness markers, and review/apply
controls;
- rebuildable outputs that can be discarded without corrupting source-of-truth memory.

### Current Recommendation

Continue building ELF. Do not directly adopt agentmemory or managed dreaming as the core
backend. The next work should prioritize:

1. a reviewable derived consolidation pipeline;
2. read-only viewer plus retrieval/consolidation observability;
3. optional agentmemory import/baseline adapter;
4. graph-lite typed query and derived knowledge pages with provenance/lint.

This ordering reuses the existing vNext planning surface instead of starting a parallel
roadmap: [XY-286](https://linear.app/hack-ink/issue/XY-286/knowledge-memory-derived-entityconceptproject-pages-with-provenance),
[XY-19](https://linear.app/hack-ink/issue/XY-19/add-a-read-only-web-viewer-for-sessions-and-traces),
[XY-27](https://linear.app/hack-ink/issue/XY-27/viewer-add-retrieval-observability-panels-on-top-of-the-read-only),
and [XY-70](https://linear.app/hack-ink/issue/XY-70/graph-lite-dx-typed-schema-typed-query-nanograph-inspired)
remain the right backbone.

Primary sources for this refresh:

- https://github.com/rohitg00/agentmemory
- https://raw.githubusercontent.com/rohitg00/agentmemory/main/ROADMAP.md
- https://openai.com/index/chatgpt-memory-dreaming/
- https://platform.claude.com/docs/en/managed-agents/dreams
- https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/agents/always-on-memory-agent
- https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/auto-memory.md

## Scope And Intended Use

| Aspect | ELF | [memsearch](https://github.com/zilliztech/memsearch) | [qmd](https://github.com/tobi/qmd) | [claude-mem](https://github.com/thedotmack/claude-mem) | [mem0](https://github.com/mem0ai/mem0) |
Expand Down
18 changes: 18 additions & 0 deletions docs/guide/research/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Research Guide Index

Goal: Route agents to external comparison and decision-support research for ELF memory architecture.
Read this when: You need to compare ELF with adjacent memory, context, RAG, or consolidation systems.
Inputs: Current ELF docs/code, public external project docs, tracker state, and checked-in research run files.
Depends on: `docs/index.md`, `docs/governance.md`, and `docs/research/` for machine-readable research runs.
Outputs: The smallest comparison or inventory document needed for implementation decisions.

## Documents

- `research_projects_inventory.md`: audited and pending external projects, research depth, and current planning surface.
- `comparison_external_projects.md`: detailed capability comparison, project trade-offs, source map, and research-backed ELF directions.

## Machine-Readable Runs

Machine-authoritative research run JSON files live under `docs/research/`.
Use those files when a research conclusion needs replayable hypotheses, evidence,
trade-offs, challenge records, and terminal decision state.
28 changes: 27 additions & 1 deletion docs/guide/research/research_projects_inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Inputs: Existing research notes, open architecture questions, and tracked adopti
Depends on: `docs/guide/research/comparison_external_projects.md`.
Outputs: A current inventory of reviewed and pending external projects.

Last updated: April 17, 2026.
Last updated: June 8, 2026.

## Legend

Expand All @@ -18,6 +18,10 @@ Last updated: April 17, 2026.

| Project | Research depth | Current status | Why it matters to ELF | Primary reference |
| ------- | -------------- | -------------- | --------------------- | ----------------- |
| [agentmemory](https://github.com/rohitg00/agentmemory) | D1 | Reviewed | Cross-agent coding-memory hooks, MCP/REST surface, viewer, consolidation lifecycle, and external benchmark target | `docs/guide/research/comparison_external_projects.md`; `docs/research/2026-06-08-agent-memory-selection.json` |
| [OpenAI ChatGPT Memory Dreaming](https://openai.com/index/chatgpt-memory-dreaming/) | D1 | Reviewed | Background memory synthesis and staleness repair as a product direction | `docs/research/2026-06-08-agent-memory-selection.json` |
| [Claude Managed Agents Dreams](https://platform.claude.com/docs/en/managed-agents/dreams) | D1 | Reviewed | Reviewable derived memory-store output over past sessions; strong safety shape for ELF consolidation | `docs/research/2026-06-08-agent-memory-selection.json` |
| [Gemini CLI Auto Memory](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/auto-memory.md) | D1 | Reviewed | Background session mining with project-local review inbox for memory patches and skills | `docs/research/2026-06-08-agent-memory-selection.json` |
| [mem0](https://github.com/mem0ai/mem0) | D2 | Reviewed | Graph memory as additive context, memory history and async mode trade-offs | `docs/guide/research/comparison_external_projects.md` |
| [memsearch](https://github.com/zilliztech/memsearch) | D2 | Reviewed | Markdown-first SoT + rebuildable index pattern | `docs/guide/research/comparison_external_projects.md` |
| [qmd](https://github.com/tobi/qmd) | D2 | Reviewed | Retrieval routing, weighted fusion, and local-first explainability | `docs/guide/research/comparison_external_projects.md` |
Expand All @@ -35,6 +39,26 @@ Last updated: April 17, 2026.
| [LightRAG](https://github.com/HKUDS/LightRAG) | D0 | Pending deep dive | Graph-augmented RAG strategy relevance; not yet audited to adoption level | Discussion history only |
| [GraphRAG](https://www.microsoft.com/en-us/research/project/graphrag/) | D0 | Pending deep dive | Graph-based retrieval concepts; not yet audited to implementation decision level | Discussion history only |

## June 2026 Activity Snapshot

GitHub API snapshot time: 2026-06-08T06:01:57Z.

The monitored project set is still moving quickly. Recent push activity was observed for
agentmemory, mem0, qmd, claude-mem, OpenViking, gbrain, graphify, LangGraph, Graphiti,
RAGFlow, LightRAG, and GraphRAG. Notable current scale signals:

- agentmemory: 21,783 stars, latest release `v0.9.27`, pushed 2026-06-07.
- mem0: 58,005 stars, latest release `cli-node-v0.2.8`, pushed 2026-06-06.
- claude-mem: 81,157 stars, latest release `v13.4.1`, pushed 2026-06-08.
- graphify: 62,294 stars, latest release `v0.8.35`, pushed 2026-06-07.
- RAGFlow: 82,150 stars, latest release `v0.25.6`, pushed 2026-06-08.
- LightRAG: 36,270 stars, latest release `v1.5.0`, pushed 2026-06-08.
- GraphRAG: 33,545 stars, latest release `v3.1.0`, pushed 2026-06-05.

Interpretation: this is not a settled market. ELF should keep watching external
implementation velocity, but the current activity signal alone does not justify
replacing ELF's evidence-bound service contract.

## Current Planning Surface

- Linear project: [ELF vNext: Evidence-to-Knowledge Memory](https://linear.app/hack-ink/project/elf-vnext-evidence-to-knowledge-memory-d7a9dd3f3e86)
Expand All @@ -46,6 +70,8 @@ Last updated: April 17, 2026.
- [XY-40](https://linear.app/hack-ink/issue/XY-40/vision-track-elf-as-a-high-trust-memory-system-for-singlemulti-agent)
- [XY-51](https://linear.app/hack-ink/issue/XY-51/agent-memory-ux-mcp-surface-skills-doc-pointers-epic)
- [XY-63](https://linear.app/hack-ink/issue/XY-63/research-openviking-as-optional-doc-backend-integration-sketch)
- Current June 2026 research run:
- `docs/research/2026-06-08-agent-memory-selection.json`

## Notes

Expand Down
Loading