Class MemoryService
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public sealed class MemoryService : IMemoryService
- Inheritance
-
MemoryService
- Implements
- Inherited Members
Constructors
MemoryService()
public MemoryService()
Properties
MemoryRoot
The root memory directory (~/.jdai/memory/).
public string MemoryRoot { get; }
Property Value
Methods
AppendToDailyLogAsync(string, string, CancellationToken)
Appends a single entry to the daily log for the current UTC date.
Entries are written to memory/{projectId}/memory/YYYY/MM/yyyy-MM-dd.md.
public Task AppendToDailyLogAsync(string projectId, string entry, CancellationToken ct = default)
Parameters
projectIdstringentrystringctCancellationToken
Returns
GetDailyLogAsync(string, DateTimeOffset, CancellationToken)
Reads the daily log for a specific date.
Returns null if the file does not exist.
public Task<string?> GetDailyLogAsync(string projectId, DateTimeOffset logDate, CancellationToken ct = default)
Parameters
projectIdstringlogDateDateTimeOffsetctCancellationToken
Returns
GetMemoryContentAsync(string, CancellationToken)
Reads the long-term memory file for a project. Returns an empty string if the file does not exist.
public Task<string> GetMemoryContentAsync(string projectId, CancellationToken ct = default)
Parameters
projectIdstringctCancellationToken
Returns
WriteMemoryContentAsync(string, string, CancellationToken)
Updates the long-term MEMORY.md file for a project.
public Task WriteMemoryContentAsync(string projectId, string content, CancellationToken ct = default)
Parameters
projectIdstringcontentstringctCancellationToken