mcp-agents-memory 0.9.5 → 0.9.10
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 +29 -0
- package/README.md +8 -4
- package/RESPEC.md +5 -1
- package/build/index.js +2743 -446
- package/build/migrations/005_provenance.js +7 -6
- package/build/migrations/006_canonical_validation.js +7 -6
- package/build/migrations/007_seed_real_models.js +7 -6
- package/build/migrations/008_schema_realignment.js +7 -6
- package/build/migrations/009_skills_tables.js +7 -6
- package/build/migrations/010_subject_relationships.js +7 -6
- package/build/migrations/011_memories_metadata.js +7 -6
- package/build/migrations/012_memory_sources.js +7 -6
- package/build/migrations/013_refresh_models.js +7 -6
- package/build/migrations/014_drop_legacy_facts_constraints.js +7 -6
- package/build/migrations/015_agent_provenance.js +7 -6
- package/build/migrations/016_agent_curator.js +7 -6
- package/build/migrations/017_drop_trust_weight.js +7 -6
- package/build/migrations/018_transcript_queue.js +7 -6
- package/build/migrations/019_respec_fresh_v1.js +7 -6
- package/build/migrations/020_tag_processed_and_external_uuid.js +7 -6
- package/build/migrations/021_agent_model_nullable.js +7 -6
- package/build/migrations/022_device_name.js +7 -6
- package/build/migrations/023_librarian_gate.js +25991 -0
- package/build/migrations/024_canonical_project_tag_projection.js +26023 -0
- package/build/migrations/025_project_tag_alias_suggestions.js +26029 -0
- package/build/migrations/026_project_alias_promoter_gate.js +25990 -0
- package/package.json +1 -1
- package/README.md.back.md +0 -166
package/package.json
CHANGED
package/README.md.back.md
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
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
|
-
"env": {
|
|
95
|
-
"AGENT_KEY": "agent_claude",
|
|
96
|
-
"AGENT_PLATFORM": "claude-code"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
`AGENT_PLATFORM` is recorded as the Curator's harness identity on every memory_add call. The Curator's model is captured per-call (defaulting to the Producer's author_model) — set explicitly via the curator_model argument when an orchestrator saves memories on behalf of a different model (e.g. delegating to a subagent). This avoids the staleness that env-static model values would introduce when /model swaps mid-session.
|
|
104
|
-
|
|
105
|
-
`agent_key` (optional): Agent persona key for multi-persona harnesses (OpenClaw, Hermes, Opencode). Single-persona setups can ignore — `AGENT_KEY` env is the default. Applies to `memory_add`, `memory_save_skill`, and `memory_curator_run`.
|
|
106
|
-
|
|
107
|
-
### Cross-machine memory
|
|
108
|
-
|
|
109
|
-
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.
|
|
110
|
-
|
|
111
|
-
### CLI
|
|
112
|
-
|
|
113
|
-
- `mcp-agents-memory` — run the MCP server (stdio).
|
|
114
|
-
- `mcp-agents-memory setup` — interactive wizard (writes XDG config, applies schema + migrations).
|
|
115
|
-
- `mcp-agents-memory migrate` — apply pending migrations against an already-configured database.
|
|
116
|
-
- `mcp-agents-memory help` — show help.
|
|
117
|
-
|
|
118
|
-
### Local development
|
|
119
|
-
|
|
120
|
-
For self-hosted Postgres or working on the codebase directly:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
git clone https://github.com/a3lab01create-bit/mcp-agents-memory.git
|
|
124
|
-
cd mcp-agents-memory
|
|
125
|
-
npm install
|
|
126
|
-
npm run build
|
|
127
|
-
npm run setup
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Config search order: `$MEMORY_CONFIG_PATH` → `./.env` → `~/.config/mcp-agents-memory/.env` → `<package>/.env`. Project-root `.env` wins for dev workflows.
|
|
131
|
-
|
|
132
|
-
### Requirements
|
|
133
|
-
- PostgreSQL ≥ 14 with the `pgvector` extension.
|
|
134
|
-
- **Required API key**: OpenAI (embeddings).
|
|
135
|
-
- **Optional API keys**: depends on the wizard preset you pick (see below).
|
|
136
|
-
|
|
137
|
-
### Model presets
|
|
138
|
-
|
|
139
|
-
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.
|
|
140
|
-
|
|
141
|
-
| Preset | Triage | Extract | Audit | Contradiction | Required keys |
|
|
142
|
-
|---|---|---|---|---|---|
|
|
143
|
-
| **Recommended** | gemini-2.5-flash-lite | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | OpenAI + Google |
|
|
144
|
-
| OpenAI only | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | gpt-4o-mini | OpenAI |
|
|
145
|
-
| Anthropic only | claude-haiku-4-5 | claude-haiku-4-5 | claude-haiku-4-5 | claude-haiku-4-5 | Anthropic |
|
|
146
|
-
| Premium | gemini-2.5-flash | gpt-4o-mini | grok-4.20-0309-reasoning | grok-4.20-0309-reasoning | OpenAI + Google + xAI |
|
|
147
|
-
|
|
148
|
-
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.
|
|
149
|
-
|
|
150
|
-
## Roadmap
|
|
151
|
-
|
|
152
|
-
- [x] v0.4 — Librarian Engine (Auto extraction + resolution)
|
|
153
|
-
- [x] v0.5 — Provenance Layer (Model/Platform tracking)
|
|
154
|
-
- [x] v0.6 — **Knowledge Evolution**: Tiered Memory + Skill Grounding
|
|
155
|
-
- [x] v4.5 — Skill System closure (Curator + Auditor + Promotion + Injector filtering)
|
|
156
|
-
- [x] v5.0 — Memory Graph + External Knowledge Grounding + Auto Forgetting + memory_restore
|
|
157
|
-
- [x] **Connectors v1**: Notion page ingestion (`connector_sync` MCP tool)
|
|
158
|
-
- [ ] **Connectors v2**: Notion database iteration, GitHub, Drive
|
|
159
|
-
- [ ] v1.0 — **Production Ready**: Full benchmark and stability
|
|
160
|
-
|
|
161
|
-
## Credits
|
|
162
|
-
|
|
163
|
-
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.
|
|
164
|
-
|
|
165
|
-
## License
|
|
166
|
-
MIT
|