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

@rushdb/javascript-sdk

v2.3.3

Published

RushDB JavaScript SDK — memory layer for AI agents and modern apps

Readme

RushDB Logo

RushDB — JavaScript & TypeScript SDK

The memory layer for AI agents and apps.

Push any JSON. Get graph relationships and vector search — automatically. No schema. No pipeline. No glue code.

NPM Version NPM Downloads Bundle size License Made with Node

🌐 Website📖 Documentation☁️ Cloud🔍 Examples


Why RushDB

Agents need memory. Apps need connected data. The standard answer involves multiple databases, schema design, and an embedding pipeline before you write a single useful line of business logic.

RushDB skips all of that:

  • Managed embeddings — mark a property for indexing once; every write is auto-embedded server-side
  • Graph auto-structured — nested JSON becomes a traversable graph; no manual edge creation
  • Semantic + graph in one query — filter by relationships, rank by meaning, compute metrics — one call (use select/groupBy)
  • Zero schema — push any shape; RushDB infers types and links records
  • 6.9KB gzipped — zero runtime dependencies
  • Isomorphic — Node.js and browser

Installation

npm install @rushdb/javascript-sdk
# yarn add @rushdb/javascript-sdk
# pnpm add @rushdb/javascript-sdk

Agent memory in 3 lines

Get an API key at app.rushdb.com.

import RushDB from '@rushdb/javascript-sdk'

const db = new RushDB('RUSHDB_API_KEY')

// 1. One-time: index a property for semantic search
await db.ai.indexes.create({ label: 'MEMORY', propertyName: 'output' })

// 2. Store — no embedder needed, server handles it
await db.records.create({
  label: 'MEMORY',
  data: {
    agent_id: 'agent-42',
    session_id: 'sess-001',
    action: 'summarized',
    topic: 'Q4 results',
    output: summaryText
  }
})

// 3. Recall by meaning, scoped by graph
const memories = await db.ai.search({
  labels: ['MEMORY'],
  propertyName: 'output',
  query: 'what did we decide about Q4?',
  where: { agent_id: 'agent-42' },
  limit: 10
})

Graph traversal

// Push nested JSON — relationships created automatically
await db.records.importJson({
  label: 'COMPANY',
  payload: {
    name: 'Acme Corp',
    DEPARTMENT: [
      {
        name: 'Engineering',
        EMPLOYEE: [
          {
            name: 'Alice',
            role: 'Staff Engineer'
          }
        ]
      }
    ]
  }
})

// Traverse the auto-created graph
const engineers = await db.records.find({
  labels: ['EMPLOYEE'],
  where: {
    role: { $contains: 'Engineer' },
    DEPARTMENT: { COMPANY: { name: 'Acme Corp' } }
  }
})

// Constrain by relationship type and direction
const authoredPosts = await db.records.find({
  labels: ['USER'],
  where: {
    POST: {
      $relation: { type: 'AUTHORED', direction: 'out' },
      title: { $contains: 'graph' }
    }
  },
  limit: 10
})

// Manage relationships explicitly
const company = await db.records.findUniq({
  labels: ['COMPANY'],
  where: { name: 'Acme Corp' }
})
await company.attach(engineers, { type: 'EMPLOYS' })

Query API

One JSON structure works for record queries, aggregations, and vector search:

const result = await db.records.find({
  labels: ['TRANSACTION'],
  where: {
    status: 'posted',
    amount: { $gte: 100 }
  },
  select: {
    total: { $sum: '$record.amount' }
  },
  groupBy: ['$record.category'],
  // Legacy: The aggregate clause is deprecated and should only be used for vector similarity until select supports it.
  orderBy: { amount: 'desc' },
  limit: 50
})

where is resource-local:

  • db.records.find().where filters Records.
  • db.labels.find().where and db.properties.find().where filter Records before returning matching labels/properties.
  • db.relationships.find().where filters relationship edges. Use source and target for endpoint Record predicates.
const relationships = await db.relationships.find({
  source: { labels: ['USER'], where: { status: 'active' } },
  target: { labels: ['ORDER'] },
  where: { type: 'ORDERED', confidence: { $gte: 0.8 } }
})

SDK configuration

import RushDB from '@rushdb/javascript-sdk'

const db = new RushDB('RUSHDB_API_KEY', {
  // Override for self-hosted or staging
  url: 'http://your-rushdb-server.com/api/v1',
  timeout: 30000
})

Key options:

  • url — full API URL (default: https://api.rushdb.com/api/v1)
  • host, port, protocol — alternative to url
  • timeout — request timeout in ms (default: 10000)
  • httpClient — custom HTTP client for advanced use
  • options.allowForceDelete — allow deleting all records without criteria (default: false)

Full config reference: docs.rushdb.com/typescript-sdk/introduction#sdk-configuration-options


Documentation

docs.rushdb.com/typescript-sdk — full API reference, examples, transactions, CSV import, and more.


Contributing

See CONTRIBUTING.md. Issues and PRs welcome.