Configuration for the embedded Gralkor runtime.
Two operator-facing knobs decide what :jido_gralkor does at boot:
- The FalkorDB connection — either embedded (
falkordblitespawns a localredis-serverchild under a directory chosen byGRALKOR_DATA_DIR) or remote (networkhost:portplus optional credentials, set via the:jido_gralkor, :falkordbapplication env). Remote wins when both are configured. Seefalkordb_spec/0. - The LLM and embedder models — set via the
GRALKOR_LLM_MODELandGRALKOR_EMBEDDER_MODELenv vars in"provider:model"form (operator contract).llm_model/0andembedder_model/0return them as%{provider: atom(), id: String.t()}maps — the inline-map shapeReqLLM.model/1accepts without a catalog lookup (no "unverified model"IO.warnwhen the model id is newer than the LLMDB snapshot bundled withreq_llm).
Summary
Types
Resolved FalkorDB selection. :remote carries the validated keyword list
the operator supplied; :embedded carries the expanded data directory.
Resolved model spec — the inline-map shape ReqLLM.model/1 accepts directly.
Functions
Resolve the FalkorDB connection spec from configuration. Returns nil
when neither knob is set so the supervisor can run with no children.
Resolve the optional deployment-wide ontology from the :jido_gralkor, :ontology application env.
Validate a remote FalkorDB keyword spec. Raises ArgumentError with a
pointed message if the shape is wrong; returns the keyword list unchanged
on success.
Types
Resolved FalkorDB selection. :remote carries the validated keyword list
the operator supplied; :embedded carries the expanded data directory.
Resolved model spec — the inline-map shape ReqLLM.model/1 accepts directly.
Functions
@spec embedder_model() :: model_spec()
@spec falkordb_spec() :: falkordb_spec() | nil
Resolve the FalkorDB connection spec from configuration. Returns nil
when neither knob is set so the supervisor can run with no children.
Remote wins over embedded when both are present.
@spec llm_model() :: model_spec()
@spec ontology() :: module() | nil
Resolve the optional deployment-wide ontology from the :jido_gralkor, :ontology application env.
This is the single source of truth for ontology: it is never read from agent
state, plugin mount opts, or per-call context. Every write path (capture,
memory_add) resolves it from here. Returns the module (declared via
use Gralkor.Ontology) or nil when unset. Raises ArgumentError on a
module that is not an ontology, or any non-module value — fail-fast on
operator misconfig at the write boundary rather than as a downstream graphiti
failure.
Validate a remote FalkorDB keyword spec. Raises ArgumentError with a
pointed message if the shape is wrong; returns the keyword list unchanged
on success.