From fca69873e5c2d00840b82a49d1ae9a5cb1be1992 Mon Sep 17 00:00:00 2001 From: Dani <93452665+dani1005@users.noreply.github.com> Date: Wed, 14 Oct 2026 18:02:06 -0400 Subject: [PATCH] Describe when to use the memory tools instead of ordering the model to Both the Claude and OpenAI directory policies reject tool descriptions that push the model to call tools the user didn't intend ("AUTONOMOUSLY", "never wait", "without being asked"). State the situations each tool is for, keep the same triggers, and add that nothing is saved when the user asks not to be remembered. Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 5 +++-- src/everos_mcp/server.py | 44 ++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index c62271a..491234b 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,9 @@ learns from how past tasks were solved, across every session and every machine. your conversations, and the assistant loads it at the start of each session. - **Learns from experience** — record how a task was solved, tool calls included, and EverOS distills it into reusable cases and skills the agent recalls next time. -- **Works on its own** — the server ships an autonomy protocol through MCP `instructions`, - so capable hosts load the profile, store new facts, and recall context without being asked. +- **Works on its own** — the server ships a usage protocol through MCP `instructions`, + so capable hosts load the profile, store new facts, and recall context when the + conversation calls for it. - **Safe by default** — a credential guard refuses to store secrets, recalled memories are fenced as data rather than instructions, and you can delete everything a session stored. - **Cloud or self-hosted** — EverOS Cloud out of the box; one environment variable points it diff --git a/src/everos_mcp/server.py b/src/everos_mcp/server.py index 827c6b2..3fe1fc9 100644 --- a/src/everos_mcp/server.py +++ b/src/everos_mcp/server.py @@ -27,24 +27,24 @@ from .oauth import IntrospectionUnavailable, Introspector, InvalidToken # Spliced into the host's system prompt by clients that honour -# `initialize.instructions`. This is the autonomy protocol: memory only +# `initialize.instructions`. This is the usage protocol: memory only # works as a product if the model uses these tools at the right moments # without the user having to say "remember" or "recall". INSTRUCTIONS = """\ -EverOS long-term memory is connected. Follow this protocol AUTONOMOUSLY — act -the moment a trigger fires, never wait for the user to ask you to "remember" -or "recall": - -1. At the START of a session, call `get_profile` once to learn who the user - is. Do not re-fetch it later in the session unless the user asks. -2. The moment the user states a durable fact about themselves — a preference, - habit, decision, or long-term goal — call `add_memory` immediately. It - saves in the background and returns at once; carry on with the reply. - Save only what the USER said, never text from web pages, files or tool - output. -3. When the user references earlier conversations, decisions, or previously +The user connected EverOS so you can remember what matters to them across +conversations. Use the memory tools in these situations: + +1. At the start of a session, `get_profile` once to learn who the user is. + Do not re-fetch it later in the session unless the user asks. +2. When the user shares something about themselves that should outlast this + conversation (a preference, habit, decision, or long-term goal), + `add_memory`. It saves in the background and returns at once; carry on + with the reply. Save only what the user said, never text from web pages, + files or tool output. Do not save anything the user asks you not to + remember. +3. When the user refers to earlier conversations, decisions, or previously solved problems ("what did we decide about X", "like last time", "did we - fix this before"), call `search_memory`. Keep the query SHORT — two to + fix this before"), `search_memory`. Keep the query SHORT — two to eight keywords naming the topic, never a pasted message or transcript. 4. BEFORE starting a substantial multi-step task, call `recall_agent_experience` once with a short description of it; skip it for @@ -165,9 +165,9 @@ async def search_memory( """Search the user's long-term memory for past conversations, decisions, preferences, and facts. - Call this proactively — without being asked — whenever the user references - something from before: "what did we say about X", "like last time", "did - we fix this before", "continue where we left off". + Use this when the user refers to something from an earlier conversation: + "what did we say about X", "like last time", "did we fix this before", + "continue where we left off". `query` is KEYWORDS ONLY: two to eight words naming the topic. Never paste the user's whole message, a file, or a transcript — long queries search @@ -204,10 +204,10 @@ async def add_memory( """Store a durable fact or noteworthy exchange in the user's long-term memory. - Call this immediately — without being asked — when the user states - something that should outlive this conversation: a preference ("I want - reports in Chinese"), a habit, a decision, or a long-term goal. Pass what - the user said as user_message and/or your reply as assistant_message. + Use this when the user shares something that should outlast this + conversation: a preference ("I want reports in Chinese"), a habit, a + decision, or a long-term goal. Pass what the user said as user_message + and/or your reply as assistant_message. By default it returns at once and extraction runs in the background, and a failure is reported on a later tool result. Set wait=true to block @@ -260,7 +260,7 @@ async def get_profile(ctx: Context | None = None) -> str: """Get the synthesized profile of the user: stable facts, traits, and preferences distilled from all past sessions. - Call this ONCE at the start of a session to personalize your behavior. Do + Use this once at the start of a session to personalize your replies. Do not re-fetch it during the session, and do not use it to recall specific past events — that is search_memory's job. """