Skip to content

flowgentic.langGraph.execution_wrappers

execution_wrappers

LangGraph/AsyncFlow Integration: bridge AsyncFlow tasks and LangChain tools.

Key features: - Define AsyncFlow tasks with @flow.function_task - Expose as LangChain tools via @integration.asyncflow_tool(...)

Each call runs once. Retries and timeouts belong to the model client, to LangGraph's node policies and to the application.

TBD

- block for executing the agents in parallel!

Classes:

Name Description
AsyncFlowType

Enum defining the flow_type of AsyncFlow decoration

ExecutionWrappersLangraph

Enhanced integration between AsyncFlow WorkflowEngine and LangChain tools.

AsyncFlowType

Bases: Enum

Enum defining the flow_type of AsyncFlow decoration

ExecutionWrappersLangraph

ExecutionWrappersLangraph(flow: WorkflowEngine)

Enhanced integration between AsyncFlow WorkflowEngine and LangChain tools.

Supports both traditional workflow patterns and React agent orchestration with supervisor patterns and parallel execution.

Methods:

Name Description
asyncflow

Unified decorator to register async functions as AsyncFlow tasks with different behaviors.

asyncflow

asyncflow(
	func: Optional[Callable] = None,
	*,
	flow_type: AsyncFlowType = None,
	backend: Optional[str] = None,
	capture_stdio: bool = False,
	tool_description: Optional[str] = None,
) -> Callable

Unified decorator to register async functions as AsyncFlow tasks with different behaviors.

Parameters:

Name Type Description Default
flow_type AsyncFlowType

AsyncFlowType enum specifying the decoration behavior: - AGENT_TOOL_AS_FUNCTION: Creates a LangChain tool (with @tool wrapper) - FUNCTION_TASK: Creates a simple asyncflow task (with args, *kwargs) - SERVICE_TASK: Creates a persistent service task - EXECUTION_BLOCK: Creates a block node

None
backend Optional[str]

Optional named AsyncFlow backend for this task.

None
capture_stdio bool

Capture task output when supported by AsyncFlow.

False
tool_description Optional[str]

Description of an AGENT_TOOL_AS_FUNCTION tool; the function's docstring when omitted.

None