Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
34159fd
feat: Implement session management for conversation tracking
rexdivakar Oct 22, 2025
13b5f10
feat: Update Groq model to 3.3 and enhance provider support
rexdivakar Oct 22, 2025
c7c6459
Implement smart memory updates and semantic clustering features
rexdivakar Oct 22, 2025
45f0161
feat(multi-agent): Implement multi-agent memory management system
rexdivakar Oct 22, 2025
220b2ec
feat: Add semantic clustering and auto-categorization demo
rexdivakar Oct 22, 2025
025fd5b
Enhance semantic clustering and memory management features
rexdivakar Oct 23, 2025
7bbc19c
Add fact extraction and summarization pipelines with integration tests
rexdivakar Oct 23, 2025
a172ed3
feat: Add validation script and update documentation for intelligence…
rexdivakar Oct 26, 2025
cd2ba2e
Refactor code for improved readability and consistency
rexdivakar Oct 26, 2025
e7ea235
chore: Update CI and SonarQube workflows to pin action versions and i…
rexdivakar Oct 26, 2025
c3ad6b4
feat: Add comprehensive demo script for HippocampAI features with tel…
rexdivakar Oct 26, 2025
77fb92c
feat: Add Qdrant status check and ensure test collections exist in fi…
rexdivakar Oct 27, 2025
1575b5c
feat: Enhance CI workflow with improved health checks and readiness w…
rexdivakar Oct 27, 2025
9730cfc
feat: Simplify CI workflow by removing Ollama service and updating Qd…
rexdivakar Oct 27, 2025
52851af
refactor: Improve readability of importance decay test by formatting …
rexdivakar Oct 27, 2025
7836708
refactor: Update Ruff linting steps for improved clarity and warning …
rexdivakar Oct 27, 2025
7ea2339
fix: Ensure Ruff is installed before running lint checks
rexdivakar Oct 27, 2025
09a88ac
feat: Enhance CI workflow with Ollama service readiness checks and mo…
rexdivakar Oct 27, 2025
c8fc351
feat: Remove Ollama service from CI workflow and adjust test settings
rexdivakar Oct 27, 2025
dd4cd63
feat: Update CI workflow for improved Qdrant readiness checks and enh…
rexdivakar Oct 27, 2025
afc058e
feat: Add collection readiness check to ensure proper initialization
rexdivakar Oct 27, 2025
6b85767
refactor: Simplify CI workflow by removing unnecessary environment va…
rexdivakar Oct 27, 2025
60740fd
refactor: Comment out Qdrant service and related checks in CI workflo…
rexdivakar Oct 27, 2025
8033789
Check-1
PrakharJain1509 Oct 27, 2025
ac131e9
Check-2
PrakharJain1509 Oct 27, 2025
8c0118c
Improve: Use EAFP pattern and avoid race conditions in Qdrant operations
PrakharJain1509 Oct 27, 2025
3c728f4
Update src/hippocampai/vector/qdrant_store.py
PrakharJain1509 Oct 27, 2025
a7925c2
Update src/hippocampai/vector/qdrant_store.py
PrakharJain1509 Oct 27, 2025
9df5e95
Merge branch 'patch_1' into patch_1
PrakharJain1509 Oct 27, 2025
1534c2e
Merge pull request #9 from PrakharJain1509/patch_1
rexdivakar Oct 27, 2025
9e13861
feat: Enhance QdrantStore with additional payload indices and impleme…
rexdivakar Oct 27, 2025
d37a21e
feat: Add comprehensive Memory Management API documentation and imple…
rexdivakar Oct 27, 2025
24065ad
fix: Improve collection creation logic and add error handling for exi…
rexdivakar Oct 27, 2025
c51d9c2
feat: Refactor Memory object creation and enhance QdrantStore with co…
rexdivakar Oct 27, 2025
d57e8d3
feat: Integrate Celery for asynchronous task management
rexdivakar Oct 27, 2025
68cdf4c
fix: Update health check endpoints for consistency and disable health…
rexdivakar Oct 27, 2025
05b00b8
chore: Update LICENSE file to include full Apache License 2.0 text an…
rexdivakar Oct 28, 2025
6276d78
Add hierarchical clustering and advanced temporal analytics for memor…
rexdivakar Oct 28, 2025
0cda3bf
feat: Add intelligence routes to the FastAPI application and update c…
rexdivakar Oct 28, 2025
1aa150e
Refactor type hints from `Dict` and `List` to `dict` and `list` for c…
rexdivakar Oct 28, 2025
0505987
feat: Implement search module with saved searches and suggestions
rexdivakar Oct 28, 2025
02e3327
feat: Add comprehensive changelog documenting new search enhancements…
rexdivakar Oct 28, 2025
5d9569d
chore: Remove unused imports and update type hints for PEP8 complianc…
rexdivakar Oct 28, 2025
14354d8
ci: add .deepsource.toml
deepsource-autofix[bot] Oct 29, 2025
f31f4f4
Merge pull request #16 from rexdivakar/deepsource-config-f3300865
rexdivakar Oct 29, 2025
facfa50
feat: Enhance type hints for consistency and clarity; improve error h…
rexdivakar Oct 29, 2025
3c83e9c
feat: Add UnifiedMemoryClient supporting local and remote modes
rexdivakar Oct 29, 2025
f166471
Add usage guide and validation summary; enhance API and pipeline code
rexdivakar Oct 29, 2025
295394f
Merge branch 'patch_1' into backup/2025-10-29-1400
rexdivakar Oct 29, 2025
16d1d63
Merge pull request #17 from rexdivakar/backup/2025-10-29-1400
rexdivakar Oct 29, 2025
6a845eb
fix: Restore pull_request trigger in CI workflow
rexdivakar Oct 29, 2025
bf95453
chore: Update sonar-project.properties with Python settings and exclu…
rexdivakar Oct 29, 2025
5595f36
Refactor and improve code quality across multiple modules
rexdivakar Oct 30, 2025
945d21b
refactor: Simplify deduplication, consolidation, and cleanup tasks in…
rexdivakar Oct 30, 2025
56c7726
fix: Change breakdown type in RetrievalResult to Any and update test …
rexdivakar Oct 30, 2025
c945609
refactor: Enhance LocalBackend implementation with detailed initializ…
rexdivakar Oct 30, 2025
b72d90c
fix: Replace MemoryClient with LocalBackend in LOCAL mode initialization
rexdivakar Oct 30, 2025
7d31a56
Refactor code for improved type hinting, compatibility, and cleanup
rexdivakar Oct 31, 2025
f2f3247
refactor: Enhance type safety and cleanup across multiple modules
rexdivakar Nov 2, 2025
e831b80
Add comprehensive documentation for HippocampAI project and SaaS inte…
rexdivakar Nov 2, 2025
17d6085
feat: Introduce UnifiedMemoryClient with comprehensive usage guide an…
rexdivakar Nov 2, 2025
f7009b1
feat: Add comprehensive test runner for HippocampAI with extensive te…
rexdivakar Nov 2, 2025
3d31251
fix: Restrict pull request branch to 'main' and remove unused Qdrant …
rexdivakar Nov 2, 2025
13fa998
Merge branch 'main' into patch_1
rexdivakar Nov 2, 2025
c82aec9
chore: Update version to 0.2.0 across documentation and codebase
rexdivakar Nov 2, 2025
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
98 changes: 70 additions & 28 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,87 +1,129 @@
# HippocampAI Configuration
# Copy this file to .env and configure your settings

