addStep
Add a new step to this context. When called with only name, the returned Step
can be configured via method chaining. When an options object is provided, the
step is fully configured in one call.
Parameters
name
Step name. Must be unique within this context.
opts
Optional configuration object with the following fields:
opts.task
Text for a “Task” POM section. Equivalent to calling step.addSection('Task', task).
opts.bullets
List of bullet strings for a “Process” POM section. Equivalent to calling
step.addBullets('Process', bullets).
opts.criteria
Step-completion criteria. Equivalent to calling step.setStepCriteria(criteria).
opts.functions
Tool names the step may call, or "none" to disable all tools.
Equivalent to calling step.setFunctions(functions).
opts.validSteps
Names of steps the agent may transition to. Equivalent to calling
step.setValidSteps(validSteps).
Returns
Step — The new step
for optional further chaining.