Table of Contents

Event AfterAgentExecution

Namespace
LMKit.Agents.Orchestration
Assembly
LM-Kit.NET.dll

Fired after each agent execution.

public event EventHandler<AfterAgentExecutionEventArgs> AfterAgentExecution

Returns

EventHandler<AfterAgentExecutionEventArgs>
Fired after each agent execution.

Examples

Tracking inference cost per step across the orchestration:

int totalInferences = 0;
pipeline.AfterAgentExecution += (sender, e) => totalInferences += e.Result.InferenceCount;

var result = await pipeline.ExecuteAsync("input"); Console.WriteLine($"Total inferences: {totalInferences}");

Share