npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@riligar/agents-memories

v1.5.2

Published

RiLiGar Agents Memories - A self-improving relational memory system for AI agents.

Readme

RiLiGar Agents Memories

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).

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.

🧠 Philosophy: The Cognitive Self & SIP

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.


🏗️ Modular Architecture

The project is organized into distinct layers to ensure scalability and maintainability:

  • src/core (Cognition): Implements the heavy-lifting logic:
    • Resonance Intelligence: Priorities ripple through the graph; if a node is marked as critical, its semantic neighbors gain importance.
    • Semantic Magnet: Automatically detects near-identical facts and creates similar_to links.
  • src/database (Persistence): Uses LibSQL (SQLite) for edge-ready, high-speed storage.
  • src/sdk (Interface): Provides the MemorySystem class, a clean programmatic API.
  • src/server (Transport): Handles MCP communication via Stdio (local) and SSE (web/remote).

🔌 Quick Start

Prerequisites

  • Bun runtime (v1.x+)

Installation

bun install

Running the Standalone Server

The server starts both Stdio and SSE transports simultaneously on port 3000.

bun start
  • Stdio: Use this for Claude Desktop or local IDE configurations.
  • SSE: Access via http://localhost:3000/sse for web dashboards or remote agents.

📦 Programmatic Usage (SDK)

You can use RiLiGar as a library in your own Bun projects:

import { MemorySystem, getSystemIdentity } from '@riligar/agents-memories'
import { createClient } from '@libsql/client'

const db = createClient({ url: 'file:data/memories.db' })
const ownerId = getSystemIdentity('data')

const memory = new MemorySystem(db, ownerId)
await memory.init()

// Save a memory with automatic priority inference
await memory.save({
    content: 'The architecture is now modular.',
    path: 'Project.Architecture',
})

// Relational Semantic Search
const results = await memory.search({ query: 'How is the project organized?' })
console.log(results)

🛡️ Identity & SaaS Readiness

  • Cryptographic Soul: Each installation generates an Ed25519 identity (data/identity.json). The system uses a 10-character hex owner_id derived from this key.
  • Multi-Tenancy: Every memory is bound to an owner_id, allowing the same database to securely host memories for multiple users or agents.

🛠️ MCP Tools Reference

  • save: Stores content with automatic priority inference. REQUIRED: Include Rationale to enable Pattern Mining.
  • search: Relational semantic search. Essential for Pattern Mining and avoiding past errors (SIP).
  • bridge: Manually links two memory paths (e.g., Architecture -> Security).
  • inspect: Generates a Mermaid.js graph. Use for Architecture Audit (SIP).
  • list: Shows all unique memory paths.

🧪 Development

Running tests

bun test

Stack

Built with ❤️ by the RiLiGar Team.