Open
Conversation
Introduces the core Workflow system for composing agents into multi-step pipelines. Follows the ImagePipeline architectural pattern as a standalone class with its own DSL, execution tracking, and result aggregation. Core components: - Step: value object wrapping agent class with params and dependencies - WorkflowContext: thread-safe shared context with Mutex for step data - FlowGraph: DAG with Kahn's topological sort for execution layers - DSL: step, flow (Symbol#>>), pass, description, on_failure, budget - Runner: layer-by-layer execution with pass mappings and error handling - WorkflowResult: aggregated cost/token/timing across all steps Features: sequential execution, pass mappings between steps, conditional steps (if:/unless:), on_failure :stop/:continue, execution tracking with execution_type "workflow", AgentRegistry integration. 87 new specs, all 4250 specs pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces ParallelRunner that extends Runner to execute independent steps concurrently using Thread.new. No new gem dependency — Ruby threads are sufficient for I/O-bound LLM API calls. - Steps in the same execution layer run in parallel threads - Single-step layers still execute sequentially (no thread overhead) - WorkflowContext's Mutex ensures thread-safe result storage - Errors in one parallel step are collected without killing siblings - Wall-clock timing reflects actual parallel execution time 5 new specs covering concurrent execution, fan-in, error collection, wall-clock timing, and thread-safe context writes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces DispatchBuilder and dispatch DSL that integrates with the existing Routing concern. After a routing step executes, the dispatch system reads the route from the RoutingResult and calls the matched handler agent. - dispatch DSL: `dispatch :classify do |d| d.on :billing, agent: BillingAgent end` - DispatchBuilder: collects route-to-agent mappings with on/on_default - Runner: executes dispatched handler after routing step completes - Supports custom handler step name via `as:` option - Graceful handling when no route matches and no default set - Cost/token aggregation includes both router and handler steps 9 new specs, all 4264 specs pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces supervisor mode where an orchestrator agent loops, delegating to sub-agents via DelegateTool and CompleteTool until done or max_turns reached. Components: - DelegateTool: RubyLLM::Tool letting supervisor delegate to named agents - CompleteTool: RubyLLM::Tool signaling loop completion via thread-local - Supervisor: loop execution logic, builds initial prompt, tracks turns - DSL: `supervisor AgentClass, max_turns: N` and `delegate :name, AgentClass` Features: configurable max_turns, thread-local completion signaling, cost aggregation across supervisor turns and delegated calls, context storage of delegation results, mutually exclusive with step mode. 13 new specs, all 4277 specs pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrates workflow executions into the existing dashboard UI: - AgentRegistry: adds is_workflow flag, workflow type detection - AgentsController: separates workflows into dedicated tab, adds workflow grouping to agents_by_type - Agents index: workflow tab button and workflow agent rows - Executions show: workflow step breakdown section showing step names with success/failure indicators when execution_type is "workflow" - Execution filtering: workflow executions filterable via execution_type 4 new specs, all 4281 specs pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds rails generate ruby_llm_agents:workflow generator with --steps option, application_workflow base class template, and install generator integration. Includes 11 generator specs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create wiki/Multi-Agent-Orchestration.md with full DSL reference - Add workflow feature and code example to README.md - Add workflow section to LLMS.txt - Update wiki: Home, Generators, Examples, API Reference, Best Practices - Add example app workflows: sequential pipeline, parallel analyzer, dispatch routing with step agents and ApplicationWorkflow base class Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Creates _config_workflow.html.erb partial showing steps, on_failure strategy, budget limit, and workflow mode (pipeline/dispatch/supervisor). Adds load_workflow_config to AgentsController for workflow-specific config loading. Fixes: Missing partial error when viewing workflow agents in dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the missing supervisor workflow pattern to the example app (orchestrator + researcher + writer agents) and seed data for all 4 workflow types (pipeline, parallel, dispatch, supervisor) so they appear on the dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
step,flow,pass,context,description,on_failure, andbudgetdirectivesafter:dependenciesdispatchDSL integrates with existing Routing concern — routes to different agents based on classification resultDelegateTool/CompleteToolloops up tomax_turns, delegating to sub-agents until completionrails generate ruby_llm_agents:workflow Content --steps=research,draft,editscaffolds workflow classesArchitecture
metadataJSON columnStats
Test plan
bundle exec rspec spec/agents/workflow/— all workflow specs passbundle exec rspec— full suite (4292 examples, 0 failures)bundle exec standardrb— lint cleanbundle exec rake— full suite + lint passes🤖 Generated with Claude Code