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

@dakera-ai/langchain

v0.2.0

Published

LangChain.js integration for Dakera AI memory platform

Readme

@dakera-ai/langchain

CI npm Downloads Node License: MIT dakera.ai Docs Docs

LangChain.js integration for Dakera — persistent semantic memory and server-side vector search, no local embedding model required.

| Class | Description | |-------|-------------| | DakeraMemory | Drop-in BaseMemory for LangChain.js conversation chains | | DakeraVectorStore | VectorStore backed by Dakera's server-side embedding engine |


Quick Start

Step 1 — Run Dakera

Dakera is a self-hosted memory server. Spin it up with Docker:

docker run -d \
  --name dakera \
  -p 3300:3300 \
  -e DAKERA_ROOT_API_KEY=dk-mykey \
  ghcr.io/dakera-ai/dakera:latest

For a production setup with persistent storage, use Docker Compose:

curl -sSfL https://raw.githubusercontent.com/Dakera-AI/dakera-deploy/main/docker-compose.yml \
  -o docker-compose.yml
DAKERA_API_KEY=dk-mykey docker compose up -d

curl http://localhost:3300/health  # → {"status":"ok"}

Full deployment guide: github.com/Dakera-AI/dakera-deploy

Step 2 — Install the integration

npm install @dakera-ai/langchain @dakera-ai/dakera @langchain/core

Step 3 — Use it

import { DakeraMemory } from "@dakera-ai/langchain";
import { ConversationChain } from "langchain/chains";
import { ChatOpenAI } from "@langchain/openai";

const memory = new DakeraMemory({
  apiUrl: "http://localhost:3300",
  apiKey: "dk-mykey",
  agentId: "my-agent",
});

const chain = new ConversationChain({
  llm: new ChatOpenAI({ model: "gpt-4o" }),
  memory,
});

// Memory persists across sessions and restarts
const response = await chain.call({ input: "My project is called NeuralBridge." });
console.log(response.response);

Installation

npm install @dakera-ai/langchain @dakera-ai/dakera @langchain/core

Requirements: Node.js ≥ 20, a running Dakera server (see Step 1 above)


DakeraMemory

Persistent conversation memory for LangChain.js chains. Stores and recalls conversation history using Dakera's hybrid search.

import { DakeraMemory } from "@dakera-ai/langchain";
import { ConversationChain } from "langchain/chains";
import { ChatOpenAI } from "@langchain/openai";

const memory = new DakeraMemory({
  apiUrl: "http://localhost:3300",
  apiKey: process.env.DAKERA_API_KEY!,
  agentId: "my-agent",
  recallK: 5,       // how many past memories to surface per turn
  importance: 0.7,  // importance score for stored memories
});

const chain = new ConversationChain({
  llm: new ChatOpenAI({ model: "gpt-4o" }),
  memory,
});

// First session
await chain.call({ input: "My name is Alice and I'm building a chatbot." });

// Later session — memory persists across restarts
const { response } = await chain.call({ input: "What was I building?" });
console.log(response); // "You mentioned you were building a chatbot."

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiUrl | string | — | Dakera server URL (e.g. http://localhost:3300) | | apiKey | string | "" | Dakera API key | | agentId | string | — | Agent identifier for memory namespacing | | recallK | number | 5 | Number of memories to recall per turn | | minImportance | number | 0 | Minimum importance threshold for recall | | memoryKey | string | "history" | Key injected into the chain prompt | | inputKey | string | first key | Input key used as recall query | | importance | number | 0.7 | Importance score assigned to stored memories |


DakeraVectorStore

Server-side embedded vector store for RAG. Dakera handles embeddings — no local model, no OpenAI embeddings API needed.

import { DakeraVectorStore } from "@dakera-ai/langchain";

const vectorstore = new DakeraVectorStore({
  apiUrl: "http://localhost:3300",
  apiKey: process.env.DAKERA_API_KEY!,
  namespace: "my-docs",
});

// Index documents (server handles embedding)
await vectorstore.addDocuments([
  { pageContent: "Dakera is a persistent memory platform for AI agents.", metadata: { source: "docs" } },
  { pageContent: "It supports Python, JavaScript, Rust, and Go SDKs.", metadata: { source: "docs" } },
]);

// Semantic search
const results = await vectorstore.similaritySearch("What languages are supported?", 4);
console.log(results[0].pageContent);

RAG chain

import { RetrievalQAChain } from "langchain/chains";
import { ChatOpenAI } from "@langchain/openai";
import { DakeraVectorStore } from "@dakera-ai/langchain";

const vectorstore = new DakeraVectorStore({
  apiUrl: "http://localhost:3300",
  apiKey: process.env.DAKERA_API_KEY!,
  namespace: "my-docs",
});

const chain = RetrievalQAChain.fromLLM(
  new ChatOpenAI({ model: "gpt-4o" }),
  vectorstore.asRetriever({ k: 4 }),
);

const { text } = await chain.call({ query: "How does memory decay work?" });
console.log(text);

From texts (LangChain convention)

const store = await DakeraVectorStore.fromTexts(
  ["Document one content", "Document two content"],
  [{ source: "a" }, { source: "b" }],
  null, // embeddings param — unused, Dakera handles server-side embedding
  { apiUrl: "http://localhost:3300", apiKey: "dk-mykey", namespace: "docs" },
);

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiUrl | string | — | Dakera server URL | | apiKey | string | "" | Dakera API key | | namespace | string | — | Vector namespace to read/write | | embeddingModel | string | namespace default | Server-side embedding model override |


Related packages

| Package | Framework | Language | |---------|-----------|----------| | langchain-dakera | LangChain | Python | | crewai-dakera | CrewAI | Python | | llamaindex-dakera | LlamaIndex | Python | | autogen-dakera | AutoGen | Python |


Links


License

MIT © Dakera AI


dakera.ai · Documentation · Request Early Access