Property CanUseTools
CanUseTools
Gets a value indicating whether this agent can use tools.
public bool CanUseTools { get; }
Property Value
Examples
Verifying tool capability:
using LMKit.Model;
using LMKit.Agents;
using var model = new LM("path/to/model.gguf");
var agent = new Agent(model);
// Before adding tools
Console.WriteLine(agent.CanUseTools); // False
// After adding tools (if model supports them)
agent.EnsureTools().Register(new MyTool());
Console.WriteLine(agent.CanUseTools); // True (if model.HasToolCalls)
Remarks
Returns true only if the agent has tools registered and the assigned model supports tool calls.