Core Roast concepts and workflow capabilities
mainRoast is a Ruby-based DSL designed to orchestrate complex AI-powered automation. Key capabilities include:
- Chaining Cogs: Building multi-step workflows where the output of one cog (step) is passed as input to the next using the
!suffix. - Cogs: The building blocks of workflows. Common types include:
chat: For conversational LLM interactions.agent: For running coding agents.ruby: For executing custom Ruby logic.map: For processing collections.repeat: For iterative workflows.call: For invoking reusable scopes.
- Targets and Parameters: Workflows can accept single targets (
target!), multiple targets (targets), and custom arguments (args,kwargs) from the command line. - Control Flow: Workflows can adapt dynamically using
skip!,fail!,break!, andnext!, or check if a cog ran using the?accessor. - Scopes: Modular, reusable blocks of logic defined via
executescopes that can be called multiple times with different inputs. - Concurrency: Support for parallel execution via the
mapcog and asynchronous execution via theasync!configuration.