New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@aibind/redis

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aibind/redis

Redis-backed StreamStore and ConversationStore for @aibind

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

@aibind/redis

Redis-backed StreamStore and ConversationStore for @aibind. Works with ioredis, Upstash, node-redis, or any client that implements the minimal RedisClient interface.

Install

npm install @aibind/redis

Usage

import { Redis } from "ioredis";
import { RedisStreamStore, RedisConversationStore } from "@aibind/redis";

const redis = new Redis(process.env.REDIS_URL!);

// Durable streams (stop + resume)
const streamStore = new RedisStreamStore(redis);

// Server-side conversation history
const conversationStore = new RedisConversationStore(redis);

Pass to your framework's stream handler:

import { createStreamHandler } from "@aibind/sveltekit/server";

export const handle = createStreamHandler({
  models,
  store: streamStore,          // enables durable streams
  conversation: { store: conversationStore }, // enables multi-turn history
});

Clients

Any client with this shape works — no hard dependency on any specific Redis library:

interface RedisClient {
  get(key: string): Promise<string | null>;
  set(key: string, value: string, exArg: "EX", ttl: number): Promise<unknown>;
  exists(...keys: string[]): Promise<number>;
  rpush(key: string, ...values: string[]): Promise<number>;
  lrange(key: string, start: number, stop: number): Promise<string[]>;
  llen(key: string): Promise<number>;
  expire(key: string, seconds: number): Promise<unknown>;
  del(...keys: string[]): Promise<unknown>;
}

Documentation

Full docs →

Keywords

redis

FAQs

Package last updated on 06 Mar 2026

Related posts