defmodule ExAI do @moduledoc """ ExAI is a lightweight, graph-first runtime for building agent systems in Elixir. """ @typedoc "Supported runtime feature flags." @type feature_flag :: :web_enabled | :remote_execution_enabled | :extism_enabled | :delegate_cli_enabled @doc """ Returns the running application version. """ @spec version() :: String.t() def version do _ = Application.load(:ex_ai) case Application.spec(:ex_ai, :vsn) do nil -> "unknown" vsn -> to_string(vsn) end end @doc """ Returns whether a feature flag is enabled. """ @spec feature_enabled?(feature_flag()) :: boolean() def feature_enabled?(flag) do Application.get_env(:ex_ai, flag, false) == true end end