Table of Contents

Class ProcessKillTool

Namespace
LMKit.Agents.Tools.BuiltIn.IO
Assembly
LM-Kit.NET.dll

Terminates a running process by its process ID.

public sealed class ProcessKillTool : IBuiltInTool, ITool, IToolMetadata
Inheritance
ProcessKillTool
Implements
Inherited Members

Examples

Killing a stuck PID after explicit approval (high-risk tool):

using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.IO;

var agent = Agent.CreateBuilder(model) .WithTools(t => t.Register(new ProcessKillTool())) .WithPermissionPolicy(p => p.RequireApproval("process_kill")) .Build();

var result = await agent.RunAsync("Terminate the process with PID 12345 - it has hung.");

Constructors

ProcessKillTool()

Initializes a new instance with default settings.

ProcessKillTool(ProcessToolOptions)

Initializes a new instance with custom options.

Properties

Description

Gets a concise description of what the tool does.

InputSchema

Gets the JSON Schema defining the expected input arguments.

Name

Gets the stable, unique identifier for this tool.

Methods

InvokeAsync(string, CancellationToken)

Executes the tool with the specified JSON arguments.

Share