Table of Contents

Property Status

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

Status

Gets the execution status indicating how the task completed.

public AgentExecutionStatus Status { get; }

Property Value

AgentExecutionStatus

Examples

Handling different statuses:

using LMKit.Model;
using LMKit.Agents;

using var model = new LM("path/to/model.gguf"); var agent = new Agent(model);

var result = agent.Run("Solve this problem.");

switch (result.Status) { case AgentExecutionStatus.Completed: Console.WriteLine($"Success: {result.Content}"); break; case AgentExecutionStatus.Failed: Console.WriteLine($"Failed: {result.Error?.Message}"); break; case AgentExecutionStatus.Cancelled: Console.WriteLine("Cancelled by user."); break; }

Remarks

The status indicates the terminal state of execution:

  • Completed: Task finished successfully.
  • Failed: An error occurred during execution.
  • Cancelled: Execution was cancelled via the cancellation token.
Share