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

libro-sdk

v1.0.4

Published

The official JavaScript/TypeScript SDK for Libro.

Readme

Libro SDK

The official JavaScript/TypeScript SDK for Libro — The User Context Layer for AI Applications.

Transform conversations into structured, evolving user understanding. Build AI agents with infinite memory using our zero-cost local vectorization, semantic deduplication, and drop-in SDK.

Features

  • ⚡️ Blazing Fast Ingestion: Edge-optimized architecture guarantees <300ms ingestion latency.
  • 🧠 Zero Pipeline Changes: Seamlessly retrieve memories to pass into your LLM prompt.
  • 🛡️ Full Privacy Control: Bring your own Supabase. We don't store your vectors, you do.
  • ⏱️ Automated Context Trimming: Never overflow your context window again.

Installation

npm install libro-sdk

Note: Requires Node.js >= 18.

Quick Start

1. Initialize the Client

import { LibroClient } from 'libro-sdk';

const libro = new LibroClient({
  apiKey: process.env.LIBRO_API_KEY, 
  baseUrl: 'https://libro.co.in' // Optional: defaults to production
});

2. Ingest Memory

Save facts, preferences, or chunks of conversation into a user's memory brain.

const response = await libro.ingest({
  content: "User prefers functional programming over OOP.",
  endUserId: "user-12345",
  metadata: { source: "slack_integration" }
});

console.log(response.memory.id); // 'f3b974d0-...'

3. Retrieve Context

Retrieve the most relevant memories for a user before passing context to an LLM like GPT-4 or Claude.

const { context, memories } = await libro.getContext({
  query: "What kind of code structure do they like?",
  endUserId: "user-12345"
});

console.log(context); 
// -> "[Memory 1] (Relevance: 85.2%): User prefers functional programming over OOP."

4. Update Memory

When a user's preferences change, update their specific memory block directly.

await libro.update("memory-uuid-1234", {
  content: "User prefers OOP when building large enterprise systems."
});

5. Forget (GDPR Compliance)

Fully delete a user's memory or specific blocks to comply with data deletion requests.

// Delete a specific memory
await libro.forget({ memoryId: "memory-uuid-1234" });

// Delete ALL memories for a user (GDPR "Right to be Forgotten")
await libro.forget({ endUserId: "user-12345" });

How It Works Under The Hood

Unlike managed monoliths (Mem0, Zep), Libro uses an Edge-first architecture. Our SDK hits your API, and the vectorization happens instantly on the edge via a lightweight embedding sidecar (nomic-embed-text-v1.5), before being stored directly in your own Supabase instance using pgvector HNSW indexes.

Zero vendor lock-in. Full data sovereignty.


Libro — Memory that never forgets.