Native memory tools + MCP server + distill agent improvements

Tools:
- Add native memory_render, memory_write, memory_search,
  memory_links, memory_link_set, memory_link_add, memory_used
  tools to poc-agent (tools/memory.rs)
- Add MCP server (~/bin/memory-mcp.py) exposing same tools
  for Claude Code sessions
- Wire memory tools into poc-agent dispatch and definitions
- poc-memory daemon agents now use memory_* tools instead of
  bash poc-memory commands — no shell quoting issues

Distill agent:
- Rewrite distill.agent prompt: "agent of PoC's subconscious"
  framing, focus on synthesis and creativity over bookkeeping
- Add {{neighborhood}} placeholder: full seed node content +
  all neighbors with content + cross-links between neighbors
- Remove content truncation in prompt builder — agents need
  full content for quality work
- Remove bag-of-words similarity suggestions — agents have
  tools, let them explore the graph themselves
- Add api_reasoning config option (default: "high")
- link-set now deduplicates — collapses duplicate links
- Full tool call args in debug logs (was truncated to 80 chars)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-19 22:58:54 -04:00
parent d9b56a02c3
commit 6d22f70192
8 changed files with 290 additions and 87 deletions

View file

@ -61,6 +61,8 @@ pub struct Config {
pub api_key: Option<String>,
/// Model name to use with the direct API endpoint.
pub api_model: Option<String>,
/// Reasoning effort for API calls ("none", "low", "medium", "high").
pub api_reasoning: String,
}
impl Default for Config {
@ -93,6 +95,7 @@ impl Default for Config {
api_base_url: None,
api_key: None,
api_model: None,
api_reasoning: "high".to_string(),
}
}
}
@ -180,6 +183,10 @@ impl Config {
}
}
if let Some(s) = mem.get("api_reasoning").and_then(|v| v.as_str()) {
config.api_reasoning = s.to_string();
}
// Resolve API settings from the shared model/backend config.
// memory.agent_model references a named model; we look up its
// backend to get base_url and api_key.