llamaindex-memory 0.0 on LoCoMollm-baseline 0.0 on LoCoMomem0-local 0.0 on LongMemEvalmem0-local 0.0 on LongMemEvalllamaindex-memory 0.0 on LongMemEvalllm-baseline 0.0 on LongMemEvallangchain-memory 0.0 on LongMemEvalcognee 0.0 on LongMemEval13 systems independently scored64 systems indexedllamaindex-memory 0.0 on LoCoMollm-baseline 0.0 on LoCoMomem0-local 0.0 on LongMemEvalmem0-local 0.0 on LongMemEvalllamaindex-memory 0.0 on LongMemEvalllm-baseline 0.0 on LongMemEvallangchain-memory 0.0 on LongMemEvalcognee 0.0 on LongMemEval13 systems independently scored64 systems indexed
Methodology
Adapter Contractv1.0

Graph / RAG Adapter Spec

Adapter contract for graph-based memory and RAG systems. These systems use knowledge graphs, graph databases, or graph-enhanced retrieval to store and query information.

Required methods

def setup(self) -> None

Initialize graph database, embeddings, and any required services.

def reset(self) -> None

Clear the graph. Must remove all nodes and edges.

def teardown(self) -> None

Close connections, stop services, clean up temporary data.

def ingest(self, turns: List[Dict[str, Any]]) -> None

Extract entities and relationships from conversation turns and add to graph.

def recall(self, query: str) -> str

Query the graph for relevant information. May use graph traversal, embedding search, or both.

Required capabilities

  • -Entity extraction and relationship mapping
  • -Graph-based or graph-enhanced retrieval
  • -Knowledge scale handling
  • -Session isolation (full graph clear on reset)

Applicable benchmarks

Example implementation

python
"""Example graph memory adapter."""
from typing import Any, Dict, List, Optional
from benchd_harness.adapters.base import BaseAdapter


class MyGraphAdapter(BaseAdapter):

    @property
    def name(self) -> str:
        return "my-graph"

    @property
    def version(self) -> Optional[str]:
        return "1.0.0"

    def setup(self) -> None:
        self._graph = GraphStore(uri="bolt://localhost:7687")

    def reset(self) -> None:
        self._graph.clear_all()

    def teardown(self) -> None:
        self._graph.close()

    def ingest(self, turns: List[Dict[str, Any]]) -> None:
        text = "\n".join(
            f"[{t['role']}]: {t['content']}" for t in turns
        )
        self._graph.extract_and_store(text)

    def recall(self, query: str) -> str:
        nodes = self._graph.query(query, max_hops=2)
        return "\n".join(n.text for n in nodes)

Quick start

Install

bash
pip install benchd-harness

Validate & test

bash
benchd adapter validate my-graph && benchd run -a my-graph -b knowledge-retrieval-v0

Stable URL: benchd.ai/spec/adapter/graph/v10
Version: 1.0 | This spec is referenced in adapter manifests and will not change within the same major version.

Command Palette

Search for a command to run...