Skip to content

Database Plugin System - Complete Documentation Index

The Bamboo database plugin system is fully documented with multiple guides for different audiences:

→ Read: DATABASE_PLUGINS_QUICK_REFERENCE.md

  • Quick overview of the plugin system
  • Common usage patterns
  • Basic troubleshooting
  • 5-minute introduction

→ Read: DATABASE_PLUGINS.md

  • Complete architecture explanation
  • Detailed API reference
  • Backend implementation guide
  • Migration guide
  • Advanced topics

→ Read: DATABASE_PLUGINS_EXAMPLES.md

  • Working code examples
  • Testing patterns
  • Custom backend creation (PostgreSQL example)
  • Multi-backend configuration
  • Runtime backend switching

→ Read: DATABASE_PLUGINS_IMPLEMENTATION.md

  • What was implemented
  • File structure
  • Verification results
  • Benefits overview

Use the default backends → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Using Default Backends”

Switch to a different backend → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Switching Backends”

Add a custom backend → See: DATABASE_PLUGINS.md → “Adding a New Backend” → See: DATABASE_PLUGINS_EXAMPLES.md → “Example 3: Creating a Custom Backend”

Test my code without external databases → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Using In-Memory Backend (Testing)” → See: DATABASE_PLUGINS_EXAMPLES.md → “Example 2: Simple Test Using In-Memory Backend”

Check available backends → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “List Available Backends”

Debug backend issues → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Debugging” → See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Common Issues”

Migrate from old code → See: DATABASE_PLUGINS.md → “Migration Guide”

Understand the architecture → See: DATABASE_PLUGINS.md → “Architecture” → See: DATABASE_PLUGINS_IMPLEMENTATION.md → “Architecture Overview”

Run multiple backends → See: DATABASE_PLUGINS_EXAMPLES.md → “Example 4: Multi-Backend Configuration” → See: DATABASE_PLUGINS_EXAMPLES.md → “Example 6: Testing Multiple Backends”


FilePurposeSize
DATABASE_PLUGINS.mdComprehensive technical documentation~393 lines
DATABASE_PLUGINS_QUICK_REFERENCE.mdQuick start and common patterns~250 lines
DATABASE_PLUGINS_EXAMPLES.mdPractical code examples~400 lines
DATABASE_PLUGINS_IMPLEMENTATION.mdImplementation summary~300 lines
FilePurpose
bamboo/database/base.pyAbstract base classes for backends
bamboo/database/factory.pyBackend factory and registry
bamboo/database/backends/neo4j_backend.pyGraph database implementation
bamboo/database/backends/qdrant_backend.pyVector database implementation
bamboo/database/backends/examples/in_memory_backend.pyExample in-memory implementation
FileChanges
bamboo/database/graph_database_client.pyRefactored to use factory pattern
bamboo/database/vector_database_client.pyRefactored to use factory pattern
bamboo/config.pyAdded backend selection config
bamboo/database/__init__.pyUpdated exports

An implementation of a database interface. Examples:

  • Graph database backend for graph databases
  • Vector database backend for vector databases
  • In-Memory for testing

Mechanism for creating backend instances based on configuration.

  • Looks up backend by name
  • Instantiates the class
  • Returns ready-to-use backend

System for registering backends so they can be discovered.

  • Built-in backends auto-register
  • Custom backends can be registered
  • Supports querying available backends

Design pattern that allows:

  • Swapping implementations without code changes
  • Adding new implementations easily
  • Using configuration to select backends

Terminal window
pip install .
GRAPH_DATABASE_BACKEND=neo4j
VECTOR_DATABASE_BACKEND=qdrant
NEO4J_URI=bolt://localhost:7687
QDRANT_URL=http://localhost:6333
from bamboo.database import GraphDatabaseClient
graph_db = GraphDatabaseClient()
await graph_db.connect()
  • Quick intro: DATABASE_PLUGINS_QUICK_REFERENCE.md
  • Full docs: DATABASE_PLUGINS.md
  • Examples: DATABASE_PLUGINS_EXAMPLES.md

  • Neo4j - Production-ready graph database backend
  • In-Memory - Testing/Development
  • Qdrant - Production-ready vector database backend
  • Others can be added following the guide

  1. Read: DATABASE_PLUGINS_QUICK_REFERENCE.md (5 min)
  2. Try: Default backends with your code
  3. Experiment: Switch to in-memory for testing
  1. Read: DATABASE_PLUGINS.md sections 1-3
  2. Try: DATABASE_PLUGINS_EXAMPLES.md Example 1-2
  3. Do: Run tests with in-memory backend
  1. Read: DATABASE_PLUGINS.md completely
  2. Study: DATABASE_PLUGINS_EXAMPLES.md Example 3
  3. Do: Implement your own backend
  4. Contribute: Share with the community

bamboo/database/
├── base.py # Interfaces
├── factory.py # Plugin system
├── graph_database_client.py # Graph DB wrapper
├── vector_database_client.py # Vector DB wrapper
└── backends/
├── neo4j_backend.py # Graph database plugin
├── qdrant_backend.py # Vector database plugin
└── examples/
└── in_memory_backend.py # Example plugin
  • GraphDatabaseBackend - Base class for graph DBs
  • VectorDatabaseBackend - Base class for vector DBs
  • GraphDatabaseClient - Wrapper for graph DB operations
  • VectorDatabaseClient - Wrapper for vector DB operations
  • Factory functions - get_graph_backend(), get_vector_backend()

  • ✅ All files compile without syntax errors
  • ✅ Plugin system initializes successfully
  • ✅ Default backends (graph database + vector database) register properly
  • ✅ Example backend (in-memory) works
  • ✅ Factory pattern correctly delegates
  • ✅ Configuration-based backend selection works
  • ✅ Graceful handling of missing dependencies

→ See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Debugging”

→ See: DATABASE_PLUGINS_QUICK_REFERENCE.md → “Common Issues”

→ See: DATABASE_PLUGINS_EXAMPLES.md → “Example 3”

→ Set: GRAPH_DATABASE_BACKEND=in_memory

→ See: DATABASE_PLUGINS.md → “Adding a New Backend”


ResourceContent
DATABASE_PLUGINS_QUICK_REFERENCE.mdFAQ and troubleshooting
DATABASE_PLUGINS.mdComplete technical reference
DATABASE_PLUGINS_EXAMPLES.mdWorking code samples
Inline code commentsImplementation details

  • Use in-memory backend for fast testing
  • No external database setup needed
  • Quick iteration
  • Use in-memory backend for unit tests
  • Test multiple backends easily
  • Consistent test environment
  • Use graph database + vector database backends (or other backends)
  • Easy switching between providers
  • Clear backend selection via config
  • Switch database implementations gradually
  • Test new backends before deploying
  • Rollback easily if needed

  1. PostgreSQL + pgvector backend
  2. MongoDB backend
  3. Elasticsearch backend
  4. Cloud database backends (AWS, Azure, GCP)
  5. In-memory vector search backend

See: DATABASE_PLUGINS.md → “Adding a New Backend”


These documents are:

  • ✅ Current as of February 2026
  • ✅ Aligned with the implementation
  • ✅ Tested and verified
  • ✅ Ready for production use

For updates or corrections, refer to the implementation files and existing tests.


Start your journey: Read DATABASE_PLUGINS_QUICK_REFERENCE.md →