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

kronvex

v0.1.0

Published

Persistent memory for AI agents — Kronvex Node.js SDK

Readme

Kronvex Node.js SDK

Persistent memory for AI agents. Works with any LLM framework — OpenAI, LangChain, Vercel AI SDK, etc.

Installation

npm install kronvex
# or
pnpm add kronvex
# or
yarn add kronvex

Quick start

import { Kronvex } from "kronvex";

const kx = new Kronvex("kx_your_api_key");
const agent = kx.agent("your-agent-id");

// Store a memory
await agent.remember("User prefers concise answers", { memory_type: "preference" });

// Recall relevant memories
const memories = await agent.recall("what does the user prefer?", { top_k: 5 });
memories.forEach(m => console.log(`[${m.score?.toFixed(2)}] ${m.content}`));

// Inject context into your prompt
const context = await agent.injectContext("How should I respond?");

With Vercel AI SDK

import { Kronvex } from "kronvex";
import { openai } from "@ai-sdk/openai";
import { streamText } from "ai";

const kx = new Kronvex(process.env.KRONVEX_API_KEY!);

export async function POST(req: Request) {
  const { messages, agentId, sessionId } = await req.json();
  const agent = kx.agent(agentId);
  const lastMessage = messages.at(-1)?.content ?? "";

  // Get context from past sessions
  const context = await agent.injectContext(lastMessage, { session_id: sessionId });

  const result = streamText({
    model: openai("gpt-4o"),
    system: `You are a helpful assistant with memory.\n\n${context}`,
    messages,
    onFinish: async ({ text }) => {
      // Store the exchange
      await agent.remember(lastMessage, { memory_type: "episodic", session_id: sessionId });
      await agent.remember(text, { memory_type: "episodic", session_id: sessionId });
    },
  });

  return result.toDataStreamResponse();
}

With LangChain

import { Kronvex } from "kronvex";
import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage, SystemMessage } from "@langchain/core/messages";

const kx = new Kronvex(process.env.KRONVEX_API_KEY!);
const agent = kx.agent(process.env.KRONVEX_AGENT_ID!);

async function chat(userMessage: string, sessionId: string): Promise<string> {
  const context = await agent.injectContext(userMessage, { session_id: sessionId });

  const llm = new ChatOpenAI({ model: "gpt-4o" });
  const response = await llm.invoke([
    new SystemMessage(`You are a helpful assistant.\n\n${context}`),
    new HumanMessage(userMessage),
  ]);

  // Store for next time
  await agent.remember(`User: ${userMessage}`, { session_id: sessionId });
  await agent.remember(`You: ${response.content}`, { session_id: sessionId });

  return String(response.content);
}

API reference

new Kronvex(apiKey, options?)

| Option | Default | Description | |--------|---------|-------------| | baseUrl | https://api.kronvex.io | API base URL | | timeout | 30000 | Request timeout in ms |

| Method | Returns | Description | |--------|---------|-------------| | .agent(agentId) | Agent | Get an Agent handle | | .createAgent(name, description?) | Promise<Agent> | Create a new agent | | .listAgents() | Promise<AgentData[]> | List all agents |

Agent

| Method | Returns | Description | |--------|---------|-------------| | .remember(content, options?) | Promise<Memory> | Store a memory | | .recall(query, options?) | Promise<Memory[]> | Semantic search | | .injectContext(message, options?) | Promise<string> | Get prompt context block | | .sessions() | Promise<Session[]> | List session IDs | | .memories(options?) | Promise<Memory[]> | List stored memories | | .deleteMemory(memoryId) | Promise<void> | Delete one memory | | .clear() | Promise<{deleted: number}> | Delete all memories |

Links