Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ curl -X POST "http://localhost:8000/api/process-audio-files" \

**Implementation**:
- **Memory System**: `src/advanced_omi_backend/memory/memory_service.py` + `src/advanced_omi_backend/controllers/memory_controller.py`
- **Configuration**: `memory_config.yaml` + `src/advanced_omi_backend/memory_config_loader.py`
- **Configuration**: memory settings in `config.yml` (memory section)

### Authentication & Security
- **Email Authentication**: Login with email and password
Expand Down Expand Up @@ -541,10 +541,10 @@ OPENMEMORY_MCP_URL=http://host.docker.internal:8765

> 🎯 **New to memory configuration?** Read our [Memory Configuration Guide](./memory-configuration-guide.md) for a step-by-step setup guide with examples.

The system uses **centralized configuration** via `memory_config.yaml` for all memory extraction settings. All hardcoded values have been removed from the code to ensure consistent, configurable behavior.
The system uses **centralized configuration** via `config.yml` for all models (LLM, embeddings, vector store) and memory extraction settings.

### Configuration File Location
- **Path**: `backends/advanced-backend/memory_config.yaml`
- **Path**: repository `config.yml` (override with `CONFIG_FILE` env var)
- **Hot-reload**: Changes are applied on next processing cycle (no restart required)
- **Fallback**: If file is missing, system uses safe defaults with environment variables

Expand Down Expand Up @@ -613,7 +613,7 @@ If you experience JSON parsing errors in fact extraction:

2. **Enable fact extraction** with reliable JSON output:
```yaml
# In memory_config.yaml
# In config.yml (memory section)
fact_extraction:
enabled: true # Safe to enable with GPT-4o
```
Expand Down Expand Up @@ -727,5 +727,5 @@ curl -H "Authorization: Bearer $ADMIN_TOKEN" \
- **Connect audio clients** using the WebSocket API
- **Explore the dashboard** to manage conversations and users
- **Review the user data architecture** for understanding data organization
- **Customize memory extraction** by editing `memory_config.yaml`
- **Monitor processing performance** using debug API endpoints
- **Customize memory extraction** by editing the `memory` section in `config.yml`
- **Monitor processing performance** using debug API endpoints
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Self-hostable AI system that captures audio/video data from OMI devices and othe

## Quick Start → [Get Started](quickstart.md)

Clone, run setup wizard, start services, access at http://localhost:5173
Clone, customize config.yml, start services, access at http://localhost:5173

## Screenshots

Expand Down
2 changes: 1 addition & 1 deletion backends/advanced/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ COPY . .

# Copy configuration files if they exist, otherwise they will be created from templates at runtime
# The files are expected to exist, but we handle the case where they don't gracefully
COPY memory_config.yaml* ./

COPY diarization_config.json* ./


Expand Down
2 changes: 1 addition & 1 deletion backends/advanced/Dockerfile.k8s
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN uv sync --extra deepgram
COPY . .

# Copy memory config (created by init.sh from template)
COPY memory_config.yaml ./


# Copy and make K8s startup scripts executable
COPY start-k8s.sh start-workers.sh ./
Expand Down
28 changes: 14 additions & 14 deletions backends/advanced/Docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Welcome to chronicle! This guide provides the optimal reading sequence to unders
- What the system does (voice → memories)
- Key features and capabilities
- Basic setup and configuration
- **Code References**: `src/advanced_omi_backend/main.py`, `memory_config.yaml`, `docker-compose.yml`
- **Code References**: `src/advanced_omi_backend/main.py`, `config.yml`, `docker-compose.yml`

### 2. **[System Architecture](./architecture.md)**
**Read second** - Complete technical architecture with diagrams
Expand Down Expand Up @@ -70,12 +70,12 @@ Welcome to chronicle! This guide provides the optimal reading sequence to unders

## 🔍 **Configuration & Customization**

### 6. **Configuration File** → `../memory_config.yaml`
### 6. **Configuration File** → `../config.yml`
**Central configuration for all extraction**
- Memory extraction settings and prompts
- Quality control and debug settings
- **Code References**:
- `src/advanced_omi_backend/memory_config_loader.py` (config loading)
- `src/advanced_omi_backend/model_registry.py` (config loading)
- `src/advanced_omi_backend/memory/memory_service.py` (config usage)

---
Expand All @@ -86,11 +86,11 @@ Welcome to chronicle! This guide provides the optimal reading sequence to unders
1. [quickstart.md](./quickstart.md) - System overview
2. [architecture.md](./architecture.md) - Technical architecture
3. `src/advanced_omi_backend/main.py` - Core imports and setup
4. `memory_config.yaml` - Configuration overview
4. `config.yml` - Configuration overview

