
컨텍스트 관리를 플러그인으로 교체할 수 있는 ContextEngine 슬롯과 채널-스레드 바인딩을 저장하는 ACP 영속화가 핵심이다. lossless-claw 플러그인 설치로 압축 없는 컨텍스트 관리가 가능해졌다.
핵심 3가지
1. ContextEngine 플러그인 슬롯 - 압축 로직을 통째로 교체 가능
2. ACP 바인딩 영속화 - 재시작 후에도 Discord 채널/Telegram 토픽-스레드 연결 유지
3. Telegram 토픽별 에이전트 라우팅 - 포럼 그룹 내 토픽마다 다른 에이전트 할당
1. ContextEngine 플러그인 슬롯
기존에는 압축(compaction) 로직이 고정되어 있었다. 2026.3.7부터는 플러그인으로 완전히 교체 가능하다.
제공되는 라이프사이클 훅
// 플러그인이 구현할 수 있는 훅들
bootstrap() // 초기화
ingest() // 메시지 수집
assemble() // 컨텍스트 조립
compact() // 압축 실행
afterTurn() // 턴 종료 후
prepareSubagentSpawn() // 서브에이전트 생성 전
onSubagentEnded() // 서브에이전트 종료 후
lossless-claw 플러그인 설치
압축 없이 전체 컨텍스트를 유지하는 플러그인이다.
# 플러그인 설치
npm install -g lossless-claw
# 설정에 등록
agents:
defaults:
contextEngine:
plugin: lossless-claw
커스텀 플러그인 등록 예시
agents:
defaults:
contextEngine:
plugin: ./my-context-plugin.js
options:
maxTokens: 128000
strategy: "sliding-window"
플러그인을 설정하지 않으면 기존 압축 동작이 그대로 유지된다. Zero behavior change.
2. ACP 채널 바인딩 영속화
Discord 채널이나 Telegram 토픽을 ACP 스레드에 바인딩하면 이제 영속 저장된다. 게이트웨이를 재시작 후에도 연결이 유지된다.
CLI로 바인딩 관리
# 현재 바인딩 목록 확인
openclaw acp bindings list
# Discord 채널 바인딩
openclaw acp bind --channel discord:general --thread thread_abc123
# Telegram 토픽 바인딩
openclaw acp bind --channel telegram:mygroup:topic_123 --thread thread_def456
# 바인딩 해제
openclaw acp unbind --channel discord:general
설정 파일로 바인딩 정의
acp:
bindings:
- channel: discord:general
thread: thread_abc123
- channel: telegram:mygroup:topic_123
thread: thread_def456
3. Telegram 토픽별 에이전트 라우팅
포럼 그룹 내에서 토픽마다 다른 에이전트를 할당할 수 있다. 격리된 세션으로 라우팅된다.
토픽별 agentId 오버라이드
channels:
telegram:
myforum:
type: telegram
token: ${TELEGRAM_BOT_TOKEN}
forum:
# 토픽별 에이전트 설정
topicAgents:
12345: agent-coding # 개발 토픽
12346: agent-writing # 문서 토픽
12347: agent-research # 리서치 토픽
# 기본 에이전트 (매칭되지 않는 토픽용)
defaultAgent: agent-general
/acp spawn --thread here|auto
Telegram 토픽에서 바로 ACP 에이전트를 생성할 수 있다.
# 현재 토픽에 바인딩된 스레드에 에이전트 생성
/acp spawn --thread here
# 자동으로 새 스레드 생성 후 바인딩
/acp spawn --thread auto
바인딩 성공 시 해당 토픽에 핀 메시지가 고정된다.
4. 압축 후 섹션 재주입
압축 후에도 특정 AGENTS.md 섹션을 유지할 수 있다.
agents:
defaults:
compaction:
# 압축 후 재주입할 섹션
postCompactionSections:
- "critical-context"
- "user-preferences"
5. 플러그인 시스템 컨텍스트 주입
플러그인이 시스템 프롬프트 앞/뒤에 정적 컨텍스트를 주입할 수 있다.
// 플러그인 코드 예시
api.prependSystemContext(`
## Current Project
- Name: ${project.name}
- Tech: ${project.stack}
`);
api.appendSystemContext(`
## Response Format
Always use Korean for code comments.
`);
프로바이더 캐싱이 적용되어 반복 토큰을 절감한다.
6. 기타 변경사항
compaction 라이프사이클 이벤트
# 이벤트 구독 예시
hooks:
session:compact:before:
- action: log
message: "Compaction starting"
session:compact:after:
- action: log
message: "Compaction completed"
TTS OpenAI-compatible baseUrl
messages:
tts:
openai:
baseUrl: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
model: tts-1
SecretRef for gateway.auth.token
gateway:
auth:
token:
$secretRef: gateway-token
업그레이드
# npm으로 설치한 경우
npm i -g openclaw@latest
# 또는 openclaw CLI 사용
openclaw update
업그레이드 후 openclaw config validate로 설정을 확인한다.
요약
| 기능 | 핵심 포인트 |
|---|---|
| ContextEngine 플러그인 | 압축 로직 교체 가능, lossless-claw로 무손실 관리 |
| ACP 바인딩 영속화 | 재시작 후에도 채널-스레드 연결 유지 |
| Telegram 토픽 라우팅 | 토픽마다 다른 에이전트 할당 |
| postCompactionSections | 압축 후에도 중요 섹션 유지 |
| prepend/appendSystemContext | 플러그인에서 시스템 컨텍스트 주입 |
릴리즈 노트
Release openclaw 2026.3.7 · openclaw/openclaw
Changes Agents/context engine plugin interface: add ContextEngine plugin slot with full lifecycle hooks (bootstrap, ingest, assemble, compact, afterTurn, prepareSubagentSpawn, onSubagentEnded), sl...
github.com
'AI-Agent > OpenClaw' 카테고리의 다른 글
| 공모주 청약 일정을 OpenClaw로 구글 캘린더에 자동 등록하기 (0) | 2026.03.08 |
|---|---|
| ChatGPT Pro 구독 플랜으로 추가 과금 없이 OpenClaw에서 GPT 모델 사용하기 (0) | 2026.03.04 |
| OpenClaw 2026.3.2 릴리즈 노트 분석 - PDF 도구, SecretRef 확대, 보안 대폭 강화 (2) | 2026.03.03 |
| OpenClaw 2026.3.1 릴리즈 노트 분석 - Android 대폭 확장, Claude 4.6 adaptive thinking, 크론 경량 부트스트랩 (0) | 2026.03.02 |
| OpenClaw 2026.2.26 릴리즈 노트 분석 - 시크릿 관리, Android 지원, 에이전트 라우팅 CLI 추가 (0) | 2026.02.27 |