Skip to content

[Feature Request] Generic HTTP memory provider — plug any memory backend into SemanticMemoryProvider without new code #1478

Open

Description

@WeiYiAcc

Summary

Today the semantic-memory pipeline (MEMORY_PROVIDER_ADAPTERS in packages/adapters/src/memory-provider-factory.ts) is a closed registry: supermemory and serenity only, and any other provider string throws `Unknown memory provider`. Every new memory backend needs its own adapter + PR (Serenity #834, Honcho #1360/#1361).

I'd like to request a generic HTTP memory provider: a configurable adapter that maps the existing `SemanticMemoryProvider` contract (`remember` / `recall` / `forget`) onto user-supplied REST endpoints, so self-hosters can plug in any memory service — their own or a hosted one — without forking or waiting for a native adapter.

Why it fits Rakazo specifically

  • Self-hosters already run their own memory systems (vector stores, bespoke knowledge bases, agent-memory services like ai-memory/Honcho self-hosts). A generic adapter serves all of them at once — including providers you'll never add natively.
  • The contract surface is tiny: three operations. An adapter is a thin translation layer; the protocol is what costs effort every time.
  • The deployment trust boundary already exists: private/LAN endpoints gate behind requiresDeploymentOwner (same pattern Serenity uses) so SSRF isn't newly opened.

Rough shape (not prescriptive)

provider: "http"
settings:
  endpoints:
    remember: "POST {base}/v1/remember"
    recall:   "POST {base}/v1/recall"
    forget:   "POST {base}/v1/forget"
  bodyTemplate / responseMapping: (JSON paths or a fixed documented schema)
credentials:
  token: <bearer/api key>

Alternatively the provider could require the backend to implement a small documented schema directly (simplest for both sides — like a health-check contract).

What this is not

  • Not asking for MCP-tool integration (agents already get that via Direct MCP server integrations — different mechanism, agent-driven not pipeline-driven).
  • Not asking to remove the per-turn hook discussion in Memory providers: optional hook for each finished turn #1360 — orthogonal; a generic provider should also expose that hook when/if it lands.

Context

Self-hosted Rakazo + self-hosted memory backend here; happy to test-drive a draft implementation if that helps.

Activity

  1. balabommablock-cpu commented on Oct 20, 2026

    @balabommablock-cpu
    Contributor

    One thing worth pinning down before the shape: today's contract is a little more than remember / recall / forget. SemanticMemoryProvider is recall, save, purgeHistory, and an optional forget.

    purgeHistory is the one users would notice. When someone clears a thread, Rakazo asks the provider to drop the summaries from that conversation (botId + generations). A generic backend that skips it would keep recalling a chat the user thought was gone.

    That makes me lean to your second option, a fixed documented schema, over templates and JSON-path mappings:

    • four POST endpoints that take and return the existing request / result types as JSON (recall returns [{ memory, score, id? }])
    • purgeHistory required, forget optional, same as the interface
    • a small conformance check self-hosters can run against their URL

    Templates feel flexible, but every mapping option becomes something to support forever, and the purge path is easy to get quietly wrong. A fixed schema is one adapter here and a small shim on the backend side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions