fix: save_rule falls back to user profile when AssistantRule 404
The AssistantRule entity may not exist on some CRM instances. When save_rule gets a 404, it now falls back to saving the rule in the local user profile (update_user_profile). Also improved update_user_profile description so Shira is more likely to use it for user preferences. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -186,8 +186,10 @@ def register_memory_tools(tools: dict, case_id: str | None, user_id: str | None)
|
||||
|
||||
tools["update_user_profile"] = {
|
||||
"description": (
|
||||
"Manage the lawyer's personal profile — preferences, communication style, common case types. "
|
||||
"This persists across conversations. Use proactively when you learn about the user's preferences."
|
||||
"Manage the lawyer's personal profile — preferences, rules, communication style, common case types. "
|
||||
"This persists across conversations. Use proactively when you learn about the user's preferences. "
|
||||
"Also use this when the user says 'from now on always...', 'I prefer...', 'remember that I...' — "
|
||||
"save their preference here so you remember it in future conversations."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user