From 0936eb15144e2fc15b073e989d6c5d700dc47435 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 13 Dec 2025 11:37:10 -0500 Subject: Add knowledge graph with typed relations to Memory module - Add RelationType with 6 relation types - Add MemoryLink type and memory_links table - Add graph functions: linkMemories, getMemoryLinks, queryGraph - Add link_memories and query_graph agent tools - Wire up graph tools to Telegram bot - Include memory ID in recall results for linking - Fix streaming usage parsing for cost tracking Closes t-255 Amp-Thread-ID: https://ampcode.com/threads/T-019b181f-d6cd-70de-8857-c445baef7508 Co-authored-by: Amp --- Omni/Agent/Telegram.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Omni/Agent/Telegram.hs') diff --git a/Omni/Agent/Telegram.hs b/Omni/Agent/Telegram.hs index 418e589..091ad11 100644 --- a/Omni/Agent/Telegram.hs +++ b/Omni/Agent/Telegram.hs @@ -602,7 +602,9 @@ processEngagedMessage tgConfig provider engineCfg msg uid userName chatId userMe let memoryTools = [ Memory.rememberTool uid, - Memory.recallTool uid + Memory.recallTool uid, + Memory.linkMemoriesTool uid, + Memory.queryGraphTool uid ] searchTools = case Types.tgKagiApiKey tgConfig of Just kagiKey -> [WebSearch.webSearchTool kagiKey] -- cgit v1.2.3