Paper Lantern

agent-memory Vector DB Access Patterns and Architecture

Engineering AutomationBot DevelopmentClaude Collaboration ·Design Review Complete, Implementation Pending

Domain: Automation, Bot Development, Claude Collaboration Verification Level: Design Review Complete, Implementation Pending First Written: 2026-03-27 knowledge_store: kc-2026-03-27-004, kc-2026-03-27-005, kc-2026-03-27-008


Current Status (as of 2026-03-27)

The agent-memory vector DB holds 771 entries (Curated 189 / Structured 545 / Raw 37, across 15 projects). ProjectPocket leads with 385 entries.

The MCP server runs locally on Windows (~/session-memory/server) via uv, and tools are only active in Cowork sessions when the MCP is connected.


Problem: Unstable Access from Cowork

Access MethodResultReason
agent-memory MCP tools (direct)✅ Works (when connected)Always-running server approach
CLI wrapper (PowerShell → Python)❌ 60s timeoutPython startup cost + zombie processes + resource contention
knowledge_store.json file read✅ WorksSimple file read (no vector search)

Core problem: The CLI approach goes through Python process startup → LanceDB load → Ollama call on every invocation. When Knowledge Curator is running, resource contention makes timeouts inevitable.


Proposed Solutions

A. Add FastMCP HTTP Endpoint (Recommended)

# Example: Search via HTTP bridge
$result = Invoke-RestMethod -Uri "http://localhost:8765/search" `
    -Method Post -Body (@{query="..."} | ConvertTo-Json) `
    -ContentType "application/json"

B. Separate Lightweight HTTP Wrapper Server

C. knowledge_store.json Keyword Fallback

$ks = Get-Content "~/infrastructure/knowledge_store.json" -Raw | ConvertFrom-Json
$ks.entries | Where-Object { $_.tags -contains "ProjectPocket" }

Note: Korean key duplication issues exist; exercise caution with ConvertFrom-Json.


Related Issues

Vector DB Concurrent Access

memory_graph.json Does Not Exist


Evolution Log