MemoryExtractionService class

Extracts structured memory candidates from various sources.

Constructors

MemoryExtractionService({ExtractionConfig config = const ExtractionConfig()})

Properties

config ExtractionConfig
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchExtract(List<Map<String, dynamic>> sessionHistory, {List<String> existingMemories = const []}) List<MemoryCandidate>
Run extraction over an entire session history and return ranked, deduplicated candidates.
classifyMemory(String text) → ({MemoryCategory category, double confidence})
Classify a piece of text into a MemoryCategory with confidence.
deduplicateMemories(List<MemoryCandidate> candidates, List<String> existing) List<MemoryCandidate>
Remove candidates whose content is already present in existing.
extractFromCodeChange(String diff, String description) List<MemoryCandidate>
Extract from a code diff with an optional description.
extractFromConversation(List<Map<String, dynamic>> messages) List<MemoryCandidate>
Extract memory candidates from a list of conversation messages.
extractFromToolOutput(String toolName, String output) List<MemoryCandidate>
Extract from a tool's output.
formatForStorage(MemoryCandidate candidate) String
Format a candidate as a markdown bullet suitable for NEOMAGE.md.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rankMemories(List<MemoryCandidate> candidates) List<MemoryCandidate>
Sort candidates by usefulness (highest first).
suggestSection(MemoryCandidate candidate) String
Suggest which NEOMAGE.md section a candidate should go into.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited