ControlAgentNet.Features.Heartbeat
0.1.0
dotnet add package ControlAgentNet.Features.Heartbeat --version 0.1.0
NuGet\Install-Package ControlAgentNet.Features.Heartbeat -Version 0.1.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="ControlAgentNet.Features.Heartbeat" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ControlAgentNet.Features.Heartbeat" Version="0.1.0" />
<PackageReference Include="ControlAgentNet.Features.Heartbeat" />
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 ControlAgentNet.Features.Heartbeat --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ControlAgentNet.Features.Heartbeat, 0.1.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 ControlAgentNet.Features.Heartbeat@0.1.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=ControlAgentNet.Features.Heartbeat&version=0.1.0
#tool nuget:?package=ControlAgentNet.Features.Heartbeat&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ControlAgentNet.Features.Heartbeat
Prompt-driven heartbeats built on top of ControlAgentNet.Features.CronJobs.
What It Does
- Runs periodic agent instructions using cron schedules
- Sends each heartbeat to the agent through a synthetic
heartbeatchannel - Stores the latest execution result, error, and policy-blocked state
- Integrates with channel policies for the synthetic heartbeat channel
- Supports many heartbeats in the same host
Usage
Prompt-driven heartbeat
using ControlAgentNet.Features.Heartbeat;
builder.Services.AddControlAgentAgent(builder.Configuration, builder.Environment, configureAgent: options =>
{
options.Id = "my-agent";
options.Name = "My Agent";
options.Instructions = "You are a helpful assistant.";
})
.AddHeartbeat(options =>
{
options.HeartbeatId = "website-review";
options.DisplayName = "Website Review";
options.Prompt = """
Revisa https://miweb.com.
Usa las tools disponibles para verificar si esta caida.
Si detectas error, resume la causa probable y el impacto.
""";
options.CronExpression = "0 20 * * *";
options.TimeZoneId = "America/Caracas";
});
Heartbeat invoking a tool every minute
This is the simplest “OpenClaw-style” integration example: the heartbeat is a prompt, and the agent resolves it by calling a registered tool.
using ControlAgentNet.Features.Heartbeat;
using ControlAgentNet.Tools.Greeting;
builder.Services.AddControlAgentAgent(builder.Configuration, builder.Environment, configureAgent: options =>
{
options.Id = "my-agent";
options.Name = "My Agent";
options.Instructions = "Use the Greeting tool when a heartbeat asks for a greeting.";
})
.AddGreetingTools()
.AddHeartbeat(options =>
{
options.HeartbeatId = "greeting-every-minute";
options.DisplayName = "Greeting Every Minute";
options.Prompt = """
Invoke the Greeting tool with the name "Heartbeat Demo".
Return only the tool result.
""";
options.CronExpression = "*/1 * * * *";
options.TimeZoneId = "America/Caracas";
});
In the sample host, the orchestrator resolves the registered Greeting tool from ToolRegistry and invokes it. See samples/HeartbeatDemo/Program.cs.
Multiple heartbeats
builder.Services.AddControlAgentAgent(builder.Configuration, builder.Environment, configureAgent: options =>
{
options.Id = "my-agent";
options.Name = "My Agent";
options.Instructions = "You are a helpful assistant.";
})
.AddHeartbeat(options =>
{
options.HeartbeatId = "website-review";
options.Prompt = "Revisa https://miweb.com y resume si esta operativa.";
options.CronExpression = "0 20 * * *";
options.TimeZoneId = "America/Caracas";
})
.AddHeartbeat(options =>
{
options.HeartbeatId = "incident-summary";
options.Prompt = "Revisa los incidentes abiertos y resume las alertas criticas.";
options.CronExpression = "0 */2 * * *";
options.TimeZoneId = "America/Caracas";
});
Model
AddHeartbeat(...)registers a host-defined prompt to run on a cron schedule- Each run enters the runtime as an
IncomingMessageon channelheartbeat - Tool guards, policy guards, and human approval still apply when the agent uses tools
IChannelPolicyStorecan disable or require approval for the synthetic heartbeat channel- Execution state is recorded in
IHeartbeatStore
| Product | Versions 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.
-
net10.0
- ControlAgentNet.Core (>= 0.1.10)
- ControlAgentNet.Features.CronJobs (>= 0.1.6)
- ControlAgentNet.Policies (>= 0.1.2)
- ControlAgentNet.Runtime (>= 0.1.10)
- Cronos (>= 0.11.1)
- Microsoft.Extensions.Hosting (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 85 | 5/7/2026 |