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

@basegrid-io/core

v1.0.1

Published

BaseGrid SDK - Memory Infrastructure for AI Agents | Sub-200ms Retrieval

Readme

@basegrid-io/core

Memory infrastructure for AI agents. Sub-200ms retrieval with hybrid search.

npm version License: MIT

Features

  • Sub-200ms P95 latency - Lightning-fast memory retrieval
  • 🔍 Hybrid search - Combines semantic + keyword search
  • 🎯 3-tier architecture - Optimized for different query types
  • 🔒 Type-safe - Full TypeScript support
  • 🚀 Production-ready - Built for scale

Installation

npm install @basegrid-io/core

Quick Start

import { BaseGrid } from '@basegrid-io/core';

const bg = new BaseGrid({
  apiKey: 'your-api-key',
  baseUrl: 'https://basegrid-production.up.railway.app' // Optional
});

// Add memory
await bg.add({
  agentId: 'customer-support-bot',
  content: 'User prefers dark mode and wants email notifications disabled',
  metadata: { category: 'preferences', userId: '123' }
});

// Search memory
const results = await bg.search({
  agentId: 'customer-support-bot',
  query: 'user preferences',
  limit: 5
});

console.log(results);

API Reference

new BaseGrid(config)

Create a new BaseGrid client.

Parameters:

  • apiKey (string, required) - Your BaseGrid API key
  • baseUrl (string, optional) - API base URL (defaults to localhost)

bg.add(params)

Add a memory to an agent.

Parameters:

  • agentId (string, required) - Agent identifier
  • content (string, required) - Memory content
  • metadata (object, optional) - Additional metadata
  • importance (number, optional) - Memory importance (0-1)
  • ttl (string, optional) - Time-to-live (e.g., "30d")

Returns: Promise<Memory>

bg.search(params)

Search agent memories.

Parameters:

  • agentId (string, required) - Agent identifier
  • query (string, required) - Search query
  • limit (number, optional) - Max results (default: 10)

Returns: Promise<SearchResult[]>

bg.delete(memoryId)

Delete a specific memory.

Parameters:

  • memoryId (string, required) - Memory ID

Returns: Promise<{ deleted: boolean; id: string }>

bg.list(agentId, options?)

List all memories for an agent.

Parameters:

  • agentId (string, required) - Agent identifier
  • options.limit (number, optional) - Max results
  • options.offset (number, optional) - Pagination offset
  • options.search (string, optional) - Filter by search term

Returns: Promise<{ data: Memory[]; total: number }>

Advanced Features

Bulk Operations

// Bulk delete
await bg.bulkDelete(['memory-id-1', 'memory-id-2']);

// Delete all agent memories
await bg.deleteAgentMemories('agent-id');

Data Export

// Export all data
const data = await bg.exportAllData();

Retention Policies

// Create retention policy
await bg.createRetentionPolicy({
  policy_type: 'auto_delete_old',
  retention_days: 90,
  applies_to: 'all_memories'
});

// List policies
const policies = await bg.getRetentionPolicies();

Documentation

Full documentation: https://basegrid.io/docs

Support

License

MIT © BaseGrid