Memory Stack

August 12, 2026 · View on GitHub

The memory stack provides the vector and full-text search backends that power forge's agent memory system. It runs two storage engines on an isolated memory-net bridge network: Milvus (vector search) and OpenSearch (full-text search).

  • Compose: ~/docker/memory-stack/docker-compose.yml
  • Appdata: /opt/appdata/memory-stack/
  • Network: memory-net (isolated — no forge-net membership)

Containers

ContainerImagePurpose
milvusmilvusdb/milvus:v2.5.27Vector similarity search
milvus-etcdquay.io/coreos/etcd:v3.5.5Milvus cluster metadata store
milvus-miniominio/minio:RELEASE.2023-03-13T19-46-17ZMilvus segment object storage
opensearchopensearchproject/opensearch:2.17.0Full-text search (BM25 + hybrid)

Access

Both services listen on localhost-only ports — not accessible from the LAN:

ServicePortConsumer
Milvus gRPC/HTTP127.0.0.1:19530memsearch-watch, qmd
OpenSearch REST127.0.0.1:9202memory-fulltext-mcp

OpenSearch security plugin is disabled (DISABLE_SECURITY_PLUGIN=true). The localhost-only port binding is the access control boundary — no external exposure. The port is 9202 (not the default 9200) to avoid conflict with any future OpenSearch instance on the same host.

Milvus Architecture

Milvus standalone mode: a single milvus process backed by etcd (cluster metadata) and MinIO (segment files). All three containers must be healthy before Milvus starts. Data at /opt/appdata/memory-stack/milvus/.

Consumers

PM2 serviceWhat it indexesBackend
memsearch-watch-fast~/.claude/memory/ + session dirs (poll 60s)Milvus
memsearch-watch-templates~/.claude/templates/ (event-driven)Milvus
qmd8 000+ markdown docs across all collectionsMilvus
memory-fulltext-mcpMemory notes full-textOpenSearch
memory-metadata-mcpMemory note metadata (SQLite)— (local file)

See memory-services.md for the PM2 layer on top of this stack.