Header menu logo Nao

IWorkingMemory Type

Interface for task-scoped working memory (scratchpad)

Instance members

Instance member Description

this.ClearAsync

Full Usage: this.ClearAsync

Returns: Task<unit>
Modifiers: abstract

Clear all working memory

Returns: Task<unit>

this.DecayAsync

Full Usage: this.DecayAsync

Returns: Task<int>
Modifiers: abstract

Apply decay to all non-pinned items and evict expired/below-threshold

Returns: Task<int>

this.FocusAsync

Full Usage: this.FocusAsync

Parameters:
    key : string
    boost : float

Returns: Task<unit>
Modifiers: abstract

Boost attention for a specific item

key : string
boost : float
Returns: Task<unit>

this.GetActiveAsync

Full Usage: this.GetActiveAsync

Parameters:
    minAttention : float

Returns: Task<WorkingMemoryItem list>
Modifiers: abstract

Get items above an attention threshold

minAttention : float
Returns: Task<WorkingMemoryItem list>

this.GetAllAsync

Full Usage: this.GetAllAsync

Returns: Task<WorkingMemoryItem list>
Modifiers: abstract

Get all items sorted by attention (highest first)

Returns: Task<WorkingMemoryItem list>

this.GetAsync

Full Usage: this.GetAsync

Parameters:
    key : string

Returns: Task<WorkingMemoryItem option>
Modifiers: abstract

Get an item by key (boosts its attention)

key : string
Returns: Task<WorkingMemoryItem option>

this.PinAsync

Full Usage: this.PinAsync

Parameters:
    key : string

Returns: Task<unit>
Modifiers: abstract

Pin an item (prevent eviction)

key : string
Returns: Task<unit>

this.RemoveAsync

Full Usage: this.RemoveAsync

Parameters:
    key : string

Returns: Task<unit>
Modifiers: abstract

Remove a specific item

key : string
Returns: Task<unit>

this.RenderContextAsync

Full Usage: this.RenderContextAsync

Parameters:
    topK : int

Returns: Task<string>
Modifiers: abstract

Render working memory as context for LLM (top-K by attention)

topK : int
Returns: Task<string>

this.SetAsync

Full Usage: this.SetAsync

Parameters:
Returns: Task<unit>
Modifiers: abstract

Add or update an item in working memory

arg0 : WorkingMemoryItem
Returns: Task<unit>

this.UnpinAsync

Full Usage: this.UnpinAsync

Parameters:
    key : string

Returns: Task<unit>
Modifiers: abstract

Unpin an item

key : string
Returns: Task<unit>

Type something to start searching.