> ## 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.

# API Reference Overview

> Complete API reference for VectoriaDB

Welcome to the VectoriaDB API reference. This section documents all public classes, methods, interfaces, and error types.

## Main Classes

<CardGroup cols={2}>
  <Card title="VectoriaDB" icon="database" href="/vectoriadb/api-reference/vectoriadb/constructor">
    The main vector database class for semantic search
  </Card>

  <Card title="TFIDFVectoria" icon="text" href="/vectoriadb/api-reference/tfidf-vectoria/constructor">
    Zero-dependency TF-IDF variant for keyword search
  </Card>
</CardGroup>

## Storage Adapters

<CardGroup cols={3}>
  <Card title="FileStorageAdapter" icon="file" href="/vectoriadb/api-reference/storage-adapters/file-adapter">
    Persist to local disk
  </Card>

  <Card title="RedisStorageAdapter" icon="database" href="/vectoriadb/api-reference/storage-adapters/redis-adapter">
    Distributed Redis cache
  </Card>

  <Card title="MemoryStorageAdapter" icon="memory" href="/vectoriadb/api-reference/storage-adapters/memory-adapter">
    In-memory (default)
  </Card>
</CardGroup>

## Interfaces

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/vectoriadb/api-reference/interfaces/config">
    VectoriaConfig and related options
  </Card>

  <Card title="Documents" icon="file-lines" href="/vectoriadb/api-reference/interfaces/documents">
    DocumentMetadata and DocumentEmbedding
  </Card>

  <Card title="Search" icon="magnifying-glass" href="/vectoriadb/api-reference/interfaces/search">
    SearchOptions and SearchResult
  </Card>

  <Card title="Storage" icon="floppy-disk" href="/vectoriadb/api-reference/interfaces/storage">
    Storage adapter interfaces
  </Card>
</CardGroup>

## Error Classes

<Card title="Error Reference" icon="triangle-exclamation" href="/vectoriadb/api-reference/errors">
  All VectoriaDB error types with codes and handling examples
</Card>

## Quick Reference

### VectoriaDB Methods

| Method             | Description                        |
| ------------------ | ---------------------------------- |
| `initialize()`     | Initialize database and load cache |
| `add()`            | Add a single document              |
| `addMany()`        | Add multiple documents             |
| `search()`         | Semantic search                    |
| `get()`            | Get document by ID                 |
| `has()`            | Check if document exists           |
| `update()`         | Update document                    |
| `updateMetadata()` | Update metadata only               |
| `remove()`         | Remove document                    |
| `removeMany()`     | Remove multiple documents          |
| `clear()`          | Clear all documents                |
| `size()`           | Get document count                 |
| `getStats()`       | Get database statistics            |
| `saveToStorage()`  | Persist to storage                 |
| `clearStorage()`   | Clear storage cache                |

### Imports

```ts theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import {
  // Main classes
  VectoriaDB,
  TFIDFVectoria,

  // Storage adapters
  FileStorageAdapter,
  RedisStorageAdapter,
  MemoryStorageAdapter,

  // Utilities
  SerializationUtils,

  // Interfaces
  VectoriaConfig,
  DocumentMetadata,
  SearchOptions,
  SearchResult,

  // Errors
  VectoriaError,
  VectoriaNotInitializedError,
  DocumentValidationError,
  DocumentNotFoundError,
  DocumentExistsError,
  QueryValidationError,
  StorageError,
  ConfigurationError,
} from 'vectoriadb';
```
