Skip to content

Commit abc1fdd

Browse files
laxmancloAlex-Hunterz
authored andcommitted
feat(deploy): wire qdrant_api_key end-to-end, add CLI storage flags, docker services
- VektoriConfig gains qdrant_api_key field; factory.py passes it to QdrantBackend - Vektori.__init__ exposes qdrant_api_key so callers don't need to build VektoriConfig - CLI: --storage-backend / --database-url / --qdrant-api-key added to all commands; `vektori config` can now save storage settings to ~/.vektori/config.json - docker-compose.yml adds Neo4j 5 and Qdrant services alongside Postgres - README: remove "No Neo4j, no Qdrant" claim; document all four backends + pip extras
1 parent 171b4f5 commit abc1fdd

6 files changed

Lines changed: 262 additions & 21 deletions

File tree

README.md

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

28-
Search hits Facts, graph discovers Episodes, traces back to source Sentences. One database, Postgres or SQLite. No Neo4j, no Qdrant, no infra drama.
28+
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.
2929

3030
---
3131

@@ -42,7 +42,10 @@ Still improving. Run your own in [`/benchmarks`](benchmarks/).
4242
## Install
4343

4444
```bash
45-
pip install vektori
45+
pip install vektori # SQLite + Postgres
46+
pip install 'vektori[neo4j]' # + Neo4j support
47+
pip install 'vektori[qdrant]' # + Qdrant support
48+
pip install 'vektori[neo4j,qdrant]' # all backends
4649
```
4750

4851
No Docker, no external services. SQLite by default.
@@ -192,16 +195,53 @@ v = Vektori()
192195
# PostgreSQL + pgvector — production scale
193196
v = Vektori(database_url="postgresql://localhost:5432/vektori")
194197

198+
# Neo4j — native graph traversal for Episode layer
199+
v = Vektori(
200+
storage_backend="neo4j",
201+
database_url="bolt://localhost:7687",
202+
embedding_dimension=1024, # must match your embedding model
203+
)
204+
205+
# Qdrant — dedicated vector DB, cloud-ready
206+
v = Vektori(
207+
storage_backend="qdrant",
208+
database_url="http://localhost:6333",
209+
embedding_dimension=1024,
210+
)
211+
212+
# Qdrant Cloud
213+
v = Vektori(
214+
storage_backend="qdrant",
215+
database_url="https://your-cluster.qdrant.io",
216+
qdrant_api_key="your-api-key",
217+
embedding_dimension=1024,
218+
)
219+
195220
# In-memory — tests / CI
196221
v = Vektori(storage_backend="memory")
197222
```
198223

199-
**Postgres via Docker:**
224+
**All backends via Docker:**
200225
```bash
201226
git clone https://github.com/vektori-ai/vektori
202227
cd vektori
203-
docker compose up -d
228+
docker compose up -d # starts Postgres, Neo4j, and Qdrant
229+
230+
# Postgres
204231
DATABASE_URL=postgresql://vektori:vektori@localhost:5432/vektori python examples/quickstart_postgres.py
232+
233+
# Neo4j
234+
VEKTORI_STORAGE_BACKEND=neo4j VEKTORI_DATABASE_URL=bolt://localhost:7687 vektori add "I prefer dark mode" --user-id u1
235+
236+
# Qdrant
237+
VEKTORI_STORAGE_BACKEND=qdrant VEKTORI_DATABASE_URL=http://localhost:6333 vektori add "I prefer dark mode" --user-id u1
238+
```
239+
240+
**CLI storage flags:**
241+
```bash
242+
vektori config --storage-backend qdrant --database-url http://localhost:6333
243+
vektori add "my note" --user-id u1
244+
vektori search "preferences" --user-id u1
205245
```
206246

207247
---

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:

0 commit comments

Comments
 (0)