### **"I want to work on memory extraction"**
1. [memories.md](./memories.md) - Memory system details
2. `../memory_config.yaml` - Memory configuration
2. `../config.yml` - Models and memory configuration
3. `src/advanced_omi_backend/memory/memory_service.py` - Implementation
4. `src/advanced_omi_backend/controllers/memory_controller.py` - Processing triggers

Expand Down Expand Up @@ -128,9 +128,9 @@ backends/advanced-backend/
│ ├── controllers/ # Business logic controllers
│ ├── memory/
│ │ └── memory_service.py # Memory system (Mem0)
│ └── memory_config_loader.py # Configuration loading
│ └── model_registry.py # Configuration loading
├── memory_config.yaml # 📋 Central configuration
├── config.yml # 📋 Central configuration
├── MEMORY_DEBUG_IMPLEMENTATION.md # Debug system details
```

Expand All @@ -147,8 +147,8 @@ backends/advanced-backend/
- **Memories**: `src/advanced_omi_backend/memory/memory_service.py` → Mem0 → Qdrant

### **Configuration**
- **Loading**: `src/advanced_omi_backend/memory_config_loader.py`
- **File**: `memory_config.yaml`
- **Loading**: `src/advanced_omi_backend/model_registry.py`
- **File**: `config.yml`
- **Usage**: `src/advanced_omi_backend/memory/memory_service.py`

### **Authentication**
Expand All @@ -162,7 +162,7 @@ backends/advanced-backend/

1. **Follow the references**: Each doc links to specific code files and line numbers
2. **Use the debug API**: `GET /api/debug/memory/stats` shows live system status
3. **Check configuration first**: Many behaviors are controlled by `memory_config.yaml`
3. **Check configuration first**: Many behaviors are controlled by `config.yml`
4. **Understand the memory pipeline**: Memories (end-of-conversation)
5. **Test with curl**: All API endpoints have curl examples in the docs

Expand All @@ -175,23 +175,23 @@ backends/advanced-backend/
1. **Set up the system**: Follow [quickstart.md](./quickstart.md) to get everything running
2. **Test the API**: Use the curl examples in the documentation to test endpoints
3. **Explore the debug system**: Check `GET /api/debug/memory/stats` to see live data
4. **Modify configuration**: Edit `memory_config.yaml` to see how it affects extraction
4. **Modify configuration**: Edit `config.yml` (memory section) to see how it affects extraction
5. **Read the code**: Start with `src/advanced_omi_backend/main.py` and follow the references in each doc

### **Contributing Guidelines**

- **Add code references**: When updating docs, include file paths and line numbers
- **Test your changes**: Use the debug API to verify your modifications work
- **Update configuration**: Add new settings to `memory_config.yaml` when needed
- **Update configuration**: Add new settings to `config.yml` when needed
- **Follow the architecture**: Keep memories in their respective services

### **Getting Help**

- **Debug API**: `GET /api/debug/memory/*` endpoints show real-time system status
- **Configuration**: Check `memory_config.yaml` for behavior controls
- **Configuration**: Check `config.yml` for behavior controls
- **Logs**: Check Docker logs with `docker compose logs friend-backend`
- **Documentation**: Each doc file links to relevant code sections

---

This documentation structure ensures you understand both the **big picture** and **implementation details** in a logical progression!
This documentation structure ensures you understand both the **big picture** and **implementation details** in a logical progression!
6 changes: 3 additions & 3 deletions backends/advanced/Docs/contribution.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
1. Docs/quickstart.md (15 min)
2. Docs/architecture.md (20 min)
3. main.py - just the imports and WebSocket sections (15 min)
4. memory_config.yaml (10 min)
4. config.yml (memory section) (10 min)

🔧 "I want to work on memory extraction"

1. Docs/quickstart.md → Docs/memories.md
2. memory_config.yaml (memory_extraction section)
2. config.yml (memory.extraction section)
3. main.py lines 1047-1065 (trigger)
4. main.py lines 1163-1195 (processing)
5. src/memory/memory_service.py
Expand All @@ -32,4 +32,4 @@
Data Flow

Audio → Transcription → Dual Processing
└─ Memory Pipeline (end-of-conversation)
└─ Memory Pipeline (end-of-conversation)
6 changes: 3 additions & 3 deletions backends/advanced/Docs/memories.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This document explains how to configure and customize the memory service in the
- **Repository Layer**: `src/advanced_omi_backend/conversation_repository.py` (clean data access)
- **Processing Manager**: `src/advanced_omi_backend/processors.py` (MemoryProcessor class)
- **Conversation Management**: `src/advanced_omi_backend/conversation_manager.py` (lifecycle coordination)
- **Configuration**: `memory_config.yaml` + `src/memory_config_loader.py`
- **Configuration**: `config.yml` (memory section) + `src/model_registry.py`

## Overview

Expand Down Expand Up @@ -180,7 +180,7 @@ OPENAI_MODEL=gpt-5-mini # Recommended for reliable JSON output
# OPENAI_MODEL=gpt-3.5-turbo # Budget option
```

Or configure via `memory_config.yaml`:
Or configure via `config.yml` (memory block):

```yaml
memory_extraction:
Expand Down Expand Up @@ -674,4 +674,4 @@ The new architecture ensures proper user isolation and simplifies admin debuggin

Both load all user memories and view all memories are helpful
Both views complement each other - the debug view helps you understand how the system is working, while the clean view
helps you understand what content is being stored.
helps you understand what content is being stored.
8 changes: 4 additions & 4 deletions backends/advanced/Docs/memory-configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This guide helps you set up and configure the memory system for the Friend Advan

1. **Copy the template configuration**:
```bash
cp memory_config.yaml.template memory_config.yaml
Edit the `memory` section of `config.yml`.
```

2. **Edit memory_config.yaml** with your preferred settings:
2. **Edit `config.yml`** with your preferred settings in the `memory` section:
```yaml
memory:
provider: "mem0" # or "basic" for simpler setup
Expand Down Expand Up @@ -127,6 +127,6 @@ memory:

## Next Steps

- Configure action items detection in `memory_config.yaml`
- Configure action items detection in `config.yml` (memory.extraction)
- Set up custom prompt templates for your use case
- Monitor memory processing in the debug dashboard
- Monitor memory processing in the debug dashboard
12 changes: 6 additions & 6 deletions backends/advanced/Docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ curl -X POST "http://localhost:8000/api/audio/upload" \

**Implementation**:
- **Memory System**: `src/advanced_omi_backend/memory/memory_service.py` + `src/advanced_omi_backend/controllers/memory_controller.py`
- **Configuration**: `memory_config.yaml` + `src/advanced_omi_backend/memory_config_loader.py`
- **Configuration**: `config.yml` (memory + models) in repo root

### Authentication & Security
- **Email Authentication**: Login with email and password
Expand Down Expand Up @@ -539,10 +539,10 @@ OPENMEMORY_MCP_URL=http://host.docker.internal:8765

> 🎯 **New to memory configuration?** Read our [Memory Configuration Guide](./memory-configuration-guide.md) for a step-by-step setup guide with examples.

The system uses **centralized configuration** via `memory_config.yaml` for all memory extraction settings. All hardcoded values have been removed from the code to ensure consistent, configurable behavior.
The system uses **centralized configuration** via `config.yml` for all memory extraction and model settings.

### Configuration File Location
- **Path**: `backends/advanced-backend/memory_config.yaml`
- **Path**: `config.yml` in repo root
- **Hot-reload**: Changes are applied on next processing cycle (no restart required)
- **Fallback**: If file is missing, system uses safe defaults with environment variables

Expand Down Expand Up @@ -611,7 +611,7 @@ If you experience JSON parsing errors in fact extraction:

2. **Enable fact extraction** with reliable JSON output:
```yaml
# In memory_config.yaml
# In config.yml (memory section)
fact_extraction:
enabled: true # Safe to enable with GPT-4o
```
Expand Down Expand Up @@ -725,5 +725,5 @@ curl -H "Authorization: Bearer $ADMIN_TOKEN" \
- **Connect audio clients** using the WebSocket API
- **Explore the dashboard** to manage conversations and users
- **Review the user data architecture** for understanding data organization
- **Customize memory extraction** by editing `memory_config.yaml`
- **Monitor processing performance** using debug API endpoints
- **Customize memory extraction** by editing the `memory` section in `config.yml`
- **Monitor processing performance** using debug API endpoints
4 changes: 2 additions & 2 deletions backends/advanced/SETUP_SCRIPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document explains the different setup scripts available in Friend-Lite and

| Script | Purpose | When to Use |
|--------|---------|-------------|
| `init.py` | **Main interactive setup wizard** | **Recommended for all users** - First time setup with guided configuration (located at repo root) |
| `init.py` | **Main interactive setup wizard** | **Recommended for all users** - First time setup with guided configuration (located at repo root). Memory now configured in `config.yml`. |
| `setup-https.sh` | HTTPS certificate generation | **Optional** - When you need secure connections for microphone access |

## Main Setup Script: `init.py`
Expand Down Expand Up @@ -157,4 +157,4 @@ Setup scripts are located as follows:
✅ **Provider selection**: Choose best services for your needs
✅ **Complete configuration**: Creates working .env with all settings
✅ **Next steps guidance**: Clear instructions for starting services
✅ **No manual editing**: Reduces errors from manual .env editing
✅ **No manual editing**: Reduces errors from manual .env editing
8 changes: 2 additions & 6 deletions backends/advanced/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ services:
# Import API keys from environment
- DEEPGRAM_API_KEY=${DEEPGRAM_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=https://api.openai.com/v1
# LLM provider configuration (required for memory service)
- LLM_PROVIDER=${LLM_PROVIDER:-openai}
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o-mini}
- GROQ_API_KEY=${GROQ_API_KEY}
# Authentication (test-specific)
- AUTH_SECRET_KEY=test-jwt-signing-key-for-integration-tests
- ADMIN_PASSWORD=test-admin-password-123
Expand Down Expand Up @@ -140,8 +137,7 @@ services:
- DEBUG_DIR=/app/debug_dir
- DEEPGRAM_API_KEY=${DEEPGRAM_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LLM_PROVIDER=${LLM_PROVIDER:-openai}
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o-mini}
- GROQ_API_KEY=${GROQ_API_KEY}
- AUTH_SECRET_KEY=test-jwt-signing-key-for-integration-tests
- ADMIN_PASSWORD=test-admin-password-123
- ADMIN_EMAIL=test-admin@example.com
Expand Down
11 changes: 5 additions & 6 deletions backends/advanced/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- ./data/audio_chunks:/app/audio_chunks
- ./data/debug_dir:/app/debug_dir
- ./data:/app/data
- ../../config.yml:/app/config.yml:ro
environment:
- DEEPGRAM_API_KEY=${DEEPGRAM_API_KEY}
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
Expand All @@ -24,10 +25,7 @@ services:
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- AUTH_SECRET_KEY=${AUTH_SECRET_KEY}
- LLM_PROVIDER=${LLM_PROVIDER}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL}
- OPENAI_MODEL=${OPENAI_MODEL}
- NEO4J_HOST=${NEO4J_HOST}
- NEO4J_USER=${NEO4J_USER}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
Expand Down Expand Up @@ -67,15 +65,15 @@ services:
- ./start-workers.sh:/app/start-workers.sh
- ./data/audio_chunks:/app/audio_chunks
- ./data:/app/data
- ../../config.yml:/app/config.yml:ro
environment:
- DEEPGRAM_API_KEY=${DEEPGRAM_API_KEY}
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
- MISTRAL_MODEL=${MISTRAL_MODEL}
- TRANSCRIPTION_PROVIDER=${TRANSCRIPTION_PROVIDER}
- PARAKEET_ASR_URL=${PARAKEET_ASR_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL}
- OPENAI_MODEL=${OPENAI_MODEL}
- LLM_PROVIDER=${LLM_PROVIDER}
- GROQ_API_KEY=${GROQ_API_KEY}
- REDIS_URL=redis://redis:6379/0
depends_on:
redis:
Expand Down Expand Up @@ -226,6 +224,7 @@ services:
networks:
default:
name: chronicle-network
external: true

volumes:
ollama_data:
Expand Down
13 changes: 2 additions & 11 deletions backends/advanced/init-https.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,8 @@ else
echo " 2. Add: CORS_ORIGINS=https://localhost,https://localhost:443,https://127.0.0.1,https://$TAILSCALE_IP"
fi

# Create memory_config.yaml from template if it doesn't exist
echo ""
echo "📄 Step 4: Checking memory configuration..."
if [ ! -f "memory_config.yaml" ] && [ -f "memory_config.yaml.template" ]; then
cp memory_config.yaml.template memory_config.yaml
echo "✅ memory_config.yaml created from template"
elif [ -f "memory_config.yaml" ]; then
echo "✅ memory_config.yaml already exists"
else
echo "⚠️ Warning: memory_config.yaml.template not found"
fi
echo "📄 Step 4: Memory configuration now lives in config.yml (memory section)"

echo ""
echo "🎉 Initialization complete!"
Expand All @@ -102,4 +93,4 @@ echo " - Chronicle Backend: Internal (proxied through nginx)"
echo " - Web Dashboard: https://localhost/ or https://$TAILSCALE_IP/"
echo " - WebSocket Audio: wss://localhost/ws_pcm or wss://$TAILSCALE_IP/ws_pcm"
echo ""
echo "📚 For more details, see: Docs/HTTPS_SETUP.md"
echo "📚 For more details, see: Docs/HTTPS_SETUP.md"
Loading
Loading