load

open suspend override fun load(concept: Concept, subject: MemorySubject, scope: MemoryScope): List<Fact>(source)

Retrieves facts associated with a specific concept from storage. This method provides efficient concept-based fact retrieval with:

  • Direct lookup using concept keyword

  • Thread-safe access to storage

  • Graceful handling of missing data

Example usage:

// Load environment information
val envFacts = load(
concept = Concept("env-info", "Machine environment details", FactType.SINGLE),
subject = MemorySubject.Machine,
scope = MemoryScope.Agent("system-analyzer")
)

Return

List of facts for the concept, or empty list if none found

Parameters

concept

The concept whose facts should be retrieved

subject

Context category to search in (e.g., MACHINE, PROJECT)

scope

Visibility scope to search in (e.g., Agent, Feature)