Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dynamic Planner

Uses an LLM to generate an execution plan from the user’s input. The plan is a sequence of steps with descriptions and optional detailed instructions.

Details

IDnexus.planner.dynamic
DependenciesNone

Configuration

KeyTypeDefaultDescription
approvalstringalwaysApproval mode: always (user must approve), never (skip), auto (LLM decides)
model_rolestring(default)Model role for plan generation
max_stepsint10Maximum number of plan steps
plan_promptstring(built-in)Custom inline planning prompt
plan_prompt_filestring(none)Path to a custom planning prompt file

Events

Subscribes To

EventPriorityPurpose
plan.request50Receives plan generation requests
llm.response50Receives the LLM’s generated plan

Emits

EventWhen
plan.resultPlan generated and ready
thinking.stepPlanning reasoning
io.statusStatus updates during plan generation

How It Works

  1. Receives plan.request with user input
  2. Constructs a prompt asking the LLM to generate a JSON plan
  3. Sends llm.request tagged with Metadata["_source"] so the ReAct agent ignores this response
  4. Parses the LLM response as JSON steps
  5. Emits plan.result with the steps

Approval Modes

ModeBehavior
alwaysUser must explicitly approve before execution
neverPlan is executed immediately
autoThe LLM includes a risk assessment; low-risk plans skip approval

Example Configuration

nexus.planner.dynamic:
  approval: auto
  max_steps: 10
  model_role: reasoning