Initial commit: standalone vector memory server

REST API for per-agent semantic memory retrieval.

- FastAPI server with /api/{agent}/save and /api/{agent}/query
- ChromaDB for persistent vector storage
- all-MiniLM-L6-v2 via sentence-transformers for embeddings
- Per-agent collections for clean separation
- Config through env vars or config.py
- .venv ready with all dependencies
This commit is contained in:
2026-06-25 14:50:53 +02:00
commit 82328b0a45
6 changed files with 301 additions and 0 deletions

17
config.py Normal file
View File

@@ -0,0 +1,17 @@
"""Configuration for the Vector Memory Server."""
import os
class Config:
DATA_DIR = os.environ.get(
"MEMORY_SERVER_DATA",
"/home/admin/agent-dir/vector_memory"
)
EMBEDDING_MODEL = os.environ.get(
"MEMORY_SERVER_MODEL",
"all-MiniLM-L6-v2"
)
DEFAULT_TOP_N = int(os.environ.get("MEMORY_SERVER_TOP_N", "5"))
HOST = os.environ.get("MEMORY_SERVER_HOST", "127.0.0.1")
PORT = int(os.environ.get("MEMORY_SERVER_PORT", "8000"))