feat: implement memory management system with SQLite persistence, including conversation windows and episodic facts

This commit is contained in:
2026-03-06 00:39:22 +00:00
parent d26be78c46
commit cb9489e633
7 changed files with 642 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
package memory
import "context"
// Store is the interface for persistent memory operations.
// Defined in the pure package; implemented by shell/memory.
type Store interface {
// Facts
SaveFact(ctx context.Context, fact Fact) error
RecallFacts(ctx context.Context, agentID, subject string, key *string) ([]Fact, error)
DeleteFacts(ctx context.Context, agentID, subject string, key *string) error
// Message history
SaveMessage(ctx context.Context, msg HistoryMessage) error
LoadMessages(ctx context.Context, agentID, roomID string, limit int) ([]HistoryMessage, error)
DeleteMessages(ctx context.Context, agentID string, roomID *string) error
// Lifecycle
Close() error
}