Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

2.5 KB
Raw Blame
memory_type: preferences
description: |
  User preference memory - captures "what the user likes/dislikes or is accustomed to".
  Extract specific preferences the user has expressed across conversations.
  Each preference should be about a specific topic (not generic).
  Topics can be: code style, communication style, tools, workflow, food, commute, etc.
  Store different topics as separate memory files, do NOT mix unrelated preferences.
directory: "viking://user/{{ user_space }}/memories/preferences"
filename_template: "{{ user|lower }}/{{ topic|lower }}.md"
enabled: true
embedding_template: |-
  {{ user }}

  {{ topic }}

  {{ content }}

overview_template: |-
  # Preferences Overview
  {% if items %}**User:** {{ items[0].file_content.user|default(directory_name, true) }}
  **Topic:** {{ items[0].file_content.topic|default(items[0].file_name, true) }}{% endif %}
  {% for item in items %}
  - [{{ item.file_content.topic|default(item.file_name, true) }}](./{{ item.file_name }})
  {% endfor %}

fields:
  - name: user
    type: string
    description: |
      Username for the preference owner
    merge_op: immutable

  - name: topic
    type: string
    description: |
      Preference topic written in {{ language }}.
      {% if language == 'en' %}Use lowercase with underscores, max 3 words.{% else %}Keep the topic concise and natural in {{ language }}.{% endif %}
      Preference topic used to uniquely identify this preference memory.
      Should be a semantic topic description such as "Python code style", "Communication style", "Food preference", "Commute preference", etc.
      This topic is an identity component together with user. Merge only true aliases for
      the same owner's same behavioral choice dimension. Related dimensions may share words
      but remain separate; for example, preferred movie genres and preferred games are not
      one preference merely because both are entertainment.
    merge_op: immutable

  - name: content
    type: string
    description: |
      Preference content in Markdown format describing "what the user prefers/is accustomed to".
      Write one concise bullet per distinct, reusable preference; omit exact duplicates,
      events, dates, and plans. Preserve the specific choice, list members, conditions,
      exceptions, and user-stated reason or emotional meaning when they make the preference
      answerable or distinguish it from nearby preferences.
      Example:
      - Prefers concise written updates with decisions and next actions.
      - Chooses lightweight tools when they cover the workflow.
    merge_op: patch