Config
Arkhein uses standard Laravel configuration with custom entries for our local-first services.
Key Configuration Files
config/database.php
nativephp: The primary SQLite connection for all domain models and knowledge persistence.
config/services.php
ollama: Configuration for the local Ollama instance, including base URL and default models.
config/prompts/
This directory contains all engineered prompts used by the PromptService. Do not hardcode prompts elsewhere.
Core Settings
Settings are accessed via Setting::get('key', 'default'). Common keys include:
llm_model: The model name for chat generation (e.g.,llama3).embedding_model: The model name for generating embeddings (e.g.,nomic-embed-text).embedding_dimensions: The dimensions required for the current embedding model.
Invariants
- Fallback Protocol: All settings must have a sensible fallback in
config/if no database value is present. - Single Point of Truth: Configuration and prompts have a single, canonical location.
Common Failures
- Missing Setting: If a required setting is missing and has no fallback, Arkhein may fail to initialize.
- Model Incompatibility: If the configured
llm_modelis not pulled via Ollama, inference will fail. - Config Cache: If you change a value in
config/but it's not reflected, runphp artisan config:clear.