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

braintied

v0.1.0

Published

AI memory and conversation SDK with semantic search and embeddings

Downloads

3

Readme

Braintied

"Stripe for AI Brains" - Add intelligent memory and context to your app in 3 lines of code.

What is Braintied?

Braintied is a developer platform that makes it absurdly easy to add AI with memory to any application. Just like Stripe handles payments so you don't have to build a payment processor, Braintied handles intelligent conversation memory so you don't have to build an AI infrastructure.

Features

  • Automatic Memory Management - AI automatically extracts and stores important facts
  • Smart Context Retrieval - Relevant memories surface in each conversation
  • Multi-Brain Architecture - Create different AI agents for different use cases
  • Pre-built Components - Drop-in React components and hooks
  • Background Processing - Heavy lifting happens asynchronously
  • Type-Safe - Full TypeScript support
  • Framework Agnostic - Works with Next.js, Express, React Native, etc.

Quick Start

1. Install

npm install braintied

2. Get API Key

Sign up at braintied.com and get your API key.

3. Start Using

import BrainSDK from 'braintied';

const brain = new BrainSDK({ apiKey: process.env.BRAIN_API_KEY });

// That's it! Memory and context are automatic
const response = await brain.chat('Hello!', { userId: 'user-123' });

Usage Examples

Basic Chat with Memory

import BrainSDK from 'braintied';

const brain = new BrainSDK({ apiKey: process.env.BRAIN_API_KEY });

// First conversation
await brain.chat('My name is Sarah and I love TypeScript', {
  userId: 'user-123',
});

// Later conversation - it remembers!
const response = await brain.chat('What do I like?', {
  userId: 'user-123',
});
// Response: "You love TypeScript!"

React Component

'use client';
import { BrainProvider, ChatInterface } from 'braintied/react';

export default function Page() {
  return (
    <BrainProvider apiKey={process.env.NEXT_PUBLIC_BRAIN_API_KEY}>
      <ChatInterface
        userId={user.id}
        placeholder="Ask me anything..."
      />
    </BrainProvider>
  );
}

Multiple Brains per Project

const brain = new BrainSDK({ apiKey: process.env.BRAIN_API_KEY });

// Customer support agent
const supportBrain = brain.brain('customer-support');
await supportBrain.chat('How do I reset my password?', { userId: 'user-123' });

// Onboarding assistant
const onboardingBrain = brain.brain('onboarding');
await onboardingBrain.chat('Show me around', { userId: 'user-123' });

Manual Memory Management

// Store a memory manually
await brain.remember('user-123', 'User prefers dark mode');

// Get all memories
const memories = await brain.getMemories('user-123');

// Search memories
const results = await brain.getMemories('user-123', {
  query: 'preferences',
});

// Forget a specific memory
await brain.forget('user-123', memoryId);

// Forget all memories
await brain.forget('user-123');

React Hooks

import { useBrain, useMemory } from 'braintied/react';

function ChatComponent() {
  const { messages, input, handleInputChange, handleSubmit, isLoading } = useBrain(
    'user-123',
    { brainId: 'customer-support' }
  );

  return (
    <div>
      {messages.map(msg => <div key={msg.id}>{msg.content}</div>)}
      <form onSubmit={handleSubmit}>
        <input value={input} onChange={handleInputChange} />
      </form>
    </div>
  );
}

function MemoryPanel() {
  const { memories, remember, forget } = useMemory('user-123');

  return (
    <div>
      {memories.map(m => (
        <div key={m.id}>
          {m.content}
          <button onClick={() => forget(m.id)}>Forget</button>
        </div>
      ))}
    </div>
  );
}

Architecture

Database Schema

  • Projects - One per developer/organization
  • Brains - Multiple per project (customer support, onboarding, etc.)
  • Memories - Semantic memory with vector embeddings
  • Conversations - Chat history with auto-summarization

API Endpoints

  • POST /api/v1/chat - Send a message with automatic memory
  • GET /api/v1/memory - Get memories for a user
  • POST /api/v1/memory - Store a memory
  • DELETE /api/v1/memory - Forget memories

Background Jobs (Inngest)

  • Extract memories from conversations
  • Store conversation history
  • Generate conversation summaries
  • Log usage for billing

Tech Stack

  • Database: Supabase (PostgreSQL + pgvector)
  • AI: Vercel AI SDK (Claude, GPT)
  • Background Jobs: Inngest
  • Framework: Next.js 15
  • Type Safety: TypeScript throughout

Development

Setup

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Add your Supabase credentials and API keys

# Run development server
npm run dev

Environment Variables

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Anthropic
ANTHROPIC_API_KEY=your-anthropic-key

# OpenAI (for embeddings)
OPENAI_API_KEY=your-openai-key

# Inngest
INNGEST_EVENT_KEY=your-inngest-key

Roadmap

  • [ ] Dashboard for developers to manage projects and brains
  • [ ] Analytics and usage metrics
  • [ ] Custom tool/function calling support
  • [ ] React Native SDK
  • [ ] Self-hosted option
  • [ ] Multi-modal support (images, files)
  • [ ] Stripe integration for billing

Contributing

Contributions welcome! Please read CONTRIBUTING.md first.

License

MIT

Links