# \donttest{
if (interactive()) {
# Auto-planned mission
agent <- create_agent("Analyst", "Analyzes data", model = "openai:gpt-4o")
mission <- create_mission(
goal = "Load the iris dataset and summarize each species",
executor = agent,
model = "openai:gpt-4o"
)
mission$run()
# Manual steps
mission2 <- create_mission(
goal = "Data pipeline",
steps = list(
create_step("step_1", "Load CSV data", executor = agent),
create_step("step_2", "Summarize statistics", executor = agent,
depends_on = "step_1")
),
model = "openai:gpt-4o"
)
mission2$run()
}
# }
Run the code above in your browser using DataLab