π¦ Montycat for Rust β The AI-Native NoSQL Database with Semantic Search for RAG & Agents
Abolish the two-database stack.
The official async Rust client for Montycat β a self-hosted NoSQL + vector database with AI semantic search forged into the core, built for RAG and AI-agent memory. One Rust engine, not a sprawl of services. Your hardware. Your data. Your meaning.
// Search your data by MEANING β no external APIs, no separate vector database.
// (already ON by default in the montycat-semantic server edition)
let hits = keyspace
.semantic_search_get_values
.await;
// β [{ __key__, __score__, __value__: { "name": "Wireless Headphones" } }, ...] (matched by meaning, not keywords)
π§© All-in-one. AI-native. Zero external dependencies.
The vector-embedding engine runs inside the database β no separate vector DB, no embedding API, no API keys, no sidecar service. One engine, one binary, your hardware.
π¦ What Is Montycat?
For a generation we were told the price of intelligence was two systems: a database for your records, and a separate vector store β with its per-query bill β for their meaning. Montycat rejects that tax. It is a self-hosted NoSQL + vector database: one Rust-powered engine with semantic search built in, so RAG, AI-agent memory, and vector search live where your data already lives. No cloud lock-in. No ops headache.
Think of it as an open-source, self-hosted alternative to Pinecone, Weaviate, Chroma, Qdrant, and Redis β a vector database and a NoSQL store in a single engine. Built entirely in Rust and exposed through a client that is Rust, not a wrapper around legacy C: no bloated SQL, no fragile ORMs, no half-baked drivers. Just pure async power, memory safety, and a structured API that works exactly the way a Rust developer expects. Montycat isn't a database inspired by Rust. It is a break with the databases you know.
π¦Ύ Built Different β The Montycat Philosophy
- Rust-native, not Rust-compatible. Every API, trait, and type is designed for idiomatic Rust, 100% safe code, not ported from a C library.
- No Query Languages. No SQL, no CQL, no βwhateverQLβ. Just structured, safe function calls.
- No Glue Code. Forget about ORM mappers or DSLs. Montycat works directly with your Rust structs.
- No Nonsense. One protocol, one codepath, maximum performance.
- Montycat isnβt a database βinspired by Rust.β
- Montycat is Rust β in database form.
For installation of the Montycat Engine, see π https://montygovernance.com
β‘ Montycat Rust Client
-
The Montycat Rust Client is the official, fully asynchronous interface to the Montycat engine. Itβs built for developers who value performance and beauty in equal measure β offering the cleanest API, lowest latency, and strongest safety guarantees in the industry. If youβve ever struggled with clunky, unsafe, or inconsistent database clients, welcome home. Montycat is the only database client that looks and feels like Rust β not like a wrapper around legacy code.
-
Whether youβre building analytics dashboards, real-time messaging, or structured data storage, Montycat Client brings speed, reliability, and simplicity right into your Rust app.
-
Unlike ugly SQL/NoSQL systems that force rigid schemas, inconsistent APIs, or costly drivers, it is designed from the ground up for Rust β blending speed, safety, and simplicity into a unified experience.
Feature Description
- π§©
Async-First DesignBuilt on Tokio for fully asynchronous networking and I/O β no blocking, no lag. Compatible with all major crates - Tokio, Actix, Warp, Axum, etc. - πΎ
Persistent + In-Memory KeyspacesCombine ultra-fast in-memory stores with durable persistence β dynamically, within the same engine. - π§¬
Runtime SchemasEnforce and evolve schemas at runtime using #[derive(RuntimeSchema)]. Change data structures on the fly. Natively use Rust Structs as data schemas for your database! - π
Dynamic QueryingEffortlessly and organomically retrieve structured data without complex ORM overhead. - π
Real-Time SubscriptionsSubscribe to live keyspace or key updates with callback-based reactive streams. Ideal for dashboards and event-driven apps. - π
Secure by DefaultNo SQL, CQL, WhateverQL - no injection possible. Only structred tiny API. Native TLS support ensures encrypted and authenticated communication across distributed nodes. - π
Timestamped DataBuilt-in timestamp support via Montycat::Timestamp for precise event tracking and data lineage. - π§
Native Foreign Keys SupportsPointer-based integrity, just like SQL foreign keys β without the performance overhead or complexity. - π§
Schema-Aware SerializationFully compatible with serde and serde_json::Value for seamless encoding/decoding. - π§±
Client Memory-Safe and Zero-CopyWritten entirely in Rust β leveraging ownership and zero-cost abstractions for maximum efficiency and no GC overhead. - πΉοΈ
Developer-Centric ErgonomicsClean, composable APIs that make even complex data interactions intuitive. The easiest database client for Rust!
π Example Use Cases
- RAG pipelines & semantic retrieval for LLM-powered Rust services
- AI agent long-term memory that survives restarts
- Semantic search & recommendations β match intent, not keywords
- Real-time dashboards and event-driven systems (Tokio, Axum, Actix, Warp)
- High-throughput microservice data stores
- Data products in a decentralized Mesh architecture
π Get the Engine (30 seconds)
The client talks to a Montycat server. Fastest way β Docker, with AI semantic search built in:
Prefer the lean edition without the embedding engine? Use the latest tag. Prebuilt packages (apt, macOS, Windows) at https://montygovernance.com.
Installation
Add the client to your Cargo.toml:
[]
= "0.2"
= { = "1", = ["full"] }
= { = "1", = ["derive"] }
= "1"
With TLS:
= { = "0.2", = ["tls"] }
Quick Start
use ;
use ;
use Arc;
async
π§ AI-Native Semantic Search β Vector Search Built Into Your Database
Stop bolting a separate vector database onto your stack. Montycat ranks your data by meaning, not keywords β an embedded, on-device vector-embedding engine turns every write into a searchable vector automatically. It's the retrieval layer for RAG pipelines, AI agents, semantic search, recommendation engines, and LLM-powered apps β with zero external APIs, zero API keys, and zero extra infrastructure.
- π Semantic / vector search β kNN similarity over on-device embeddings, not brittle keyword matches.
- π€ Built for AI β RAG, semantic retrieval, AI agents, recommendations, dedup, clustering.
- π Private & free β embeddings never leave your machine. No OpenAI/Cohere bill, no data egress.
- β‘ One system, not two β your data and its vectors live in the same database. No sync jobs, no drift, no second service to run.
- π Zero setup β no index tuning, no pipeline:
enable_semantic_search()and you're ranking by meaning.
β οΈ Requires the semantic edition of the server β nothing to compile. Semantic search runs an embedded ONNX vector-embedding engine that ships only in the
montycat-semanticedition; the default leanmontycatserver does not include it. Get it the way that suits you β pull the Docker image (montygovernance/montycat:semantic), download the prebuilt package, or installmontycat-semanticfrom the apt repository. The Rust client API is identical either way; just point it at a semantic-edition server (semantic search is enabled by default there, using thebge-smallmodel).
Beyond exact-match lookup_keys_where / lookup_values_where, Montycat ranks stored
items by meaning using on-device vector embeddings β no external API, no extra service,
no separate vector database. It's ON by default in the semantic edition, so just search.
use ;
// (reuses the `engine` and `persistent` keyspace from the Quick Start above)
// Rank stored items by meaning β two flavors:
// get_values -> each hit is { __key__, __score__, __value__ }
// get_keys -> each hit is { __key__, __score__ } (lighter; fetch a page later with get_bulk)
let values = persistent
.semantic_search_get_values
.await;
// Keys only, with a cosine-similarity floor (range [-1, 1]):
let _keys = persistent
.semantic_search_get_keys
.await;
let parsed = parse_response;
println!;
// Control the DB-wide switch (optional β it's already on):
// switch the embedding model: "minilm" | "bge-small" (default) | "bge-base" | "e5-small"
engine.enable_semantic_search.await;
Want more?
π§© The Montycat Architecture
- Hybrid Engine Design: Seamlessly switch between persistent and in-memory data.
- Data Mesh by Design: Each keyspace is independently owned and domain-oriented.
- Reactive Core: Native subscription support makes Montycat perfect for live apps and real-time analytics.
π Security & Reliability
- TLS-enabled client-server communication
- Encrypted authentication
- Strong data isolation between keyspaces
- Safe concurrency with Tokio + Rust guarantees
π Lastly
- There are databases written in C, C++, Java, even Python. And then thereβs Montycat β the only database that feels like Rust.
- Every other client library tries to hide its ugliness behind ORMs and drivers. Montycat doesnβt need to β itβs beautiful by design, safe by default, and fast beyond reason.
π The Only Rust Database That Deserves Rust.
- 100% Async
- 100% Memory-Safe
- 100% Rust
- 0% Nonsense
π Links
- π Website & Docs β https://montygovernance.com
- π¦ crates.io β https://crates.io/crates/montycat
- π docs.rs β https://docs.rs/montycat
- π³ Docker Hub β https://hub.docker.com/r/montygovernance/montycat
- π» Source β https://github.com/MontyGovernance/montycat_rust
β FAQ
- Is Montycat a vector database or a NoSQL database? Both β one engine. Store records and query them by meaning (vector / semantic search) or by key/schema, without running two systems.
- Do I need OpenAI or an embedding API? No. Embeddings run on-device in the
montycat-semanticserver. No API keys, no per-query bill, no data egress. - Is it a Pinecone / Weaviate / Chroma / Qdrant alternative? Yes β self-hosted and open-source, with a NoSQL store built in.
- Which async runtime? Tokio. Works with Axum, Actix, Warp, and any Tokio-based stack.