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

@rememhq/sdk

v0.1.11

Published

Reasoning memory layer for AI agents — TypeScript SDK

Readme

@rememhq/sdk

npm version License TypeScript

The official TypeScript SDK for remem — the reasoning memory layer for AI agents.

Remem provides a persistent, queryable memory system that uses LLM-powered reasoning for importance scoring, contradiction detection, knowledge graph construction, and session consolidation. This SDK allows seamless integration of remem into your TypeScript and Node.js applications.

Key Features

  • Semantic Memory: Store and recall memories using natural language.
  • LLM-Powered Reasoning: Automatically scores memory importance and detects contradictions.
  • Knowledge Graph: Extracts and queries relationships between entities.
  • TypeScript Native: Fully typed API with extensive TSDoc comments.
  • Universal: Runs in modern browsers and Node.js 18+ via native fetch().

Installation

Install the package via npm, yarn, or pnpm:

npm install @rememhq/sdk
# or
yarn add @rememhq/sdk
# or
pnpm add @rememhq/sdk

Quick Start

1. Start the remem API Server

Before using the SDK, start the rememhq-api server from the remem repository root:

cargo run -p rememhq-api -- --project default

By default, the server listens on http://localhost:7474.

2. Initialize the Client

import { Memory } from "@rememhq/sdk";

// Initialize the memory client
const memory = new Memory({
  baseUrl: "http://localhost:7474",
  project: "my-agent",
  reasoningModel: "gpt-4o", // Configure reasoning model (e.g., claude-sonnet-4-6, gpt-4o)
  headers: {
    // Optional: Include API keys if authentication is configured on the server
    "Authorization": `Bearer ${process.env.REMEM_API_KEY}`
  }
});

3. Store and Recall Memories

// Store a new memory
const storeResponse = await memory.store("The user prefers using TypeScript over JavaScript for large codebases.", {
  tags: ["preferences", "languages"],
  importance: 0.8 // Optional: Overrides LLM auto-scoring
});

console.log(`Stored memory ID: ${storeResponse.id}`);

// Recall relevant memories based on context
const results = await memory.recall("What is the user's preferred language for big projects?", 5);

for (const result of results) {
  console.log(`Content: ${result.content}`);
  console.log(`Relevance Score: ${result.score}`);
  console.log(`Reasoning: ${result.reasoning}`);
}

API Reference

Configuration Options (MemoryOptions)

| Option | Type | Default | Description | |---|---|---|---| | baseUrl | string | "http://localhost:7474" | URL of the remem API server | | project | string | "default" | Logical namespace for your agent's memory | | reasoningModel | string | "gpt-4o" | LLM used for reasoning and scoring | | timeout | number | 30000 | Request timeout in milliseconds | | headers | Record<string, string> | {} | Additional HTTP headers |

Core Methods

  • store(content: string, options?: StoreOptions): Promise<StoreResponse>: Saves a new memory.
  • recall(query: string, limit?: number): Promise<RecallResult[]>: Retrieves contextually relevant memories with LLM reasoning.
  • search(query: string, limit?: number): Promise<SearchResult[]>: Performs a fast vector/full-text search.
  • update(memoryId: string, content: string): Promise<UpdateResponse>: Modifies an existing memory.
  • forget(memoryId: string): Promise<ForgetResponse>: Deletes a memory from the store.
  • consolidate(sessionId: string): Promise<ConsolidateResponse>: Consolidates temporary session logs into long-term facts.

Development

To build the SDK locally:

cd sdk/typescript
npm install
npm run build
npm run test

Contributing

We welcome contributions! Please review our Contributing Guide for details on submitting pull requests, reporting issues, and suggesting enhancements.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.