Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt

Use this file to discover all available pages before exploring further.

In-memory storage adapter (default, no persistence).

Constructor

constructor(config?: StorageAdapterConfig)

StorageAdapterConfig

interface StorageAdapterConfig {
  namespace?: string;
}
OptionTypeDefaultDescription
namespacestring'default'Namespace (for consistency)

Example

import { VectoriaDB, MemoryStorageAdapter } from 'vectoriadb';

const db = new VectoriaDB({
  storageAdapter: new MemoryStorageAdapter({ namespace: 'tools' }),
});

// Or simply omit storageAdapter - MemoryStorageAdapter is the default
const db = new VectoriaDB();

Behavior

  • No persistence: Data is lost on restart
  • No cache validation: hasValidCache() always returns false
  • Fast: No I/O overhead

Methods

MethodDescription
initialize()No-op
load()Returns stored data or null
save(data)Stores data in memory
hasValidCache(metadata)Always returns false
clear()Clears stored data
close()Clears stored data

Use Cases

  • Development and testing
  • When re-indexing is fast enough
  • Serverless functions with bundled embeddings

FileStorageAdapter

File storage

RedisStorageAdapter

Redis storage

Storage Guide

Memory adapter guide