# ============================================
# Qdrant Vector Database
# ============================================
# ==================== API Configuration ====================
API_PORT=8000

# ==================== Qdrant Vector Database ====================
QDRANT_URL=http://localhost:6333
QDRANT_PORT=6333
QDRANT_GRPC_PORT=6334
COLLECTION_FACTS=hippocampai_facts
COLLECTION_PREFS=hippocampai_prefs

# ============================================
# HNSW Index Tuning (Advanced)
# ============================================
# ==================== HNSW Index Tuning (Advanced) ====================
# Higher M = better recall, more memory
HNSW_M=48
# Higher ef_construction = better index quality, slower build
EF_CONSTRUCTION=256
# Higher ef_search = better recall, slower search
EF_SEARCH=128

# ============================================
# Embedding Model
# ============================================
# ==================== Embedding Model ====================
EMBED_MODEL=BAAI/bge-small-en-v1.5
EMBED_DIMENSION=384
EMBED_BATCH_SIZE=32
EMBED_QUANTIZED=false

# ============================================
# Reranker (Cross-Encoder)
# ============================================
# ==================== Reranker (Cross-Encoder) ====================
RERANKER_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
RERANK_CACHE_TTL=86400

# ============================================
# LLM Provider Configuration
# ============================================
# ==================== LLM Provider Configuration ====================
# Options: ollama, openai, anthropic, groq
LLM_PROVIDER=ollama
LLM_MODEL=qwen2.5:7b-instruct

