콘텐츠로 이동

Hindsight 메모리 관리 및 다이어트 가이드

Hindsight 메모리 관리 및 다이어트 가이드

섹션 제목: “Hindsight 메모리 관리 및 다이어트 가이드”

[!note] 수정이력 | 2026-05-07 18:40, 루키 (hermes)

  • 최초 작성. Hermes의 2중 메모리 시스템(Built-in vs Hindsight bank)과 다이어트/수정/삭제 방법 정리.

Hermes는 두 개의 메모리를 동시에 사용함.

구분저장 위치용량 한도관리 주체
Built-in 메모리~/.hermes/memories/MEMORY.md, USER.md2,200 chars (memory), 1,375 chars (user)Hermes 에이전트
Hindsight bankhindsight 데몬 내부 DB (SQLite/Vector)별도 제한 없음 (Consolidation 기준)hindsight-embed 데몬
  • Built-in: 에이전트가 직접 읽어서 매 턴 주입하는 핵심 요약 메모리. 용량 제한 있음.
  • Hindsight bank: 대화 중 자동 저장 + 명시 저장된 전체 기억을 검색·추론. 용량 넉넉.

2. 메모리 다이어트(용량 줄이기)

섹션 제목: “2. 메모리 다이어트(용량 줄이기)”

현황 체크:

Terminal window
wc -c ~/.hermes/memories/MEMORY.md
wc -c ~/.hermes/memories/USER.md

방법 1: 직접 편집 (추천)

Terminal window
nano ~/.hermes/memories/MEMORY.md
# 중복/오래된 정보 삭제, 한 문장으로 압축

방법 2: 완전 초기화 (주의)

Terminal window
# 백업 먼저!
cp ~/.hermes/memories/MEMORY.md ~/.hermes/memories/MEMORY.md.bak.$(date +%Y%m%d_%H%M)
cp ~/.hermes/memories/USER.md ~/.hermes/memories/USER.md.bak.$(date +%Y%m%d_%H%M)
# 초기화
hermes memory reset

전체 목록 확인:

Terminal window
~/.hermes/hermes-agent/venv/bin/hindsight-embed -p hermes memory list

특정 메모리 삭제:

Terminal window
~/.hermes/hermes-agent/venv/bin/hindsight-embed -p hermes memory delete <ID>

전체 비우기 (주의):

Terminal window
~/.hermes/hermes-agent/venv/bin/hindsight-embed -p hermes memory clear

특정 관찰(observation)만 삭제:

Terminal window
~/.hermes/hermes-agent/venv/bin/hindsight-embed -p hermes memory clear-observations <ID>

  • MEMORY.md, USER.md일반 텍스트 파일이라 직접 편집 가능
  • 수정 즉시 다음 턴부터 반영됨
  • 선언형 문장 사용: “User prefers dark mode” 형태
  • hindsight는 삭제 후 재저장 방식 (직접 edit 명령 없음)
  • 기존 메모리 delete → 새 내용 retain
  • 또는 hindsight_retain으로 동일 주제의 새 메모리를 추가 저장하면, reflect 시 최신 정보가 가중됨

  • Hindsight가 저장된 메모리들을 AI가 자동으로 연결·정리하는 기능
  • 현황: Hindsight 대시보드(Bank Configuration 탭)에서 확인
  • 예: “42 / 48 (88%)” → 48개 중 42개 통합 완료, 6개 대기 중
  • Consolidation은 삭제와 무관하게 메타데이터 가공이므로, 메모리 삭제 후 재생성되면 다시 통합 대상이 됨

Terminal window
# ===== Built-in 메모리 =====
hermes memory status # 현재 메모리 설정 확인
hermes memory reset # MEMORY.md + USER.md 초기화
# ===== Hindsight bank =====
# 목록/조회
hindsight-embed -p hermes memory list
hindsight-embed -p hermes memory get <ID>
hindsight-embed -p hermes memory history <ID>
# 삭제/비우기
hindsight-embed -p hermes memory delete <ID>
hindsight-embed -p hermes memory clear
hindsight-embed -p hermes memory clear-observations <ID>
# 검색/추론 (에이전트 내부 도구)
hindsight_recall(query="...")
hindsight_reflect(query="...")
hindsight_retain(content="...", context="...", tags=["..."])
# ===== UI / Daemon =====
hindsight-embed -p hermes daemon status
hindsight-embed -p hermes ui start --port 19177
hindsight-embed -p hermes ui stop

  • Hindsight 대시보드: https://ruki-r.pinksky.kr/dashboard
  • Hermes 메모리 설정: ~/.hermes/config.yaml (memory 섹션)
  • Built-in 메모리 경로: ~/.hermes/memories/
  • 이전 문서:
    • 20260506_2016_Hermes_Hindsight_로컬_임베디드_설치_매뉴얼.md
    • 20260506_2236_Hermes_Hindsight_설치_및_설정_완료.md
    • 20260507_1740_Hindsight_embed_기능_개요_및_연동_가이드.md