Versions in this module Expand all Collapse all v1 v1.2.0 Jun 6, 2026 v1.1.0 Jun 3, 2026 Changes in this version + type ReActChain struct + Actions []ToolAction + Observations []string + Thoughts []string + type RoundSummary struct + Actions int + ExpiresAt time.Time + KeyPoints []string + Messages int + Metadata map[string]interface{} + Observations int + RoundID string + Summary string + Thoughts int + Timestamp time.Time + type ShortTermMemory struct + func NewShortTermMemory(maxRounds int, ttl time.Duration) *ShortTermMemory + func (s *ShortTermMemory) AddRoundSummary(summary *RoundSummary) (evicted *RoundSummary, err error) + func (s *ShortTermMemory) BindPersistence(dataDir, subjectID string) error + func (s *ShortTermMemory) BuildContextString(count int) string + func (s *ShortTermMemory) Clear() error + func (s *ShortTermMemory) GenerateSummaryFromWorkingMemory(wm *WorkingMemory) *RoundSummary + func (s *ShortTermMemory) GetAllSummaries() []*RoundSummary + func (s *ShortTermMemory) GetRecentSummaries(count int) []*RoundSummary + func (s *ShortTermMemory) GetRoundSummary(roundID string) (*RoundSummary, error) + func (s *ShortTermMemory) GetStats() *ShortTermMemoryStats + func (s *ShortTermMemory) GetSummariesOldestFirst() []*RoundSummary + func (s *ShortTermMemory) ToMessages(count int) []protocol.Message + type ShortTermMemoryStats struct + MaxRounds int + StoredRounds int + TTL time.Duration + type ToolAction struct + Input map[string]interface{} + Timestamp time.Time + ToolName string + type ToolObservation struct + Error string + Output string + Timestamp time.Time + ToolName string + type WorkingMemory struct + func NewWorkingMemory(roundID string) *WorkingMemory + func (w *WorkingMemory) AddAction(toolName string, input map[string]interface{}) + func (w *WorkingMemory) AddMessage(role protocol.MessageRole, content string) + func (w *WorkingMemory) AddObservation(observation string) + func (w *WorkingMemory) AddThought(thought string) + func (w *WorkingMemory) Clear() + func (w *WorkingMemory) GetAllTempVars() map[string]interface{} + func (w *WorkingMemory) GetContext() WorkingMemoryContext + func (w *WorkingMemory) GetDuration() time.Duration + func (w *WorkingMemory) GetMessages() []protocol.Message + func (w *WorkingMemory) GetReActChain() ReActChain + func (w *WorkingMemory) GetRoundID() string + func (w *WorkingMemory) GetStats() WorkingMemoryStats + func (w *WorkingMemory) GetTempVar(key string) interface{} + func (w *WorkingMemory) MarkMessageAsPriority(index int) + func (w *WorkingMemory) OptimizeContext() + func (w *WorkingMemory) SetCompressionRatio(ratio float32) + func (w *WorkingMemory) SetMaxSize(size int) + func (w *WorkingMemory) SetTempVar(key string, value interface{}) + func (w *WorkingMemory) ToPrompt() string + type WorkingMemoryContext struct + Messages []protocol.Message + ReActChain ReActChain + RoundID string + Stats WorkingMemoryStats + TempVars map[string]interface{} + type WorkingMemoryStats struct + ActionCount int + Duration time.Duration + MessageCount int + ObservationCount int + RoundID string + StartTime time.Time + TempVarCount int + ThoughtCount int