mcp-agents-memory 0.6.0
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.
- package/.env.example +109 -0
- package/LICENSE +21 -0
- package/README.md +158 -0
- package/README_KR.md +113 -0
- package/build/index.js +118223 -0
- package/build/migrations/005_provenance.js +26046 -0
- package/build/migrations/006_canonical_validation.js +26017 -0
- package/build/migrations/007_seed_real_models.js +26016 -0
- package/build/migrations/008_schema_realignment.js +26027 -0
- package/build/migrations/009_skills_tables.js +26031 -0
- package/build/migrations/010_subject_relationships.js +26000 -0
- package/build/migrations/011_memories_metadata.js +25985 -0
- package/build/migrations/012_memory_sources.js +26025 -0
- package/build/migrations/013_refresh_models.js +26009 -0
- package/build/migrations/014_drop_legacy_facts_constraints.js +25999 -0
- package/package.json +69 -0
package/.env.example
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# ─────────────────────────────────────────────────────────────
|
|
2
|
+
# mcp-agents-memory — example configuration
|
|
3
|
+
# ─────────────────────────────────────────────────────────────
|
|
4
|
+
# Loaded by db.ts in this order (first hit wins):
|
|
5
|
+
# 1. $MEMORY_CONFIG_PATH (explicit override)
|
|
6
|
+
# 2. ./.env (project-local — dev workflow)
|
|
7
|
+
# 3. ~/.config/mcp-agents-memory/.env (XDG — what `setup` writes)
|
|
8
|
+
# 4. <package>/../.env (legacy fallback)
|
|
9
|
+
|
|
10
|
+
# ─────────────────────────────────────────────────────────────
|
|
11
|
+
# Database — choose ONE path
|
|
12
|
+
# ─────────────────────────────────────────────────────────────
|
|
13
|
+
|
|
14
|
+
# (a) Connection string (recommended for cloud Postgres — Neon, Supabase, etc.)
|
|
15
|
+
# Append `?sslmode=require` for any cloud provider — pg won't auto-enable SSL otherwise.
|
|
16
|
+
# DATABASE_URL=postgres://user:pass@host:5432/db?sslmode=require
|
|
17
|
+
|
|
18
|
+
# (b) Individual fields (legacy / self-hosted local)
|
|
19
|
+
DB_HOST=localhost
|
|
20
|
+
DB_PORT=5432
|
|
21
|
+
DB_USER=postgres
|
|
22
|
+
DB_PASS=password
|
|
23
|
+
DB_NAME=mcp_memory
|
|
24
|
+
# DB_SSL=true # set true for SSL when using individual fields
|
|
25
|
+
|
|
26
|
+
# SSH Tunneling (Optional — only for reaching a Postgres behind SSH bastion)
|
|
27
|
+
SSH_ENABLED=false
|
|
28
|
+
SSH_HOST=
|
|
29
|
+
SSH_PORT=22
|
|
30
|
+
SSH_USER=
|
|
31
|
+
SSH_KEY_PATH=
|
|
32
|
+
|
|
33
|
+
# ─────────────────────────────────────────────────────────────
|
|
34
|
+
# AI keys
|
|
35
|
+
# ─────────────────────────────────────────────────────────────
|
|
36
|
+
|
|
37
|
+
# OpenAI (Required — embeddings + Librarian fact extraction)
|
|
38
|
+
# Get your key at: https://platform.openai.com/api-keys
|
|
39
|
+
OPENAI_API_KEY=sk-...
|
|
40
|
+
|
|
41
|
+
# Optional — needed only for the preset / role you choose below.
|
|
42
|
+
# ANTHROPIC_API_KEY= # required if any role uses provider=anthropic
|
|
43
|
+
# GOOGLE_GENERATIVE_AI_API_KEY= # required if any role uses provider=google
|
|
44
|
+
# GROK_API_KEY= # required if any role uses provider=xai
|
|
45
|
+
# TAVILY_API_KEY= # only when MEMORY_AUDIT_ENABLED or PROMOTION_ENABLED is on
|
|
46
|
+
# EXA_API_KEY= # only when MEMORY_AUDIT_ENABLED or PROMOTION_ENABLED is on
|
|
47
|
+
|
|
48
|
+
# Optional — Notion Connector (v5.0 Phase 3). Required to use connector_sync(provider='notion').
|
|
49
|
+
# Create an integration at https://www.notion.so/profile/integrations and share pages with it.
|
|
50
|
+
# NOTION_API_KEY=
|
|
51
|
+
|
|
52
|
+
# ─────────────────────────────────────────────────────────────
|
|
53
|
+
# LLM role assignments — every role accepts <ROLE>_PROVIDER + <ROLE>_MODEL.
|
|
54
|
+
# Defaults below match the wizard's "Recommended" preset.
|
|
55
|
+
#
|
|
56
|
+
# Three other presets are available via the wizard (no manual overriding needed):
|
|
57
|
+
# - OpenAI only: every role on gpt-4o-mini (only OPENAI_API_KEY needed)
|
|
58
|
+
# - Anthropic only: every role on claude-haiku-4-5 (only ANTHROPIC_API_KEY)
|
|
59
|
+
# - Premium: audit + contradiction switched to grok-4.20-0309-reasoning
|
|
60
|
+
# ─────────────────────────────────────────────────────────────
|
|
61
|
+
|
|
62
|
+
EMBEDDING_MODEL=text-embedding-3-small
|
|
63
|
+
|
|
64
|
+
TRIAGE_PROVIDER=google
|
|
65
|
+
TRIAGE_MODEL=gemini-2.5-flash-lite
|
|
66
|
+
|
|
67
|
+
EXTRACT_PROVIDER=openai
|
|
68
|
+
EXTRACT_MODEL=gpt-4o-mini
|
|
69
|
+
|
|
70
|
+
AUDIT_PROVIDER=openai
|
|
71
|
+
AUDIT_MODEL=gpt-4o-mini
|
|
72
|
+
|
|
73
|
+
CONTRADICTION_PROVIDER=openai
|
|
74
|
+
CONTRADICTION_MODEL=gpt-4o-mini
|
|
75
|
+
|
|
76
|
+
SKILL_CURATOR_PROVIDER=openai
|
|
77
|
+
SKILL_CURATOR_MODEL=gpt-4o-mini
|
|
78
|
+
|
|
79
|
+
# Grounding roles — only fire when their gate is on.
|
|
80
|
+
SKILL_AUDITOR_PROVIDER=anthropic
|
|
81
|
+
SKILL_AUDITOR_MODEL=claude-sonnet-4-6
|
|
82
|
+
|
|
83
|
+
MEMORY_AUDITOR_PROVIDER=anthropic
|
|
84
|
+
MEMORY_AUDITOR_MODEL=claude-sonnet-4-6
|
|
85
|
+
|
|
86
|
+
# Optional default subject key for `memory_startup` if the caller doesn't pass one.
|
|
87
|
+
# MEMORY_DEFAULT_SUBJECT=user_yourname
|
|
88
|
+
|
|
89
|
+
# ─────────────────────────────────────────────────────────────
|
|
90
|
+
# Optional v4.5 / v5.0 background loops — opt-in
|
|
91
|
+
# ─────────────────────────────────────────────────────────────
|
|
92
|
+
|
|
93
|
+
# Skill Promotion Engine (background auto-curator)
|
|
94
|
+
PROMOTION_ENABLED=false
|
|
95
|
+
PROMOTION_INTERVAL_MIN=60
|
|
96
|
+
PROMOTION_WARMUP_MIN=5
|
|
97
|
+
|
|
98
|
+
# Memory Auditor (v5.0 SYNC external knowledge grounding)
|
|
99
|
+
# Gate: MEMORY_AUDIT_ENABLED=true AND fact_type='learning' AND importance > 7.
|
|
100
|
+
MEMORY_AUDIT_ENABLED=false
|
|
101
|
+
MEMORY_AUDITOR_MODEL=claude-sonnet-4-6
|
|
102
|
+
|
|
103
|
+
# Auto Forgetting (v5.0 Phase 3)
|
|
104
|
+
# Soft-deletes low-score memories on a background interval.
|
|
105
|
+
# Profile facts and validation_status='pending' rows are immune.
|
|
106
|
+
FORGETTING_ENABLED=false
|
|
107
|
+
FORGETTING_WARMUP_MIN=30
|
|
108
|
+
FORGETTING_INTERVAL_MIN=1440
|
|
109
|
+
FORGET_THRESHOLD=0.5
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hoon (triplealab)
|
|
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 OF OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# mcp-agents-memory (v0.6.0)
|
|
2
|
+
|
|
3
|
+
Multi-agent Shared Long-term Memory MCP Server.
|
|
4
|
+
An MCP server that enables AI agents (Claude, Gemini, GPT, etc.) to **autonomously manage memory** and evolve knowledge into **validated operational rules (Skills)**.
|
|
5
|
+
|
|
6
|
+
## 🌟 New in v0.6: Knowledge Evolution
|
|
7
|
+
|
|
8
|
+
- **🧠 Memory Tiering**: Intelligent loading strategy mimicking human memory. Full detail for the **last 30 days** (short-term) and metadata/important summaries for older records (long-term).
|
|
9
|
+
- **🦾 Skill Evolution**: Repetitive patterns and project know-how automatically evolve into **Skills**. These rules are injected into the agent's system prompt to guide future actions.
|
|
10
|
+
- **🌐 Authority Grounding**: High-value facts are reconciled against external authority sources (**Tavily** for recency, **Exa** for authority/docs) before storage.
|
|
11
|
+
- **⚡ MCP Prompts (Slash Commands)**: Direct interaction via `/briefing`, `/recall <query>`, and `/save <text>` for a premium UX.
|
|
12
|
+
- **🔐 Cross-MCP Ready**: Standardized context hooks to share `subject_key` and `session_id` with other MCPs (Vision, Audio, etc.).
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **📚 Librarian Engine**: Multi-model pipeline (Triage → Extract → Audit) for zero-config fact extraction.
|
|
17
|
+
- **⚡ Contradiction Resolution**: Detects and updates conflicting information (e.g., "Lives in Seoul" → "Moved to Busan").
|
|
18
|
+
- **🧠 Smart Briefing**: Dynamic session startup with user profile, project context, and applicable **Skills**.
|
|
19
|
+
- **🔍 Semantic Search**: Vector embedding-based retrieval with automatic tier-up for matching long-term memories.
|
|
20
|
+
- **🔐 Unified Provenance**: Every fact is tagged with `author_model`, `platform`, and `session_id` for perfect traceability.
|
|
21
|
+
|
|
22
|
+
## 🧠 Hybrid Intelligence Tech Stack
|
|
23
|
+
|
|
24
|
+
v0.6 employs a sophisticated multi-role architecture using the best models for each specialized task.
|
|
25
|
+
|
|
26
|
+
| Role | Technology | Description |
|
|
27
|
+
|----------|------------|-------------|
|
|
28
|
+
| **Skill Auditor** | Anthropic `Sonnet` / `Gemini Pro` | **Grounding**: Reconciles facts with external docs using Tavily + Exa. |
|
|
29
|
+
| **Skill Curator** | Google `Gemini Flash` | **Promotion**: Monitors memory clusters to identify skill candidates. |
|
|
30
|
+
| **Fact Extractor** | OpenAI `gpt-4o-mini` | **Extraction**: Efficient atomic fact generation from text. |
|
|
31
|
+
| **Embedding** | OpenAI `text-embedding-3-small` | **Standard**: 1536-dim vector indexing for semantic search. |
|
|
32
|
+
| **Search (Required)** | **Tavily + Exa** | **The Two Pillars**: Tavily (Recency) + Exa (Authority/Research). |
|
|
33
|
+
| **Database** | PostgreSQL + pgvector | **Tiered Storage**: Tier-aware partitioning (Short/Long term). |
|
|
34
|
+
|
|
35
|
+
## Architecture
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
┌─────────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
39
|
+
│ Claude Code │ │ Gemini │ │ GPT │
|
|
40
|
+
│ (Zero-Config) │ │ (Autonomous) │ │ (Autonomous) │
|
|
41
|
+
└────────┬────────┘ └──────┬───────┘ └──────┬───────┘
|
|
42
|
+
│ │ │
|
|
43
|
+
└─────────────────────┼────────────────────┘
|
|
44
|
+
│
|
|
45
|
+
┌──────────▼──────────┐
|
|
46
|
+
│ MCP Protocol │
|
|
47
|
+
│ (w/ instructions) │ ← Zero-Config Entry
|
|
48
|
+
└──────────┬──────────┘
|
|
49
|
+
│
|
|
50
|
+
┌──────────▼──────────┐ ┌──────────────────┐
|
|
51
|
+
│ mcp-agents-memory │ │ Skill Track │
|
|
52
|
+
│ ┌───────────────┐ │ ───▶ │ Curator/Auditor │
|
|
53
|
+
│ │ Librarian │ │ │ (Knowledge/Web) │
|
|
54
|
+
│ │ Engine │ │ └────────┬─────────┘
|
|
55
|
+
│ └───────┬───────┘ │ │
|
|
56
|
+
└──────────┼──────────┘ ┌────────▼─────────┐
|
|
57
|
+
│ │ Skills Table │
|
|
58
|
+
┌──────────▼──────────┐ │ (Operational) │
|
|
59
|
+
│ PostgreSQL + pgvec │ └──────────────────┘
|
|
60
|
+
│ (Tiered Memories) │
|
|
61
|
+
└─────────────────────┘
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Setup
|
|
65
|
+
|
|
66
|
+
### Install
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm i -g mcp-agents-memory
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Configure
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
mcp-agents-memory setup
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The interactive wizard:
|
|
79
|
+
- Prompts for your Postgres connection (cloud provider with `pgvector` recommended — [Neon](https://neon.tech) and [Supabase](https://supabase.com) both have free tiers; URL must end with `?sslmode=require`).
|
|
80
|
+
- Asks for the required OpenAI key (embeddings).
|
|
81
|
+
- Lets you pick a Librarian model preset (see below).
|
|
82
|
+
- Writes config to `~/.config/mcp-agents-memory/.env`.
|
|
83
|
+
- Applies the base schema and runs all migrations idempotently.
|
|
84
|
+
|
|
85
|
+
### Add to your MCP client
|
|
86
|
+
|
|
87
|
+
Claude Desktop / Claude Code / any MCP-aware client:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"memory": {
|
|
93
|
+
"command": "mcp-agents-memory"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Cross-machine memory
|
|
100
|
+
|
|
101
|
+
On a second computer, run `npm i -g mcp-agents-memory` and `mcp-agents-memory setup` pointing to the **same** `DATABASE_URL`. Memory shares automatically — the database is the source of truth and the MCP server is stateless.
|
|
102
|
+
|
|
103
|
+
### CLI
|
|
104
|
+
|
|
105
|
+
- `mcp-agents-memory` — run the MCP server (stdio).
|
|
106
|
+
- `mcp-agents-memory setup` — interactive wizard (writes XDG config, applies schema + migrations).
|
|
107
|
+
- `mcp-agents-memory migrate` — apply pending migrations against an already-configured database.
|
|
108
|
+
- `mcp-agents-memory help` — show help.
|
|
109
|
+
|
|
110
|
+
### Local development
|
|
111
|
+
|
|
112
|
+
For self-hosted Postgres or working on the codebase directly:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
git clone https://github.com/a3lab01create-bit/mcp-agents-memory.git
|
|
116
|
+
cd mcp-agents-memory
|
|
117
|
+
npm install
|
|
118
|
+
npm run build
|
|
119
|
+
npm run setup
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Config search order: `$MEMORY_CONFIG_PATH` → `./.env` → `~/.config/mcp-agents-memory/.env` → `<package>/.env`. Project-root `.env` wins for dev workflows.
|
|
123
|
+
|
|
124
|
+
### Requirements
|
|
125
|
+
- PostgreSQL ≥ 14 with the `pgvector` extension.
|
|
126
|
+
- **Required API key**: OpenAI (embeddings).
|
|
127
|
+
- **Optional API keys**: depends on the wizard preset you pick (see below).
|
|
128
|
+
|
|
129
|
+
### Model presets
|
|
130
|
+
|
|
131
|
+
The wizard offers four presets for the always-on Librarian roles. Every role still accepts `<ROLE>_PROVIDER` and `<ROLE>_MODEL` env overrides if you want to mix and match.
|
|
132
|
+
|
|
133
|
+
| Preset | Triage | Extract | Audit | Contradiction | Required keys |
|
|
134
|
+
|---|---|---|---|---|---|
|
|
135
|
+
| **Recommended** | gemini-2.5-flash-lite | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | OpenAI + Google |
|
|
136
|
+
| OpenAI only | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | OpenAI |
|
|
137
|
+
| Anthropic only | claude-haiku-4-5 | claude-haiku-4-5 | claude-haiku-4-5 | claude-haiku-4-5 | Anthropic |
|
|
138
|
+
| Premium | gemini-2.5-flash | gpt-4o-mini | grok-4.20-0309-reasoning | grok-4.20-0309-reasoning | OpenAI + Google + xAI |
|
|
139
|
+
|
|
140
|
+
Grounding roles (`skill_auditor` + `memory_auditor`) default to `claude-sonnet-4-6` and only fire when `PROMOTION_ENABLED` / `MEMORY_AUDIT_ENABLED` are on. Sonnet calls use prompt caching automatically — repeat audits within 5 minutes hit at ~10× cheaper rate.
|
|
141
|
+
|
|
142
|
+
## Roadmap
|
|
143
|
+
|
|
144
|
+
- [x] v0.4 — Librarian Engine (Auto extraction + resolution)
|
|
145
|
+
- [x] v0.5 — Provenance Layer (Model/Platform tracking)
|
|
146
|
+
- [x] v0.6 — **Knowledge Evolution**: Tiered Memory + Skill Grounding
|
|
147
|
+
- [x] v4.5 — Skill System closure (Curator + Auditor + Promotion + Injector filtering)
|
|
148
|
+
- [x] v5.0 — Memory Graph + External Knowledge Grounding + Auto Forgetting + memory_restore
|
|
149
|
+
- [x] **Connectors v1**: Notion page ingestion (`connector_sync` MCP tool)
|
|
150
|
+
- [ ] **Connectors v2**: Notion database iteration, GitHub, Drive
|
|
151
|
+
- [ ] v1.0 — **Production Ready**: Full benchmark and stability
|
|
152
|
+
|
|
153
|
+
## Credits
|
|
154
|
+
|
|
155
|
+
Built by **Hoon** ([triplealab](https://github.com/a3lab01create-bit)) in collaboration with **Claude** (Anthropic) and **Codex** (OpenAI). Most of v0.5 / v0.6 / v4.5 / v5.0 was designed and implemented through iterative human-AI pair programming — eating our own dog food on the same memory and skill systems this server provides.
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
MIT
|
package/README_KR.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# mcp-agents-memory (v0.6.0)
|
|
2
|
+
|
|
3
|
+
멀티 에이전트 공유 장기 기억 MCP 서버.
|
|
4
|
+
AI 에이전트(Claude, Gemini, GPT 등)가 별도의 설정 없이도 **자율적으로 기억을 관리**하고, 지능적인 검증을 통해 신뢰할 수 있는 지식 베이스를 구축하게 해주는 MCP 서버입니다.
|
|
5
|
+
|
|
6
|
+
## 🌟 v0.6 신규 기능: 유니버설 자율성 (Universal Autonomy)
|
|
7
|
+
|
|
8
|
+
- **🧠 Zero-Config 자율성**: 더 이상 `settings.json`에 복잡한 hooks를 설정할 필요가 없습니다! 서버가 MCP `instructions` 필드를 통해 에이전트에게 직접 지침을 내려, 에이전트가 스스로 메모리 도구를 사용하도록 유도합니다.
|
|
9
|
+
- **⚖️ 선별적 감사 (Selective Audit)**: 추출된 모든 사실 중 중요도가 높은 상위 5개의 사실만 골라 고성능 모델(Opus/Grok)에게 정밀 검증을 맡깁니다. 비용은 아끼고 품질은 높였습니다.
|
|
10
|
+
- **🌐 출처 가중치 (Source Weighting)**: 외부 사실 검증 시 도메인 권위(.gov, .edu, 공식 문서 등)에 따라 가중치를 부여합니다. 공신력 있는 정보를 우선적으로 신뢰합니다.
|
|
11
|
+
- **⚡ MCP Prompts (슬래시 명령어)**: `/briefing`, `/recall <query>`, `/save <text>`와 같은 직관적인 명령어로 메모리와 직접 상호작용할 수 있습니다.
|
|
12
|
+
- **🔐 통합 출처 관리**: 모든 기억에 출처 모델(`author_model`), 플랫폼(`platform`), 세션 ID가 자동으로 기록되어 완벽한 추적성을 보장합니다.
|
|
13
|
+
|
|
14
|
+
## 주요 기능
|
|
15
|
+
|
|
16
|
+
- **📚 Librarian AI**: 대화 원문을 자동으로 분석 → 핵심 사실(fact) 추출, 분류, 저장
|
|
17
|
+
- **⚡ 모순 해결(Contradiction Resolution)**: "서울 거주" → "부산 이사" 같은 모순을 자동 감지하고 기존 기억을 업데이트(Supersede)합니다.
|
|
18
|
+
- **🧠 스마트 브리핑**: 세션 시작 시 유저 프로필, 프로젝트 상태, 핵심 결정사항을 한 번에 브리핑합니다.
|
|
19
|
+
- **🔍 시맨틱 검색**: 벡터 임베딩 기반 검색 + 유저 프로필 자동 첨부 기능을 지원합니다.
|
|
20
|
+
- **🔐 SSH 터널링**: 원격 DB에 안전하게 접속하며, 안정적인 연결 관리 기능을 제공합니다.
|
|
21
|
+
- **🤖 멀티 에이전트**: 어떤 AI 모델이나 플랫폼을 사용하더라도 동일한 메모리 풀을 공유합니다.
|
|
22
|
+
|
|
23
|
+
## 🧠 하이브리드 지능 기술 스택 (Hybrid Intelligence)
|
|
24
|
+
|
|
25
|
+
v0.6은 대량의 데이터 처리는 효율적인 모델이, 핵심적인 추론과 검증은 최고급 모델이 담당하는 **지능형 멀티 모델 아키텍처**를 채택하고 있습니다.
|
|
26
|
+
|
|
27
|
+
| 역할 | 기술 | 설명 |
|
|
28
|
+
|----------|------------|-------------|
|
|
29
|
+
| **메인 브레인** | Anthropic `Claude 3 Opus` | **선별적 감사(Selective Audit)**: 고가치 사실 및 결정 사항 정밀 검증. |
|
|
30
|
+
| **진실 추론기** | xAI `Grok-1` | **검증 통합(Validation Synthesis)**: 외부 웹 데이터를 기반으로 사실성 판단. |
|
|
31
|
+
| **사실 추출기** | OpenAI `gpt-4o-mini` | **Librarian 엔진**: 빠르고 비용 효율적인 데이터 추출 및 분류. |
|
|
32
|
+
| **임베딩** | OpenAI `text-embedding-3-small` | **시맨틱 검색**: 표준화된 1536차원 벡터 인덱싱. |
|
|
33
|
+
| **검색 엔진** | Tavily + Exa | **가중치 기반 검색**: 도메인 권위(gov, edu)를 고려한 외부 근거 확보. |
|
|
34
|
+
| **데이터베이스** | PostgreSQL + pgvector | **벡터 저장소**: 확장 가능한 장기 기억 저장소. |
|
|
35
|
+
|
|
36
|
+
## 설치 및 설정
|
|
37
|
+
|
|
38
|
+
### 1. 설치 및 빌드
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install
|
|
42
|
+
npm run build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. 설정 위저드 실행
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run setup
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
DB 연결, SSH 터널, OpenAI API 키를 설정하고 스키마를 자동 생성합니다.
|
|
52
|
+
|
|
53
|
+
### 3. 모든 MCP 클라이언트에 연결
|
|
54
|
+
클라이언트(Claude Code, Antigravity 등)에 서버를 추가하기만 하면 됩니다. 별도의 훅 설정은 필요하지 않습니다!
|
|
55
|
+
```bash
|
|
56
|
+
claude mcp add mcp-agents-memory node /path/to/build/index.js
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 도구 및 프롬프트 (v0.6)
|
|
60
|
+
|
|
61
|
+
### 🚨 Prompts (슬래시 명령어)
|
|
62
|
+
- `/briefing`: 현재 세션의 전체 브리핑을 요청합니다.
|
|
63
|
+
- `/recall <query>`: 메모리에서 관련 정보를 빠르게 검색합니다.
|
|
64
|
+
- `/save <text>`: 특정 사실이나 결정사항을 수동으로 저장합니다.
|
|
65
|
+
|
|
66
|
+
### 🛠️ 핵심 도구
|
|
67
|
+
- `memory_startup`: 유저 프로필 및 프로젝트 상태를 로드합니다.
|
|
68
|
+
- `memory_add`: 자동 출처 기록 및 감사가 포함된 사실 추출을 수행합니다.
|
|
69
|
+
- `memory_search`: 통합 시맨틱 + 키워드 검색을 수행합니다.
|
|
70
|
+
- `memory_status`: 시스템 상태 및 메모리 통계를 확인합니다.
|
|
71
|
+
|
|
72
|
+
## 아키텍처
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
76
|
+
│ Claude Code │ │ Gemini │ │ GPT │
|
|
77
|
+
│ (Zero-Config) │ │ (자율 작동) │ │ (자율 작동) │
|
|
78
|
+
└────────┬────────┘ └──────┬───────┘ └──────┬───────┘
|
|
79
|
+
│ │ │
|
|
80
|
+
└─────────────────────┼─────────────────────┘
|
|
81
|
+
│
|
|
82
|
+
┌──────────▼──────────┐
|
|
83
|
+
│ MCP Protocol │
|
|
84
|
+
│ (w/ instructions) │ ← v0.6 신규
|
|
85
|
+
└──────────┬──────────┘
|
|
86
|
+
│
|
|
87
|
+
┌──────────▼──────────┐
|
|
88
|
+
│ mcp-agents-memory │
|
|
89
|
+
│ ┌───────────────┐ │
|
|
90
|
+
│ │ Selective │ │ ← 상위 5개 랭커
|
|
91
|
+
│ │ Audit │ │
|
|
92
|
+
│ └───────┬───────┘ │
|
|
93
|
+
└──────────┼──────────┘
|
|
94
|
+
│
|
|
95
|
+
┌──────────▼──────────┐
|
|
96
|
+
│ PostgreSQL + pgvec │
|
|
97
|
+
│ (통합 Facts 테이블) │ ← v0.6 메타데이터 포함
|
|
98
|
+
└─────────────────────┘
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 로드맵
|
|
102
|
+
|
|
103
|
+
- [x] v0.1 — 기본 CRUD 메모리 시스템
|
|
104
|
+
- [x] v0.2 — 동적 주체 생성, pgvector 시맨틱 검색
|
|
105
|
+
- [x] v0.3 — 스마트 브리핑, 원자적 저장 강제
|
|
106
|
+
- [x] v0.4 — Librarian 엔진 (자동 추출 및 해결)
|
|
107
|
+
- [x] v0.5 — 출처 관리 레이어 (모델/플랫폼 신뢰도)
|
|
108
|
+
- [x] v0.6 — **유니버설 자율성**: Zero-Config + 선별적 감사 ← **현재**
|
|
109
|
+
- [ ] v0.8 — **메모리 그래프**: 지식 그래프 연관 추론 및 자동 만료
|
|
110
|
+
- [ ] v1.0 — **프로덕션 준비**: npm 배포 및 벤치마킹
|
|
111
|
+
|
|
112
|
+
## 라이선스
|
|
113
|
+
MIT
|