1.9 KiB
1.9 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ee85bf89-93f0-48e4-b911-7ddc18a735b5 | decision | Auto-edge creation on memory_store in MCP server |
|
0.8 | 0.8 | 2026-03-01T04:12:39.570452+00:00 | 2026-03-01T04:13:10.207790+00:00 |
|
Auto-edge Creation on memory_store in MCP Server
Decision
Implemented auto-edge creation in mcp_server.py that runs after every memory_store call.
Implementation
The _auto_create_edges() helper:
- Uses
client.recall(title + tags, limit=5, semantic=True)to find related memories - Applies type-pair heuristics from
AUTO_EDGE_HEURISTICStable (subset of edge-proposer.py) to choose edge types: SOLVES, BUILDS_ON, RELATED_TO - Calls
client.relate()for up to 3 edges - Returns
(edges_list, error_string_or_None)tuple — never raises so store always succeeds
Response Shape
Response includes auto_edges array and optional auto_edge_error key.
Key Design Decisions
- Same-type pairs excluded as too noisy
- REQUIRES/FOLLOWS excluded as needing stronger signal
- Keyword-only fallback requires tag overlap to prevent spurious edges
- Similarity score passed as edge strength
- Description arrow matches actual from/to direction (after direction resolution)