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

@lanonasis/memory-sdk-standalone

v1.1.0

Published

Standalone Memory SDK - drop into any project for multi-agent orchestration with persistent memory

Readme

@lanonasis/memory-sdk

Official TypeScript SDK for Lanonasis Memory as a Service (MaaS)

🚀 Quick Start

Installation

# NPM
npm install @lanonasis/memory-sdk

# Yarn
yarn add @lanonasis/memory-sdk

# Bun
bun add @lanonasis/memory-sdk

Basic Usage

import MemoryClient from '@lanonasis/memory-sdk';

// Initialize client
const memory = new MemoryClient({
  apiUrl: 'https://api.lanonasis.com',
  apiKey: 'your-api-key-here'
});

// Create a memory
const newMemory = await memory.createMemory({
  title: 'Important Meeting Notes',
  content: 'Discussed Q4 strategy and budget allocation...',
  type: 'context',
  tags: ['meeting', 'strategy', 'q4']
});

// Search memories
const results = await memory.searchMemories({
  query: 'Q4 strategy',
  limit: 10,
  type: 'context'
});

// Get user stats
const stats = await memory.getUserStats();

🚀 Multi-Modal Memory

Unlike traditional LLMs limited by context windows, Lanonasis Memory Service stores unlimited content across multiple formats:

import { MultiModalMemoryClient } from '@lanonasis/memory-sdk';

const memory = new MultiModalMemoryClient({
  apiUrl: 'https://api.lanonasis.com',
  apiKey: 'your-api-key'
});

// Store an image with OCR and AI description
const imageMemory = await memory.createImageMemory(
  'Product Screenshot',
  imageFile,
  { extractText: true, generateDescription: true }
);

// Store audio with transcription
const audioMemory = await memory.createAudioMemory(
  'Meeting Recording',
  audioFile
);

// Store code with semantic analysis
const codeMemory = await memory.createCodeMemory(
  'Authentication Helper',
  codeString,
  'typescript',
  { extractFunctions: true, generateDocs: true }
);

// Store documents with full-text extraction
const docMemory = await memory.createDocumentMemory(
  'Project Requirements',
  pdfFile,
  'pdf'
);

// Search across all modalities
const results = await memory.getMultiModalContext('user authentication', {
  includeImages: true,
  includeAudio: true,
  includeDocuments: true,
  includeCode: true
});

🎯 Features

  • Multi-Modal Memory: Store images, audio, documents, and code with full content extraction
  • Semantic Search: Vector-based similarity search across all content types
  • Memory Types: Context, project, knowledge, reference, personal, workflow
  • AI-Powered Analysis: OCR, transcription, code analysis, and summarization
  • Unlimited Context: No token limits - store and search unlimited content
  • Real-time Updates: SSE support for live memory updates
  • TypeScript: Full type safety and IntelliSense
  • Authentication: API key and JWT token support
  • Error Handling: Comprehensive error types and messages

📚 API Reference

Client Configuration

interface MaaSClientConfig {
  apiUrl: string;           // Your MaaS API endpoint
  apiKey?: string;          // API key for authentication
  authToken?: string;       // JWT token (alternative to API key)
  timeout?: number;         // Request timeout in milliseconds
}

Memory Operations

Create Memory

await memory.createMemory({
  title: 'Memory Title',
  content: 'Memory content here...',
  type: 'context',              // context | project | knowledge | reference | personal | workflow
  tags: ['tag1', 'tag2'],
  topic_id: 'optional-topic-id',
  metadata: { custom: 'data' }
});

Search Memories

await memory.searchMemories({
  query: 'search terms',
  limit: 10,
  type: 'context',
  tags: ['filter-tag'],
  similarity_threshold: 0.7
});

Get Memory by ID

const memory = await memory.getMemory('memory-id');

Update Memory

await memory.updateMemory('memory-id', {
  title: 'Updated Title',
  content: 'Updated content...'
});

Delete Memory

await memory.deleteMemory('memory-id');

Topic Management

Create Topic

await memory.createTopic({
  name: 'Project Alpha',
  description: 'All memories related to Project Alpha',
  color: '#3B82F6'
});

Get Topics

const topics = await memory.getTopics();

Analytics

Get User Stats

