SmartPipe.Memory.Health 0.2.0

dotnet add package SmartPipe.Memory.Health --version 0.2.0
                    
NuGet\Install-Package SmartPipe.Memory.Health -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SmartPipe.Memory.Health" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SmartPipe.Memory.Health" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="SmartPipe.Memory.Health" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SmartPipe.Memory.Health --version 0.2.0
                    
#r "nuget: SmartPipe.Memory.Health, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SmartPipe.Memory.Health@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SmartPipe.Memory.Health&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=SmartPipe.Memory.Health&version=0.2.0
                    
Install as a Cake Tool

SmartPipe.Memory.Health

Predictive analytics and health monitoring for SmartPipe.Memory graph stores.

Installation

dotnet add package SmartPipe.Memory.Health

Quick Start

using SmartPipe.Core;
using SmartPipe.Memory.Graph;
using SmartPipe.Memory.Storage;
using SmartPipe.Memory.Health;
using SmartPipe.Memory.Health.Analysis;
using SmartPipe.Memory.Health.Infrastructure;

// 1. Create an in‑memory store and populate a node
var store = StoreFactory.CreateInMemory();
await store.UpsertNodeAsync(new Node { Id = "node1", Type = "Transformer" });

// 2. Build metric history (normally streamed from a pipeline)
var metricHistory = new List<MetricsEntry>
{
    new()
    {
        NodeId = "node1",
        Timestamp = DateTime.UtcNow.AddSeconds(-30),
        Values = new Dictionary<string, double>
        {
            ["AvgLatencyMs"] = 50,
            ["SmoothThroughput"] = 100,
            ["ItemsFailed"] = 0
        }
    },
    new()
    {
        NodeId = "node1",
        Timestamp = DateTime.UtcNow,
        Values = new Dictionary<string, double>
        {
            ["AvgLatencyMs"] = 120,
            ["SmoothThroughput"] = 95,
            ["ItemsFailed"] = 2
        }
    }
};

// 3. Compute the health vector
var calculator = new HealthVectorCalculator(store);
var health = await calculator.ComputeAsync("node1", metricHistory, retryBudget: 3);
Console.WriteLine($"HealthScore: {health.HealthScore:F2}");

// 4. Predict bottlenecks using temporal comparison
var predictor = new BottleneckPredictor(calculator, store);
var prediction = await predictor.PredictAsync(
    "node1",
    metricHistory[^1],               // current snapshot
    metricHistory,                   // full history
    metricHistory[0].Timestamp);     // timestamp of the first snapshot

Console.WriteLine($"Is bottleneck: {prediction.IsBottleneck}");
Console.WriteLine($"Time to impact: {prediction.TimeToImpactMs:F0} ms");

// 5. Generate insights and start a background agent
var generator = new InsightGenerator(predictor, store);
var consolidation = new CognitiveConsolidation(store);
var agent = new InsightAgent(store, generator, consolidation, TimeSpan.FromSeconds(30));

await agent.StartAsync(CancellationToken.None);

// Let the agent run for a while ...
await Task.Delay(TimeSpan.FromSeconds(5));

await agent.StopAsync(CancellationToken.None);
Console.WriteLine("Agent stopped.");

Key Features

  • HealthVector – predictive health scoring with configurable weights
  • BottleneckPredictor – temporal comparison for bottleneck detection
  • InsightGenerator – generates actionable insights from predictions
  • CognitiveConsolidation – merges repeated insights for higher confidence
  • MemoryDecayPolicy – adaptive edge weight decay over time
  • ConflictResolver – weakens old edges on contradictory facts
  • InsightAgent – background service for periodic health analysis
  • MetricsBackgroundConsumer – async channel-based metrics persistence

Dependencies

  • SmartPipe.Memory (>= 0.2.0)
  • SmartPipe.Core (>= 1.0.6)

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SmartPipe.Memory.Health:

Package Downloads
SmartPipe.Memory.Extensions

Integration library connecting SmartPipe.Memory with SmartPipe.Core ETL pipelines. Provides UseMemory(), AsGraphSource(), ToGraphSink(), TransformToEdges() and automatic pipeline topology registration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 36 5/23/2026
0.1.3 98 5/17/2026
0.1.2 103 5/11/2026
0.1.1 101 5/11/2026