init
__all__ = ['GraphType', 'LGClientProtocol', 'RunSettings', 'get_langgraph_client', 'get_thread_state', 'run_any_graph', 'run_assistant_graph']
module-attribute
GraphType
Bases: StrEnum
BASIC = 'basic_agent_graph'
class-attribute
instance-attribute
DEBUG = 'debug_graph'
class-attribute
instance-attribute
LGClientProtocol
Bases: Protocol
runs
property
threads
property
RunSettings
Bases: BaseModel
configurable
instance-attribute
interrupt_after = None
class-attribute
instance-attribute
interrupt_before = None
class-attribute
instance-attribute
langgraph_settings
instance-attribute
resuming = False
class-attribute
instance-attribute
sub_assistant_run_info
instance-attribute
user_input
instance-attribute
get_langgraph_client()
get_thread_state(client, thread_id)
async
Get the state of a thread from the graph.
Roughly equivalent to
- langgraph_sdk.threads.get_state(...)
run_any_graph(client, updatable=None, thread_id=None, graph_type=GraphType.DEBUG, inputs=None, config=None)
async
run_assistant_graph(client, updatable, thread_id, graph_type, run_settings)
async
Run the assistant (graph) with run_settings.
Roughly equivalent to
- langgraph_sdk.runs.stream(...)
2024-10-11 -- For now always expecting a FullGraphState to be returned from graphs run by this interface. This could change.