feat: introduce MemoryPromptConfig for customizable memory prompts#5330
Open
lorenzejay wants to merge 4 commits intomainfrom
Open
feat: introduce MemoryPromptConfig for customizable memory prompts#5330lorenzejay wants to merge 4 commits intomainfrom
lorenzejay wants to merge 4 commits intomainfrom
Conversation
* Added MemoryPromptConfig class to allow users to override default memory prompts for various operations (save, query, extract, consolidation). * Updated relevant functions and classes to utilize the new configuration, enabling more flexible and context-specific memory handling. * Enhanced tests to validate the functionality of the new prompt configuration and its integration within the memory processing flows.
| "Knowledge", | ||
| "LLMGuardrail", | ||
| "Memory", | ||
| "MemoryPromptConfig", |
* Removed the static method for online people research and replaced it with a constructor for MemoryPromptConfig that accepts custom strings for save, extract, and query systems. * Updated the corresponding test to validate the new configuration approach, ensuring flexibility in memory prompt handling.
…emory-prompt-influence
greysonlalonde
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Introduces a new public configuration surface and changes how memory prompt templates are selected/passed into LLM calls, which could affect memory analysis behavior if overrides are misformatted. Telemetry change is low risk but touches span attribute serialization.
Overview
Adds a new
MemoryPromptConfigAPI that lets callers override the default i18n-backed prompt strings used by memory LLM steps (save, query, extract, consolidation), and wires this throughMemory,MemoryConfig, and the encoding/recall/analyze flows.Also hardens telemetry by serializing
Crew.memoryinto OTLP-compatible primitive values viacrew_memory_span_attribute_value, and expands tests to cover prompt override behavior and the new telemetry serialization.Reviewed by Cursor Bugbot for commit 15bf60f. Bugbot is set up for automated code reviews on this repo. Configure here.