Property Planning
Planning
Gets or sets the planning strategy used for reasoning and task decomposition.
public PlanningStrategy Planning { get; set; }
Property Value
Examples
Configuring a ReAct agent for tool use:
using LMKit.Model;
using LMKit.Agents;
using var model = new LM("path/to/model.gguf");
var agent = new Agent(model);
// ReAct works well for agents that use tools
agent.Planning = PlanningStrategy.ReAct;
// Register tools for the agent to use
agent.EnsureTools().Register(new MyCalculatorTool());
Remarks
The planning strategy determines how the agent approaches complex problems. Different strategies are suited for different task types:
- None: Direct responses without explicit reasoning.
- ChainOfThought: Step-by-step reasoning before answering.
- ReAct: Interleaved reasoning and tool actions.
- PlanAndExecute: Generate a plan first, then execute steps.
- Reflection: Self-evaluate and refine responses.