May 7, 2026

Memory recall refactored: tool delegation, single-pass factors

Memory recall’s internal schedule search was removed and replaced with a delegation to the schedule ability via handleTool()

Memory recall’s internal schedule search was removed and replaced with a delegation to the schedule ability via handleTool(). Similarly, document artifact search now routes through the document ability’s tool instead of duplicating query logic. This ensures correct dispatch, recording, and act_trail entries while eliminating synthetic service workarounds. Additionally, guidance prompts were updated to instruct the LLM to make separate recall calls per topic, closing a multi-topic expansion gap.

Performance of memory radius computation was improved by merging narrow and expand factor calculations into a single pass over the query history. This replaces two functions that each performed identical cosine-distance work, reducing per-turn overhead while maintaining mathematical equivalence—verified by nine deterministic unit tests.

Security and correctness fixes: a path traversal guard using os.path.realpath() was added to gateway data file endpoints; test secrets across six API test files were hardened from hardcoded strings to secrets.token_hex(16); and document creation now populates the clean_text column, fixing a bug that caused all queries against it to return NULL.

  • Replaced _compute_narrow_factor and _compute_expand_factor with single-history-pass _compute_radius_factors

  • Memory recall now delegates to schedule and document tools via handleTool() instead of internal search functions

  • LLM guidance updated to encourage separate recall calls per topic

  • Path traversal guard added to gateway data file endpoints

  • Document creation now populates clean_text field, resolving NULL column queries