Skip to content

flowgentic.langGraph.execution_wrappers

execution_wrappers

LangGraph/AsyncFlow Integration: bridge AsyncFlow tasks and LangChain tools with built-in retries, backoff, and timeouts.

Key features: - Define AsyncFlow tasks with @flow.function_task - Expose as LangChain tools via @integration.asyncflow_tool(...) - Sensible defaults for fault tolerance (no config required)

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, instrospector: GraphIntrospector)

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, retry: Optional[RetryConfig] = None, **kwargs) -> 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) - AGENT_TOOL_AS_SERVICE: Creates a LangChain tool with persistent service instance - FUNCTION_TASK: Creates a simple asyncflow task (with args, *kwargs) - SERVICE_TASK: Creates a persistent service task - EXECUTION_BLOCK: Creates a block node

None
retry Optional[RetryConfig]

Optional retry configuration

None