@riligar/agents-memories 1.2.0 → 1.4.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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # RiLiGar Agents Memories
2
2
 
3
- A high-performance, persistent memory system for AI agents, built on the **Model Context Protocol (MCP)**. RiLiGar transforms flat data into a **Relational Knowledge Graph** featuring **Resonance Intelligence** and **Semantic Bridging**.
3
+ A high-performance, persistent memory system for AI agents, built on the **Model Context Protocol (MCP)**. RiLiGar transforms flat data into a **Relational Knowledge Graph** featuring **Resonance Intelligence** and the **Self-Improvement Protocol (SIP)**.
4
4
 
5
- Now evolved into a **Modular SDK**, RiLiGar can be used both as a standalone MCP server and as a core library for cognitive applications.
5
+ Now evolved into a **Self-improving System**, RiLiGar can be used both as a standalone MCP server and as a core library for cognitive applications.
6
6
 
7
- ## 🧠 Philosophy: The Cognitive Self
7
+ ## 🧠 Philosophy: The Cognitive Self & SIP
8
8
 
9
- RiLiGar focuses on **Relational Intelligence**. Memory is not just retrieval; it is an extension of the agent's identity. By transforming memories into a living graph, the agent understands how facts are interconnected across different domains, simulating a "working memory" that evolves with every interaction.
9
+ RiLiGar focuses on **Relational Intelligence**. Memory is not just retrieval; it is an extension of the agent's identity. With the **Self-Improvement Protocol (SIP)**, the system transitions from passive storage to active learning. By capturing the **Rationale** of every decision, the agent can mine past patterns, audit its own architecture, and evolve its skills autonomously.
10
10
 
11
11
  ---
12
12
 
@@ -84,10 +84,10 @@ console.log(results)
84
84
 
85
85
  ## 🛠️ MCP Tools Reference
86
86
 
87
- - `save`: Stores content with automatic priority inference and **Semantic Magnet** auto-linking.
88
- - `search`: Relational semantic search (Score = 60% Similarity + 40% Recency).
87
+ - `save`: Stores content with automatic priority inference. **REQUIRED**: Include **Rationale** to enable **Pattern Mining**.
88
+ - `search`: Relational semantic search. Essential for **Pattern Mining** and avoiding past errors (SIP).
89
89
  - `bridge`: Manually links two memory paths (e.g., `Architecture` -> `Security`).
90
- - `inspect`: Generates a **Mermaid.js** graph of the memory topology.
90
+ - `inspect`: Generates a **Mermaid.js** graph. Use for **Architecture Audit (SIP)**.
91
91
  - `list`: Shows all unique memory paths.
92
92
 
93
93
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riligar/agents-memories",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "RiLiGar Agents Memories - A self-improving relational memory system for AI agents.",
5
5
  "module": "src/index.js",
6
6
  "main": "src/index.js",
@@ -25,7 +25,8 @@
25
25
  "scripts": {
26
26
  "dev": "bun --watch src/server/index.js",
27
27
  "start": "bun src/server/index.js",
28
- "test": "bun src/test.js"
28
+ "test": "bun src/test.js",
29
+ "build:pdf": "bun scripts/generate-pdf.js"
29
30
  },
30
31
  "dependencies": {
31
32
  "@huggingface/transformers": "^4.0.1",
@@ -39,6 +40,7 @@
39
40
  "@semantic-release/github": "^12.0.6",
40
41
  "@semantic-release/npm": "^13.1.5",
41
42
  "@semantic-release/release-notes-generator": "^14.1.0",
43
+ "md-to-pdf": "^5.2.5",
42
44
  "semantic-release": "^25.0.3"
43
45
  }
44
46
  }
