Wire-Compatible, AI-Native, Open Source
MongoDB pioneered the document database, but its October 2018 relicensing to SSPL sent the ecosystem searching for alternatives. AWS built DocumentDB (proprietary, cloud-only). FerretDB built a protocol translator (open source, but AI-free). HeliosDB takes a different approach: wire-compatible MongoDB protocol, AI-native capabilities, full SQL engine, and Apache-2.0 license --- all in a single 60MB binary. Your mongosh connects unchanged. Your drivers work unchanged. But now you also get native vector search, natural language queries, intelligent indexing, and 13 other protocol adapters.
| Feature | MongoDB 7 | HeliosDB |
|---|---|---|
| License | SSPL (restrictive) | Apache-2.0 (permissive) |
| Wire protocol | Native OP_MSG | OP_MSG + OP_QUERY (wire-compatible) |
| Aggregation stages | 35+ | 50+ (including $facet, $graphLookup, $setWindowFields) |
| ACID transactions | Multi-document | Multi-document with MVCC |
| Vector search | Atlas-only ($vectorSearch) | Native HNSW + Product Quantization (self-hosted) |
| NL queries | Not available | Built-in natural language to query translation |
| Intelligent indexing | Atlas Performance Advisor (paid) | ML-driven auto-recommendation (built-in) |
| Schema optimization | Manual validation rules | AI-powered schema analysis |
| Change streams | Yes | Yes (with CDC adapter) |
| GridFS | Yes | Yes |
| Authentication | SCRAM-SHA-256 / x.509 | SCRAM-SHA-256 |
| SQL access | Not available | Same data via PostgreSQL wire protocol |
| Full-text search | $text / Atlas Search | Native @@ operator with boolean, phrase, fuzzy |
| Time-travel queries | Not available | MVCC snapshots at any timestamp |
| Data branching | Not available | Git-like branching with merge |
| Encryption at rest | Encrypted Storage Engine (Enterprise) | TDE (AES-256-GCM) + Zero-Knowledge |
| Deployment | mongod + mongos + config servers | Single 60MB binary |
| Minimum HA | 3 nodes (replica set) | 2 nodes (primary + replica) |
| Other protocols | MongoDB only | 14 protocols (PG, MySQL, Redis, Cassandra, etc.) |
| Anomaly detection | Atlas alerts (threshold) | Built-in AI.ANOMALY (z-score + ML models) |
| Production cost | Atlas M30: $370/month | $0 self-hosted / $5K-20K managed |
FerretDB proved that translating MongoDB wire protocol to an underlying SQL engine is viable. HeliosDB takes that idea and adds everything FerretDB left out: AI, performance, and a complete feature set.
FerretDB Architecture:
+------------------+ +------------------+
| MongoDB Client |---->| FerretDB |---> PostgreSQL / SQLite
| (mongosh, etc.) | | (protocol proxy) | (external dependency)
+------------------+ +------------------+
No vector search. No AI. No change streams.
Limited aggregation. External DB required.
HeliosDB Architecture:
+------------------+ +---------------------------------------------+
| MongoDB Client |---->| HeliosDB Full |
| (mongosh, etc.) | | |
+------------------+ | MongoDB Protocol Adapter (12,366 LOC) |
| 50+ aggregation stages |
| SCRAM-SHA-256 auth |
| Change streams + GridFS |
| MongoDB -> SQL query translator |
| |
| AI Engine |
| HNSW vector search + PQ |
| NL2SQL translation |
| Intelligent indexing |
| Anomaly detection |
| |
| SQL Core Engine |
| Cost-based optimizer |
| MVCC + ACID transactions |
| LSM storage (no external DB) |
| Vectorized execution |
+---------------------------------------------+
Everything in one binary. No external dependencies.
| Capability | FerretDB | HeliosDB |
|---|---|---|
| Approach | Protocol translator (proxy to external DB) | Protocol translator + full AI database engine |
| External database required | Yes (PostgreSQL or SQLite) | No (built-in LSM storage) |
| Aggregation stages | ~10 basic stages | 50+ stages |
| Change streams | Not available | Yes (with CDC adapter) |
| GridFS | Partial | Full implementation |
| Vector search | Not available | Native HNSW + Product Quantization |
| NL queries | Not available | Built-in NL2SQL |
| Intelligent indexing | Manual PostgreSQL indexes | ML-driven auto-recommendation |
| Multi-protocol | MongoDB only | 14 protocols simultaneously |
HeliosDB is not just a MongoDB-compatible database. It is an AI-native data platform that happens to speak MongoDB protocol. Every AI feature works with data stored via MongoDB drivers.
MongoDB Atlas offers vector search only in the cloud, only with Atlas Search, and with limited integration into the standard aggregation pipeline. HeliosDB provides native HNSW vector indexes with Product Quantization, available self-hosted, and fully integrated with every query path.
// MongoDB Atlas: $vectorSearch (cloud-only, requires Atlas)
db.products.aggregate([
{
$vectorSearch: {
index: "vector_index",
path: "embedding",
queryVector: [0.12, -0.45, 0.89, /* ... */],
numCandidates: 100,
limit: 10
}
},
{ $project: { name: 1, score: { $meta: "vectorSearchScore" } } }
]);
// HeliosDB: same syntax, self-hosted, with SQL hybrid queries
db.products.aggregate([
{
$vectorSearch: {
index: "vector_index",
path: "embedding",
queryVector: [0.12, -0.45, 0.89, /* ... */],
numCandidates: 100,
limit: 10
}
},
{ $match: { category: "electronics", price: { $lt: 500 } } },
{ $project: { name: 1, price: 1, score: { $meta: "vectorSearchScore" } } }
]);
-- Or query the same data via PostgreSQL protocol with SQL
SELECT name, price,
embedding <-> '[0.12, -0.45, 0.89, ...]'::vector(384) AS distance
FROM products
WHERE category = 'electronics' AND price < 500
ORDER BY embedding <-> '[0.12, -0.45, 0.89, ...]'::vector(384)
LIMIT 10;
Non-technical users can query HeliosDB in plain English. The NL2SQL engine translates natural language into optimized MongoDB queries or SQL, depending on the protocol in use.
// HeliosDB NL query via MongoDB protocol
db.runCommand({
nlQuery: "Find the top 5 customers who spent the most last month"
});
// Translates to:
// db.orders.aggregate([
// { $match: { date: { $gte: ISODate("2026-02-01"), $lt: ISODate("2026-03-01") } } },
// { $group: { _id: "$customer_id", total: { $sum: "$amount" } } },
// { $sort: { total: -1 } },
// { $limit: 5 },
// { $lookup: { from: "customers", localField: "_id", foreignField: "_id", as: "customer" } },
// { $unwind: "$customer" },
// { $project: { name: "$customer.name", total: 1 } }
// ])
MongoDB Atlas Performance Advisor requires a paid Atlas tier and provides suggestions you must manually apply. HeliosDB's ML-based indexing engine analyzes query patterns in real time and can automatically create, modify, or drop indexes based on actual workload.
// MongoDB Atlas: manual index management
db.orders.createIndex({ customer_id: 1, date: -1 });
// Hope you guessed right. Check Atlas Performance Advisor in a week.
// HeliosDB: AI-driven index recommendations
db.runCommand({ analyzeIndexes: "orders" });
// Returns:
// {
// "recommendations": [
// { "action": "create", "index": { "customer_id": 1, "date": -1 },
// "reason": "Covers 78% of queries, estimated 4.2x speedup" },
// { "action": "drop", "index": { "status": 1 },
// "reason": "Used by <0.1% of queries, wastes 2.3GB" }
// ]
// }
// HeliosDB: AI-powered schema analysis
db.runCommand({ analyzeSchema: "users" });
// Returns:
// {
// "suggestions": [
// { "field": "address", "issue": "Nested object queried in 45% of reads",
// "suggestion": "Flatten to top-level fields for 3x query improvement" },
// { "field": "tags", "issue": "Array with avg 47 elements",
// "suggestion": "Consider separate collection with $lookup" },
// { "field": "last_login", "issue": "95% of values are timestamps",
// "suggestion": "Add TTL index, enable time-series optimization" }
// ]
// }
HeliosDB implements over 50 aggregation pipeline stages, exceeding MongoDB's own count. The MongoDB-to-SQL translator converts pipelines into optimized SQL with CTEs and window functions, leveraging HeliosDB's cost-based query optimizer for execution plans that MongoDB's B-tree engine cannot match on analytical workloads.
| Stage | MongoDB 7 | HeliosDB | FerretDB |
|---|---|---|---|
| $match | Yes | Yes | Yes |
| $group | Yes | Yes | Yes |
| $sort | Yes | Yes | Yes |
| $project / $addFields | Yes | Yes | Yes |
| $unwind | Yes | Yes | Yes |
| $lookup (joins) | Yes | Yes | Partial |
| $facet | Yes | Yes | No |
| $graphLookup | Yes | Yes | No |
| $setWindowFields | Yes | Yes | No |
| $bucket / $bucketAuto | Yes | Yes | No |
| $merge / $out | Yes | Yes | Partial |
| $unionWith | Yes | Yes | No |
| $replaceRoot / $replaceWith | Yes | Yes | No |
| $redact | Yes | Yes | No |
| $sample | Yes | Yes | No |
| $count | Yes | Yes | No |
| $densify | Yes | Yes | No |
| $fill | Yes | Yes | No |
| $vectorSearch | Atlas-only | Yes (self-hosted) | No |
| Total stages | ~35 | 50+ | ~10 |
# Connect to HeliosDB exactly like MongoDB
mongosh "mongodb://admin:password@heliosdb-host:27017/mydb"
# All standard commands work
mydb> db.users.insertMany([
{ name: "Alice", age: 30, dept: "Engineering", tags: ["admin", "dev"] },
{ name: "Bob", age: 25, dept: "Marketing", tags: ["viewer"] },
{ name: "Carol", age: 35, dept: "Engineering", tags: ["admin"] }
])
mydb> db.users.find({ dept: "Engineering" }).sort({ age: -1 })
[
{ _id: ObjectId("..."), name: "Carol", age: 35, dept: "Engineering", tags: ["admin"] },
{ _id: ObjectId("..."), name: "Alice", age: 30, dept: "Engineering", tags: ["admin", "dev"] }
]
// Complex aggregation: multi-stage pipeline with $facet
db.orders.aggregate([
{ $match: { date: { $gte: ISODate("2026-01-01") } } },
{
$facet: {
byDepartment: [
{ $group: { _id: "$department", revenue: { $sum: "$total" } } },
{ $sort: { revenue: -1 } }
],
byMonth: [
{ $group: {
_id: { $dateToString: { format: "%Y-%m", date: "$date" } },
orders: { $sum: 1 },
revenue: { $sum: "$total" }
}},
{ $sort: { "_id": 1 } }
],
topCustomers: [
{ $group: { _id: "$customer_id", spent: { $sum: "$total" } } },
{ $sort: { spent: -1 } },
{ $limit: 10 },
{ $lookup: {
from: "customers",
localField: "_id",
foreignField: "_id",
as: "customer"
}},
{ $unwind: "$customer" },
{ $project: { name: "$customer.name", spent: 1 } }
]
}
}
]);
// Store documents with embeddings via MongoDB protocol
db.knowledge_base.insertOne({
title: "HeliosDB Architecture Guide",
content: "HeliosDB uses an LSM-tree storage engine with MVCC...",
embedding: [0.12, -0.33, 0.78, /* 384 dimensions */],
metadata: { category: "docs", version: 3 }
});
// RAG retrieval: vector search + metadata filter
db.knowledge_base.aggregate([
{
$vectorSearch: {
index: "embedding_index",
path: "embedding",
queryVector: [0.11, -0.32, 0.79, /* query embedding */],
numCandidates: 100,
limit: 5,
filter: { "metadata.category": "docs" }
}
},
{ $project: {
title: 1,
content: 1,
score: { $meta: "vectorSearchScore" }
}}
]);
// Same data accessible via PostgreSQL for SQL analytics
// psql: SELECT title, content, embedding <-> $1 AS dist
// FROM knowledge_base WHERE category = 'docs'
// ORDER BY embedding <-> $1 LIMIT 5;
// ACID transactions work exactly like MongoDB
const session = client.startSession();
session.startTransaction();
try {
const accounts = db.collection("accounts");
// Transfer $500 from Alice to Bob
await accounts.updateOne(
{ name: "Alice" },
{ $inc: { balance: -500 } },
{ session }
);
await accounts.updateOne(
{ name: "Bob" },
{ $inc: { balance: 500 } },
{ session }
);
// Record the transfer
await db.collection("transfers").insertOne(
{ from: "Alice", to: "Bob", amount: 500, date: new Date() },
{ session }
);
await session.commitTransaction();
} catch (error) {
await session.abortTransaction();
} finally {
session.endSession();
}
// Before (MongoDB)
const uri = "mongodb://user:pass@mongodb-host:27017/mydb";
// After (HeliosDB) -- change the host, everything else stays the same
const uri = "mongodb://user:pass@heliosdb-host:27017/mydb";
# Option A: mongodump/mongorestore (standard MongoDB tools)
mongodump --uri="mongodb://mongodb-host:27017/mydb" --out=/tmp/dump
mongorestore --uri="mongodb://heliosdb-host:27017/mydb" /tmp/dump
# Option B: Live migration with change streams
# Start syncing from MongoDB to HeliosDB, then cut over
# Verify with mongosh
mongosh "mongodb://heliosdb-host:27017/mydb"
mydb> db.users.countDocuments()
42517
mydb> db.users.find({ status: "active" }).limit(5)
# Same results as MongoDB
mydb> db.orders.aggregate([
{ $group: { _id: "$status", count: { $sum: 1 } } }
])
# Same aggregation results
// Now add capabilities that MongoDB doesn't have
// Create vector index for semantic search
db.products.createIndex(
{ embedding: "vectorSearch" },
{ hnsw: { m: 16, efConstruction: 200 } }
);
// Use natural language queries
db.runCommand({ nlQuery: "Show me this week's top sellers" });
// Enable intelligent index recommendations
db.runCommand({ analyzeIndexes: "orders" });
// Access the same data via SQL
// psql -h heliosdb-host -p 5432 -d mydb
// SELECT * FROM orders WHERE total > 1000 ORDER BY date DESC;
| Tier | MongoDB Atlas | HeliosDB |
|---|---|---|
| Free tier | M0: 512MB, shared, no vector search | Unlimited (Apache-2.0, all features) |
| Development | M10: $57/month ($684/yr) | $0 (self-hosted) |
| Production | M30: $370/month ($4,440/yr) | $0 (self-hosted) |
| Production + Vectors | M30 + Atlas Search: ~$500/month | $0 (vectors included) |
| Enterprise | M50+: $1,000+/month | $0 (self-hosted) |
| Managed service | Atlas metered pricing | $5,000-$20,000/year (predictable) |
| Support | $15,000+/year (Enterprise) | Included in managed tier |
| Dimension | MongoDB 7 | FerretDB | HeliosDB |
|---|---|---|---|
| License | SSPL | Apache-2.0 | Apache-2.0 |
| Wire compatibility | Native | Yes (proxy) | Yes (built-in adapter) |
| Aggregation | 35+ stages | ~10 stages | 50+ stages |
| Vector search | Atlas-only (cloud) | No | Native HNSW + PQ (self-hosted) |
| NL queries | No | No | Built-in NL2SQL |
| Intelligent indexing | Atlas Advisor (paid) | No | ML-driven, built-in |
| SQL access | No | Backend-dependent | Yes (14 protocols) |
| Change streams | Yes | No | Yes + CDC |
| Transactions | Multi-document | Backend-dependent | Multi-document ACID + MVCC |
| Time-travel | No | No | Yes (MVCC snapshots) |
| Encryption | Enterprise only | Backend-dependent | TDE + ZKE (all editions) |
| Deployment | Multi-component | Proxy + backend | Single 60MB binary |
| Best for | Established MongoDB shops | License compliance (minimal) | AI-native document workloads |
| Production cost | $370+/month (Atlas) | $0 + backend cost | $0 self-hosted |
MongoDB defined the document database category. FerretDB solved the licensing problem. HeliosDB solves both --- and adds the AI capabilities that the next generation of applications demands. Same connection string, same drivers, same mongosh. Plus native vector search, natural language queries, intelligent indexing, and 13 other protocol adapters. All under Apache-2.0, all in a single binary.
Get started with HeliosDB in minutes. Open source, free to use.