Documentation
¶
Overview ¶
Package compact implements memory compaction — auto-summarize when the graph exceeds a token budget. Based on Engram and Letta approaches.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compactor ¶
type Compactor struct {
// contains filtered or unexported fields
}
Compactor summarizes old, low-confidence memories to keep the graph lean.
func (*Compactor) Compact ¶
Compact merges low-confidence, old memories of the same type into summary nodes. Returns the number of nodes compacted.
func (*Compactor) NeedsCompaction ¶
NeedsCompaction returns true if total content exceeds the token budget.
func (*Compactor) WithSummarizer ¶
func (c *Compactor) WithSummarizer(s Summarizer) *Compactor
WithSummarizer sets a custom summarizer (e.g., LLM-backed).
type DefaultSummarizer ¶
type DefaultSummarizer struct{}
DefaultSummarizer is the built-in, no-LLM summarizer.
Click to show internal directories.
Click to hide internal directories.