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

vasperamemory-sdk

v0.2.2

Published

VasperaMemory TypeScript/JavaScript SDK - Universal AI memory layer

Readme

VasperaMemory TypeScript SDK

Add persistent AI memory to your applications. Your AI agents remember context across sessions.

npm version License: MIT

Why VasperaMemory?

  • Persistent Memory — Your AI remembers decisions, patterns, and fixes across sessions
  • Error Fix Memory — Save error fixes once, get suggestions automatically next time
  • Change Impact Analysis — Understand what code changes will affect before making them
  • Entity Intelligence — Track relationships between code entities across your codebase
  • Pattern Library — Access and contribute to community-shared coding patterns
  • Framework Ready — Works with Vercel AI SDK, LangChain, and more

Installation

npm install vasperamemory-sdk

Quick Start

import { VasperaMemory } from 'vasperamemory-sdk';

const vm = new VasperaMemory({
  apiKey: process.env.VASPERAMEMORY_API_KEY,
  projectId: process.env.VASPERAMEMORY_PROJECT_ID
});

// Search your project's memory
const results = await vm.search('authentication patterns');

// Capture decisions for future reference
await vm.captureDecision({
  category: 'architectural',
  title: 'Use Redis for caching',
  content: 'Chose Redis for its data structure support'
});

// Find past fixes for errors
const fix = await vm.findErrorFix('TypeError: Cannot read property');

New in v0.2.0

Change Impact Analysis

Understand what will be affected before making code changes:

// Analyze impact before modifying code
const impact = await vm.analyzeChangeImpact(
  'src/auth/handler.ts',
  ['validateToken', 'refreshSession']
);
console.log('Affected files:', impact.affectedFiles);
console.log('Risk level:', impact.riskLevel);

// Estimate risk for a set of changes
const risk = await vm.estimateChangeRisk(
  ['src/auth/handler.ts', 'src/middleware/auth.ts'],
  'refactor'
);
console.log('Risk score:', risk.riskScore);
console.log('Recommendations:', risk.recommendations);

// Find similar code implementations
const similar = await vm.findSimilarCode(`
  async function validateToken(token: string) {
    const decoded = jwt.verify(token, secret);
    return decoded;
  }
`);

Entity Intelligence

Track and query code entities across your codebase:

// Search for entities
const entities = await vm.searchEntities('auth', {
  entityType: 'function',
  limit: 10
});

// Get relationships between entities
const relationships = await vm.getEntityRelationships('UserService', {
  direction: 'both',
  predicateFilter: 'uses'
});

// Track entity evolution over time
const evolution = await vm.getEntityEvolution('src/services/auth.ts', 'validateUser');
console.log('Stability score:', evolution.stabilityScore);
console.log('Version count:', evolution.versionCount);

Export & Import

Migrate or backup your project memory:

// Export memories
const exportResult = await vm.exportMemory({
  format: 'json',
  includeDecisions: true,
  includeErrors: true
});
console.log('Download URL:', exportResult.downloadUrl);

// Import memories
const importResult = await vm.importMemory(memoryData, 'append');
console.log('Imported:', importResult.importedCount);

Pattern Library

Access community patterns and share your own:

// Get pattern suggestions based on context
const suggestions = await vm.suggestPatterns({
  context: 'implementing authentication middleware',
  filePath: 'src/middleware/auth.ts'
});

// Search community patterns
const patterns = await vm.searchPatterns('error handling', {
  category: 'typescript'
});

// Contribute a pattern
await vm.contributePattern(
  'Repository Pattern',
  'Abstract data access layer for database operations',
  'architecture',
  `class UserRepository {
    async findById(id: string): Promise<User> { ... }
  }`
);

Vercel AI SDK Integration

import { createVasperaMemoryTools } from 'vasperamemory-sdk/vercel-ai';
import { generateText } from 'ai';

const tools = createVasperaMemoryTools(vm);

const result = await generateText({
  model: openai('gpt-4'),
  prompt: 'What patterns do we use?',
  tools
});

API Reference

Core Methods

| Method | Description | |--------|-------------| | search(query, options?) | Search memories by semantic similarity | | captureMemory(request) | Save a new memory | | captureDecision(request) | Record an architectural decision | | captureErrorFix(request) | Save an error fix for future reference | | findErrorFix(errorMessage) | Find a fix for a known error | | getSessionContext(options?) | Get comprehensive session context | | fuseContext(options?) | Merge context from multiple sources |

Change Analysis Methods (v0.2.0)

| Method | Description | |--------|-------------| | analyzeChangeImpact(file, symbols) | Analyze impact of modifying code | | predictChangeImpact(file, options?) | Predict ripple effects of changes | | estimateChangeRisk(files, changeType?) | Assess risk before making changes | | findSimilarCode(code, options?) | Find similar implementations |

Entity Methods (v0.2.0)

| Method | Description | |--------|-------------| | searchEntities(query, options?) | Search code entities | | getEntityRelationships(entity, options?) | Get entity dependencies | | getEntityEvolution(file, entity?) | Track entity history |

Export/Import Methods (v0.2.0)

| Method | Description | |--------|-------------| | exportMemory(options?) | Export to JSON/markdown/YAML | | importMemory(data, strategy?) | Import from external sources |

Pattern Methods (v0.2.0)

| Method | Description | |--------|-------------| | suggestPatterns(options?) | Get context-aware pattern suggestions | | searchPatterns(query, options?) | Search community patterns | | contributePattern(name, desc, category, example?) | Share a pattern |

Get Your API Key

  1. Run npx vasperamemory connect in any project
  2. Enter your email when prompted
  3. Your API key is generated automatically

Or sign up at vasperamemory.com

Documentation

Full API documentation: vasperamemory.com/docs/sdk

Links

License

MIT — Use it, modify it, ship it.