AI.Agent.Memory.Deduplicator (fnord v0.9.29)

View Source

Agent that examines two same-scope long-term memories and decides whether to merge them into a single synthesized memory.

Returns a structured JSON response (no prose) with shape:

{"merge": false}

or

{"merge": true, "title": "...", "content": "...", "topics": [...]}

The caller is responsible for saving the synthesized memory and deleting both originals on a merge decision.

Summary

Functions

Evaluates two same-scope memories and returns a merge decision.

Functions

run(a, b)

@spec run(Memory.t(), Memory.t()) :: {:ok, map()} | {:error, term()}

Evaluates two same-scope memories and returns a merge decision.

Returns {:ok, %{"merge" => false}} to keep both, or {:ok, %{"merge" => true, "title" => ..., "content" => ..., "topics" => [...]}}.