Skip to content

Commit 627f9c3

Browse files
committed
2 parents 3a1f044 + abc1fdd commit 627f9c3

12 files changed

Lines changed: 2875 additions & 21 deletions

README.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ EPISODE LAYER (L1) <- patterns auto-discovered via graph traversal.
2525
SENTENCE LAYER (L2) <- raw conversation. Sequential NEXT edges. The full story.
2626
```
2727

28+
<<<<<<< HEAD
2829
<p align="center">
2930
<img src="assets/screenshots/layers.jpeg" alt="Three-layer memory graph: Facts → Episodes → Sentences" width="680" />
3031
</p>
3132

3233
Search hits Facts, graph discovers Episodes, traces back to source Sentences. One database, Postgres or SQLite. No Neo4j, no Qdrant, no infra drama.
34+
=======
35+
Search hits Facts, graph discovers Episodes, traces back to source Sentences. SQLite by default — swap to Postgres, Neo4j, or Qdrant when you're ready to scale.
36+
>>>>>>> abc1fdde5ff85f05c6d6f7ece73cdf5262765875
3337
3438
---
3539

@@ -46,7 +50,10 @@ Still improving. Run your own in [`/benchmarks`](benchmarks/).
4650
## Install
4751

4852
```bash
49-
pip install vektori
53+
pip install vektori # SQLite + Postgres
54+
pip install 'vektori[neo4j]' # + Neo4j support
55+
pip install 'vektori[qdrant]' # + Qdrant support
56+
pip install 'vektori[neo4j,qdrant]' # all backends
5057
```
5158

5259
No Docker, no external services. SQLite by default.
@@ -196,16 +203,53 @@ v = Vektori()
196203
# PostgreSQL + pgvector — production scale
197204
v = Vektori(database_url="postgresql://localhost:5432/vektori")
198205

206+
# Neo4j — native graph traversal for Episode layer
207+
v = Vektori(
208+
storage_backend="neo4j",
209+
database_url="bolt://localhost:7687",
210+
embedding_dimension=1024, # must match your embedding model
211+
)
212+
213+
# Qdrant — dedicated vector DB, cloud-ready
214+
v = Vektori(
215+
storage_backend="qdrant",
216+
database_url="http://localhost:6333",
217+
embedding_dimension=1024,
218+
)
219+
220+
# Qdrant Cloud
221+
v = Vektori(
222+
storage_backend="qdrant",
223+
database_url="https://your-cluster.qdrant.io",
224+
qdrant_api_key="your-api-key",
225+
embedding_dimension=1024,
226+
)
227+
199228
# In-memory — tests / CI
200229
v = Vektori(storage_backend="memory")
201230
```
202231

203-
**Postgres via Docker:**
232+
**All backends via Docker:**
204233
```bash
205234
git clone https://github.com/vektori-ai/vektori
206235
cd vektori
207-
docker compose up -d
236+
docker compose up -d # starts Postgres, Neo4j, and Qdrant
237+
238+
# Postgres
208239
DATABASE_URL=postgresql://vektori:vektori@localhost:5432/vektori python examples/quickstart_postgres.py
240+
241+
# Neo4j
242+
VEKTORI_STORAGE_BACKEND=neo4j VEKTORI_DATABASE_URL=bolt://localhost:7687 vektori add "I prefer dark mode" --user-id u1
243+
244+
# Qdrant
245+
VEKTORI_STORAGE_BACKEND=qdrant VEKTORI_DATABASE_URL=http://localhost:6333 vektori add "I prefer dark mode" --user-id u1
246+
```
247+
248+
**CLI storage flags:**
249+
```bash
250+
vektori config --storage-backend qdrant --database-url http://localhost:6333
251+
vektori add "my note" --user-id u1
252+
vektori search "preferences" --user-id u1
209253
```
210254

211255
---

docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,37 @@ services:
1717
timeout: 5s
1818
retries: 5
1919

20+
neo4j:
21+
image: neo4j:5
22+
environment:
23+
NEO4J_AUTH: neo4j/password
24+
NEO4J_PLUGINS: '["apoc"]'
25+
NEO4J_dbms_security_procedures_unrestricted: apoc.*
26+
ports:
27+
- "7474:7474" # HTTP browser
28+
- "7687:7687" # Bolt
29+
volumes:
30+
- neo4jdata:/data
31+
healthcheck:
32+
test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "password", "RETURN 1"]
33+
interval: 10s
34+
timeout: 10s
35+
retries: 10
36+
37+
qdrant:
38+
image: qdrant/qdrant:latest
39+
ports:
40+
- "6333:6333" # REST
41+
- "6334:6334" # gRPC
42+
volumes:
43+
- qdrantdata:/qdrant/storage
44+
healthcheck:
45+
test: ["CMD-SHELL", "curl -sf http://localhost:6333/healthz || exit 1"]
46+
interval: 5s
47+
timeout: 5s
48+
retries: 10
49+
2050
volumes:
2151
pgdata:
52+
neo4jdata:
53+
qdrantdata:

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ dependencies = [
3434

3535
[project.optional-dependencies]
3636
postgres = ["asyncpg>=0.29", "pgvector>=0.2"]
37+
neo4j = ["neo4j>=5.14"]
38+
qdrant = ["qdrant-client>=1.7"]
3739
anthropic = ["anthropic>=0.20", "voyageai>=0.2"]
3840
sentence-transformers = ["sentence-transformers>=2.6"]
3941
bge = ["FlagEmbedding>=1.2"]
@@ -48,6 +50,8 @@ dev = [
4850
all = [
4951
"asyncpg>=0.29",
5052
"pgvector>=0.2",
53+
"neo4j>=5.14",
54+
"qdrant-client>=1.7",
5155
"anthropic>=0.20",
5256
"voyageai>=0.2",
5357
"sentence-transformers>=2.6",

0 commit comments

Comments
 (0)