-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(slm): add remote shell execution API + distributed_shell workflow step type for fleet parallelism #3406
Copy link
Copy link
Open
Labels
Description
Context7 Score: 78/100
Test query: "Define a visual workflow that executes three shell scripts in parallel across a distributed fleet."
Audit Findings
What EXISTS
autobot-backend/orchestration/dag_executor.py— full DAG executor withasyncio.gather()for independent branches;NodeType.PARALLELenum value exists but has no handlerautobot-backend/orchestration/workflow_executor.py—_group_steps_by_dependency()for concurrent step groupsautobot-backend/tools/parallel/executor.py—ParallelToolExecutorframeworkautobot-slm-backend/api/nodes.py— node enrollment, health, lifecycle managementautobot-backend/api/sandbox.py— local secure shell execution (Docker sandbox)
What is MISSING
- No remote execution API —
POST /nodes/{node_id}/executedoes not exist on SLM backend - No
distributed_shellstep type — workflow executor has no handler to fan-out a script to multiple fleet nodes in parallel - Visual builder has no parallel/fleet step configuration UI (tracked separately)
- No docs/example for fleet parallel workflows
Acceptance Criteria
SLM Backend
-
POST /nodes/{node_id}/executeendpoint inautobot-slm-backend/api/accepting{command, script, language, timeout, stream_output} - SLM agent (
slm/agent/agent.py) receives and executes remote commands; streams stdout/stderr back - Command validation: audit log entry per execution, timeout enforcement, allowlist check
AutoBot Backend
-
distributed_shellstep type handler indag_executor.py— reads{script, nodes: [node_id, ...], timeout}from step config, fans out to N nodes via parallel SLM execute calls, returns per-node{node_id, exit_code, stdout, stderr} -
NodeType.PARALLELhandler updated (ordistributed_shellas new NodeType) to use the above
Docs & Example
-
docs/examples/parallel_fleet_workflow.py— creates a workflow with 3 parallel shell steps targeting 3 nodes -
docs/user/guides/workflows.md— "Parallel Fleet Execution" section with step config reference
Tests
- Unit:
dag_executorfans out to N nodes, aggregates results correctly - Unit: SLM execute endpoint validates command, returns structured output
- Integration: end-to-end workflow with 2+ parallel shell steps
Files to Touch
autobot-slm-backend/api/nodes_execution.py(new)autobot-slm-backend/slm/agent/agent.pyautobot-backend/orchestration/dag_executor.pyautobot-backend/orchestration/workflow_executor.pydocs/examples/parallel_fleet_workflow.py(new)docs/user/guides/workflows.md
Out of Scope (separate issue)
- Frontend visual builder UI for parallel/fleet steps
Reactions are currently unavailable