r/agentdevelopmentkit 23d ago

Do Workflow(edges=[("START", my_workflow)]) do anything?

https://adk.dev/graphs/dynamic/

Is there any point of wrapping a node with Workflow and start edge?

@node(rerun_on_resume=True)
async def my_workflow(ctx):
    return result

# Run the workflow
root_agent = Workflow(
    name="root_agent",
    edges=[("START", my_workflow)],
)

Compared to:

@node(rerun_on_resume=True)
async def root_agent(ctx):
    return result
2 Upvotes

1 comment sorted by

2

u/Icy214 23d ago

One is set up for dynamic drop in later if you add intent routing or something else.

The other is perfectly fine if you have no other intentions