-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
243 lines (222 loc) · 9.71 KB
/
Copy pathconfig.yaml
File metadata and controls
243 lines (222 loc) · 9.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# === Two-Layer Unified Memory MCP ===
# Layer 1: User facts | Layer 2: Agent identity
#
# EVERY key here is read by code (see docs/CONTROL_MAP.md).
# Per-agent override: copy this file and point the agent's MCP env at it:
# MCP_CONFIG_PATH=/home/<user>/.mcp-ariel-memory-<agent>/config.yaml
# === Layers ===
# Disable a layer to reject all reads/writes for it at the API boundary.
layers:
user:
enabled: true
agent:
enabled: true
# === L1-L4 Limits ===
limits:
l1_buffer_size: 50
l2_session_limit: 100
l3_episodic_limit: 1000
l4_core_limit: 5000
# === Hooks ===
# Single source of truth — no code-side duplicate list.
# Missing key = hook enabled; disable explicitly with `false`.
hooks:
user:
message_received: true
message_sent: true
state_delta: true
consolidation: true
emotion_trigger: true
nightly: true
importance_gate: true
auto_context: true
forgetting_ritual: true
retrieval_router: true
conflict_resolver: true
dream_buffer: true
agent:
error_occurred: true
decision_made: true
self_correction: true
personality_shift: true
emotion_context: true
wiki_agent: true
consolidation: true
forgetting_ritual: true
auto_context: true
retrieval_router: true
conflict_resolver: true
emotion: true
# Explicit agent saves must not be silently dropped by the adaptive
# threshold (short notes score ~0.2 vs EMA that drifts up to 0.6).
# Noise filtering for agents happens in think()'s routing instead.
importance_gate: false
# === Forgetting & Consolidation ===
forgetting:
decay_rate: 0.01
archive_threshold_days: 90
archive_min_importance: 0.3
consolidate_weight_threshold: 0.7 # episode weight needed for L3→L4 promotion sweep
# === RAG ===
rag:
storage:
keep_float_blobs: true # dense embeddings kept for threshold training; false saves disk
chunk_size: 500 # max chars per chunk (sliding window with overlap)
chunk_overlap: 100 # overlap between consecutive chunks
search_limit: 10 # default result count when caller omits limit
# Известные персоны проекта для privacy ru-тира (⟨PERSON_RU_N⟩).
# НЕ хардкодятся в коде; класс каждой персоны расширяется синонимами
# rag.synonyms в обе стороны (см. mcp_server/utils/privacy.py).
ru_personas:
- мамочка
- котёнок
- Лили
- Lily
- лисёныш
- лисёнок
- Люси
- Эли
- Eli
- Мурат
- Murat
# S17 п.7 Tenure counter-signal aliases: {superseded_имя: текущее_имя}.
# Хит, чей контент содержит старое имя без текущего (и запрос не спрашивает
# про старое), пессимизируется ×0.7 — негативная роль, не дроп.
counter_signals: {} # пример: {"старое-название-проекта": "новое-название"}
# S19: ru_core_news_sm NER на кириллическом пути privacy-гейта (⟨PER_N⟩/⟨ORG_N⟩/
# ⟨LOC_N⟩). Model install: pip ru-core-news-sm; сбои → circuit breaker → en-NER/
# словарь/regex. false = только словарь ru_personas + en-NER.
ru_ner: true
# S19-хвосты: RU-морфология через pymorphy3 (lazy, сбои → сырые токены).
# lemmatize: леммы в _canon_tokens (topic_overlap/wire_new_node) и канон-ключах
# дистиллера. Внимание ключам: смена деривации = новые факты о старых темах
# получат новые ключи (старые не пере-хэшируются) — переобучаться вручную.
lemmatize: true
# === Retrieval ablation arms (Phase G Task 7, для №11-eval) ===
# env RETRIEVAL_MODE перекрывает yaml; невалидное значение → 'full'.
retrieval:
mode: "full" # full (dual-route, дефолт) | rrf | dense_per_kind | gated
# S17 п.1: детерминированный порядок (min-max без ингибиции/K-члена) для
# регламентированных сценариев. Default off — включается владельцем.
deterministic: false
# S17 п.3: AdaptiveRAG pre-gate (27 query-features, LLM-free) — дешёвый
# skip-тир источников поверх RRF в full-арме. Default off до №11-абляции.
pregate: false
# S19.2 textcat-пилот: 2-классовая модель стабильности клаузы (stable vs
# ephemeral) промоутит keyword-unmatched факты из L3 в L4. Модель обучается
# scripts/train_textcat.py (self-labels live core_memory), артефакт кладётся
# в <data_dir>/textcat_model. Default off — пилот: P 0.49 < keyword 0.64.
textcat: false
# textcat_threshold: 0.9 # уверенность argmax; ниже → fallback keyword-мапы
# textcat_model_path: "" # оверрайд пути (default: <data_dir>/textcat_model)
# CLACK exp3 (2026-09-08): q-fields (doc2query) — 3 гипотетических запроса на
# rag-юнит (ночная джоба) + лексический буст 2.0·|qt∩qf| в route_query.
# hit@5 0.08→0.46 на LongMemEval-S снапшоте. Default off до A/B-вердикта.
qfields:
enabled: false # джоба + буст; config-only флаг (без env)
weight: 2.0 # буст |qt ∩ qf| (CLACK qb, канон 2.0)
max_units_per_night: 100 # cost-cap ночной джобы (LLM-вызовы)
llm_config_path: "" # путь к api_config.json (base_url/api_key/model); пусто = джоба спит
# === Memory write gate (S18) ===
memory:
# S18 п.5: semantic dedup — cosine>0.92 против same-kind фактов как 3-й
# сигнал дедупа (после SHA-256 и Jaccard-novelty). Нужны честные эмбеддинги
# (hash-fallback шумный); default off до №11-eval.
semantic_dedup: false
# === Injection ===
inject:
# S18 D6: per-block cap при инъекции — один длинный факт не съедает бюджет.
max_chars: 400
# === Embeddings ===
# Multilingual (100+ languages incl. Russian). If sentence-transformers is not
# installed the system falls back to deterministic hash embeddings ("hash").
embeddings:
model: "intfloat/multilingual-e5-small"
fallback: "hash"
# === Binary Embeddings (MIB) ===
binary:
mode: "naive" # naive | supervised_path
dim: 384 # must match embeddings dimension
thresholds_path: "~/.mcp-ariel-memory/thresholds.npy" # supervised_path only
# === Graph ===
graph:
max_depth: 3
# S17 доп.9: подтверждающий слой минера #9 — embedding-пара сверяется с
# keyword-сигналом (общие теги/канон-токены): согласие → вес 0.6, конфликт →
# ребро не пишется. Default off (статус-кво: одиночный embedding-сигнал 0.5).
embedding_crosscheck: false
# S17 доп.11: HDBSCAN-кластеризация MIB-векторов + сверка с louvain в отчёте
# graph_enrich (miners.embedding.clusters). Отчёт-only, рёбра не меняет.
# Смысл имеет при dense-эмбеддингах; на hash-фолбэке кластеры шумовые.
embed_clusters: false
# === Wiki ===
# Type flags + external dirs synced on start / sync_external.
wiki:
user:
diary: true
relationships: true
desires: true
aspirations: true
work_notes: true
preferences: true
retrospective: true
external_dirs: []
agent:
decision_log: true
error_analysis: true
personality_evolution: true
emotional_context: true
wiki_agent: true
learning_journal: true
principle_log: true
external_dirs: []
# === Storage ===
storage:
db_warn_mb: 50 # WARN log when a *.db exceeds this
db_alert_mb: 200 # ERROR log threshold
vacuum_min_mb: 10 # only auto-VACUUM files at least this big
vacuum_freelist_ratio: 0.25 # and with at least this share of free pages
# === Auth ===
auth:
bearer_token_enabled: true
# bearer_token generated automatically, or set manually:
# bearer_token: "mt_your_custom_token_here"
# === Features ===
features:
compression: true
backup: true
backup_cron: true # periodic DB backups inside the server
rate_limiting: true
audit_trail: true # audit_log writes (see AuditTrail)
# === Performance ===
performance:
wal_mode: true # PRAGMA journal_mode=WAL on every connection
# === Security ===
security:
rate_limit_per_user: 100
max_ws_per_user: 5 # connection caps used by RateLimiter
max_ws_total: 100
# === CORS (HTTP transport / dashboard) ===
cors:
allowed_origins:
- "http://localhost:*"
- "http://127.0.0.1:*"
# === Backup ===
backup:
auto_backup: true
backup_interval_hours: 24
backup_retention_days: 30
jitter_seconds: 3600 # random 0-3600s delay before each backup
wiki_sync_interval_minutes: 30 # wiki sync cadence
# === Dashboard (HTTP transport only) ===
# Synced with --dashboard CLI flag: flag OR this section enables it.
dashboard:
enabled: false # stdio agents don't need it; flip for http runs
port: 8000 # default for --port when not passed explicitly
# === Logging ===
# Rotating file log under <MCP_MEMORY_DATA_DIR>/logs/
logging:
level: INFO
file: memory.log
max_size_mb: 10
backup_count: 5