Skip to content

Feature request: native HTTP transport for MemosBridgeClient (remote bridge) #1985

Description

@xybstone

Problem

MemosBridgeClient (in adapters/hermes/memos_provider/bridge_client.py) is stdio-only.
It spawns node dist/bridge.cjs as a local subprocess and communicates via line-delimited
JSON-RPC on stdin/stdout. There is no built-in way to connect to a remote MemOS instance.

This means:

  • A user who wants to share one MemOS database across multiple devices must either
    sync the DB file, or run Hermes directly on the machine that hosts memos.
  • The Hermes desktop app runs well on laptops (thin clients), but the heavy work
    (embeddings, LLM filtering, reward backprop) would be better placed on a home server.

Proposal

Add a transport layer to MemosBridgeClient so it can optionally talk to a remote
bridge over HTTP (REST API) instead of requiring a local subprocess.

Something like:

# env-var-driven transport selection
if os.environ.get("MEMOS_REMOTE_URL"):
    self._transport = HttpTransport(base_url=MEMOS_REMOTE_URL)
else:
    self._transport = StdioTransport(...)

The HTTP transport would:

  • Map read methods (search, get_trace, health) → GET /api/v1/memory/search, etc.
  • Forward write methods (turn.end, session.open) through SSH stdio to remote bridge
    (or potentially expose write endpoints in the HTTP daemon)
  • Be a drop-in: same JSON-RPC contract, same response shape

Reference

We built a working 199-line Python shim that does exactly this by intercepting
.memos-node-bin to route between HTTP and SSH stdio:

https://github.com/xybstone/memos-hermes-remote

Reads go through the viewer daemon's HTTP API (:18800), writes go through
ssh host node dist/bridge.cjs --agent=hermes --no-viewer. The provider
sees no difference — stdin/stdout JSON-RPC contract is preserved exactly.

Tested across two Macs over Tailscale: full lifecycle (session.open →
turn.start → turn.end) including persistence and semantic search.

Why this matters

MemOS is advertised as memos-local-plugin, but there's a very natural use case
for one persistent MemOS instance that multiple Hermes sessions (desktop, laptop,
mini) all use. The only missing piece is a transport abstraction in bridge_client.py.

Happy to discuss the design or contribute a PR if there's a direction!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pluginPlugin, adapter, bridge, or apps layer | 插件、适配器、桥接层或 apps 目录types:enhancementNew feature or improvement | 新功能或改进

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions