Knowledge graph + vector search + SQL analytics in SQLite
Project description
ChimeraDB
Semantic search + graph queries + SQL analytics. All in one SQLite file.
The only database that combines vector embeddings, Cypher graph patterns, and full SQL for LLM apps. No separate vector DB, no separate graph DB, no infrastructure.
Quick Start
pip install chimeradb
from chimeradb import KnowledgeGraph
kg = KnowledgeGraph("my.db") # Auto-embeddings enabled
# 1. Vector embeddings - semantic search
kg.cypher("CREATE (p:Person {name: 'Alice', bio: 'ML engineer building LLM agents'})")
kg.cypher("CREATE (p:Person {name: 'Bob', bio: 'AI researcher focused on NLP'})")
results = kg.search("who works on language models?", top_k=2)
# Finds both Alice and Bob even though query doesn't match exactly
# 2. Cypher - graph relationships
kg.cypher("CREATE (alice:Person {name: 'Alice'})")
kg.cypher("CREATE (bob:Person {name: 'Bob'})")
kg.cypher("CREATE (acme:Company {name: 'Acme AI'})")
kg.cypher("MATCH (alice:Person {name: 'Alice'}), (acme:Company) CREATE (alice)-[:WORKS_AT]->(acme)")
# Simple pattern matching - no messy SQL joins
colleagues = kg.cypher("MATCH (p:Person)-[:WORKS_AT]->(:Company)<-[:WORKS_AT]-(colleague) RETURN colleague")
# 3. SQL - analytics and aggregation
stats = kg.query("""
SELECT
json_extract(properties, '$.name') as company,
COUNT(*) as employee_count
FROM graph_nodes
WHERE labels LIKE '%Company%'
GROUP BY company
""")
# The power: combine all three in one query!
Why ChimeraDB?
Three powerful tools, one simple database:
- Vector embeddings - Search by meaning, not keywords. Find "machine learning expert" when the text says "AI researcher"
- Cypher graph queries - Express relationships naturally:
MATCH (person)-[:WORKS_AT]->(company)beats complex SQL joins - Full SQL analytics - Aggregate, filter, join with the full power of SQLite when you need it
The combination is the killer feature:
- RAG systems: Semantic search + relationship context
- AI agents: Graph traversal + analytical reasoning
- Recommendations: Similarity search + collaborative filtering
Zero infrastructure:
- One SQLite file
- Runs anywhere (laptop, server, edge device)
- Works with any language (Python, Node.js, Go, Rust...)
Installation
Python Package
pip install chimeradb
Platform Support:
- ✅ macOS (Intel x86_64 & Apple Silicon ARM64)
- ✅ Linux (x86_64 only)
- ❌ Linux ARM64: Not supported yet. Build extensions from source: sqlite-graph and sqlite-vector
- ⚠️ Windows: Not tested. Use WSL (x86_64) or build extensions manually from source.
Or from source:
git clone https://github.com/codimusmaximus/chimeradb.git
cd chimeradb
./setup.sh && source .venv/bin/activate
SQL Only (Any Language)
# macOS ARM64
mkdir -p extensions
curl -L https://github.com/agentflare-ai/sqlite-graph/releases/latest/download/libgraph.dylib -o extensions/libgraph.dylib
curl -L https://github.com/sqliteai/sqlite-vector/releases/latest/download/vector-macos-arm64.dylib -o extensions/vector.dylib
Then load in any SQLite client:
.load extensions/libgraph
.load extensions/vector
Use from Python, Node.js, Go, Rust, Java, C++, or any language with SQLite support.
Python API
from chimeradb import KnowledgeGraph
# Create database
kg = KnowledgeGraph("my_graph.db") # Or ":memory:"
# Optional: disable embeddings or use different model
# kg = KnowledgeGraph("my.db", embedding_model=None)
# kg = KnowledgeGraph("my.db", embedding_model="text-embedding-3-small")
# Add nodes
kg.add_entity(
entity_id="person1",
labels=["Person"],
properties={"name": "Alice", "bio": "AI researcher"},
embed_field="bio"
)
# Add relationships
kg.add_relationship(
from_id="person1",
to_id="company1",
relation_type="WORKS_AT",
properties={"since": 2020}
)
# Semantic search
results = kg.search("machine learning expert", top_k=10)
# Graph traversal
network = kg.traverse("person1", direction="outgoing", max_depth=3)
# SQL queries
data = kg.query("""
SELECT json_extract(properties, '$.name') as name
FROM graph_nodes
WHERE json_extract(properties, '$.role') = 'Engineer'
""")
kg.close()
Examples
- 00_sql_only.sql: Pure SQL usage (no Python)
- 01_getting_started.py: Python API basics
- 02_basic.py: Semantic search + graph traversal + SQL analytics
- 03_advanced.py: Research paper recommendations with graph analysis
Requirements
- Python 3.8+
- macOS (ARM64 or Intel) - Linux and Windows coming soon
sentence-transformers(auto-installed by setup.sh)
Documentation
Tech Stack
Built on:
- SQLite - World's most deployed database
- sqlite-vector - Vector similarity search
- sqlite-graph - Cypher queries
License
MIT - see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chimeradb-0.1.2.tar.gz.
File metadata
- Download URL: chimeradb-0.1.2.tar.gz
- Upload date:
- Size: 600.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d912d62b5da1b1ebbdab99914d0cec3b31261fd12546e38110f43d2d675660bc
|
|
| MD5 |
485fc79d9f053f68025332834e6392bb
|
|
| BLAKE2b-256 |
a06f8b885766ed9730418141111e2fc6edf35ad61972382db88c2f9de076ce89
|
File details
Details for the file chimeradb-0.1.2-py3-none-any.whl.
File metadata
- Download URL: chimeradb-0.1.2-py3-none-any.whl
- Upload date:
- Size: 601.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7ecf2638d605fd180ab680c6abec9de3a50111881d2d0963b938c2804b492ac
|
|
| MD5 |
b2b6b45e5b7e179bd96f3b2c5ae3ac5b
|
|
| BLAKE2b-256 |
545c448ac69d70844f793807ef2a77a4df6a78fc811a3bddb08f61a2d9e47f60
|