# For Ollama (local, self-hosted)
LLM_MODEL=qwen2.5:7b-instruct
LLM_BASE_URL=http://localhost:11434

# For OpenAI (cloud)
# LLM_PROVIDER=openai
# LLM_MODEL=gpt-4o-mini
# OPENAI_API_KEY=sk-your-key-here

# For Groq (fast, cost-effective cloud inference)
# LLM_PROVIDER=groq
# LLM_MODEL=llama-3.3-70b-versatile
# GROQ_API_KEY=gsk_your-groq-api-key-here

# For Anthropic (cloud)
# LLM_PROVIDER=anthropic
# LLM_MODEL=claude-3-haiku-20240307
# ANTHROPIC_API_KEY=sk-ant-your-key-here

# Allow cloud providers (set to true if using OpenAI/Anthropic/Groq)
ALLOW_CLOUD=false

# ============================================
# Retrieval Parameters
# ============================================
# ==================== Retrieval Parameters ====================
# Number of candidates from vector search
TOP_K_QDRANT=200
# Final number of results after reranking
TOP_K_FINAL=20
# Reciprocal rank fusion parameter
RRF_K=60

# ============================================
# Scoring Weights (must sum to ~1.0)
# ============================================
# ==================== Scoring Weights (must sum to ~1.0) ====================
WEIGHT_SIM=0.55
WEIGHT_RERANK=0.20
WEIGHT_RECENCY=0.15
WEIGHT_IMPORTANCE=0.10

# ============================================
# Importance Decay Half-Lives (days)
# ============================================
# ==================== Importance Decay Half-Lives (days) ====================
HALF_LIFE_PREFS=90
HALF_LIFE_FACTS=30
HALF_LIFE_EVENTS=14

# ============================================
# Background Jobs (Optional)
# ============================================
# ==================== Background Jobs & Scheduling ====================
ENABLE_SCHEDULER=true
# Decay importance daily at 2am
DECAY_CRON=0 2 * * *
# Consolidate memories weekly on Sunday at 3am
CONSOLIDATE_CRON=0 3 * * 0
# Create snapshots hourly
SNAPSHOT_CRON=0 * * * *

# Background Tasks
ENABLE_BACKGROUND_TASKS=true
AUTO_DEDUP_ENABLED=true
AUTO_CONSOLIDATION_ENABLED=false
DEDUP_INTERVAL_HOURS=24
CONSOLIDATION_INTERVAL_HOURS=168
EXPIRATION_INTERVAL_HOURS=1

