@smartpointstech/spt-sptdb-onnx
SPT SptDB with optimized ONNX embeddings - 100% local, GPU-accelerated AI agent memory
Overview
This package provides a high-performance AI agent memory system that combines ONNX Runtime for local embedding generation with SPT's vector storage via sptflo-memory. It supports GPU acceleration, batch embedding, and includes ReflexionMemory and ReasoningBank for agent learning workflows. A CLI is included for database management.
Installation
bash
npm install @smartpointstech/spt-sptdb-onnxKey Features
- Local ONNX Embeddings -- generates embeddings on-device using models like all-MiniLM-L6-v2
- GPU Acceleration -- optional GPU-backed inference via ONNX Runtime
- ReflexionMemory -- episodic memory with critique, reward, and success tracking
- ReasoningBank Integration -- pattern storage via sptflo-memory
- CLI Tool --
spt-sptdb-onnxcommand for database operations and benchmarks
Dependencies
Key internal dependencies:
@smartpointstech/sptflo-memory-- database creation, ReasoningBank, ReflexionMemoryonnxruntime-node-- ONNX Runtime for local model inference@xenova/transformers-- transformer model loading and tokenization
Quick Start
typescript
import { createONNXSptDB, ONNXEmbeddingService } from '@smartpointstech/spt-sptdb-onnx';
const sptDB = await createONNXSptDB({
dbPath: './agent-memory.db',
modelName: 'Xenova/all-MiniLM-L6-v2',
useGPU: true,
});API Reference
Exports
| Export | Type | Description |
|---|---|---|
createONNXSptDB | function | Create an SptDB instance with ONNX embeddings |
ONNXEmbeddingService | class | ONNX-powered embedding generation service |
ONNXConfig | type | Configuration for model, GPU, batch size, cache |
EmbeddingResult | type | Single embedding result |
BatchEmbeddingResult | type | Batch embedding result |