<- Back to projects and build log

OpenClaw는 어떻게 우리와의 대화를 기억할까

OpenClaw(몰트봇)의 Persistent Memory 기능을 코드베이스 분석을 통해 살펴본 기록

ai / rag / persistent-memory / hybrid-search
OpenClaw는 어떻게 우리와의 대화를 기억할까 글 대표 일러스트
Jeffrey Kim의 SecondBrain 빌드 로그 아티클 커버

Quick context

First, this page captures one concrete build-log step, research note, or project lesson from Jeffrey Kim.

Next, use the tags, related reading, and home archive to move from this note to deeper material in the same topic cluster.

Finally, follow the RSS feed if you want the next experiment, retrospective, or paper review as soon as it ships.

Archive note

First, this imported note is intentionally compact. It acts as a pointer into the wider SecondBrain archive rather than a long-form standalone article.

Next, use the tags, related reading, and project sections to move toward deeper context. Those paths usually lead to fuller write-ups, experiments, or project retrospectives.

Finally, revisit this page together with the home archive and RSS feed when you want the follow-up posts that expand the same topic.

OpenClaw(몰트봇)의 가장 매력적인 기능 중 하나는 바로 ‘Persistent Memory’입니다. 마치 사람처럼 지난 대화의 맥락을 기억하는 이 기능, 과연 어떤 마법이 숨어 있을까요?

직접 OpenClaw의 코드베이스를 분석해 본 결과, 그 비밀은 마법이 아닌 기존 기술의 영리한 조합에 있었습니다. 크게 두 가지 메커니즘으로 작동합니다.

1. AI 전용 메모장, Memory.md

가장 기본이 되는 방식은 Memory.md라는 마크다운 파일을 활용하는 것입니다. 쉽게 말해 OpenClaw에게 “기억해야 할 것들을 적어두는 메모장”을 하나 쥐어준 셈입니다.

LLM에게 자유롭게 쓸 수 있는 포스트잇을 하나 붙여준 것과 같은 아주 직관적인 방식이죠.

2. 하이브리드 검색 기반의 대화 기록 저장 (RAG)

‘hook’ 옵션으로 활성화하는 이 기능은 그냥 RAG라고 보시면 됩니다. 검색하는 문서가 OpenClaw와 나눈 대화 기록일 뿐이죠.

대화 기록을 특정 토큰 단위로 잘라(Chunking) 임베딩 모델로 저장합니다. 이후 질문이 들어오면 Hybrid Search를 통해 관련 기록을 찾아내는데요, 가중합(Hybrid CC) 연산을 사용합니다.

키워드 기반의 BM25와 의미 기반의 Vector Search를 조합해 가장 유사도가 높은 맥락을 찾아내어 모델에게 전달합니다.

마무리

Memory 시스템에 대한 고민이 많으신 분들은 OpenClaw의 구현을 참고해보시면 좋을 것 같습니다. 결국 핵심은 “기존 기술을 얼마나 영리하게 조합하느냐”에 있습니다.

Related reading

같이 읽으면 좋은 프로젝트 로그와 연구 노트를 이어서 탐색해보세요.