Open
Conversation
Design spec for visual agent orchestration layer using React Flow integrated into Agent Zero as a full-screen modal. Covers node types (Agent, Parallel Group, Condition, Input/Output), backend flow engine, Alpine-React bridge pattern, and 5-phase implementation plan. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Visual agent orchestration layer using React Flow inside a stacked modal. Phase 1 delivers the canvas scaffold: - Modal shell with flow list view and canvas view (Alpine.js) - React Flow canvas loaded dynamically from esm.sh CDN (zero build step) - 5 custom node types: Input, Output, Agent, Parallel Group, Condition - Drag-and-drop node palette - Connection validation (no cycles, type-aware handle rules) - Alpine-React bridge via custom DOM events - Node inspector drawer with config editing - Orchestrator button added to sidebar quick actions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend CRUD endpoints for /usr/flows/*.json: - flow_list.py — list saved flows - flow_load.py — load flow by filename (with path traversal protection) - flow_save.py — save/update flow (slugified filename from name) - flow_delete.py — delete flow file Frontend changes: - Store now uses callJsonApi for all flow operations - Flow list loads from backend on modal open - Save button persists to /usr/flows/ - Delete button with $confirmClick on flow list items - Editable flow name in toolbar - Correct /agents API integration for agent profiles - _waitForReactThenLoad handles CDN loading race condition Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tation - Add explicit parallel branches to flow templates (deep-research, agent-swarm, parallel-orchestration) - Wire real-time node progress from backend to React Flow canvas (activity text + elapsed time) - Fix flow group accordion toggle (x-if + immutable state updates) - Add flow_templates/ directory with 4 shipped templates - Add flow_template_list API endpoint - Add template browser UI section in orchestrator modal - Add flows/ and runtime data dirs to .dockerignore and .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ac3d721 to
9ef5ac6
Compare
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
Adds a visual agent orchestration layer to Agent Zero using React Flow, enabling users to build, save, and execute multi-agent workflows through a drag-and-drop canvas. Agents can run in parallel, with conditional routing and real-time
progress visibility.
usr/flows/)Architecture
Backend (Python)
python/helpers/flow_engine.pyFlowRunstate tracker,FlowEnginegraph walker with Kahn's algorithm, parallel branch execution viaasyncio.gather, condition evaluation, real-time progress viaAgentContextlogpython/api/flow_execute.pyDeferredTaskpython/api/flow_status.pypython/api/flow_stop.pypython/api/flow_save.py/flow_load.py/flow_list.py/flow_delete.pyusr/flows/python/api/flow_template_list.pyflow_templates/python/api/flow_result.pypython/api/flow_group_remove.pyFrontend (Alpine.js + React)
orchestrator.htmlorchestrator-store.jsorchestrator-bridge.jsreact/OrchestrationCanvas.jschats-store.jschats-list.htmlx-iffor reliable Alpine reactivityTemplates (
flow_templates/)parallel-orchestration.jsonsequential-pipeline.jsondeep-research.jsonagent-swarm.jsonKey Design Decisions
Explicit parallel branches: Parallel group nodes declare a
branchesarray listing which successors run concurrently. Non-branch successors (e.g., synthesizers) wait for the merged output. This prevents the graph walker fromincorrectly running downstream consumers as parallel branches.
Real-time progress via log introspection: Rather than adding a new progress reporting mechanism, the engine queries each running node's
AgentContext.logfor the latest log entry — extracting tool name, heading text, and elapsedtime. This piggybacks on the existing agent logging infrastructure with zero changes to the agent core.
React Flow without a build step: The canvas uses
htm(tagged template literals) + dynamic ESM imports fromesm.shCDN, avoiding any build tooling. React and Alpine communicate through custom DOM events on#react-flow-root.x-ifoverx-showfor accordion: Alpine'sx-showinsidex-foriterations can fail to toggle visibility when the iterated object is replaced via immutable updates. Usingx-if(which adds/removes DOM) is more reliable foraccordion patterns.