Search for assistants.
search(
self,
*,
metadata: Json = None,
graph_id: str | None = None,
name: str | None = None,
limit: int = 10,
offset: int = 0,
sort_by: AssistantSortBy | None = None,
sort_order: SortOrder | None = None,
select: list[AssistantSelectField] | None = None,
response_format: Literal['array', 'object'] = 'array',
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None
) -> AssistantsSearchResponse | list[Assistant]client = get_sync_client(url="http://localhost:2024")
response = client.assistants.search(
metadata = {"name":"my_name"},
graph_id="my_graph_id",
limit=5,
offset=5,
response_format="object",
)
assistants = response["assistants"]
next_cursor = response["next"]| Name | Type | Description |
|---|---|---|
metadata | Json | Default: NoneMetadata to filter by. Exact match filter for each KV pair. |
graph_id | str | None | Default: NoneThe ID of the graph to filter by. The graph ID is normally set in your langgraph.json configuration. |
name | str | None | Default: NoneThe name of the assistant to filter by. The filtering logic will match assistants where 'name' is a substring (case insensitive) of the assistant name. |
limit | int | Default: 10The maximum number of results to return. |
offset | int | Default: 0The number of results to skip. |
sort_by | AssistantSortBy | None | Default: NoneThe field to sort by. |
sort_order | SortOrder | None | Default: NoneThe order to sort by. |
select | list[AssistantSelectField] | None | Default: NoneSpecific assistant fields to include in the response. |
response_format | Literal['array', 'object'] | Default: 'array'Controls the response shape. Use |
headers | Mapping[str, str] | None | Default: NoneOptional custom headers to include with the request. |