forked from kagura-ai/memory-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
201 lines (153 loc) · 7.55 KB
/
.env.example
File metadata and controls
201 lines (153 loc) · 7.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# =============================================================================
# Kagura Memory Cloud - Environment Variables
# =============================================================================
#
# Copy this file to .env.local and fill in your credentials:
# cp .env.example .env.local
#
# IMPORTANT: Never commit .env.local to Git (it's in .gitignore)
#
# =============================================================================
# -----------------------------------------------------------------------------
# Database (PostgreSQL)
# -----------------------------------------------------------------------------
# Local development (docker-compose)
DATABASE_URL=postgresql://kagura:kagura_dev_password@localhost:5432/kagura
DB_PASSWORD=kagura_dev_password
# -----------------------------------------------------------------------------
# Qdrant (Vector DB)
# -----------------------------------------------------------------------------
# Local development (docker-compose)
QDRANT_URL=http://localhost:6333
# -----------------------------------------------------------------------------
# Redis (Cache)
# -----------------------------------------------------------------------------
# Local development (docker-compose)
REDIS_URL=redis://localhost:6379
# -----------------------------------------------------------------------------
# OAuth2 (Google)
# -----------------------------------------------------------------------------
# Get from: https://console.cloud.google.com/apis/credentials
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI=http://localhost:8080/api/v1/auth/google/callback
# OAuth Provider Control (default: auto — enable all configured providers)
# AUTH_PROVIDERS=auto # Enable all providers with credentials set
# AUTH_PROVIDERS=google # Google only
# AUTH_PROVIDERS=github # GitHub only
# AUTH_PROVIDERS=google,github # Both explicitly
# Registration Control (default: false — invitation-only)
# First user is always allowed to register as admin
# ALLOW_REGISTRATION=false
# GitHub OAuth2 (optional - for GitHub login)
# Get from: https://github.com/settings/developers → OAuth Apps → New OAuth App
# GITHUB_CLIENT_ID=Ov23li...
# GITHUB_CLIENT_SECRET=...
# GITHUB_REDIRECT_URI=http://localhost:8080/api/v1/auth/github/callback
# Stripe Billing (optional - for SaaS deployments)
# BILLING_ENABLED=true
# STRIPE_SECRET_KEY=sk_test_...
# STRIPE_WEBHOOK_SECRET=whsec_...
# STRIPE_PRICE_BASIC=price_xxx (Stripe Price ID for Basic/M plan)
# STRIPE_PRICE_PRO=price_yyy (Stripe Price ID for Pro/L plan)
# -----------------------------------------------------------------------------
# Security (Required)
# -----------------------------------------------------------------------------
# API Key encryption secret (auto-generated by create_admin if not set)
API_KEY_SECRET=change-me-api-key-secret
# JWT secret for session tokens (use: openssl rand -hex 32)
JWT_SECRET=change-me-jwt-secret
# JWT Settings
JWT_ALGORITHM=HS256
JWT_EXPIRE_MINUTES=60
# -----------------------------------------------------------------------------
# API Settings
# -----------------------------------------------------------------------------
API_HOST=0.0.0.0
API_PORT=8080
LOG_LEVEL=info
LOG_COLORIZE=true
# CORS Origins (comma-separated)
CORS_ORIGINS=http://localhost:3000,http://localhost:8080
# Production (replace with your domain)
# CORS_ORIGINS=https://your-domain.com
# Frontend URL (for OAuth redirects)
FRONTEND_URL=http://localhost:3000
# Production (replace with your domain)
# FRONTEND_URL=https://your-domain.com
# Note: OpenAI/Cohere API keys are managed via Web UI (Workspace > Integrations > External Keys).
# They are encrypted and stored in the database — no env vars needed.
# -----------------------------------------------------------------------------
# Environment
# -----------------------------------------------------------------------------
# development | staging | production
ENVIRONMENT=development
# -----------------------------------------------------------------------------
# Feature Flags
# -----------------------------------------------------------------------------
# Neural Memory
ENABLE_NEURAL_MEMORY=true
# Research Tools
ENABLE_RESEARCH_TOOLS=true
# -----------------------------------------------------------------------------
# Embedding Configuration
# -----------------------------------------------------------------------------
EMBEDDING_PROVIDER=openai # openai | ollama
EMBEDDING_MODEL=text-embedding-3-small # Model name (see EMBEDDING_MODEL_REGISTRY in constants.py)
EMBEDDING_DIMENSIONS=512 # Vector dimensions (auto-detected from model registry)
# Ollama Configuration (only needed if EMBEDDING_PROVIDER=ollama)
OLLAMA_BASE_URL=http://localhost:11434 # Ollama API base URL
# OpenAI API KEY
OPENAI_API_KEY= # OpenAI API Key to use for embeddings (set via Web UI in Integrations > External Keys)
# -----------------------------------------------------------------------------
# Search Configuration
# -----------------------------------------------------------------------------
ENABLE_RERANKING=false # Enable Cohere reranking
# -----------------------------------------------------------------------------
# Usage & Plan Limits (Issue #48)
# -----------------------------------------------------------------------------
# Default FREE Plan Limits
DEFAULT_PLAN_MEMORY_LIMIT=1000
DEFAULT_PLAN_DAILY_API_LIMIT=1000
DEFAULT_PLAN_WEEKLY_API_LIMIT=5000
# Usage Warning Thresholds (0.0-1.0)
USAGE_WARNING_THRESHOLD=0.80 # 80% - Show warning
USAGE_CRITICAL_THRESHOLD=0.95 # 95% - Show critical alert
# -----------------------------------------------------------------------------
# Neural Memory Configuration
# -----------------------------------------------------------------------------
# Tunable parameters (27 total) are managed in the database via Admin UI
# at /admin/neural-config. Only feature flags are configured here.
TRACK_CO_ACTIVATION=true # Enable co-activation tracking
ENABLE_DECAY=true # Enable automatic edge weight decay
ENABLE_TRUST_MODULATION=true # Modulate learning by confidence score
# -----------------------------------------------------------------------------
# Billing Plugin (OSS: disabled by default)
# -----------------------------------------------------------------------------
# When disabled (default), plan changes are admin-only.
# Enable for self-service plan management with Stripe.
BILLING_ENABLED=false
# STRIPE_SECRET_KEY=sk_...
# STRIPE_WEBHOOK_SECRET=whsec_...
# -----------------------------------------------------------------------------
# Plan Tier Overrides (optional, for OSS deployments)
# -----------------------------------------------------------------------------
# Override default plan limits via environment variables.
# Uncomment and set values to customize.
# PLAN_FREE_MAX_CONTEXTS=3
# PLAN_FREE_MEMORY_LIMIT=1000
# PLAN_FREE_MCP_CALLS_PER_DAY=1000
# PLAN_BASIC_MAX_CONTEXTS=10
# PLAN_BASIC_MEMORY_LIMIT=10000
# PLAN_BASIC_MCP_CALLS_PER_DAY=10000
# PLAN_PRO_MAX_CONTEXTS=20
# PLAN_PRO_MEMORY_LIMIT=100000
# PLAN_PRO_MCP_CALLS_PER_DAY=50000
# -----------------------------------------------------------------------------
# Production Deployment
# -----------------------------------------------------------------------------
# Update these for your production domain:
# CORS_ORIGINS=https://your-domain.com
# GOOGLE_REDIRECT_URI=https://your-domain.com/api/v1/auth/google/callback
# LOG_LEVEL=info
# ENVIRONMENT=production