Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/openhuman/memory/tools/forget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ impl Tool for MemoryForgetTool {
}

fn description(&self) -> &str {
"Remove a memory by namespace and key. Returns whether the memory was found and removed."
"Remove a memory by namespace and key. Returns whether the memory was found and removed. \
Memory protocol: if `update_memory_md` is available, call it after removing an entry to keep \
the MEMORY.md index in sync with the store."
}

fn parameters_schema(&self) -> serde_json::Value {
Expand Down
13 changes: 12 additions & 1 deletion src/openhuman/memory/tools/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ impl Tool for MemoryStoreTool {
"Store a general fact or note in a namespace (e.g. global, background, autocomplete, skill-{id}). \
Do NOT use this for user preferences — for any preference (how the user wants you to behave, \
their tastes, settings, standing instructions) call `save_preference` instead, which routes it \
to the preference store the assistant actually reads. Requires an explicit namespace."
to the preference store the assistant actually reads. Requires an explicit namespace. \
Memory protocol (only with tools you actually have available): if you have a memory-recall \
tool (e.g. `memory_recall`), check for a near-duplicate before storing so you don't create \
one; and if `update_memory_md` is available, call it after storing to keep the MEMORY.md \
index in sync with the store."
}

fn parameters_schema(&self) -> serde_json::Value {
Expand Down Expand Up @@ -145,6 +149,13 @@ mod tests {
let schema = tool.parameters_schema();
assert!(schema["properties"]["key"].is_object());
assert!(schema["properties"]["content"].is_object());
// The memory protocol (#4116) must be stated up front so the model recalls
// for dedupe before writing and reconciles the index after.
let desc = tool.description();
assert!(
desc.contains("memory_recall") && desc.contains("update_memory_md"),
"memory_store description must state the read→dedupe→write→update contract: {desc}"
);
}

#[tokio::test]
Expand Down
2 changes: 2 additions & 0 deletions tests/config_auth_app_state_connectivity_e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,7 @@ async fn worker_a_controller_schemas_are_fully_exposed() {
"openhuman.config_get_meet_settings",
"openhuman.config_get_memory_sync_settings",
"openhuman.config_get_onboarding_completed",
"openhuman.config_get_privacy_mode",
"openhuman.config_get_runtime_flags",
"openhuman.config_get_sandbox_settings",
"openhuman.config_get_search_settings",
Expand All @@ -2811,6 +2812,7 @@ async fn worker_a_controller_schemas_are_fully_exposed() {
"openhuman.config_resolve_api_url",
"openhuman.config_set_browser_allow_all",
"openhuman.config_set_onboarding_completed",
"openhuman.config_set_privacy_mode",
"openhuman.config_set_super_context_enabled",
"openhuman.config_update_activity_level_settings",
"openhuman.config_update_agent_paths",
Expand Down
Loading