| Name | Type | Description |
|---|---|---|
assistant_id* | str | The ID of the assistant to get the graph of. |
xray | int | bool | Default: FalseInclude graph representation of subgraphs. If an integer value is provided, only subgraphs with a depth less than or equal to the value will be included. |
headers | Mapping[str, str] | None | Default: None |
params | QueryParamTypes | None | Default: None |
Get the graph of an assistant by ID.
client = get_client(url="http://localhost:2024")
graph_info = await client.assistants.get_graph(
assistant_id="my_assistant_id"
)
print(graph_info)
--------------------------------------------------------------------------------------------------------------------------
{
'nodes':
[
{'id': '__start__', 'type': 'schema', 'data': '__start__'},
{'id': '__end__', 'type': 'schema', 'data': '__end__'},
{'id': 'agent','type': 'runnable','data': {'id': ['langgraph', 'utils', 'RunnableCallable'],'name': 'agent'}},
],
'edges':
[
{'source': '__start__', 'target': 'agent'},
{'source': 'agent','target': '__end__'}
]
}Optional custom headers to include with the request.
Optional query parameters to include with the request.