Skip to content

Python: Add functional workflow API #3537

@moonbox3

Description

@moonbox3

Summary

Feedback that we should add a functional API for defining workflows, in addition to the current graph-based API.

Context

Currently workflows are defined using builder patterns:

workflow = (
    WorkflowBuilder()
    .register_executor(...)
    .add_edge(...)
    .build()
)

A functional API could look like:

workflow = Workflow(
    executors={...},
    edges=[...],
)

Action Items

  • Design functional API surface
  • Consider relationship with builder pattern (complement vs replace)
  • Evaluate if this aligns with "direct Workflow instantiation" feedback in builder ergonomics issue
  • Prototype and gather feedback

Metadata

Metadata

Assignees

Labels

agent orchestrationIssues related to agent orchestrationpythonworkflowsRelated to Workflows in agent-framework

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions