mcp-memory-server 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. mcp_memory_server-0.2.0/.gitignore +38 -0
  2. mcp_memory_server-0.2.0/CHANGELOG.md +34 -0
  3. mcp_memory_server-0.2.0/CLAUDE.md +8 -0
  4. mcp_memory_server-0.2.0/LICENSE +21 -0
  5. mcp_memory_server-0.2.0/PKG-INFO +219 -0
  6. mcp_memory_server-0.2.0/PROJECT_SUMMARY.md +295 -0
  7. mcp_memory_server-0.2.0/README.md +180 -0
  8. mcp_memory_server-0.2.0/pyproject.toml +88 -0
  9. mcp_memory_server-0.2.0/src/aimemory/__init__.py +3 -0
  10. mcp_memory_server-0.2.0/src/aimemory/config.py +267 -0
  11. mcp_memory_server-0.2.0/src/aimemory/dataset/__init__.py +16 -0
  12. mcp_memory_server-0.2.0/src/aimemory/dataset/builder.py +270 -0
  13. mcp_memory_server-0.2.0/src/aimemory/dataset/splitter.py +191 -0
  14. mcp_memory_server-0.2.0/src/aimemory/dataset/stats.py +300 -0
  15. mcp_memory_server-0.2.0/src/aimemory/i18n/__init__.py +95 -0
  16. mcp_memory_server-0.2.0/src/aimemory/i18n/en.py +157 -0
  17. mcp_memory_server-0.2.0/src/aimemory/i18n/ko.py +179 -0
  18. mcp_memory_server-0.2.0/src/aimemory/mcp/__init__.py +5 -0
  19. mcp_memory_server-0.2.0/src/aimemory/mcp/__main__.py +5 -0
  20. mcp_memory_server-0.2.0/src/aimemory/mcp/bridge.py +487 -0
  21. mcp_memory_server-0.2.0/src/aimemory/mcp/server.py +314 -0
  22. mcp_memory_server-0.2.0/src/aimemory/memory/__init__.py +50 -0
  23. mcp_memory_server-0.2.0/src/aimemory/memory/composer.py +157 -0
  24. mcp_memory_server-0.2.0/src/aimemory/memory/consolidation.py +197 -0
  25. mcp_memory_server-0.2.0/src/aimemory/memory/forgetting.py +178 -0
  26. mcp_memory_server-0.2.0/src/aimemory/memory/graph_retriever.py +143 -0
  27. mcp_memory_server-0.2.0/src/aimemory/memory/graph_store.py +492 -0
  28. mcp_memory_server-0.2.0/src/aimemory/memory/knowledge_graph.py +184 -0
  29. mcp_memory_server-0.2.0/src/aimemory/memory/resolution.py +140 -0
  30. mcp_memory_server-0.2.0/src/aimemory/memory/sleep_cycle.py +289 -0
  31. mcp_memory_server-0.2.0/src/aimemory/online/__init__.py +35 -0
  32. mcp_memory_server-0.2.0/src/aimemory/online/ab_comparator.py +182 -0
  33. mcp_memory_server-0.2.0/src/aimemory/online/autonomy.py +115 -0
  34. mcp_memory_server-0.2.0/src/aimemory/online/enhanced_encoder.py +53 -0
  35. mcp_memory_server-0.2.0/src/aimemory/online/enhanced_policy.py +164 -0
  36. mcp_memory_server-0.2.0/src/aimemory/online/gossip.py +280 -0
  37. mcp_memory_server-0.2.0/src/aimemory/online/policy.py +438 -0
  38. mcp_memory_server-0.2.0/src/aimemory/online/replay_buffer.py +53 -0
  39. mcp_memory_server-0.2.0/src/aimemory/online/reranker.py +570 -0
  40. mcp_memory_server-0.2.0/src/aimemory/online/rule_verifier.py +57 -0
  41. mcp_memory_server-0.2.0/src/aimemory/online/transport.py +162 -0
  42. mcp_memory_server-0.2.0/src/aimemory/reward/__init__.py +31 -0
  43. mcp_memory_server-0.2.0/src/aimemory/reward/calculator.py +258 -0
  44. mcp_memory_server-0.2.0/src/aimemory/reward/feedback_detector.py +209 -0
  45. mcp_memory_server-0.2.0/src/aimemory/reward/implicit_detector.py +66 -0
  46. mcp_memory_server-0.2.0/src/aimemory/reward/korean_patterns.py +269 -0
  47. mcp_memory_server-0.2.0/src/aimemory/reward/signals.py +524 -0
  48. mcp_memory_server-0.2.0/src/aimemory/schemas.py +169 -0
  49. mcp_memory_server-0.2.0/src/aimemory/selfplay/__init__.py +31 -0
  50. mcp_memory_server-0.2.0/src/aimemory/selfplay/engine.py +427 -0
  51. mcp_memory_server-0.2.0/src/aimemory/selfplay/llm_client.py +172 -0
  52. mcp_memory_server-0.2.0/src/aimemory/selfplay/memory_agent.py +381 -0
  53. mcp_memory_server-0.2.0/src/aimemory/selfplay/scenarios.py +201 -0
@@ -0,0 +1,38 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.egg-info/
6
+ *.egg
7
+ dist/
8
+ build/
9
+
10
+ # Virtual environment
11
+ .venv/
12
+
13
+ # Testing
14
+ .pytest_cache/
15
+ htmlcov/
16
+ .coverage
17
+
18
+ # IDE
19
+ .vscode/
20
+ .idea/
21
+ *.swp
22
+ *.swo
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # AIMemory runtime data
29
+ memory_db/
30
+ checkpoints/
31
+
32
+ # Data artifacts (keep raw source files, ignore generated)
33
+ data/embeddings/
34
+ data/plots/
35
+ data/splits/
36
+
37
+ # Claude Code
38
+ .claude/plans/
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.0] - 2026-02-28
9
+
10
+ First public release.
11
+
12
+ ### Added
13
+
14
+ - **MCP Server** with 12 tools: `auto_search`, `memory_save`, `memory_search`, `memory_update`, `memory_delete`, `memory_get_related`, `memory_pin`, `memory_unpin`, `memory_stats`, `sleep_cycle_run`, `policy_status`, `policy_decide`
15
+ - **RL Memory Policy** โ€” Rule-based importance scoring + MLP contextual bandit (SAVE/SKIP/RETRIEVE)
16
+ - **Enhanced Policy** (opt-in) โ€” 778d state encoder (SentenceTransformer 768d + 10d hand-crafted), experience replay buffer, progressive autonomy
17
+ - **Semantic Search** โ€” ChromaDB vector store with `intfloat/multilingual-e5-small` embeddings
18
+ - **Knowledge Graph** โ€” NetworkX-based entity-relation graph with multi-hop traversal
19
+ - **GraphRAG Hybrid Retrieval** (opt-in) โ€” Vector similarity + graph traversal with RL re-ranker (11d features)
20
+ - **Multi-Resolution Text** โ€” 3 levels (full text, keyword summary, entity triples) with token-budget-aware composition
21
+ - **Forgetting Pipeline** โ€” Decay-based aging with compress โ†’ deactivate โ†’ delete stages
22
+ - **Sleep Cycle** โ€” Periodic maintenance: consolidation, resolution regeneration, forgetting, checkpoint saving
23
+ - **Immutable Memories** โ€” Protected from modification/deletion with SHA-256 rule hash verification
24
+ - **Pin/Unpin** โ€” User-controlled forgetting protection
25
+ - **Multilingual Support** โ€” Korean (ko) and English (en) i18n patterns
26
+ - **P2P Federated Learning** โ€” Gossip protocol with differential privacy and Krum aggregation
27
+ - **A/B Comparison Framework** โ€” Baseline vs re-ranked retrieval comparison
28
+ - **CI/CD** โ€” GitHub Actions with Python 3.11/3.12/3.13 matrix
29
+ - **611 tests** passing across 31 test files
30
+
31
+ ### Removed
32
+
33
+ - Deprecated DualHeadDQN offline training pipeline (replaced by online MLP bandit)
34
+ - `ExtractorConfig` (unused after DQN removal)
@@ -0,0 +1,8 @@
1
+ # AIMemory Project
2
+
3
+ ## Overview
4
+ This project uses Claude Code with team agents for collaborative AI-powered tasks.
5
+
6
+ ## Conventions
7
+ - Use the `.claude/agents/` directory for custom agent definitions
8
+ - Agents are defined as markdown files describing their role, tools, and instructions
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AIMemory Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,219 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-memory-server
3
+ Version: 0.2.0
4
+ Summary: Intelligent memory MCP server for AI assistants โ€” auto-save, semantic search, RL-powered retrieval, and knowledge graphs
5
+ Project-URL: Homepage, https://github.com/ihwoo/mcp-memory-server
6
+ Project-URL: Repository, https://github.com/ihwoo/mcp-memory-server
7
+ Project-URL: Issues, https://github.com/ihwoo/mcp-memory-server/issues
8
+ Project-URL: Changelog, https://github.com/ihwoo/mcp-memory-server/blob/main/CHANGELOG.md
9
+ Author: ihwoo
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: ai,chatbot,claude,knowledge-graph,llm,mcp,memory,rag,reinforcement-learning
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: <3.14,>=3.11
22
+ Requires-Dist: chromadb>=0.5.0
23
+ Requires-Dist: mcp[cli]>=1.2.0
24
+ Requires-Dist: pydantic>=2.0
25
+ Requires-Dist: sentence-transformers>=3.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8.0; extra == 'dev'
28
+ Requires-Dist: ruff>=0.5; extra == 'dev'
29
+ Provides-Extra: ko
30
+ Requires-Dist: mecab-ko-dic>=1.0.0; extra == 'ko'
31
+ Requires-Dist: mecab-python3>=1.0.9; extra == 'ko'
32
+ Provides-Extra: train
33
+ Requires-Dist: matplotlib>=3.8; extra == 'train'
34
+ Requires-Dist: ollama>=0.4.0; extra == 'train'
35
+ Requires-Dist: pandas>=2.0; extra == 'train'
36
+ Requires-Dist: pyarrow>=15.0; extra == 'train'
37
+ Requires-Dist: tqdm>=4.66; extra == 'train'
38
+ Description-Content-Type: text/markdown
39
+
40
+ # AIMemory
41
+
42
+ **Intelligent memory for AI assistants that actually remembers.**
43
+
44
+ > Drop-in MCP server that gives Claude (and any MCP client) persistent, searchable, self-organizing memory โ€” powered by semantic search, knowledge graphs, and reinforcement learning.
45
+
46
+ [![CI](https://github.com/ihwoo/mcp-memory-server/actions/workflows/ci.yml/badge.svg)](https://github.com/ihwoo/mcp-memory-server/actions)
47
+ [![PyPI](https://img.shields.io/pypi/v/mcp-memory-server)](https://pypi.org/project/mcp-memory-server/)
48
+ [![Python](https://img.shields.io/pypi/pyversions/mcp-memory-server)](https://pypi.org/project/mcp-memory-server/)
49
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
50
+
51
+ ---
52
+
53
+ ## Why AIMemory?
54
+
55
+ Current AI memory tools have two critical problems:
56
+
57
+ | Problem | How AIMemory solves it |
58
+ |---------|----------------------|
59
+ | **Manual retrieval** โ€” you must ask "do you remember X?" | `auto_search` runs every turn, injecting relevant memories automatically |
60
+ | **Token waste** โ€” entire memory dump inserted into context | Multi-resolution composer selects top-K memories within a token budget |
61
+
62
+ ## Key Features
63
+
64
+ - **RL-powered policy** โ€” Contextual bandit decides when to save, skip, or retrieve (not just keyword matching)
65
+ - **Semantic search** โ€” ChromaDB + multilingual sentence-transformer embeddings (`intfloat/multilingual-e5-small`)
66
+ - **Knowledge graph** โ€” Entity-relation graph (NetworkX) for multi-hop reasoning ("who likes what?")
67
+ - **GraphRAG hybrid retrieval** โ€” Vector similarity + graph traversal, fused and re-ranked by an RL re-ranker
68
+ - **Multi-resolution text** โ€” Full text โ†’ summary โ†’ entity triples, composed within token budget
69
+ - **Forgetting pipeline** โ€” Decay-based aging with consolidation, pinning, and immutable protection
70
+ - **Sleep cycle** โ€” Periodic maintenance: dedup, compress, forget, checkpoint
71
+ - **Multilingual** โ€” Korean and English pattern support out of the box
72
+
73
+ ---
74
+
75
+ ## Quick Start (2 minutes)
76
+
77
+ ### 1. Install
78
+
79
+ ```bash
80
+ pip install mcp-memory-server
81
+ ```
82
+
83
+ Or with [uv](https://docs.astral.sh/uv/):
84
+
85
+ ```bash
86
+ uv pip install mcp-memory-server
87
+ ```
88
+
89
+ <details>
90
+ <summary>Optional: Korean NLP support</summary>
91
+
92
+ ```bash
93
+ pip install mcp-memory-server[ko]
94
+ ```
95
+ </details>
96
+
97
+ ### 2. Connect to Claude Desktop
98
+
99
+ Add to your `claude_desktop_config.json`:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "aimemory": {
105
+ "command": "aimemory-mcp"
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ That's it. Claude now has persistent memory across all conversations.
112
+
113
+ <details>
114
+ <summary>Advanced: custom data path or uv project mode</summary>
115
+
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "aimemory": {
120
+ "command": "uv",
121
+ "args": ["run", "--project", "/path/to/AIMemory", "aimemory-mcp"],
122
+ "env": {
123
+ "AIMEMORY_DB_PATH": "/path/to/memory_db"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+ </details>
130
+
131
+ ### 3. Connect to Claude Code
132
+
133
+ ```bash
134
+ claude mcp add aimemory -- aimemory-mcp
135
+ ```
136
+
137
+ ---
138
+
139
+ ## MCP Tools (12)
140
+
141
+ | Tool | Description |
142
+ |------|-------------|
143
+ | `auto_search` | Auto-retrieve relevant memories at turn start (multi-resolution context) |
144
+ | `memory_save` | Save a new memory with keywords, category, and relations |
145
+ | `memory_search` | Semantic similarity search |
146
+ | `memory_update` | Update content or keywords of an existing memory |
147
+ | `memory_delete` | Delete a memory (respects immutability) |
148
+ | `memory_get_related` | BFS graph traversal for related memories |
149
+ | `memory_pin` / `memory_unpin` | Protect memories from forgetting |
150
+ | `memory_stats` | Total count and category breakdown |
151
+ | `sleep_cycle_run` | Trigger maintenance (consolidation + forgetting + checkpoint) |
152
+ | `policy_status` | RL policy state (epsilon, action distribution, updates) |
153
+ | `policy_decide` | Ask the RL policy for a SAVE/SKIP/RETRIEVE decision with reasoning |
154
+
155
+ ---
156
+
157
+ ## Configuration
158
+
159
+ All settings via environment variables:
160
+
161
+ | Variable | Default | Description |
162
+ |----------|---------|-------------|
163
+ | `AIMEMORY_DB_PATH` | `./memory_db` | ChromaDB persistence directory |
164
+ | `AIMEMORY_LANGUAGE` | `ko` | Language for pattern matching (`ko` / `en`) |
165
+ | `AIMEMORY_EMBEDDING_MODEL` | `intfloat/multilingual-e5-small` | Sentence-transformer model |
166
+ | `AIMEMORY_LOG_LEVEL` | `INFO` | Logging level |
167
+ | `AIMEMORY_ENHANCED_POLICY` | `0` | Enable 778d enhanced RL policy (`1` to enable) |
168
+ | `AIMEMORY_GRAPH_RAG` | `0` | Enable GraphRAG hybrid retrieval (`1` to enable) |
169
+
170
+ ---
171
+
172
+ ## Architecture
173
+
174
+ ```
175
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
176
+ โ”‚ MCP Client โ”‚
177
+ โ”‚ (Claude Desktop / Claude Code) โ”‚
178
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
179
+ โ”‚ stdio (JSON-RPC)
180
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
181
+ โ”‚ FastMCP Server (12 tools) โ”‚
182
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
183
+ โ”‚ MemoryBridge (orchestrator) โ”‚
184
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
185
+ โ”‚ RL Policyโ”‚ Retrievalโ”‚ Storage โ”‚ Maintenance โ”‚
186
+ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
187
+ โ”‚ Rule- โ”‚ ChromaDB โ”‚ Graph โ”‚ Sleep Cycle โ”‚
188
+ โ”‚ Based + โ”‚ vector + โ”‚ Memory โ”‚ (consolidation, โ”‚
189
+ โ”‚ MLP โ”‚ Knowledgeโ”‚ Store โ”‚ forgetting, โ”‚
190
+ โ”‚ Bandit โ”‚ Graph โ”‚ โ”‚ checkpoints) โ”‚
191
+ โ”‚ โ”‚ (GraphRAG)โ”‚ โ”‚ โ”‚
192
+ โ”‚ Re-rankerโ”‚ โ”‚ โ”‚ โ”‚
193
+ โ”‚ (11d MLP)โ”‚ โ”‚ โ”‚ โ”‚
194
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Development
200
+
201
+ ```bash
202
+ # Clone and install dev dependencies
203
+ git clone https://github.com/ihwoo/mcp-memory-server.git
204
+ cd mcp-memory-server
205
+ uv sync --extra dev
206
+
207
+ # Run tests (611 tests)
208
+ uv run pytest tests/ -q
209
+
210
+ # Lint & format
211
+ uv run ruff check src/ tests/
212
+ uv run ruff format src/ tests/
213
+ ```
214
+
215
+ ---
216
+
217
+ ## License
218
+
219
+ MIT โ€” see [LICENSE](LICENSE) for details.
@@ -0,0 +1,295 @@
1
+ # AIMemory ํ”„๋กœ์ ํŠธ ์ •๋ฆฌ
2
+
3
+ > ์ž‘์„ฑ์ผ: 2026-02-28 | v0.1.0
4
+
5
+ ## 1. ํ”„๋กœ์ ํŠธ ๊ฐœ์š”
6
+
7
+ **AI Memory System** โ€” AI ์ฑ—๋ด‡์ด ์‚ฌ์šฉ์ž์˜ ์ •๋ณด๋ฅผ ์ž๋™์œผ๋กœ ๊ธฐ์–ตํ•˜๊ณ  ํ™œ์šฉํ•˜๋Š” ์‹œ์Šคํ…œ.
8
+
9
+ ํ•ต์‹ฌ ๋ฌธ์ œ ํ•ด๊ฒฐ:
10
+ - **์ˆ˜๋™ ๊ฒ€์ƒ‰ ๋ฌธ์ œ**: ์‚ฌ์šฉ์ž๊ฐ€ ๋ช…์‹œ์ ์œผ๋กœ ์š”์ฒญํ•ด์•ผ๋งŒ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํ™œ์šฉ โ†’ ๋งค ํ„ด ์ž๋™ ๊ฒ€์ƒ‰
11
+ - **ํ† ํฐ ๋‚ญ๋น„ ๋ฌธ์ œ**: ์ „์ฒด ๊ธฐ์–ต์„ ๋งค๋ฒˆ context์— ์‚ฝ์ž… โ†’ top-K ์„ ๋ณ„ + ๋‹คํ•ด์ƒ๋„ ์••์ถ•
12
+
13
+ ## 2. ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜
14
+
15
+ ```
16
+ ์‚ฌ์šฉ์ž ๋ฉ”์‹œ์ง€
17
+ โ”‚
18
+ โ–ผ
19
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
20
+ โ”‚ State Encoder (394d) โ”‚ ํ…์ŠคํŠธ ์ž„๋ฒ ๋”ฉ(384d) + ์ˆ˜์ž‘์—… ํŠน์ง•(10d)
21
+ โ”‚ โ†’ Action Selection โ”‚ SAVE / SKIP / RETRIEVE (Contextual Bandit)
22
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
23
+ โ”‚
24
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
25
+ โ–ผ โ–ผ โ–ผ
26
+ SAVE SKIP RETRIEVE
27
+ โ”‚ โ”‚
28
+ โ–ผ โ–ผ
29
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
30
+ โ”‚GraphRAGโ”‚ โ”‚Context โ”‚
31
+ โ”‚Store โ”‚โ—„โ”€โ”€โ”€โ”€โ–บโ”‚Composer โ”‚
32
+ โ”‚(Chroma)โ”‚ โ”‚(Token Budget)โ”‚
33
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
34
+ โ”‚
35
+ โ–ผ (์ฃผ๊ธฐ์ )
36
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
37
+ โ”‚Sleep Cycle โ”‚ ๋ง๊ฐ ยท ํ†ตํ•ฉ ยท ์žฌ์ธ์ฝ”๋”ฉ
38
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
39
+ ```
40
+
41
+ ### 6 ๋ ˆ์ด์–ด
42
+
43
+ | ๋ ˆ์ด์–ด | ๋ชจ๋“ˆ | ์—ญํ•  |
44
+ |--------|------|------|
45
+ | 1. Policy | `online/policy.py`, `online/enhanced_policy.py` | Feature โ†’ Action (SAVE/SKIP/RETRIEVE) |
46
+ | 2. Rule Filter | `online/rule_verifier.py` | ๋ถˆ๋ณ€ ๊ทœ์น™ (๋ณด์•ˆ/ํ”„๋ผ์ด๋ฒ„์‹œ) |
47
+ | 3. Storage | `memory/graph_store.py`, `memory/knowledge_graph.py` | ChromaDB + Knowledge Graph |
48
+ | 4. Retrieval | `memory/graph_retriever.py`, `online/reranker.py` | Vector search + RL Re-ranking |
49
+ | 5. Composer | `memory/composer.py`, `memory/resolution.py` | ํ† ํฐ budget ๋‚ด ์ตœ์  ์กฐํ•ฉ + ๋‹คํ•ด์ƒ๋„ ์••์ถ• |
50
+ | 6. Sleep Cycle | `memory/sleep_cycle.py`, `memory/forgetting.py`, `memory/consolidation.py` | ์ฃผ๊ธฐ์  ๊ธฐ์–ต ์ •๋ฆฌ |
51
+
52
+ ## 3. ๋ชจ๋“ˆ ๊ตฌ์กฐ
53
+
54
+ ```
55
+ src/aimemory/ # 9,709 lines
56
+ โ”œโ”€โ”€ __init__.py
57
+ โ”œโ”€โ”€ config.py # ์ „์ฒด ์„ค์ • (Pydantic)
58
+ โ”œโ”€โ”€ schemas.py # ๋ฐ์ดํ„ฐ ๋ชจ๋ธ (Turn, Episode, MemoryActionType)
59
+ โ”‚
60
+ โ”œโ”€โ”€ i18n/ # ๋‹ค๊ตญ์–ด ์ง€์›
61
+ โ”‚ โ”œโ”€โ”€ __init__.py # LanguagePatterns ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ
62
+ โ”‚ โ”œโ”€โ”€ ko.py # ํ•œ๊ตญ์–ด ํŒจํ„ด (์ •๊ทœ์‹ 40+๊ฐœ)
63
+ โ”‚ โ””โ”€โ”€ en.py # ์˜์–ด ํŒจํ„ด
64
+ โ”‚
65
+ โ”œโ”€โ”€ mcp/ # MCP ์„œ๋ฒ„ (12 tools)
66
+ โ”‚ โ”œโ”€โ”€ __init__.py
67
+ โ”‚ โ”œโ”€โ”€ __main__.py # python -m aimemory.mcp
68
+ โ”‚ โ”œโ”€โ”€ server.py # FastMCP ์„œ๋ฒ„ ์ •์˜
69
+ โ”‚ โ””โ”€โ”€ bridge.py # Policy โ†” MCP ์—ฐ๊ฒฐ
70
+ โ”‚
71
+ โ”œโ”€โ”€ memory/ # ๊ธฐ์–ต ์ €์žฅ/๊ฒ€์ƒ‰/๊ด€๋ฆฌ
72
+ โ”‚ โ”œโ”€โ”€ graph_store.py # ChromaDB + sentence-transformers
73
+ โ”‚ โ”œโ”€โ”€ knowledge_graph.py # ํŠธ๋ฆฌํ”Œ ๊ธฐ๋ฐ˜ ์ง€์‹ ๊ทธ๋ž˜ํ”„
74
+ โ”‚ โ”œโ”€โ”€ graph_retriever.py # ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๊ฒ€์ƒ‰ (Vector + Graph)
75
+ โ”‚ โ”œโ”€โ”€ composer.py # Context ์กฐํ•ฉ (ํ† ํฐ budget)
76
+ โ”‚ โ”œโ”€โ”€ resolution.py # ๋‹คํ•ด์ƒ๋„ ํ…์ŠคํŠธ (L0/L1/L2)
77
+ โ”‚ โ”œโ”€โ”€ forgetting.py # ๋ง๊ฐ ํŒŒ์ดํ”„๋ผ์ธ
78
+ โ”‚ โ”œโ”€โ”€ consolidation.py # ๊ธฐ์–ต ํ†ตํ•ฉ
79
+ โ”‚ โ””โ”€โ”€ sleep_cycle.py # ์ˆ˜๋ฉด ์‚ฌ์ดํด ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜
80
+ โ”‚
81
+ โ”œโ”€โ”€ online/ # RL ์˜จ๋ผ์ธ ํ•™์Šต
82
+ โ”‚ โ”œโ”€โ”€ policy.py # Contextual Bandit (10d โ†’ 3 actions)
83
+ โ”‚ โ”œโ”€โ”€ enhanced_policy.py # Enhanced MLP (394d โ†’ 3 actions)
84
+ โ”‚ โ”œโ”€โ”€ enhanced_encoder.py # 384d embedding + 10d features
85
+ โ”‚ โ”œโ”€โ”€ replay_buffer.py # Experience replay
86
+ โ”‚ โ”œโ”€โ”€ autonomy.py # Progressive autonomy (์‹ ๋ขฐ๋„ ๊ธฐ๋ฐ˜)
87
+ โ”‚ โ”œโ”€โ”€ reranker.py # RL Re-ranker (๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ์žฌ์ •๋ ฌ)
88
+ โ”‚ โ”œโ”€โ”€ ab_comparator.py # A/B ๋น„๊ต ํ…Œ์ŠคํŠธ
89
+ โ”‚ โ”œโ”€โ”€ gossip.py # P2P Federated Learning (Gossip)
90
+ โ”‚ โ”œโ”€โ”€ rule_verifier.py # ๋ถˆ๋ณ€ ๊ทœ์น™ ํ•„ํ„ฐ
91
+ โ”‚ โ””โ”€โ”€ transport.py # P2P ํ†ต์‹  ๊ณ„์ธต
92
+ โ”‚
93
+ โ”œโ”€โ”€ reward/ # ๋ณด์ƒ ๊ณ„์‚ฐ
94
+ โ”‚ โ”œโ”€โ”€ calculator.py # ์ข…ํ•ฉ ๋ณด์ƒ ๊ณ„์‚ฐ๊ธฐ
95
+ โ”‚ โ”œโ”€โ”€ feedback_detector.py # ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ๊ฐ์ง€ (๊ธ์ •/๋ถ€์ •/๊ต์ •)
96
+ โ”‚ โ”œโ”€โ”€ implicit_detector.py # ์•”๋ฌต์  ๋ณด์ƒ ๊ฐ์ง€
97
+ โ”‚ โ”œโ”€โ”€ korean_patterns.py # (legacy) ํ•œ๊ตญ์–ด ํŒจํ„ด
98
+ โ”‚ โ””โ”€โ”€ signals.py # ๋ณด์ƒ ์‹ ํ˜ธ ์ •์˜
99
+ โ”‚
100
+ โ”œโ”€โ”€ dataset/ # ํ•™์Šต ๋ฐ์ดํ„ฐ ํŒŒ์ดํ”„๋ผ์ธ
101
+ โ”‚ โ”œโ”€โ”€ builder.py # Episode โ†’ ํ•™์Šต ๋ฐ์ดํ„ฐ ๋ณ€ํ™˜
102
+ โ”‚ โ”œโ”€โ”€ splitter.py # Train/Val/Test ๋ถ„๋ฆฌ
103
+ โ”‚ โ””โ”€โ”€ stats.py # ๋ฐ์ดํ„ฐ์…‹ ํ†ต๊ณ„
104
+ โ”‚
105
+ โ”œโ”€โ”€ extractor/ # Offline RL Feature Extractor
106
+ โ”‚ โ”œโ”€โ”€ encoder.py # Feature ์ธ์ฝ”๋”
107
+ โ”‚ โ”œโ”€โ”€ model.py # DualHeadDQN
108
+ โ”‚ โ”œโ”€โ”€ dataset.py # DQN ํ•™์Šต ๋ฐ์ดํ„ฐ
109
+ โ”‚ โ”œโ”€โ”€ policy.py # ์ถ”์ถœ ์ •์ฑ…
110
+ โ”‚ โ””โ”€โ”€ trainer.py # ํ•™์Šต ๋ฃจํ”„
111
+ โ”‚
112
+ โ””โ”€โ”€ selfplay/ # Self-play ๋ฐ์ดํ„ฐ ์ƒ์„ฑ
113
+ โ”œโ”€โ”€ engine.py # Self-play ์—”์ง„
114
+ โ”œโ”€โ”€ llm_client.py # Ollama ํด๋ผ์ด์–ธํŠธ
115
+ โ”œโ”€โ”€ memory_agent.py # ๋ฉ”๋ชจ๋ฆฌ ์—์ด์ „ํŠธ
116
+ โ””โ”€โ”€ scenarios.py # ์‹œ๋‚˜๋ฆฌ์˜ค ๊ด€๋ฆฌ
117
+ ```
118
+
119
+ ## 4. ํ…Œ์ŠคํŠธ ํ˜„ํ™ฉ
120
+
121
+ ```
122
+ tests/ # 8,491 lines, 619 tests
123
+ โ”œโ”€โ”€ test_i18n.py # ๋‹ค๊ตญ์–ด ํŒจํ„ด (ko/en)
124
+ โ”œโ”€โ”€ test_mcp_server.py # MCP ์„œ๋ฒ„
125
+ โ”œโ”€โ”€ test_mcp_bridge.py # MCP ๋ธŒ๋ฆฟ์ง€
126
+ โ”œโ”€โ”€ test_mcp_e2e.py # MCP E2E
127
+ โ”œโ”€โ”€ test_graph_store.py # ChromaDB ์ €์žฅ์†Œ
128
+ โ”œโ”€โ”€ test_graph_retriever.py # ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๊ฒ€์ƒ‰
129
+ โ”œโ”€โ”€ test_knowledge_graph.py # ์ง€์‹ ๊ทธ๋ž˜ํ”„
130
+ โ”œโ”€โ”€ test_online_policy.py # Contextual Bandit
131
+ โ”œโ”€โ”€ test_enhanced_policy.py # Enhanced Policy
132
+ โ”œโ”€โ”€ test_enhanced_encoder.py # Enhanced Encoder
133
+ โ”œโ”€โ”€ test_replay_buffer.py # Replay Buffer
134
+ โ”œโ”€โ”€ test_reranker.py # Re-ranker
135
+ โ”œโ”€โ”€ test_ab_comparator.py # A/B ๋น„๊ต
136
+ โ”œโ”€โ”€ test_gossip.py # Gossip Protocol
137
+ โ”œโ”€โ”€ test_transport.py # P2P Transport
138
+ โ”œโ”€โ”€ test_autonomy.py # Progressive Autonomy
139
+ โ”œโ”€โ”€ test_rule_verifier.py # Rule Verifier
140
+ โ”œโ”€โ”€ test_reward_calculator.py # ๋ณด์ƒ ๊ณ„์‚ฐ
141
+ โ”œโ”€โ”€ test_feedback_detector.py # ํ”ผ๋“œ๋ฐฑ ๊ฐ์ง€
142
+ โ”œโ”€โ”€ test_implicit_detector.py # ์•”๋ฌต์  ๋ณด์ƒ
143
+ โ”œโ”€โ”€ test_resolution.py # ๋‹คํ•ด์ƒ๋„ ํ…์ŠคํŠธ
144
+ โ”œโ”€โ”€ test_composer.py # Context Composer
145
+ โ”œโ”€โ”€ test_forgetting.py # ๋ง๊ฐ ํŒŒ์ดํ”„๋ผ์ธ
146
+ โ”œโ”€โ”€ test_sleep_cycle.py # ์ˆ˜๋ฉด ์‚ฌ์ดํด
147
+ โ”œโ”€โ”€ test_extractor.py # Feature Extractor
148
+ โ”œโ”€โ”€ test_e2e_enhanced.py # Enhanced E2E
149
+ โ”œโ”€โ”€ test_dataset_builder.py # ๋ฐ์ดํ„ฐ์…‹ ๋นŒ๋”
150
+ โ”œโ”€โ”€ test_schemas.py # ์Šคํ‚ค๋งˆ
151
+ โ””โ”€โ”€ test_selfplay_engine.py # Self-play (ollama ํ•„์š”, skip)
152
+ ```
153
+
154
+ **๊ฒฐ๊ณผ**: 619 passed, 1 skipped (14.6s)
155
+
156
+ ## 5. ํ•ต์‹ฌ ๊ธฐ์ˆ 
157
+
158
+ ### 5.1 Contextual Bandit Policy
159
+ - **State**: 394d feature vector (384d multilingual embedding + 10d hand-crafted)
160
+ - **Actions**: SAVE(0), SKIP(1), RETRIEVE(2)
161
+ - **Reward**: ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ๊ธฐ๋ฐ˜ (๊ธ์ • +1.0, ๋ถ€์ • -1.0, ์•”๋ฌต์  ๋ณด์ƒ ํฌํ•จ)
162
+ - **ํ•™์Šต**: Online MLP + Experience Replay + Epsilon-greedy
163
+
164
+ ### 5.2 GraphRAG Storage
165
+ - **Vector Store**: ChromaDB + `intfloat/multilingual-e5-small` (384d)
166
+ - **Knowledge Graph**: ํŠธ๋ฆฌํ”Œ ๊ธฐ๋ฐ˜ (`subject โ†’ predicate โ†’ object`)
167
+ - **Hybrid Retrieval**: Vector similarity + Graph traversal ๊ฒฐํ•ฉ
168
+
169
+ ### 5.3 ๋‹คํ•ด์ƒ๋„ ํ…์ŠคํŠธ
170
+ - **L0**: ์›๋ณธ ํ…์ŠคํŠธ
171
+ - **L1**: ํ•ต์‹ฌ ์ •๋ณด ์ถ”์ถœ (์ฃผ์–ด+์ˆ ์–ด)
172
+ - **L2**: ํ‚ค์›Œ๋“œ ์••์ถ•
173
+ - Context Composer๊ฐ€ ํ† ํฐ budget์— ๋งž๊ฒŒ ์ ์ ˆํ•œ ๋ ˆ๋ฒจ ์„ ํƒ
174
+
175
+ ### 5.4 ์ˆ˜๋ฉด ์‚ฌ์ดํด
176
+ - ์ฃผ๊ธฐ์ ์œผ๋กœ ์‹คํ–‰: ๋ง๊ฐ โ†’ ํ†ตํ•ฉ โ†’ ์žฌ์ธ์ฝ”๋”ฉ
177
+ - **๋ง๊ฐ**: ์ ‘๊ทผ ๋นˆ๋„ ๋‚ฎ์€ ๊ธฐ์–ต ์‚ญ์ œ (pinned/immutable ๋ณดํ˜ธ)
178
+ - **ํ†ตํ•ฉ**: ์œ ์‚ฌ ๊ธฐ์–ต ๋ณ‘ํ•ฉ
179
+ - **์žฌ์ธ์ฝ”๋”ฉ**: ์ž„๋ฒ ๋”ฉ ์žฌ์ƒ์„ฑ
180
+
181
+ ### 5.5 ๋‹ค๊ตญ์–ด ์ง€์› (i18n)
182
+ - `LanguagePatterns` ๋ฐ์ดํ„ฐ ํด๋ž˜์Šค๋กœ ์–ธ์–ด๋ณ„ ํŒจํ„ด ๋ถ„๋ฆฌ
183
+ - ํ˜„์žฌ ์ง€์›: ํ•œ๊ตญ์–ด (`ko`), ์˜์–ด (`en`)
184
+ - `register()` ํ•จ์ˆ˜๋กœ ์ƒˆ ์–ธ์–ด ์ถ”๊ฐ€ ๊ฐ€๋Šฅ
185
+
186
+ ## 6. MCP ์„œ๋ฒ„ ๋„๊ตฌ (12๊ฐœ)
187
+
188
+ | ๋„๊ตฌ | ์„ค๋ช… |
189
+ |------|------|
190
+ | `auto_search` | ๋งค ํ„ด ์ž๋™ ๊ธฐ์–ต ๊ฒ€์ƒ‰ |
191
+ | `memory_save` | ๊ธฐ์–ต ์ €์žฅ |
192
+ | `memory_search` | ๋ช…์‹œ์  ๊ธฐ์–ต ๊ฒ€์ƒ‰ |
193
+ | `memory_update` | ๊ธฐ์–ต ์ˆ˜์ • |
194
+ | `memory_delete` | ๊ธฐ์–ต ์‚ญ์ œ |
195
+ | `memory_stats` | ๊ธฐ์–ต ํ†ต๊ณ„ |
196
+ | `memory_list` | ๊ธฐ์–ต ๋ชฉ๋ก |
197
+ | `memory_get` | ๊ธฐ์–ต ์ƒ์„ธ ์กฐํšŒ |
198
+ | `graph_query` | ์ง€์‹ ๊ทธ๋ž˜ํ”„ ์ฟผ๋ฆฌ |
199
+ | `graph_add_triple` | ํŠธ๋ฆฌํ”Œ ์ถ”๊ฐ€ |
200
+ | `sleep_cycle` | ์ˆ˜๋ฉด ์‚ฌ์ดํด ์ˆ˜๋™ ์‹คํ–‰ |
201
+ | `policy_stats` | ์ •์ฑ… ํ†ต๊ณ„ |
202
+
203
+ ## 7. ์˜์กด์„ฑ
204
+
205
+ ### Core
206
+ ```
207
+ pydantic>=2.0
208
+ chromadb>=0.5.0
209
+ sentence-transformers>=3.0
210
+ mcp[cli]>=1.2.0
211
+ ```
212
+
213
+ ### Optional
214
+ ```
215
+ [ko] mecab-python3, mecab-ko-dic # ํ•œ๊ตญ์–ด ํ˜•ํƒœ์†Œ ๋ถ„์„
216
+ [dev] pytest, ruff # ๊ฐœ๋ฐœ
217
+ [train] ollama, pandas, pyarrow, tqdm, matplotlib # ํ•™์Šต
218
+ ```
219
+
220
+ ## 8. ์„ค์น˜ ๋ฐ ์‹คํ–‰
221
+
222
+ ```bash
223
+ # ๊ธฐ๋ณธ ์„ค์น˜
224
+ uv sync
225
+
226
+ # ํ•œ๊ตญ์–ด ์ง€์› ํฌํ•จ
227
+ uv sync --extra ko
228
+
229
+ # ๊ฐœ๋ฐœ ํ™˜๊ฒฝ
230
+ uv sync --extra dev --extra ko
231
+
232
+ # ํ…Œ์ŠคํŠธ
233
+ uv run pytest tests/ -q
234
+
235
+ # MCP ์„œ๋ฒ„ ์‹คํ–‰
236
+ uv run python -m aimemory.mcp
237
+
238
+ # OpenClaw ์—ฐ๋™
239
+ bash scripts/install_openclaw.sh
240
+ ```
241
+
242
+ ## 9. ํ™˜๊ฒฝ ๋ณ€์ˆ˜
243
+
244
+ | ๋ณ€์ˆ˜ | ๊ธฐ๋ณธ๊ฐ’ | ์„ค๋ช… |
245
+ |------|--------|------|
246
+ | `AIMEMORY_DB_PATH` | `./memory_db` | ChromaDB ์ €์žฅ ๊ฒฝ๋กœ |
247
+ | `AIMEMORY_LANGUAGE` | `ko` | ์–ธ์–ด (`ko`, `en`) |
248
+ | `AIMEMORY_EMBEDDING_MODEL` | `intfloat/multilingual-e5-small` | ์ž„๋ฒ ๋”ฉ ๋ชจ๋ธ |
249
+ | `AIMEMORY_LOG_LEVEL` | `WARNING` | ๋กœ๊ทธ ๋ ˆ๋ฒจ |
250
+ | `AIMEMORY_TOKEN_BUDGET` | `500` | ๊ฒ€์ƒ‰ ํ† ํฐ budget |
251
+ | `AIMEMORY_EPSILON` | `0.15` | Epsilon-greedy ํƒ์ƒ‰๋ฅ  |
252
+
253
+ ## 10. ๊ตฌํ˜„ ์ด๋ ฅ
254
+
255
+ | Step | ๋‚ด์šฉ | ์ƒํƒœ |
256
+ |------|------|------|
257
+ | 1 | ํ•™์Šต ๋ฐ์ดํ„ฐ ํ™•๋ณด (Self-play + ๊ณต๊ฐœ ๋ฐ์ดํ„ฐ) | โœ… |
258
+ | 2 | Rule-Based Baseline + Online MLP Bandit | โœ… |
259
+ | 3 | ๋ง๊ฐ ํŒŒ์ดํ”„๋ผ์ธ + ๋‹คํ•ด์ƒ๋„ ์ €์žฅ | โœ… |
260
+ | 4 | ์ˆ˜๋ฉด ์‚ฌ์ดํด + ๊ธฐ์–ต ํ†ตํ•ฉ | โœ… |
261
+ | 5 | RL Re-ranker | โœ… |
262
+ | 6 | P2P Federated Learning (Gossip) | โœ… |
263
+ | 7 | MCP ์„œ๋ฒ„ ํŒจํ‚ค์ง• | โœ… |
264
+ | 8 | GraphRAG Integration + Enhanced Policy | โœ… |
265
+ | 9 | ๋‹ค๊ตญ์–ด(i18n) + ์„ค์น˜ ํŒŒ์ดํ”„๋ผ์ธ + ๋ฐฐํฌ ์ค€๋น„ | โœ… |
266
+
267
+ ## 11. ๋ฐฐํฌ ๋ฐฉ๋ฒ•
268
+
269
+ ```bash
270
+ # 1. ๋นŒ๋“œ
271
+ uv build
272
+ # โ†’ dist/aimemory-0.1.0.tar.gz
273
+ # โ†’ dist/aimemory-0.1.0-py3-none-any.whl
274
+
275
+ # 2. TestPyPI์— ๋จผ์ € ํ…Œ์ŠคํŠธ
276
+ uv publish --publish-url https://test.pypi.org/legacy/
277
+
278
+ # 3. PyPI ๋ฐฐํฌ
279
+ uv publish
280
+ # PyPI API token ํ•„์š”: https://pypi.org/manage/account/token/
281
+
282
+ # 4. ์„ค์น˜ ํ™•์ธ
283
+ pip install aimemory
284
+ ```
285
+
286
+ ## 12. ์ฝ”๋“œ ๊ทœ๋ชจ
287
+
288
+ | ํ•ญ๋ชฉ | ์ˆ˜์น˜ |
289
+ |------|------|
290
+ | ์†Œ์Šค ์ฝ”๋“œ | 51๊ฐœ ํŒŒ์ผ, 9,709 ์ค„ |
291
+ | ํ…Œ์ŠคํŠธ ์ฝ”๋“œ | 31๊ฐœ ํŒŒ์ผ, 8,491 ์ค„ |
292
+ | ํ…Œ์ŠคํŠธ ์ˆ˜ | 619 passed, 1 skipped |
293
+ | ์Šคํฌ๋ฆฝํŠธ | 14๊ฐœ |
294
+ | MCP ๋„๊ตฌ | 12๊ฐœ |
295
+ | ์ง€์› ์–ธ์–ด | 2 (ko, en) |