@@ -21,64 +21,65 @@ export function createMcpServer(memorySystem) {
21
21
  tools: [
22
22
  {
23
23
  name: 'save',
24
- description: 'Saves info with Resonance and Auto-Bridging. SIP Note: Capture the Rationale (the "Why") to enable Pattern Mining.',
24
+ description: 'Primary "CAPTURE" tool for the RiLiGar Self-Improvement Protocol (SIP). Saves information into the Relational Knowledge Graph using Resonance Intelligence and Auto-Bridging. IMPORTANT: Always include the "Rationale" (the "Why") within the content to enable future Pattern Mining. Supports batch saving via arrays.',
25
25
  inputSchema: {
26
26
  type: 'object',
27
27
  properties: {
28
28
  content: {
29
+ description: 'The information to persist. For architectural decisions, include the technical Rationale.',
29
30
  oneOf: [
30
31
  { type: 'string' },
31
32
  { type: 'array', items: { anyOf: [
32
33
  { type: 'string' },
33
34
  { type: 'object', properties: {
34
- content: { type: 'string' },
35
- path: { type: 'string' },
36
- owner_id: { type: 'string' },
37
- priority: { type: 'integer' }
35
+ content: { type: 'string', description: 'The main data/lesson/decision text.' },
36
+ path: { type: 'string', description: 'Dot-notation path (e.g., Project.Architecture.Storage).' },
37
+ owner_id: { type: 'string', description: 'Agent/User identity for ownership.' },
38
+ priority: { type: 'integer', description: 'Base priority (0-10) for Resonance rippling.' }
38
39
  }, required: ['content'] }
39
40
  ] } }
40
41
  ],
41
42
  },
42
- path: { type: 'string' },
43
- owner_id: { type: 'string' },
44
- priority: { type: 'integer' },
43
+ path: { type: 'string', description: 'Hierarchical path (e.g., Self.Ethics.Protocol or Patterns.SOTA.Elysia).' },
44
+ owner_id: { type: 'string', description: 'Identity string of the memory owner.' },
45
+ priority: { type: 'integer', description: 'Initial importance; triggers priority adjustment in semantic neighbors.' },
45
46
  },
46
47
  required: ['content'],
47
48
  },
48
49
  },
49
50
  {
50
51
  name: 'bridge',
51
- description: 'Manually connects two memory paths.',
52
+ description: 'Establish explicit "Relational Intelligence" by connecting two disparate memory paths. Use this to document logical dependencies (depends_on), hierarchies (part_of), or implementation requirements that semantic similarity might not immediately detect.',
52
53
  inputSchema: {
53
54
  type: 'object',
54
55
  properties: {
55
- source_path: { type: 'string' },
56
- target_path: { type: 'string' },
57
- relation: { type: 'string', default: 'related_to' },
56
+ source_path: { type: 'string', description: 'The origin path of the relationship.' },
57
+ target_path: { type: 'string', description: 'The destination path of the relationship.' },
58
+ relation: { type: 'string', default: 'related_to', description: 'The type of connection: depends_on, part_of, implements, conflicts_with, etc.' },
58
59
  },
59
60
  required: ['source_path', 'target_path'],
60
61
  },
61
62
  },
62
63
  {
63
64
  name: 'search',
64
- description: 'Semantic search with Relational Awareness. Use for Pattern Mining and Error Avoidance (SIP).',
65
+ description: 'Execute "Reflexive Cognition". Performs a Relational Semantic Search across memories. Agents MUST use this proactively before complex tasks to find past "Lessons Learned", "Rationales", or "Errors" related to the current context. Results are ranked by Similarity (60%) and Recency (40%).',
65
66
  inputSchema: {
66
67
  type: 'object',
67
68
  properties: {
68
- query: { type: 'string' },
69
- path_filter: { type: 'string' },
69
+ query: { type: 'string', description: 'Semantic search query (e.g., "how we optimized sidebar storage").' },
70
+ path_filter: { type: 'string', description: 'Filter by path prefix (e.g., "Project.Architecture").' },
70
71
  },
71
72
  required: ['query'],
72
73
  },
73
74
  },
74
75
  {
75
76
  name: 'inspect',
76
- description: 'Visualizes the Knowledge Graph in Mermaid.js syntax. Use for Architecture Audit (SIP).',
77
+ description: 'Visualize the Relational Knowledge Graph in Mermaid.js syntax. Critical for the "Self-Critique" phase of SIP. Use it to audit system architecture, browse cognitive connections, and ensure no architectural drift has occurred.',
77
78
  inputSchema: { type: 'object', properties: {} },
78
79
  },
79
80
  {
80
81
  name: 'list',
81
- description: 'Lists all memory paths.',
82
+ description: 'List all unique memory paths (namespace discovery). Use this to explore the hierarchy and understand the available knowledge domains before performing targeted searches or saves.',
82
83
  inputSchema: { type: 'object', properties: {} },
83
84
  },
84
85
  ],