convez.ai
MCP ServerIntegração & APIsIntermediário
Dakera-AI

Dakera JS — SDK de Memória para Agentes IA

Dakera-AI/dakera-js

Motor de memória para agentes IA com busca híbrida e grafos de conhecimento

Ver no GitHub
BomPluginScore · de 0 a 100

SDK TypeScript/JavaScript para Dakera AI, um motor de memória auto-hospedado para agentes IA com busca vetorial, BM25, híbrida e knowledge graphs. Oferece armazenamento persistente, embeddings built-in e suporte cross-platform (Node, Deno, Bun, Workers, browsers).

Instalação

$npx convez-ai Dakera-AI/dakera-js

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
87%
Último commit
há 2 semanas
Versão
v0.12.3
Issues abertas
6
Contribuidores
3

Casos de uso

  • Construir agentes IA com memória persistente e contextual
  • Implementar busca semântica e híbrida em aplicações inteligentes
  • Gerenciar sessões e histórico de conversas com knowledge graphs

Veredito

Solução robusta e production-ready para memória de agentes IA com ótima acurácia (88.2% LoCoMo) e deployment simplificado. Ideal para quem precisa ir além de RAG convencional com grafos de conhecimento e busca híbrida eficiente.

README

A tradução para o português deste README ainda está na fila.


Why Dakera?

DakeraOthers
LoCoMo accuracy88.2% (1,540 Q standard eval)60–92%
DeploymentSingle binary, Docker one-linerExternal vector DB + embedding service required
EmbeddingsBuilt-in — no OpenAI key neededRequires external embedding API
Search modesVector · BM25 · Hybrid · Knowledge GraphUsually one or two
BundleESM + CJS, browser-compatibleOften Node-only

→ Full benchmark results · dakera.ai


Run Dakera

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

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

For persistent storage with 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

Full deployment guide (Docker Compose, Kubernetes, Helm): dakera-deploy


Install

npm install @dakera-ai/dakera

Works with Node.js (20+), Deno, Bun, Cloudflare Workers, and modern browsers. Ships ESM + CJS with full TypeScript declarations.


Quick Start

import { DakeraClient } from '@dakera-ai/dakera';
const client = new DakeraClient({ baseUrl: 'http://localhost:3000', apiKey: 'dk-mykey' });
await client.storeMemory('my-agent', { content: 'User prefers brevity', importance: 0.9 });

Full example — store, recall, upsert, and hybrid search:

import { DakeraClient } from '@dakera-ai/dakera';

const client = new DakeraClient({
  baseUrl: 'http://localhost:3000',
  apiKey: 'dk-mykey',
});

// Store an agent memory
await client.storeMemory('my-agent', {
  content: 'User prefers concise responses with code examples',
  importance: 0.9,
  memory_type: 'semantic',
});

// Recall memories (semantic search)
const response = await client.recall('my-agent', 'what does the user prefer?', {
  top_k: 5,
});
for (const m of response.memories) {
  console.log(`[${m.score?.toFixed(2)}] ${m.content}`);
}

// Upsert vectors
await client.upsert('my-namespace', [
  { id: 'vec1', values: [0.1, 0.2, 0.3], metadata: { category: 'docs' } },
]);

// Hybrid search (vector + BM25)
const results = await client.hybridSearch('my-namespace', 'completed task', { topK: 5, vectorWeight: 0.7 });
for (const r of results) {
  console.log(r.id, r.score);
}

SSE Streaming

// Subscribe to real-time memory events
const stream = client.subscribeMemoryEvents('my-agent');
for await (const event of stream) {
  console.log(event.type, event.memory_id);
}

Features

  • Agent Memory — store, recall, search, and forget memories with importance scoring
  • Sessions — group memories by conversation with auto-consolidation on session end
  • Knowledge Graph — traverse memory relationships, find paths, export graphs
  • Vector Search — ANN queries with metadata filters and batch operations
  • Full-Text Search — BM25 ranking with stemming and stop-word filtering
  • Hybrid Search — combine vector similarity with keyword matching
  • Text Auto-Embedding — server-side embedding generation (no local model needed)
  • Namespaces — isolated vector stores per project, tenant, or use case
  • Feedback Loop — upvote/downvote/flag memories to improve recall quality
  • T-I-F Reliability — TifScore type and evaluateTif() for Truth-Indeterminacy-Falsity scoring of memory reliability
  • Entity Extraction — GLiNER NER for automatic entity detection
  • SSE Streaming — async generator event subscriptions, browser-compatible
  • Branded Types — VectorId, AgentId, MemoryId, SessionId for compile-time safety
  • ESM + CJS — dual bundle output, works in Node.js and browsers
  • Retry & Rate Limiting — built-in exponential backoff and rate-limit header tracking
  • Zero Runtime Deps — uses native fetch, no external HTTP libraries

Connect to Dakera

import { DakeraClient } from '@dakera-ai/dakera';

// Self-hosted
const client = new DakeraClient({
  baseUrl: 'http://your-server:3000',
  apiKey: 'your-key',
});

// Cloud (early access)
const client = new DakeraClient({
  baseUrl: 'http://<your-server-ip>:3000',
  apiKey: 'your-key',
});

// With custom retry config
const client = new DakeraClient({
  baseUrl: 'http://localhost:3000',
  apiKey: 'your-key',
  retryBackoff: { maxRetries: 5, baseDelayMs: 200, maxDelayMs: 10000 },
});

Examples

See the examples/ directory:

  • basic.ts — vectors, namespaces, queries, filters, batch operations
  • memory.ts — store/recall memories, sessions, agent stats
  • advanced.ts — text embedding, full-text, hybrid search, knowledge graph, feedback

Run examples with:

npx tsx examples/basic.ts

Resources

DocumentationFull API reference and guides
TypeScript SDK docsTypeScript-specific reference
BenchmarkLoCoMo evaluation results
dakera.aiWebsite and early access
GitHub OrgAll public repos
dakera-deploySelf-hosting guide

Other SDKs

SDKPackage
dakera-pydakera (PyPI)
dakera-rsdakera-client (crates.io)
dakera-gogithub.com/dakera-ai/dakera-go
dakera-cliCLI tool
dakera-mcpMCP server for Claude/Cursor

Ver o original no GitHub

Bom para

Relacionados