Skip to main content

Memory System

Overview

The memory system is one of Evatar Agent's core capabilities. It automatically extracts important information from chat conversations, screenshot analysis, and reasoning articles, divided into short-term (48-hour expiry) and long-term (permanent) memory. Memories are automatically injected into the Agent's conversation context.

Memory Types

TypeDescriptionExpiry Strategy
short_termShort-term memory, temporary infoAuto-deleted after 48 hours
long_termLong-term memory, persistent infoNever expires, but decays

Memory Categories

CategoryDescriptionExample
peoplePeople information"User's colleague is Zhang San"
financeFinancial info"User holds NVDA stock"
scheduleSchedule/arrangements"Project review meeting next Wednesday"
projectProject/work info"Working on metro engineering bid"
preferencePreferences"User prefers Markdown notes"
interestInterests"Follows AI and machine learning"
habitHabits"Takes screenshots at 10pm daily"
factGeneral factsDefault category

Deduplication

Memory uses MD5 hashing for deduplication (lowercase, trim whitespace, strip trailing period). Existing memories increment access_count instead of creating duplicates.

Decay Mechanism

  • Short-term memory: auto-deleted after 48 hours
  • Long-term memory: importance multiplied by 0.9 after 7 days without access
  • Importance never drops below 0.1
  • Each access refreshes last_accessed and increments access_count

API Endpoints

MethodPathDescription
GET/api/memoriesPaginated memory list
GET/api/memories/statsMemory statistics
DELETE/api/memories/{id}Delete specific memory