Versions in this module Expand all Collapse all v0 v0.2.0 Apr 17, 2026 Changes in this version + var ValidMemoryTypes = map[MemoryType]bool + func ContentHash(content string) string + type Manager struct + func NewManager(s VectorStore, e embedding.Provider) *Manager + func (m *Manager) Add(ctx context.Context, content string, memType MemoryType, filter *SearchFilter, ...) (*Memory, error) + func (m *Manager) Delete(ctx context.Context, id string) error + func (m *Manager) Get(ctx context.Context, id string) (*Memory, error) + func (m *Manager) List(ctx context.Context, filter *SearchFilter, limit, offset int) ([]*Memory, int, error) + func (m *Manager) Search(ctx context.Context, query string, k int, filter *SearchFilter) ([]SearchResult, error) + func (m *Manager) Stats(ctx context.Context, filter *SearchFilter) (*Stats, error) + func (m *Manager) Update(ctx context.Context, id string, content *string, metadata map[string]any) (*Memory, error) + type Memory struct + AgentID string + AppID string + Content string + ContentHash string + CreatedAt time.Time + Embedding []float32 + ID string + MemoryType MemoryType + Metadata map[string]any + RunID string + UpdatedAt time.Time + UserID string + type MemoryType string + const TypeCodePattern + const TypeConversation + const TypeCorrection + const TypeDecision + const TypeFact + func (mt MemoryType) Valid() bool + type SearchFilter struct + AgentID string + AppID string + MemoryType MemoryType + RunID string + Since *time.Time + Until *time.Time + UserID string + type SearchResult struct + Distance float64 + Memory Memory + Score float64 + type Stats struct + ByType map[string]int + ByUser map[string]int + NewestAt *time.Time + OldestAt *time.Time + Total int + type VectorStore interface + Close func() error + Delete func(ctx context.Context, id string) error + Get func(ctx context.Context, id string) (*Memory, error) + GetByHash func(ctx context.Context, contentHash string, filter *SearchFilter) (*Memory, error) + Insert func(ctx context.Context, mem *Memory) error + List func(ctx context.Context, filter *SearchFilter, limit, offset int) ([]*Memory, int, error) + Search func(ctx context.Context, vector []float32, k int, filter *SearchFilter) ([]SearchResult, error) + Stats func(ctx context.Context, filter *SearchFilter) (*Stats, error) + Update func(ctx context.Context, mem *Memory) error