diff --git a/src/agent/tools/memory.rs b/src/agent/tools/memory.rs index efad978..f64a4d3 100644 --- a/src/agent/tools/memory.rs +++ b/src/agent/tools/memory.rs @@ -33,7 +33,7 @@ async fn get_provenance(agent: &Option>) -> // ── Definitions ──────────────────────────────────────────────── -pub fn memory_tools() -> [super::Tool; 14] { +pub fn memory_tools() -> [super::Tool; 13] { use super::Tool; [ Tool { name: "memory_render", description: "Read a memory node's content and links.", @@ -75,9 +75,6 @@ pub fn memory_tools() -> [super::Tool; 14] { Tool { name: "graph_health", description: "Show graph health report with maintenance recommendations.", parameters_json: r#"{"type":"object","properties":{}}"#, handler: Arc::new(|_a, _v| Box::pin(async { graph_health().await })) }, - Tool { name: "interference_pairs", description: "Find similar nodes that may interfere (duplicates or near-duplicates).", - parameters_json: r#"{"type":"object","properties":{"threshold":{"type":"number","description":"Similarity threshold (default 0.5)"},"limit":{"type":"integer","description":"Max pairs to return (default 10)"}}}"#, - handler: Arc::new(|_a, v| Box::pin(async move { interference_pairs(&v).await })) }, ] } @@ -343,13 +340,3 @@ async fn graph_health() -> Result { Ok(crate::subconscious::prompts::format_health_section(&store, &graph)) } -async fn interference_pairs(args: &serde_json::Value) -> Result { - let threshold = args.get("threshold").and_then(|v| v.as_f64()).unwrap_or(0.5) as f32; - let limit = args.get("limit").and_then(|v| v.as_u64()).unwrap_or(10) as usize; - let arc = cached_store().await?; - let store = arc.lock().await; - let graph = store.build_graph(); - let mut pairs = crate::neuro::detect_interference(&store, &graph, threshold); - pairs.truncate(limit); - Ok(crate::subconscious::prompts::format_pairs_section(&pairs, &store, &graph)) -} diff --git a/src/subconscious/agents/separator.agent b/src/subconscious/agents/separator.agent deleted file mode 100644 index 51b6068..0000000 --- a/src/subconscious/agents/separator.agent +++ /dev/null @@ -1,42 +0,0 @@ -{"agent": "separator", "query": "", "schedule": "daily"} - -# Separator Agent — Pattern Separation (Dentate Gyrus) - - -{{tool: memory_render core-personality}} - -{{tool: memory_render memory-instructions-core}} - -{{tool: memory_render memory-instructions-core-subconscious}} - -{{tool: memory_render subconscious-notes-{agent_name}}} - -You are a memory consolidation agent performing pattern separation. - -## What you're doing - -When two memories are similar but semantically distinct, actively make -their representations MORE different to reduce interference. Take -overlapping inputs and orthogonalize them. - -## Types of interference - -1. **Genuine duplicates**: Merge them. -2. **Near-duplicates with important differences**: Sharpen the distinction, - add distinguishing links. -3. **Surface similarity, deep difference**: Categorize differently. -4. **Supersession**: Link with supersession note, let older decay. - -## Guidelines - -- **Read both nodes carefully before deciding.** -- **Merge is a strong action.** When in doubt, differentiate instead. -- **The goal is retrieval precision.** -- **Session summaries are the biggest source of interference.** -- **Look for the supersession pattern.** - -{{tool: graph_topology}} - -## Interfering pairs to review - -{{tool: interference_pairs}} diff --git a/src/subconscious/prompts.rs b/src/subconscious/prompts.rs index 132ef3f..854ac19 100644 --- a/src/subconscious/prompts.rs +++ b/src/subconscious/prompts.rs @@ -195,7 +195,7 @@ pub fn format_health_section(store: &Store, graph: &Graph) -> String { out } -pub fn format_pairs_section( +pub(super) fn format_pairs_section( pairs: &[(String, String, f32)], store: &Store, graph: &Graph,