Table of Contents

Class ProcessShellTool

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

Executes a shell command (cmd.exe on Windows, /bin/sh on Linux/macOS).

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

Examples

Running a one-line shell pipeline (registered with explicit user approval):

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

// ProcessShellTool is high-risk — wrap with a permission policy that requires approval. var agent = Agent.CreateBuilder(model) .WithTools(t => t.Register(new ProcessShellTool())) .WithPermissionPolicy(p => p.RequireApproval("process_shell")) .Build();

var result = await agent.RunAsync(@"Show me the disk usage of C:\src\app.");

Constructors

ProcessShellTool()

Initializes a new instance with default settings.

ProcessShellTool(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