Property Model
Model
Gets or sets the language model used by this agent for inference.
public LM Model { get; set; }
Property Value
Examples
Assigning a model to an agent:
using LMKit.Model;
using LMKit.Agents;
using var model = new LM("path/to/model.gguf");
var agent = new Agent();
agent.Model = model;
agent.Identity = new AgentIdentity("Assistant", "Help with general questions.");
// Verify the agent is ready
if (agent.HasModel && agent.Validate(out var errors))
{
var result = agent.Run("Hello!");
Console.WriteLine(result.Content);
}
Remarks
The model is required for agent execution. It must be loaded with tensors before the agent can process tasks. If the agent uses tools, the model must support tool calls (HasToolCalls).