MCPcopy
hub / github.com/micro/go-micro / storeMemory

Struct storeMemory

agent/memory.go:112–120  ·  view source on GitHub ↗

storeMemory is the default Memory: an ai.History buffer optionally persisted to a store.

Source from the content-addressed store, hash-verified

110// storeMemory is the default Memory: an ai.History buffer optionally
111// persisted to a store.
112type storeMemory struct {
113 mu sync.Mutex
114 store store.Store
115 key string
116 hist *ai.History
117 compaction MemoryCompaction
118 archive []ai.Message
119 retrieveAll bool
120}
121
122func (m *storeMemory) Add(role, content string) {
123 m.mu.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected