Class AfterAgentExecutionEventArgs
- Namespace
- LMKit.Agents.Orchestration
- Assembly
- LM-Kit.NET.dll
Event arguments for after agent execution in orchestration.
Provides access to the execution result for logging or post-processing.
public sealed class AfterAgentExecutionEventArgs : EventArgs
- Inheritance
-
AfterAgentExecutionEventArgs
- Inherited Members
Examples
Logging per-step duration and stopping the orchestration on first failure:
using LMKit.Agents;
using LMKit.Agents.Orchestration;
orchestrator.AfterAgentExecution += (sender, e) =>
{
Console.WriteLine($"{e.Agent.Identity?.Persona ?? "agent"} -> {e.Result.Status} " +
$"({e.Result.InferenceCount} inferences)");
if (e.Result.Status != AgentExecutionStatus.Completed)
{
e.Context.Stop($"agent failed with {e.Result.Status}");
}
};
Constructors
- AfterAgentExecutionEventArgs(Agent, AgentExecutionResult, OrchestrationContext)
Initializes a new instance of the AfterAgentExecutionEventArgs class.
Properties
- Agent
Gets the agent that executed.
- Context
Gets the orchestration context.
- Result
Gets the execution result.