Skip to content

ProgressSinksAttribute

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework

ProgressSinksAttribute Class

Declares which IProgressSink types should receive progress events when this agent runs. The source generator discovers this attribute and emits a companion method that returns the sink types for use by orchestrators when creating reporters.

public sealed class ProgressSinksAttribute : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 ProgressSinksAttribute

Remarks

Apply alongside NeedlrAiAgentAttribute on agent classes:

[NeedlrAiAgent(Instructions = "...")]
[ProgressSinks(typeof(CostTrackingSink), typeof(AuditSink))]
public partial class WriterAgent { }

The generator emits a GetWriterAgentProgressSinkTypes() extension method on IAgentFactory that returns the declared types. Orchestrators use this to create reporters with the correct sinks for each agent.

Constructors

ProgressSinksAttribute(Type[]) Constructor

public ProgressSinksAttribute(params System.Type[] sinkTypes);

Parameters

sinkTypes System.Type[]

The IProgressSink types to use for this agent's progress reporting.

Properties

ProgressSinksAttribute.SinkTypes Property

Gets the sink types declared for this agent.

public System.Type[] SinkTypes { get; }

Property Value

System.Type[]