Learn R Programming

aisdk (version 1.1.0)

create_step: Create a MissionStep

Description

Factory function to create a MissionStep.

Usage

create_step(
  id,
  description,
  executor = NULL,
  max_retries = 2,
  timeout_secs = NULL,
  parallel = FALSE,
  depends_on = NULL
)

Value

A MissionStep object.

Arguments

id

Unique step ID (e.g., "step_1").

description

Natural language task description.

executor

Agent, AgentTeam, Flow, or R function to execute the step.

max_retries

Maximum retry attempts before stall escalation. Default 2.

timeout_secs

Optional per-step timeout in seconds. Default NULL.

parallel

If TRUE, this step may run in parallel with other parallel steps.

depends_on

Character vector of prerequisite step IDs.

Examples

Run this code
# \donttest{
if (interactive()) {
  step <- create_step(
    id          = "load_data",
    description = "Load the CSV file and return a summary",
    executor    = my_agent,
    max_retries = 3
  )
}
# }

Run the code above in your browser using DataLab