integration

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryIntegration

type MemoryIntegration struct {
	// contains filtered or unexported fields
}

MemoryIntegration provides integration between agent and memory system

func NewMemoryIntegration

func NewMemoryIntegration(store *memory.Store) *MemoryIntegration

NewMemoryIntegration creates a new memory integration

func (*MemoryIntegration) BuildContext

func (m *MemoryIntegration) BuildContext(query string) (string, error)

BuildContext builds a context string from relevant memories

func (*MemoryIntegration) CompactSessionMemories

func (m *MemoryIntegration) CompactSessionMemories() error

CompactSessionMemories compacts session memories when session is long

func (*MemoryIntegration) EnableAutoRecall

func (m *MemoryIntegration) EnableAutoRecall(enabled bool)

EnableAutoRecall enables automatic memory recall

func (*MemoryIntegration) ExtractAndStore

func (m *MemoryIntegration) ExtractAndStore(conversation []struct {
	Role    string
	Content string
}) error

ExtractAndStore extracts key information from the conversation using pattern matching

func (*MemoryIntegration) GetAgentMemory

func (m *MemoryIntegration) GetAgentMemory() (string, error)

GetAgentMemory retrieves agent memory

func (*MemoryIntegration) GetCommandTrustLevel

func (m *MemoryIntegration) GetCommandTrustLevel(commandHash string) (string, int, error)

GetCommandTrustLevel returns how trusted a command is

func (*MemoryIntegration) GetSessionMemories

func (m *MemoryIntegration) GetSessionMemories() ([]*memory.Memory, error)

GetSessionMemories retrieves all memories from the current session

func (*MemoryIntegration) GetUserMemory

func (m *MemoryIntegration) GetUserMemory() (string, error)

GetUserMemory retrieves user memory

func (*MemoryIntegration) PeriodicRecall

func (m *MemoryIntegration) PeriodicRecall(ctx context.Context, keywords []string) ([]*memory.Memory, error)

PeriodicRecall performs periodic recall to refresh context

func (*MemoryIntegration) Recall

func (m *MemoryIntegration) Recall(query string, memoryTypes ...memory.MemoryType) ([]*memory.Memory, error)

Recall retrieves relevant memories for a query

func (*MemoryIntegration) RecordCommandAction

func (m *MemoryIntegration) RecordCommandAction(command, action string) error

RecordCommandAction records a command action for learning

func (*MemoryIntegration) SetSession

func (m *MemoryIntegration) SetSession(sessionID string)

SetSession sets the current session ID

func (*MemoryIntegration) Stats

func (m *MemoryIntegration) Stats() (*memory.MemoryStats, error)

Stats returns memory statistics

func (*MemoryIntegration) Store

func (m *MemoryIntegration) Store(mem *memory.Memory) error

Store saves a new memory

func (*MemoryIntegration) StoreFromConversation

func (m *MemoryIntegration) StoreFromConversation(userMsg, agentMsg string) error

StoreFromConversation extracts and stores key information from conversation

func (*MemoryIntegration) UpdateAgentMemory

func (m *MemoryIntegration) UpdateAgentMemory(content string) error

UpdateAgentMemory updates the agent's persistent memory

func (*MemoryIntegration) UpdateUserMemory

func (m *MemoryIntegration) UpdateUserMemory(content string) error

UpdateUserMemory updates the user's persistent profile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL