Enable
PassWithMemory with a memory.Config:
Backends
Infrastructure setup (local dev):
Scope
Memories are isolated by scope. Attach context values on every run that should share memories:memCfg.ScopeConfig:
Store modes
Memory kinds
Memories are tagged with aKind that controls TTL defaults and filtering:
Set
memCfg.Recall.Kinds to filter which kinds are recalled for a given agent.
Recall config
TTL and dedup
Override default TTLs withmemCfg.TTLPolicy:
memCfg.Store.DedupMinScore (default 0.85) controls whether a near-duplicate memory is updated or appended. Lower to dedup more aggressively; raise to keep distinct entries.
Remote workers
Pass the samememory.Config to both NewAgent and NewAgentWorker. Both processes must reach the same backend host. See Distributed Execution for the full split-process setup.
Custom backend
Implementinterfaces.Memory:
Storepersists in scope and returns an ID. SupportWithMemoryIDfor upserts.Loadreturns scoped results ordered by relevance; honor limit and min-score options.Cleardeletes all memories in a scope.
memory.DefaultConfig(yourStore) and use with agent.WithMemory.
Example
Memory
Weaviate and pgvector store/recall demos
Related
Conversation
Session history within a single chat
Retrieval
RAG from external document stores