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

@seizn/spring

v0.1.0

Published

Seizn Spring - Semantic Memory SDK for AI Applications

Readme

@seizn/spring

Semantic Memory SDK for AI Applications. Store, search, and retrieve memories with automatic embedding and vector similarity search.

Installation

npm install @seizn/spring
# or
yarn add @seizn/spring
# or
pnpm add @seizn/spring

Quick Start

import { SpringClient } from '@seizn/spring';

const spring = new SpringClient({
  apiKey: process.env.SEIZN_API_KEY!,
  namespace: 'my-app',
});

// Store a memory
await spring.remember('User prefers dark mode');

// Search memories
const memories = await spring.recall('UI preferences');
console.log(memories);

Features

  • Semantic Search: Vector-based similarity search with automatic embedding
  • Hybrid Search: Combine vector and keyword search for better results
  • Memory Types: Organize memories by type (fact, preference, experience, etc.)
  • Namespaces: Isolate memories by namespace for multi-tenant apps
  • Bulk Operations: Add multiple memories in a single request
  • Export/Import: Backup and restore memories

API Reference

Configuration

const spring = new SpringClient({
  apiKey: 'szn_...',           // Required: Your Seizn API key
  namespace: 'default',        // Optional: Default namespace
  baseUrl: 'https://seizn.com/api',  // Optional: API base URL
  timeout: 30000,              // Optional: Request timeout (ms)
  retries: 3,                  // Optional: Max retry attempts
  onError: (error) => {},      // Optional: Error callback
});

Core Methods

add(request) - Add a memory

const memory = await spring.add({
  content: 'User prefers dark mode',
  memory_type: 'preference',   // fact | preference | experience | relationship | instruction | conversation
  tags: ['ui', 'settings'],
  namespace: 'my-app',
});

search(query) - Search memories

// Simple search
const results = await spring.search('UI preferences');

// Advanced search
const results = await spring.search({
  query: 'UI preferences',
  limit: 10,
  threshold: 0.7,
  mode: 'hybrid',  // vector | hybrid | keyword
  tags: ['ui'],
});

get(id) - Get a memory by ID

const memory = await spring.get('mem_123');

update(id, request) - Update a memory

const memory = await spring.update('mem_123', {
  content: 'User prefers light mode',
  tags: ['ui', 'settings', 'updated'],
});

delete(ids) - Delete memories

await spring.delete('mem_123');
// or delete multiple
await spring.delete(['mem_123', 'mem_456']);

Shortcuts

// remember = add with type 'fact'
await spring.remember('Important fact');

// recall = search and return results array
const memories = await spring.recall('query', 5);

// forget = delete
await spring.forget('mem_123');

Bulk Operations

const result = await spring.bulkAdd([
  { content: 'Memory 1', memory_type: 'fact' },
  { content: 'Memory 2', memory_type: 'preference' },
]);
console.log(`Added: ${result.added}, Failed: ${result.failed}`);

Export/Import

// Export all memories
const backup = await spring.export();

// Export specific namespace
const backup = await spring.export({ namespace: 'my-app' });

// Import memories
const result = await spring.import(backup);
console.log(`Imported: ${result.imported}, Skipped: ${result.skipped}`);

Analytics

const stats = await spring.stats();
console.log(`Total memories: ${stats.totalMemories}`);
console.log(`Storage used: ${stats.storageUsedMb} MB`);

Error Handling

import { SpringClient, SpringError } from '@seizn/spring';

const spring = new SpringClient({
  apiKey: 'szn_...',
  onError: (error: SpringError) => {
    console.error(`Error [${error.code}]: ${error.message}`);
  },
});

try {
  await spring.search('query');
} catch (error) {
  if ((error as SpringError).code === 'RATE_LIMITED') {
    // Handle rate limiting
  }
}

TypeScript Support

Full TypeScript support with exported types:

import type {
  Memory,
  MemoryType,
  MemoryScope,
  SearchMode,
  SpringClientConfig,
  SpringError,
} from '@seizn/spring';

License

MIT - see LICENSE for details.

Links