Hindsight-specific configuration with multi-level precedence.
Hindsight 0.4+
Uses REST API. URLs are base URLs (e.g. http://localhost:8888),
not MCP paths. Operations use /v1/default/banks/{bank_id}/....
Precedence (highest to lowest)
- UI runtime override (ETS, session-only)
- Project config (
<project>/.llm_core/config.yml) - Global config (
~/.llm_core/config.yml) - Environment variable (
HINDSIGHT_URL) - Auto-discovered endpoint
Configuration Options
memory:
hindsight:
url: http://localhost:8888
api_key_env: HINDSIGHT_API_KEY
enabled: true
default_bank_id: platform
timeout_health_ms: 2000
timeout_retain_ms: 10000
timeout_recall_ms: 30000
timeout_reflect_ms: 60000
max_retries: 3
retry_backoff_ms: [1000, 2000, 4000]
circuit_failure_threshold: 5
circuit_reset_ms: 30000
cache_ttl_ms: 300000
cache_max_entries: 1000
prefetch_on_startup: true
Summary
Functions
Clears the runtime override map.
Clears the UI override.
Returns default configuration.
Returns the effective default bank identifier, if configured.
Returns the effective configuration merging all sources.
Returns the effective URL using precedence rules.
Returns the API key for authentication (from configured env var).
Gets the discovered URL if available.
Checks if URL requires authentication (non-localhost).
Stores a discovered URL (from auto-discovery).
Applies a runtime override map sourced from the TOML configuration loader.
Sets a UI override URL (session-only, not persisted).
Types
@type t() :: %LlmCore.Memory.Hindsight.Config{ api_key_env: String.t(), cache_max_entries: pos_integer(), cache_reflect_ttl_ms: pos_integer(), cache_ttl_ms: pos_integer(), circuit_failure_threshold: pos_integer(), circuit_reset_ms: pos_integer(), default_bank_id: String.t() | nil, enabled: boolean(), max_retries: non_neg_integer(), prefetch_on_startup: boolean(), retain_raw_llm: boolean(), retry_backoff_ms: [pos_integer()], timeout_health_ms: pos_integer(), timeout_recall_ms: pos_integer(), timeout_reflect_ms: pos_integer(), timeout_retain_ms: pos_integer(), url: String.t() | nil }
Functions
@spec clear_runtime_override() :: :ok
Clears the runtime override map.
@spec clear_ui_override() :: :ok
Clears the UI override.
@spec defaults() :: map()
Returns default configuration.
@spec effective_bank_id() :: String.t() | nil
Returns the effective default bank identifier, if configured.
@spec effective_config() :: t()
Returns the effective configuration merging all sources.
@spec effective_url() :: String.t() | nil
Returns the effective URL using precedence rules.
@spec get_api_key() :: String.t() | nil
Returns the API key for authentication (from configured env var).
@spec get_discovered_url() :: String.t() | nil
Gets the discovered URL if available.
Checks if URL requires authentication (non-localhost).
@spec set_discovered_url(String.t() | nil) :: :ok
Stores a discovered URL (from auto-discovery).
@spec set_runtime_override(map()) :: :ok
Applies a runtime override map sourced from the TOML configuration loader.
@spec set_ui_override(String.t() | nil) :: :ok
Sets a UI override URL (session-only, not persisted).