Documentation
¶
Overview ¶
Package memorybackend adapts octo to optional, user-configured external semantic memory services (hindsight, mem0, agentmemory). It is separate from and does not touch internal/memory, which owns the markdown MEMORY.md/topic-file layer — see dev-docs/memory-design.md for why that layer is deliberately untyped. This package is the opposite: a typed store/recall client for services that do their own extraction and retrieval server-side.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// Name identifies the backend, e.g. "hindsight".
Name() string
// Store saves a piece of free-form text. Backends that do their own
// extraction (mem0, agentmemory) are expected to receive raw
// conversational content and extract/dedupe it themselves.
Store(ctx context.Context, content string) error
// Recall searches for memories relevant to query.
Recall(ctx context.Context, query string) ([]Result, error)
}
Backend is the normalized interface every adapter implements.
type Config ¶
type Config struct {
// Type is "hindsight", "mem0", or "agentmemory".
Type string
// BaseURL is the backend's REST endpoint, e.g. http://localhost:8888.
BaseURL string
// APIKey is optional; whether it's required depends on the backend and
// how it was deployed (e.g. mem0 requires auth by default, hindsight
// does not).
APIKey string
// Namespace scopes stored/recalled memories (hindsight bank_id, mem0
// user_id, agentmemory project). Defaults to "default" when empty.
Namespace string
// Mode selects between deployment variants of the same Type. Currently
// only meaningful for "mem0": "cloud" talks to the hosted Platform API
// (api.mem0.ai); "" or "self_hosted" (the default) talks to the
// self-hosted server/ OSS stack. Ignored by other backend types.
Mode string
}
Config selects and configures a single backend. Only one backend can be active at a time.
Click to show internal directories.
Click to hide internal directories.