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
+14
View File
@@ -17,6 +17,7 @@ type AgentConfig struct {
Observability ObservabilityCfg `yaml:"observability"`
Resilience ResilienceCfg `yaml:"resilience"`
Storage StorageCfg `yaml:"storage"`
Memory MemoryCfg `yaml:"memory"`
}
// ── Identity ──────────────────────────────────────────────────────────────
@@ -107,6 +108,7 @@ type ToolsCfg struct {
Scripts ScriptsCfg `yaml:"scripts"`
FileOps FileOpsCfg `yaml:"file_ops"`
MCP MCPToolCfg `yaml:"mcp"`
Memory MemoryToolCfg `yaml:"memory"`
}
type SSHToolCfg struct {
@@ -384,3 +386,15 @@ type HistoryStorageCfg struct {
Path string `yaml:"path"`
Retention time.Duration `yaml:"retention"`
}
// ── Memory ────────────────────────────────────────────────────────────────
type MemoryCfg struct {
Enabled bool `yaml:"enabled"`
WindowSize int `yaml:"window_size"` // sliding window size per room (default 20)
DBPath string `yaml:"db_path"` // SQLite path (default agents/<id>/data/memory.db)
}
type MemoryToolCfg struct {
Enabled bool `yaml:"enabled"`
}