Skip to content

feat: introduce MemoryPromptConfig for customizable memory prompts#5330

Open
lorenzejay wants to merge 4 commits intomainfrom
lorenze/imp/memory-prompt-influence
Open

feat: introduce MemoryPromptConfig for customizable memory prompts#5330
lorenzejay wants to merge 4 commits intomainfrom
lorenze/imp/memory-prompt-influence

Conversation

@lorenzejay
Copy link
Copy Markdown
Collaborator

@lorenzejay lorenzejay commented Apr 8, 2026

  • 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.

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 MemoryPromptConfig API that lets callers override the default i18n-backed prompt strings used by memory LLM steps (save, query, extract, consolidation), and wires this through Memory, MemoryConfig, and the encoding/recall/analyze flows.

Also hardens telemetry by serializing Crew.memory into OTLP-compatible primitive values via crew_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.

* 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.
@github-actions github-actions bot added the size/L label Apr 8, 2026
"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.
@github-actions github-actions bot added the size/M label Apr 8, 2026
@github-actions github-actions bot removed the size/L label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants