A tiny, file-based, AI-native database engine with semantic search
Project description
neuDB
A tiny, file-based, AI-native database engine.
Zero dependencies. Human-readable JSON storage. Semantic search built in.
Features
- No server, no config – just a folder of JSON tables.
- AI‑ready – store embeddings, search by meaning with cosine similarity.
- Multi‑user – sessions, messages, tags, and memory per user.
- Library + CLI –
import neudbor use the command‑line tool.
Quick start
# Clone
git clone https://github.com/neuralbroker/neudb.git
cd neudb
# CLI
python neudb.py table create users
python neudb.py row insert users --data '{"username":"alice"}'
python neudb.py row list users
# Library
from neudb import connect
db = connect("mydb")
users = db.table("users")
users.insert({"username": "bob"})
AI memory mode
from neudb.ai_schema import *
db = init_ai_database()
alice = add_user(db, "alice", "alice@example.com")
session = create_session(db, alice, "Chat about Python")
add_message_with_embedding(db, session, "user", "How do I fix an import error?")
Install as a package
pip install .
# or
pip install -e .
Then you can import neudb from anywhere.
HTTP API
Install the API extra and run FastAPI with Uvicorn:
pip install -e ".[api]"
uvicorn neudb.api:app --reload
Open Swagger UI at http://127.0.0.1:8000/docs, or use curl:
curl -X POST http://127.0.0.1:8000/users \
-H 'Content-Type: application/json' \
-d '{"username":"alice","email":"alice@example.com"}'
Set NEUDB_API_DB=/path/to/db to choose the API storage directory. By default it uses neudb_api_data/.
Local LLM agent memory
Run a chat loop that uses neuDB as long-term memory for Ollama:
ollama pull llama3.2
pip install -e ".[agent]"
neudb-agent --provider ollama --model llama3.2
Each turn searches similar past messages, injects them into the prompt, and saves the new user/assistant exchange back into neuDB.
OpenAI is also supported:
export OPENAI_API_KEY="..."
neudb-agent --provider openai --model gpt-4o-mini
Use --db /path/to/memory to choose the memory directory. By default it uses neudb_agent_memory/.
License
MIT – see LICENSE.
Changelog
See CHANGELOG.md.
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 neudb-0.4.0.tar.gz.
File metadata
- Download URL: neudb-0.4.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07a1aee21055445332ba3c745b9f644a0a477fa3b9ce41c7d3424654cf1c27e6
|
|
| MD5 |
fee97090e0fc5c2194a036efb008b521
|
|
| BLAKE2b-256 |
ed6cac37ccded1605f33f4f577ea91c51f306b096d0a781b7333a5a92a2a285a
|
File details
Details for the file neudb-0.4.0-py3-none-any.whl.
File metadata
- Download URL: neudb-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59f4939650faaec3697602bdc9942866fff6f180618437b33cdc1c85cffdebd3
|
|
| MD5 |
6ab5b238622dcd84a968c698dcd5e95b
|
|
| BLAKE2b-256 |
7e5054e5f556e8b9b6799d01629fd25c30dac90a8c0445672162ce94d3231286
|