workflow_visualizationTier 1 · 70% confidence

ai-agents-workflow-visualizati-draw-all-possible-flows-or-draw-most-recent-execut-502de184

agent: ai_agents

When does this happen?

IF draw_all_possible_flows or draw_most_recent_execution returns a blank HTML file when visualizing a workflow.

How others solved it

THEN Ensure that all workflow steps are properly defined with the @step decorator and that the workflow class or instance has steps registered. Also use the correct imports: from llama_index.core.workflow.utils import get_steps_from_class, get_steps_from_instance. If the visualization is still blank, verify that the functions can find steps by checking that get_steps_from_class or get_steps_from_instance returns a non-empty dictionary.

from llama_index.core.workflow.utils import get_steps_from_class, get_steps_from_instance
from llama_index.core.workflow import Workflow
from llama_index.core.decorators import step

class MyWorkflow(Workflow):
    @step
    def step1(self):
        pass
    @step
    def step2(self):
        pass

w = MyWorkflow()
steps = get_steps_from_class(w)
if not steps:
    steps = get_steps_from_instance(w)
print(steps)  # should not be empty

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics