Back to Changelog
v0.15.1
April 9, 2026

Patch: Memory graph entity scoring & tracing spans

AddedChangedFixed

#[0.15.1] - 2026-04-09

Patch release that replaces the binary accept/reject entity filter in the memory graph with a continuous specificity scoring and promotion system, adds tracing spans around tool execution and LLM calls, and improves fact extraction quality.

#Added

  • Entity specificity scoring (MemoryGraph._score_entity_specificity)

    Entities are now scored 0.0–1.0 based on how likely they represent real domain concepts. Proper nouns, technical identifiers (snake_case, dot.notation, ALL_CAPS), and hyphenated compound terms score high; generic lowercase words and short vague terms score low.

  • Entity promotion system

    Entities are surfaced in graph traversal only when promoted. Promotion happens automatically when an entity's specificity score meets the auto_promote_specificity threshold (default 0.7), or when a lower-specificity entity accumulates enough mentions across distinct memories (mention_promote_count, default 2). This replaces the previous hardcoded _GENERIC_ENTITIES blocklist.

    python
    memory = MemoryPlugin(
        enable_memory_graph=True,
        graph_auto_promote_specificity=0.7,
        graph_mention_promote_specificity=0.3,
        graph_mention_promote_count=2,
    )
  • Tracing spans for tool execution (Agent._execute_and_emit)

    Each tool call is now wrapped in a tool_{name} tracing span, capturing input arguments and execution time for observability.

  • Tracing spans for LLM calls (BaseLLMProvider.generate)

    Non-streaming LLM calls are now wrapped in a llm_{provider} tracing span. Token usage (prompt, completion, total) is recorded on the span when available.

#Changed

  • Entity quality filtering simplified

    _is_low_quality_entity() now only rejects structurally invalid entities (empty, temporal, currency, bare numbers, too many words). The previous from_facts parameter and single-lowercase-word heuristic have been removed — quality differentiation is handled by specificity scoring instead.

  • _GENERIC_ENTITIES blocklist removed

    The hardcoded frozenset of generic words ("challenges", "data", "information", etc.) has been replaced by the continuous specificity scoring system, which generalizes better across domains.

  • _filter_entity_pairs and _entities_from_facts simplified

    Both methods no longer accept or pass a from_facts flag. All entity pairs go through the same structural validation, with quality differentiation deferred to the scoring/promotion layer.

  • Memory graph nodes carry metadata

    Entity nodes now store specificity, mention_count, and promoted in their properties. Memory and entity nodes also inherit default_properties (e.g. workspace) from the MemoryGraph constructor.

  • Graph traversal skips unpromoted entities

    BFS traversal in traverse_memory now checks the promoted flag on entity nodes, skipping low-quality entities that haven't earned promotion. Legacy nodes without the flag default to promoted for backward compatibility.

#Fixed

  • Fact extractor prompt expanded with negative examples

    Added explicit "WRONG" examples to the FactExtractor prompt for boolean literals ("true", "false"), vague state descriptions ("unauthorized access"), and abstract process nouns ("error handling", "best practices"), reducing extraction of low-value entities at the source.