add_step
add_step
Add a new step to this context. When called with only name, the returned Step
can be configured via method chaining. When keyword arguments are provided, the
step is fully configured in one call.
Raises ValueError if the step name already exists in this context or the maximum
steps per context limit (100) is exceeded.
Parameters
name
Step name. Must be unique within this context.
task
Text for a “Task” POM section. Equivalent to calling step.add_section("Task", task).
bullets
List of bullet strings for a “Process” POM section. Equivalent to calling
step.add_bullets("Process", bullets). Requires task to also be set.
criteria
Step-completion criteria. Equivalent to calling step.set_step_criteria(criteria).
functions
Tool names the step may call, or "none" to disable all tools.
Equivalent to calling step.set_functions(functions).
valid_steps
Names of steps the agent may transition to. Equivalent to calling
step.set_valid_steps(valid_steps).
Returns
Step — The new step
for optional further chaining.