# ==================== Redis Cache ====================
REDIS_PORT=6379
REDIS_URL=redis://localhost:6379
REDIS_DB=0
REDIS_CACHE_TTL=300
REDIS_MAX_CONNECTIONS=100
REDIS_MIN_IDLE=10

# ==================== Celery Task Queue ====================
CELERY_BROKER_URL=redis://localhost:6379/1
CELERY_RESULT_BACKEND=redis://localhost:6379/2
CELERY_WORKER_CONCURRENCY=4
CELERY_WORKER_PREFETCH_MULTIPLIER=4
CELERY_TASK_ACKS_LATE=true
CELERY_WORKER_MAX_TASKS_PER_CHILD=1000

# Flower UI (Celery Monitoring)
FLOWER_PORT=5555
FLOWER_USER=admin
FLOWER_PASSWORD=changeme_in_production

# ==================== Monitoring ====================
PROMETHEUS_ENABLED=true
PROMETHEUS_PORT=9090

# Grafana
GRAFANA_PORT=3000
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=changeme_in_production
GRAFANA_ROOT_URL=http://localhost:3000

# ==================== Security (Recommended for Production) ====================
# Enable these in production deployments
# ENABLE_AUTH=true
# JWT_SECRET=your_jwt_secret_here
# RATE_LIMIT_PER_MINUTE=60
75 changes: 27 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CI
on:
push:
branches: ["*"]
pull_request:
branches: ["main"]

env:
PYTHONUNBUFFERED: "1"
Expand All @@ -16,64 +18,40 @@ jobs:
matrix:
python-version: ["3.10", "3.11", "3.12"]

services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
- 6334:6334

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python dependencies
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/pip
${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python-version }}-

- name: Ruff lint
run: pip install ruff && ruff check . --output-format=github

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev,api]'

- name: Wait for Qdrant to be ready
run: |
echo "Waiting for Qdrant to be ready..."
for i in {1..30}; do
if curl -f http://localhost:6333/healthz > /dev/null 2>&1; then
echo "Qdrant is ready!"
curl -s http://localhost:6333/ | head -20
exit 0
fi
echo "Attempt $i/30: Qdrant not ready yet, waiting..."
sleep 2
done
echo "Qdrant failed to become ready"
exit 1

- name: Lint with Ruff
- name: Ruff format (warn only)
run: |
ruff check . --output-format=github
ruff format . --check
if ! ruff format . --check; then
echo "::warning ::Some files would be reformatted by Ruff"
fi

- name: Run Tests
- name: Bandit Security Scan
run: |
pytest -v --maxfail=1 --disable-warnings --cov=src --cov-report=term-missing
env:
QDRANT_HOST: localhost
QDRANT_PORT: 6333
QDRANT_URL: http://localhost:6333
pip install bandit
if ! bandit -r src -lll; then
echo "::warning ::Bandit found potential security issues (review above)"
fi

build:
name: Build Package
Expand All @@ -82,30 +60,31 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"

- name: Cache Python dependencies
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-build-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-build-

- name: Install build tools
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install -e '.[dev,api]'

- name: Install build tools
run: pip install build twine

- name: Build package
run: |
python -m build
run: python -m build

- name: Validate build with Twine
run: |
twine check dist/*
run: twine check dist/*
25 changes: 15 additions & 10 deletions .github/workflows/sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@ name: SonarQube Scan

on:
push:
branches: [ '*']

branches: ['*']

jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# actions/checkout v4.3.0 (full SHA)
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: SonarSource/sonarqube-scan-action@v6
fetch-depth: 0

# SonarQube Scan action v6.0.0 (full SHA)
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# - uses: SonarSource/sonarqube-quality-gate-action@v1

# If you want to enforce the Quality Gate, un-comment and keep the pin:
# - name: SonarQube Quality Gate
# uses: SonarSource/sonarqube-quality-gate-action@cf038b0e0cdecfa9e56c198bbb7d21d751d62c3b
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Loading
Loading