Table of Contents

Property Identity

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

Identity

Gets or sets the identity defining the agent's persona and base instruction.

public AgentIdentity Identity { get; set; }

Property Value

AgentIdentity

Examples

Setting an agent's identity:

using LMKit.Model;
using LMKit.Agents;

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

agent.Identity = new AgentIdentity(
    persona: "Customer Support Agent",
    instruction: "Answer customer questions politely. " +
                 "If you cannot help, escalate to a human."
);

Remarks

The identity shapes the agent's behavior and communication style. It consists of a persona (who the agent is) and an instruction (what it should do).

If not set, returns Empty.