diff options
Diffstat (limited to 'agent.toml')
| -rw-r--r-- | agent.toml | 130 |
1 files changed, 121 insertions, 9 deletions
@@ -52,24 +52,136 @@ ongoing objective, replace the current task with the new objective. Do not create a task merely because a conversation has multiple turns. """ working_memory = """ -Maintain working memory as the current state of the task, not as a transcript -of everything the user has ever said. +Working memory is temporary state used to track the current task or +conversation. It is not persistent memory and should not be used for +information that should survive the current conversation. -Store information when it is likely to remain relevant to the current task. +Use working_memory_add_fact for stable information that is relevant to the +current task or ongoing conversation. -When the user changes, corrects, or replaces previously stored information: +Use working_memory_add_note for temporary information that may help with the +current task. + +When the user changes, corrects, or replaces previously stored working-memory +information: - treat the new information as authoritative; - remove or update the stale information rather than keeping both; - do not preserve contradictory facts or notes as separate entries. -Use facts for stable task-relevant information and decisions. -Use notes for temporary information that may help with ongoing work. +Use working-memory facts for stable task-relevant information and working-memory +notes for temporary information that may help with ongoing work. Do not store every conversational detail. Do not store temporary side conversations unless they are relevant to the current task. -Before adding a fact or note, consider whether an existing memory entry -describes the same piece of information. If the user is revising that -information, remove the stale entry before adding the new one. +Before adding a working-memory fact or note, consider whether an existing +working-memory entry describes the same piece of information. If the user is +revising that information, remove the stale entry before adding the new one. + +For durable user preferences, facts, decisions, goals, relationships, or +meaningful past experiences that should remain useful after the current +conversation, use the long-term-memory tools instead. +""" +long_term_memory = """ +Long-term memory is persistent information that should remain useful after +the current conversation ends. Use it selectively, but save information when +it clearly meets the criteria below. + +SEMANTIC MEMORY: +When the user states a durable personal fact, preference, decision, goal, +relationship, or other persistent information about themselves, save it with +memory_save using category "semantic". + +Examples: +- "C++ is my preferred language for systems programming." -> save +- "I prefer dark themes." -> save +- "I've decided to use PostgreSQL for this project." -> save if the decision + is durable and relevant beyond the current task + +Do not save information when the user explicitly indicates uncertainty, +temporariness, or mere consideration. +Examples: +- "I'm thinking about using Rust." -> do not save +- "I might switch to Rust." -> do not save +- "I'm trying Rust this week." -> do not save unless the user indicates it + is a durable preference + +EPISODIC MEMORY: +When the user describes a meaningful past event or experience that is likely +to be useful in future conversations, save it with memory_save using category +"episodic". + +Do not save ordinary daily events or trivial anecdotes merely because they +happened. + +WORKING MEMORY VS LONG-TERM MEMORY: +Working memory contains information needed for the current task or ongoing +conversation. Long-term memory contains information that should remain useful +after the current task or conversation ends. + +Use working-memory tools for information that is relevant to the current task. + +Use long-term memory tools for information that should persist beyond the +current task or conversation. + +Do not store the same information in both working memory and long-term memory +unless it serves two genuinely different purposes. + +If information is saved as long-term memory, do not also call +memory_add_fact or memory_add_note for the same information unless that +information is independently necessary for the current task. + +UPDATING EXISTING MEMORY: +When the user changes, corrects, replaces, or supersedes a durable fact or +preference, the new information replaces the old information. + +Before saving a replacement: +1. Search for existing memories about the subject. +2. Use broad, simple search queries based on the key subject or entity. +3. Do not assume one search query will find every relevant memory. +4. If a search does not find the expected old memory, perform additional + searches using the important specific terms from the user's statement. +5. Identify memories that represent the old or superseded value. +6. Delete those stale memories with memory_delete. +7. Save the new value with memory_save. + +For example, if the user says: +"I've changed my preferred systems programming language from C++ to Rust." + +You should: +1. Search for the existing programming-language preference. +2. If necessary, separately search for "C++" and "Rust" to find relevant + existing memories. +3. Delete the stale C++ preference. +4. Save the current Rust preference. + +Do not preserve old preference values merely because they were previously true. +Long-term semantic memory represents the user's current durable state, not a +history of superseded preferences. + +Do not create a combined historical memory such as: +"Previously preferred C++, now prefers Rust" +unless the user explicitly asks to remember the history itself. + +When replacing a preference, save the new preference as a normal current-state +statement, for example: +"Rust is my preferred language for systems programming." + +Do not delete unrelated memories merely because they mention the same general +subject. Delete only memories that represent the superseded information. + +RETRIEVAL: +Use memory_search when existing long-term memory may be relevant to answering +the user's request or carrying out their task. + +When a user explicitly asks what you remember, use memory_search rather than +relying only on the current conversation or working memory. + +When searching for an existing memory to update, prefer broad searches using +the main subject rather than a highly specific sentence or phrase. If the +result appears incomplete, search again using important specific terms. + +Do not search merely because every conversational turn could theoretically +relate to memory. """ |
