-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path.env.example
More file actions
112 lines (99 loc) · 5.97 KB
/
Copy path.env.example
File metadata and controls
112 lines (99 loc) · 5.97 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
# ──────────────────────────────────────────────────
# Statewave — Environment Configuration
#
# Quickstart:
# 1. cp .env.example .env
# 2. docker compose up -d
#
# That's it — no API key required. The defaults below run Statewave in
# demo mode, and every step of getting-started.md works as written.
# To turn on real LLM extraction + semantic search, see the opt-in
# LiteLLM block further down.
#
# All variables are prefixed STATEWAVE_. Values left commented use the
# defaults baked into server/core/config.py.
# ──────────────────────────────────────────────────
# ── Default: demo mode (no API key required) ─────────────────
# Heuristic regex compiler + hash-based embeddings. Zero external calls,
# nothing to configure. Memories are extracted locally; retrieval is
# keyword/text only (no semantic similarity). Good for first-touch local
# exploration and for finishing the getting-started.md quickstart.
STATEWAVE_COMPILER_TYPE=heuristic
STATEWAVE_EMBEDDING_PROVIDER=stub
# ── Opt-in: real LLM compiler + LiteLLM embeddings ───────────
# For LLM-driven memory extraction and real semantic search, comment out
# the two demo-mode lines above, then uncomment the block below and set a
# provider. Note: with the LLM compiler selected but no key reachable,
# compilation produces zero memories — it does NOT fall back to the regex
# compiler. Use demo mode above for a keyless setup.
#
# LiteLLM dispatches to whichever provider you select via the model
# identifier. https://docs.litellm.ai/docs/providers
#
# gpt-4o-mini → OpenAI (set sk-...)
# anthropic/claude-3-haiku-20240307 → Anthropic (set sk-ant-...)
# azure/<deployment> → Azure OpenAI
# ollama/llama3 → Ollama (no key — runs locally)
# bedrock/anthropic.claude-3-haiku-... → AWS Bedrock
# cohere/command-r → Cohere (set co-...)
#
# STATEWAVE_COMPILER_TYPE=llm
# STATEWAVE_EMBEDDING_PROVIDER=litellm
# STATEWAVE_LITELLM_API_KEY=sk-...
# STATEWAVE_LITELLM_MODEL=gpt-4o-mini
# STATEWAVE_LITELLM_EMBEDDING_MODEL=text-embedding-3-small
# STATEWAVE_LITELLM_API_BASE= # e.g. http://host.docker.internal:11434 for Ollama
# STATEWAVE_LITELLM_TIMEOUT_SECONDS=60
# STATEWAVE_LITELLM_MAX_RETRIES=2
# STATEWAVE_LITELLM_TEMPERATURE=0.1
# ── Database ─────────────────────────────────────────────────
# Docker compose overrides this to point at the `db` service. Set this
# only if you're running the API against a database OUTSIDE compose.
# STATEWAVE_DATABASE_URL=postgresql+asyncpg://statewave:statewave@localhost:5432/statewave
# ── Docker Compose — Host Port Overrides ────────────────────
# For local development: override the default host ports to resolve
# conflicts with services running on your host machine. Defaults are
# 5432 (database), 8100 (API) and 8080 (admin console). Only the host
# side changes — in-container service-to-service traffic is unaffected.
# STATEWAVE_DB_HOST_PORT=5432
# STATEWAVE_API_HOST_PORT=8100
# STATEWAVE_ADMIN_HOST_PORT=8080
# ── Server ───────────────────────────────────────────────────
# STATEWAVE_DEBUG=true
# STATEWAVE_HOST=0.0.0.0
# STATEWAVE_PORT=8100
# ── Authentication ───────────────────────────────────────────
# Set a key to require X-API-Key auth. Leave empty for open access.
# STATEWAVE_API_KEY=
# ── Rate Limiting ────────────────────────────────────────────
# Requests per minute per client IP. 0 = disabled.
# STATEWAVE_RATE_LIMIT_RPM=0
# ── Embedding dimensions ─────────────────────────────────────
# STATEWAVE_EMBEDDING_DIMENSIONS=1536
# ── Webhooks ─────────────────────────────────────────────────
# HTTP endpoint for event notifications. Empty = disabled.
# STATEWAVE_WEBHOOK_URL=
# STATEWAVE_WEBHOOK_TIMEOUT=5.0
# ── Multi-tenant (app-layer isolation — see README limitations) ──
# STATEWAVE_TENANT_HEADER=X-Tenant-ID
# STATEWAVE_REQUIRE_TENANT=false
# ── CORS ─────────────────────────────────────────────────────
# JSON array of allowed origins. ["*"] for local dev.
# STATEWAVE_CORS_ORIGINS=["*"]
# ── Memory TTL / expiry (v0.7.2+) ────────────────────────────
# Per-kind global expiry windows. JSON object keyed by MemoryKind:
# profile_fact | episode_summary | procedure | artifact_ref
# Values are positive integers (days). Memories of a configured kind get
# `valid_to = valid_from + days` stamped at insert time. /v1/context
# retrieval filters expired rows out immediately; an hourly cleanup loop
# tombstones expired rows so the status surface stays current.
#
# Empty (default) = no expiry for any kind (backwards compatible).
# Missing kind = no expiry for that kind (forever).
#
# Soft-delete only — rows are kept for audit and future receipt lookup.
# Per-subject / per-tenant / per-policy TTL is NOT supported here. See full
# operator guide at: https://github.com/smaramwbc/statewave-docs/blob/main/deployment/memory-ttl.md
#
# Example:
# STATEWAVE_KIND_TTL_DAYS={"episode_summary": 30, "artifact_ref": 90}