Table of Contents

Class MemoryContextProvider

Namespace
Oscova.Agents.Memory
Assembly
Oscova.Agents.dll

Boot-loads the user's long-term memory index and recent daily logs into the agent's system prompt.

public sealed class MemoryContextProvider : AIContextProvider

Inheritance

AIContextProvider

Inherited Members

AIContextProvider.InvokingAsync(AIContextProvider.InvokingContext, CancellationToken)
AIContextProvider.InvokedAsync(AIContextProvider.InvokedContext, CancellationToken)
AIContextProvider.GetService(Type, object?)
AIContextProvider.GetService<TService>(object?)
AIContextProvider.StateKeys

Remarks

Initializes a new instance of Oscova.Agents.Memory.MemoryContextProvider.

Constructors

MemoryContextProvider(IAgentMemoryService, string, int, IReadOnlyList<AITool>?)

Boot-loads the user's long-term memory index and recent daily logs into the agent's system prompt.

Fields

DefaultMemoryPrompt

Default prompt template that explains persistent memory and inserts the assembled memory block.

Properties

SystemPrompt

The system prompt template injected into the agent's context when memory is loaded. Supports a {{ agent_memory }} Scriban template variable that expands to the assembled <agent_memory> XML block. If the variable is omitted, the block is appended automatically.

Methods

ProvideAIContextAsync(InvokingContext, CancellationToken)

When overridden in a derived class, provides additional AI context to be merged with the input context for the current invocation.