Gralkor.Recall (jido_gralkor v11.0.0)

Copy Markdown View Source

Orchestrate one recall call: search the graph and wrap the returned facts in a <gralkor-memory> block.

Pure orchestration — the search dependency is passed as a function in opts. Production wiring lives in Gralkor.Client.Native.

See test-trees/unit/recall_TEST_TREES.md.

Summary

Types

group_id()

@type group_id() :: String.t()

opts()

@type opts() :: [
  search_fn: search_fn(),
  max_results: pos_integer(),
  deadline_ms: pos_integer()
]

search_fn()

@type search_fn() :: (group_id(), query :: String.t(), max :: pos_integer() ->
                  {:ok, [String.t()]} | {:error, term()})

session_id()

@type session_id() :: String.t() | nil

Functions

recall(group_id, agent_name, session_id, query, opts)

@spec recall(group_id(), String.t(), session_id(), String.t(), opts()) ::
  {:ok, String.t()} | {:error, :recall_deadline_expired | term()}