Table of Contents

Property Tools

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

Tools

Gets or sets the registry of tools available to the agent.

public ToolRegistry Tools { get; set; }

Property Value

ToolRegistry

Examples

Working with the tool registry:

using LMKit.Model;
using LMKit.Agents;
using LMKit.Agents.Tools;

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

// Set a pre-configured registry var tools = new ToolRegistry(); tools.Register(new WeatherTool()); tools.Register(new CalculatorTool()); agent.Capabilities.Tools = tools;

// Or access directly for reading if (agent.Capabilities.Tools != null) { foreach (var tool in agent.Capabilities.Tools.Tools) { Console.WriteLine($"Tool: {tool.Name}"); } }

Remarks

Tools are external functions that the agent can invoke to perform actions beyond text generation. Common tool types include:

  • Search tools (web search, document search)
  • Computation tools (calculator, code execution)
  • Data tools (database queries, API calls)
  • Communication tools (email, messaging)

Use EnsureTools() to get the registry and create it if necessary.

Share