haive.core.graph.state_graph.conversion.langgraph¶
LangGraph conversion utilities for Haive graphs.
from typing import Any, Dict This module provides functions to convert Haive graphs to and from LangGraph objects.
Functions¶
|
Convert a Haive graph to a LangGraph StateGraph. |
Create a wrapper that adapts to the function's parameter count. |
|
|
Extract a callable from a node. |
Module Contents¶
- haive.core.graph.state_graph.conversion.langgraph.convert_to_langgraph(graph, state_schema=None)¶
Convert a Haive graph to a LangGraph StateGraph.
- Parameters:
graph (Any) – Haive graph instance (BaseGraph or SchemaGraph)
state_schema (type[pydantic.BaseModel] | None) – Optional schema to use for the StateGraph
- Returns:
LangGraph StateGraph instance
- Return type:
langgraph.graph.StateGraph
- haive.core.graph.state_graph.conversion.langgraph.create_parameter_aware_wrapper(func)¶
Create a wrapper that adapts to the function’s parameter count.
- Parameters:
func (Any) – Function to wrap
- Returns:
Wrapped function that handles parameter count differences
- Return type:
Any