const stats = await memory.getUserStats();
// Returns: { total_memories, memories_by_type, recent_activity, etc. }

🔧 Advanced Usage

Error Handling

import { MemoryClient, MemoryError } from '@lanonasis/memory-sdk';

try {
  const result = await memory.createMemory({...});
} catch (error) {
  if (error instanceof MemoryError) {
    console.error('Memory API Error:', error.message);
    console.error('Status Code:', error.statusCode);
  }
}

Real-time Updates

// Subscribe to memory updates
const unsubscribe = memory.onMemoryUpdate((update) => {
  console.log('Memory updated:', update);
});

// Unsubscribe when done
unsubscribe();

Pagination

const memories = await memory.getAllMemories({
  page: 1,
  limit: 20,
  type: 'context'
});

🛠️ Integration Examples

React Hook

import { useState, useEffect } from 'react';
import MemoryClient from '@lanonasis/memory-sdk';

const useMemory = (apiKey: string) => {
  const [client] = useState(() => new MemoryClient({
    apiUrl: 'https://api.lanonasis.com',
    apiKey
  }));

  return {
    createMemory: client.createMemory.bind(client),
    searchMemories: client.searchMemories.bind(client),
    // ... other methods
  };
};

Node.js Server

import MemoryClient from '@lanonasis/memory-sdk';

const memory = new MemoryClient({
  apiUrl: 'https://api.lanonasis.com',
  apiKey: process.env.LANONASIS_API_KEY
});

// Use in API routes
app.post('/api/memories', async (req, res) => {
  try {
    const result = await memory.createMemory(req.body);
    res.json(result);
  } catch (error) {
    res.status(500).json({ error: error.message });
  }
});

Next.js App

// lib/memory.ts
import MemoryClient from '@lanonasis/memory-sdk';

export const memory = new MemoryClient({
  apiUrl: process.env.NEXT_PUBLIC_LANONASIS_API_URL!,
  apiKey: process.env.LANONASIS_API_KEY!
});

// pages/api/search.ts
import { memory } from '../../lib/memory';

export default async function handler(req, res) {
  const results = await memory.searchMemories({
    query: req.body.query,
    limit: 10
  });
  res.json(results);
}

🔐 Authentication

The SDK supports multiple authentication methods:

API Key (Recommended)

const memory = new MemoryClient({
  apiUrl: 'https://api.lanonasis.com',
  apiKey: 'sk_live_...'
});

JWT Token

const memory = new MemoryClient({
  apiUrl: 'https://api.lanonasis.com',
  authToken: 'your-jwt-token'
});

📖 Memory Types

  • context: General contextual information and notes
  • project: Project-specific knowledge and documentation
  • knowledge: Educational content and reference materials
  • reference: Quick reference information and code snippets
  • personal: User-specific private memories
  • workflow: Process and procedure documentation

🌐 Environment Variables

Create a .env file in your project:

LANONASIS_API_URL=https://api.lanonasis.com
LANONASIS_API_KEY=your-api-key-here

🧠 Why Choose Lanonasis Over Traditional LLMs?

| Feature | Traditional LLMs | Lanonasis Memory Service | |---------|------------------|-------------------------| | Context Window | Limited (4K-128K tokens) | ♾️ Unlimited | | Memory Persistence | ❌ Ephemeral | ✅ Permanent | | Multi-Modal Support | ⚠️ Limited | ✅ Images, Audio, Documents, Code | | Content Processing | ❌ Basic | ✅ OCR, Transcription, Analysis | | Search Capabilities | ❌ None | ✅ Vector Similarity + Metadata | | Cross-Session Memory | ❌ None | ✅ Full History | | File Storage | ❌ None | ✅ Permanent URLs | | Content Extraction | ❌ Limited | ✅ Full Text + Semantic Analysis |

Lanonasis transforms how AI systems work with information - instead of forgetting everything after each conversation, it builds a persistent, searchable knowledge base that grows more valuable over time.

📞 Support

  • Documentation: https://docs.lanonasis.com/sdk
  • API Reference: https://api.lanonasis.com/docs
  • Support: [email protected]
  • GitHub: https://github.com/lanonasis/memory-sdk

📄 License

MIT License - see LICENSE file for details.