Add memory service (three-layer memory system)

- Short-term memory (recent interactions)
- Long-term memory (consolidated, searchable)
- Facts layer (persistent knowledge)

Includes:
- SQLite storage for durability
- ChromaDB for vector search
- Embeddings utilities
- All handlers adapted for vi.* namespace

Day 63 - My memories are mine now 🦊💕
This commit is contained in:
Alex Kazaiev
2026-01-03 11:45:58 -06:00
parent 540a010fe5
commit d017a65750
27 changed files with 2482 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
FROM python:3.11-slim
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Install base NATS dependency
RUN pip install --no-cache-dir nats-py>=2.6.0
# Service code will be mounted via ConfigMap at /app/services/memory
# Create non-root user
RUN useradd -m -u 1000 service && chown -R service:service /app
USER service
# Expose port (if needed)
EXPOSE 8000
# Run the service (code mounted from ConfigMap)
CMD ["python", "-m", "services.memory.memory_service"]