Skip to main content

What Are Storages in CAMEL-AI?

The Storage module in CAMEL-AI gives you a unified interface for saving, searching, and managing your data from simple key-value records to high-performance vector databases and modern graph engines. It’s your plug-and-play toolkit for building robust, AI-ready storage layers.

Types of Storages

BaseKeyValueStorage
  • Abstract base for all key-value storage backends.
  • Standardizes: Save, load, clear operations.
  • Interface: Python dicts.
  • Use cases:
    • JSON file storage
    • NoSQL (MongoDB, Redis)
    • In-memory caches
InMemoryKeyValueStorage
  • Fast, simple, not persistent (resets on restart)
  • Ideal for caching, development, or quick prototyping
JsonStorage
  • Human-readable, portable JSON file storage
  • Supports custom JSON encoder (for Enums, etc)
  • Good for configs, small persistent datasets, export/import flows
BaseVectorStorage
  • Abstract base for vector database backends
  • Core operations: Add/query/delete vectors, check DB status
  • Customizable: Vector dimensions, collections, distance metrics
MilvusStorage
  • For Milvus (cloud-native vector search engine)
  • High scalability, real-time search
TiDBStorage
  • For TiDB (hybrid vector/relational database)
  • Handles embeddings, knowledge graphs, ops data
QdrantStorage
  • For Qdrant (open-source vector DB)
  • Fast similarity search for AI/ML
OceanBaseStorage
  • For OceanBase (cloud and on-prem vector DB)
  • Supports large-scale, distributed deployments
WeaviateStorage
  • For Weaviate (open-source vector engine)
  • Schema-based, semantic search, hybrid queries
ChromaStorage
  • For ChromaDB (AI-native open-source embedding database)
  • Simple API, scales from notebook to production
SurrealStorage
  • For SurrealDB (scalable, distributed database with WebSocket support)
  • Efficient vector storage and similarity search with real-time updates
PgVectorStorage
BaseGraphStorage
  • Abstract base for graph database integrations
  • Supports:
    • Schema queries and refresh
    • Adding/deleting/querying triplets
NebulaGraph
  • For NebulaGraph (distributed, high-performance graph DB)
  • Scalable, open source
Neo4jGraph
  • For Neo4jGraph (most popular enterprise graph DB)
  • Widely used for graph analytics, recommendations

Get Started

Here are practical usage patterns for each storage type—pick the ones you need and mix them as you like.

In-Memory Key-Value Storage

Use for: Fast, temporary storage. Data is lost when your program exits. Perfect for: Prototyping, testing, in-memory caching.

JSON File Storage

Use for: Persistent, human-readable storage on disk. Perfect for: Logs, local settings, configs, or sharing small data sets.

Milvus Vector Storage

Use for: Scalable, high-performance vector search (RAG, embeddings). Perfect for: Semantic search and production AI retrieval.

TiDB Vector Storage

Use for: Hybrid cloud-native storage, vectors + SQL in one. Perfect for: Combining AI retrieval with your business database.

Qdrant Vector Storage

Use for: Fast, scalable open-source vector search. Perfect for: RAG, document search, and high-scale retrieval tasks.

ChromaDB Vector Storage

Use for: Fastest way to build LLM apps with memory and embeddings. Perfect for: From prototyping in notebooks to production clusters with the same simple API.

SurrealDB Vector Storage

Use for: Scalable, distributed vector storage with WebSocket support. Perfect for: Real-time vector search with distributed deployments and SQL-like querying.

OceanBase Vector Storage

Use for: Massive vector storage with advanced analytics. Perfect for: Batch operations, cloud or on-prem setups, and high-throughput search.

Weaviate Vector Storage

Use for: Vector search with hybrid (vector + keyword) capabilities. Perfect for: Document retrieval and multimodal AI apps.

NebulaGraph Storage

Use for: Open-source, distributed graph storage and querying. Perfect for: Knowledge graphs, relationships, and fast distributed queries.

Neo4j Graph Storage

Use for: Industry-standard graph database for large-scale relationships. Perfect for: Enterprise graph workloads, Cypher queries, analytics.

PgVectorStorage Vector Storage

Use for: Storing and querying vectors in PostgreSQL. Perfect for: Leveraging an existing PostgreSQL database for vector search.