# `Gralkor.Config`
[🔗](https://github.com/elimydlarz/gralkor/blob/main/lib/gralkor/config.ex#L1)

Configuration for the embedded Gralkor runtime.

Two operator-facing knobs decide what `:gralkor_ex` does at boot:

  * The FalkorDB connection — either embedded (`falkordblite` spawns a local
    `redis-server` child under a directory chosen by `GRALKOR_DATA_DIR`) or
    remote (network `host:port` plus optional credentials, set via the
    `:gralkor_ex, :falkordb` application env). Remote wins when both are
    configured. See `falkordb_spec/0`.
  * The LLM and embedder models — read from the `GRALKOR_LLM_MODEL` and
    `GRALKOR_EMBEDDER_MODEL` env vars, falling back to the defaults below.

Models are stored as req_llm-style `"provider:model"` strings — when graphiti
needs them split, the provider/model halves are extracted at the call site.

# `falkordb_spec`

```elixir
@type falkordb_spec() :: {:remote, keyword()} | {:embedded, String.t()}
```

Resolved FalkorDB selection. `:remote` carries the validated keyword list
the operator supplied; `:embedded` carries the expanded data directory.

# `embedder_model`

```elixir
@spec embedder_model() :: String.t()
```

# `falkordb_spec`

```elixir
@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.

# `llm_model`

```elixir
@spec llm_model() :: String.t()
```

# `validate_falkordb!`

```elixir
@spec validate_falkordb!(any()) :: keyword()
```

Validate a remote FalkorDB keyword spec. Raises `ArgumentError` with a
pointed message if the shape is wrong; returns the keyword list unchanged
on success.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
