Agent workflows are a new top-level product surface in Box0. They are inspired by tools like n8n and Dify, but the first version should stay tightly focused on Box0's strength: orchestrating named agents.
This document defines the V1 product and technical direction.
- Add a new
Workflowstab in the dashboard. - Model workflows as first-class objects, independent from
tasks. - Treat workflows as agent-first DAGs.
- Optimize V1 for visibility and light editing, not full low-code automation.
- Require at least one existing agent in the workspace before a workflow can be created.
- Do not add third-party integrations in V1.
Box0 already has strong primitives for agent execution:
- named agents
- inbox-based task dispatch
- thread history
- workspace scoping
- web visibility
What is missing is a durable, user-visible way to describe how multiple agents should collaborate on a task.
Without workflows, users can still ask one agent to plan and execute steps internally. That is useful, but it is not enough for:
- explicit agent-to-step assignment
- reusable multi-agent patterns
- visible dependencies between steps
- partial reruns
- pausing for human input
- explaining how a result was produced
These should be treated as different concepts:
| Concept | Meaning |
|---|---|
| Agent | A reusable executor with a role, instructions, runtime, and machine placement |
| Plan | A temporary execution outline, often created by an agent for one run |
| Workflow | A user-visible, editable, reusable execution graph |
Practical rule:
- if the steps only help one execution succeed, they are a plan
- if the steps should be visible, editable, assigned, and reused, they are a workflow
tasks should not be the foundation for workflows.
Tasks are a legacy execution surface and may be removed later. Workflows should be introduced as a new independent model with their own definitions and run history.
A future kanban item should represent "what needs to be done."
A workflow represents "how this kind of work should be executed."
One kanban item may run without a workflow, may use a temporary plan, or may attach to a reusable workflow definition.
The core value of Box0 workflow is not generic step sequencing. It is explicit coordination between agents.
Single-agent multi-step flows are supported, but they are not the main product story.
The execution model should be a DAG from the start, but V1 should support only a minimal subset of node types and rules.
V1 should prioritize:
- clear structure
- visible dependencies
- understandable execution state
- safe editing
It should not try to match the full automation surface of n8n.
Users should be able to:
- add and remove steps
- choose an agent for a step
- edit step instructions
- connect steps with dependencies
V1 should avoid heavy features like:
- loops
- arbitrary scripting
- complex variable templates
- dozens of node types
- rich external integrations
- new
Workflowstab in the web UI - workflow list page
- workflow empty state
- workflow detail page with graph and form-based editing
- workflow creation only when the workspace has at least one agent
- draft workflow definitions
- workflow DAG validation
- workflow runs
- per-step execution state
- manual rerun of a failed or completed step run
- human-input pause nodes
- third-party integrations
- loops
- nested workflows
- dynamic code nodes
- variable mapping UI
- arbitrary conditional expressions
- public workflow templates marketplace
- replacing all current task UI in the same milestone
V1 should support only four node types:
- exactly one per workflow
- no incoming edges
- provides run input
- bound to one existing agent in the workspace
- contains a title and prompt
- may have multiple upstream dependencies
- creates one execution unit in a workflow run
- pauses the workflow
- asks the user for input or approval
- resumes downstream nodes after input is submitted
- optional in V1, but recommended for clarity
- no outgoing edges
- marks terminal completion
V1 should keep the rules simple and explicit:
- a workflow must contain exactly one
start - a workflow must contain at least one
agentnode - a workflow must be acyclic
- every node except
startmust be reachable fromstart endcannot have outgoing edgesstartcannot have incoming edgesagentandhuman_inputnodes may fan out to multiple downstream nodes
The backend should reject invalid definitions on save and publish.
Add a Workflows tab alongside the existing top-level surfaces.
List view should show:
- workflow name
- status:
draftorpublished - number of nodes
- number of agents used
- updated time
- last run result
If the workspace has zero agents:
- show an empty state explaining that workflows require at least one agent
- provide a clear CTA to create an agent first
If the workspace has agents but no workflows:
- show a CTA to create the first workflow
V1 create flow can be lightweight:
- click
Create Workflow - enter name and optional description
- start with a default graph:
Start- one
Agent Step End
- select an agent for the first step
- save as
draft
The main workflow page should be display-first:
- left or center: graph view
- right side: selected node inspector
- top actions: save, run, publish, archive
Editing should be form-driven even if the graph is visual.
Users should be able to:
- rename the workflow
- add a node
- delete a node
- edit node title
- edit node prompt
- choose the bound agent
- connect and disconnect nodes
When a workflow runs, users should be able to see:
- run status
- which nodes are pending, running, blocked, waiting for input, done, or failed
- which agent each step was assigned to
- node outputs
- failure reason
This visibility is a major part of the product value.
The runtime model should separate definition from execution:
| Object | Purpose |
|---|---|
| Workflow | A saved DAG definition |
| Workflow run | One execution of a workflow |
| Step run | One execution of one node within a workflow run |
Suggested workflow run states:
queuedrunningwaiting_for_inputdonefailedcancelled
Suggested step run states:
pendingreadyrunningwaiting_for_inputdonefailedskipped
At runtime:
- create a workflow run
- create step runs for all nodes
- mark
startdone immediately with the run input - find all nodes whose dependencies are satisfied
- mark them
ready - dispatch
agentnodes - pause on
human_input - when a node completes, reevaluate downstream nodes
- complete the run when all reachable terminal nodes complete
Independent ready nodes may run in parallel.
An agent node should execute by creating a thread for the bound agent and sending a request through the same inbox-based mechanism already used elsewhere in Box0.
Each step run should keep:
- workflow run id
- node id
- bound agent name
- thread id
- input payload
- output payload
- status
- error
- timestamps
V1 should keep data passing intentionally simple.
Each node receives:
- workflow run input
- upstream node outputs as plain text blocks
- the node's own prompt
The backend can compose a structured prompt like:
Workflow: <workflow name>
Step: <step title>
Run input:
<input>
Upstream outputs:
<node A output>
<node B output>
Step instructions:
<node prompt>
This is enough for V1 and avoids the complexity of a full variable mapping language.
A human_input node should:
- surface a prompt in the UI
- pause the workflow run
- accept a user response
- store the response as the node output
- unblock downstream nodes
The workflow system should use new tables rather than reusing tasks.
idworkspace_namenamedescriptionstatus(draft,published,archived)created_bycreated_atupdated_at
idworkflow_idkind(start,agent,human_input,end)titlepromptagent_namenullableposition_xposition_ycreated_atupdated_at
idworkflow_idsource_node_idtarget_node_id- unique constraint on
(workflow_id, source_node_id, target_node_id)
idworkflow_idworkspace_namestatusinputstarted_bystarted_atfinished_aterror
idworkflow_run_idnode_idagent_namenullablethread_idnullablestatusinputoutputerrorstarted_atfinished_at
Suggested workspace-scoped endpoints:
GET /workspaces/{workspace}/workflows
POST /workspaces/{workspace}/workflows
GET /workspaces/{workspace}/workflows/{workflow_id}
PUT /workspaces/{workspace}/workflows/{workflow_id}
DELETE /workspaces/{workspace}/workflows/{workflow_id}
POST /workspaces/{workspace}/workflows/{workflow_id}/publish
POST /workspaces/{workspace}/workflows/{workflow_id}/runs
GET /workspaces/{workspace}/workflow-runs
GET /workspaces/{workspace}/workflow-runs/{run_id}
POST /workspaces/{workspace}/workflow-runs/{run_id}/steps/{step_run_id}/retry
POST /workspaces/{workspace}/workflow-runs/{run_id}/steps/{step_run_id}/input
The current frontend is a legacy dashboard mounted through Vue. V1 should keep the implementation lightweight and incremental.
Recommended approach:
- add a
Workflowsroute and sidebar entry - implement the first version in the existing
legacy-dashboard.js - keep the editor mostly form-based
- use a simple graph renderer instead of a heavy low-code canvas from day one
The graph can start as:
- node cards positioned on a canvas
- SVG lines between nodes
- click-to-select node
- inspector panel for edits
This is enough to validate the product before investing in a more advanced editor.
Rust is a strong fit for the backend of this feature.
Why:
- workflow execution is a state machine
- DAG validation is deterministic and type-friendly
- parallel step scheduling benefits from Rust's async runtime
- long-running orchestration needs stability
- the existing Box0 backend, database layer, and dispatch model are already in Rust
The hard part of a workflow product is more likely to be the editor UX than the Rust runtime.
- add workflow tables
- add workflow CRUD
- add
Workflowstab - add list and detail views
- save draft workflows
- validate DAG structure
Success criteria:
- users can create and inspect workflows
- users can assign agents and dependencies
- users can understand the graph without running it
- create workflow runs
- execute
agentnodes - execute fan-out when dependencies are satisfied
- show run status and step status
- allow retry on failed steps
Success criteria:
- a saved workflow can run end-to-end
- users can observe progress and outputs
- add
human_inputnodes - pause and resume runs from the UI
Success criteria:
- workflows can safely wait for approval or clarification
- Should
publishedworkflows be immutable except through a new version, or can they be edited in place? - Should a workflow run snapshot the full workflow definition so later edits do not affect past runs?
- Should the same agent be allowed on many parallel nodes with no additional throttling?
- Should
endremain optional in V1, or should it be required for simpler mental models? - When a node has multiple upstream nodes, should their outputs be concatenated in edge order or node creation order?
For Box0 V1, workflows should be:
- a new top-level tab
- independent from legacy tasks
- agent-first DAGs
- display-first with light editing
- minimal in node types
- simple in data passing
- explicitly designed for future execution, not just mock display
That gives Box0 a workflow model that is credible, useful, and realistic to build without overreaching into full n8n-style automation on day one.