#[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_specificitythreshold (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_ENTITIESblocklist.pythonmemory = 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 previousfrom_factsparameter and single-lowercase-word heuristic have been removed — quality differentiation is handled by specificity scoring instead. -
_GENERIC_ENTITIESblocklist removedThe 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_pairsand_entities_from_factssimplifiedBoth methods no longer accept or pass a
from_factsflag. 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, andpromotedin their properties. Memory and entity nodes also inheritdefault_properties(e.g. workspace) from theMemoryGraphconstructor. -
Graph traversal skips unpromoted entities
BFS traversal in
traverse_memorynow checks thepromotedflag 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
FactExtractorprompt 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.