> ## Documentation Index
> Fetch the complete documentation index at: https://joe-pro-ai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Every environment variable Sluice Box reads, with its default.

Settings load from `sluice-box/.env` (via `python-dotenv`) and the process environment. Variables already set in the environment win. Copy `.env.example` to start, and never commit `.env`.

> [!WARNING]
>
> Keep real keys out of every repository. The examples on this site use placeholders only.

## Profile

| Variable | Default | Purpose |
| - | - | - |
| `SLUICE_BOX_PROFILE` | `default` | `meta` sends each turn to Muse Spark Open and claim checks to Muse Spark 1.3. `default` keeps the OpenRouter live model. Any other value falls back to `default`. |
| `SIGNAL_DESK_PROFILE` | none | Accepted as the same switch. `SLUICE_BOX_PROFILE` wins if both are set. |
| `META_STRICT` | on in the Meta profile, off otherwise | `1`, `true`, `on`, or `yes` turns it on. When on, a failed Meta call shows an error card and no other model answers. See [META\_STRICT](https://joe-pro-ai.mintlify.site/architecture.md#meta_strict). |

## Models and keys

| Variable | Default | Purpose |
| - | - | - |
| `OPENROUTER_API_KEY` | empty | Muse Spark Open, and the OpenRouter fallback. |
| `OPENROUTER_LISTEN_MODEL` | `meta/muse-spark-open` | Live model in the Meta profile. Also writes Topic Ledger expansions. |
| `OPENROUTER_MODEL` | `openai/gpt-6-luna` | Live model in the `default` profile. |
| `OPENROUTER_DEEP_MODEL` | `openai/gpt-6.1-sol` | Check this claim in the `default` profile, and the fallback when `META_STRICT` is off. |
| `OPENROUTER_REASONING_EFFORT` | `minimal` | Live reasoning effort. `off` or `none` omits the parameter. |
| `OPENROUTER_DEEP_REASONING_EFFORT` | `medium` | Claim-check reasoning effort. |
| `OPENROUTER_JSON_MODE` | `on` | Asks for a JSON object and sets `require_parameters`. `off`, `0`, or `false` disables it. |
| `OPENROUTER_BASE_URL` | `https://openrouter.ai/api/v1` | OpenRouter base URL. |
| `MODEL_API_KEY` | empty | Meta Model API key for Muse Spark 1.3 and Muse Voice Transcribe. |
| `META_API_BASE` | `https://api.meta.ai/v1` | Meta Model API base URL. |
| `META_DEEP_MODEL` | `muse-spark-1.3` | Claim-check model. A `-contributor` suffix is stripped, so only Standard mode is called. |
| `META_ASR_MODEL` | `muse-voice-transcribe-1.0` | Meta speech model. |

## Speech to text

| Variable | Default | Purpose |
| - | - | - |
| `STT_BACKEND` | `meta` in the Meta profile, else `openvino` | `meta` uses Muse Voice Transcribe (measured more accurate on the hard clip) and falls back to Whisper. `openvino` uses local Whisper only. |
| `META_SPEND_CAP_USD` | `5` | Meta calls are logged to `sessions/meta-spend.jsonl` and refused once the logged total reaches this. |
| `WHISPER_MODEL_DIR` | none | OpenVINO Whisper export folder. Relative paths resolve from the `sluice-box` folder. |
| `WHISPER_DEVICE` | `CPU` | OpenVINO device for Whisper. |

## Notes and memory

| Variable | Default | Purpose |
| - | - | - |
| `NOTES_DIR` | `notes` | Markdown notes folder. Each heading is a snippet the cards can quote, labeled `Your notes`. |
| `GBRAIN_RECALL_URL` | empty | Optional recall endpoint. It receives `POST {"query", "limit"}` and returns `{"snippets": [{"text", "ref", "label"}]}`. Blank uses the notes folder only. |

## Topic Ledger

| Variable | Default | Purpose |
| - | - | - |
| `SESSIONS_DIR` | `sessions` | Where session JSON files are saved. |
| `TOPIC_EXPAND_CAP` | `15` | Expansions per session. |
| `TOPIC_COOLDOWN_SECONDS` | `120` | Wait between expansions of one topic. |
| `TOPIC_IDLE_SECONDS` | `20` | Quiet time before an automatic expansion. `0` turns automatic expansion off. |

## Limits and security

| Variable | Default | Purpose |
| - | - | - |
| `ALLOWED_ORIGINS` | `http://127.0.0.1:7788,http://localhost:7788` | Comma-separated origins allowed to open `/ws` and call the write routes. |
| `FACT_CHECK_MAX_CHARS` | `2000` | Longest claim a check accepts. |
| `FACT_CHECK_PER_MINUTE` | `6` | Claim checks allowed per minute. |

## Voice (optional)

**Hear this** stays off until both the key and the voice id are set. Nothing plays before a click.

| Variable | Default | Purpose |
| - | - | - |
| `ELEVENLABS_API_KEY` | empty | ElevenLabs key. |
| `ELEVENLABS_VOICE_ID` | empty | Voice to use. |
| `ELEVENLABS_MODEL` | `eleven_flash_v2_5` | TTS model. |
| `ELEVENLABS_BASE_URL` | `https://api.elevenlabs.io` | ElevenLabs base URL. |

## Offline fallback

| Variable | Default | Purpose |
| - | - | - |
| `OLLAMA_URL` | `http://127.0.0.1:11434/api/generate` | Local Ollama endpoint used when OpenRouter is unreachable. |
| `OLLAMA_MODEL` | `gemma3:4b` | Local fallback model. |

## Example `.env`

```bash .env theme={"dark"}
SLUICE_BOX_PROFILE=meta
OPENROUTER_API_KEY=your-openrouter-key
MODEL_API_KEY=your-meta-model-api-key
STT_BACKEND=openvino
WHISPER_MODEL_DIR=models/whisper-large-v3-turbo-fp16-ov
NOTES_DIR=notes
TOPIC_IDLE_SECONDS=20
TOPIC_EXPAND_CAP=15
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.