UPDATE [dbo].[AgentMemories]
SET [AgentId] = @AgentId, [Domain] = @Domain, [SourceTaskId] = @SourceTaskId, [SourceReviewId] = @SourceReviewId, [SourceType] = @SourceType, [Content] = @Content, [Summary] = @Summary, [TagsJson] = @TagsJson, [Confidence] = @Confidence, [UpdatedUtc] = @UpdatedUtc, [ExpiresUtc] = @ExpiresUtc, [LastAccessedUtc] = @LastAccessedUtc
WHERE [MemoryId] = @MemoryId
  AND [WorkspaceId] = @WorkspaceId;

SELECT *
FROM [dbo].[AgentMemories]
WHERE [MemoryId] = @MemoryId
  AND [WorkspaceId] = @WorkspaceId;
