Documentation
¶
Index ¶
- type MemoryItem
- type MemoryStore
- func (ms *MemoryStore) AddDecision(content string, tags ...string) string
- func (ms *MemoryStore) AddFact(content string, tags ...string) string
- func (ms *MemoryStore) AddFinding(content string, tags ...string) string
- func (ms *MemoryStore) AddTask(content string, tags ...string) string
- func (ms *MemoryStore) Clear()
- func (ms *MemoryStore) Query(category string, tags ...string) []MemoryItem
- func (ms *MemoryStore) Stats() map[string]int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryItem ¶
type MemoryItem struct {
ID string `json:"id"`
Content string `json:"content"`
Category string `json:"category"`
Tags []string `json:"tags,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Priority int `json:"priority"`
}
MemoryItem represents a single memory entry.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore provides cross-session memory for AI agents. Inspired by lean-ctx's CCP and claw-compactor's Engram system.
func NewMemoryStore ¶
func NewMemoryStore(storePath string) *MemoryStore
NewMemoryStore creates a new memory store.
func (*MemoryStore) AddDecision ¶
func (ms *MemoryStore) AddDecision(content string, tags ...string) string
AddDecision adds a decision to memory.
func (*MemoryStore) AddFact ¶
func (ms *MemoryStore) AddFact(content string, tags ...string) string
AddFact adds a fact to memory.
func (*MemoryStore) AddFinding ¶
func (ms *MemoryStore) AddFinding(content string, tags ...string) string
AddFinding adds a finding to memory.
func (*MemoryStore) AddTask ¶
func (ms *MemoryStore) AddTask(content string, tags ...string) string
AddTask adds a task to memory.
func (*MemoryStore) Query ¶
func (ms *MemoryStore) Query(category string, tags ...string) []MemoryItem
Query searches memory by category and tags.
func (*MemoryStore) Stats ¶
func (ms *MemoryStore) Stats() map[string]int
Stats returns memory statistics.
Click to show internal directories.
Click to hide internal directories.