Factory function to create a new Flow object for multi-agent orchestration.
Examples
if (FALSE) { # \dontrun{
# Create a multi-agent flow
session <- create_chat_session()
cleaner <- create_agent("Cleaner", "Cleans data")
plotter <- create_agent("Plotter", "Creates plots")
registry <- create_agent_registry(list(cleaner, plotter))
manager <- create_agent("Manager", "Coordinates data analysis")
flow <- create_flow(
session = session,
model = "openai:gpt-4o",
registry = registry
)
# Run the manager with auto-delegation
result <- flow$run(manager, "Load data and create a visualization")
} # }