# coding: utf-8

"""
    Arthur Scope

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 0.1.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr
from typing import List, Optional
from typing_extensions import Annotated
from arthur_client.api_bindings.models.agent_response import AgentResponse
from arthur_client.api_bindings.models.agent_sort import AgentSort
from arthur_client.api_bindings.models.patch_unregistered_agent_request import PatchUnregisteredAgentRequest
from arthur_client.api_bindings.models.put_agents import PutAgents
from arthur_client.api_bindings.models.put_agents_response import PutAgentsResponse
from arthur_client.api_bindings.models.resource_list_agent_response import ResourceListAgentResponse
from arthur_client.api_bindings.models.resource_list_data_source import ResourceListDataSource
from arthur_client.api_bindings.models.resource_list_llm_model import ResourceListLLMModel
from arthur_client.api_bindings.models.resource_list_sub_agent import ResourceListSubAgent
from arthur_client.api_bindings.models.resource_list_tool import ResourceListTool
from arthur_client.api_bindings.models.sort_order import SortOrder

from arthur_client.api_bindings.api_client import ApiClient, RequestSerialized
from arthur_client.api_bindings.api_response import ApiResponse
from arthur_client.api_bindings.rest import RESTResponseType


class AgentsV1Api:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def get_registered_agent_by_id(
        self,
        agent_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> AgentResponse:
        """Get A Registered Agent By Its Id.

        Get a single registered agent by ID. Requires agent_read permission.

        :param agent_id: (required)
        :type agent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_registered_agent_by_id_serialize(
            agent_id=agent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_registered_agent_by_id_with_http_info(
        self,
        agent_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[AgentResponse]:
        """Get A Registered Agent By Its Id.

        Get a single registered agent by ID. Requires agent_read permission.

        :param agent_id: (required)
        :type agent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_registered_agent_by_id_serialize(
            agent_id=agent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_registered_agent_by_id_without_preload_content(
        self,
        agent_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get A Registered Agent By Its Id.

        Get a single registered agent by ID. Requires agent_read permission.

        :param agent_id: (required)
        :type agent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_registered_agent_by_id_serialize(
            agent_id=agent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_registered_agent_by_id_serialize(
        self,
        agent_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if agent_id is not None:
            _path_params['agent_id'] = agent_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/agents/registered/{agent_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_agents_for_workspace(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by model IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListAgentResponse:
        """List All Agents For A Workspace.

        List all agents for a workspace. Requires workspace_list_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter agents by model IDs.
        :type model_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_agents_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by model IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListAgentResponse]:
        """List All Agents For A Workspace.

        List all agents for a workspace. Requires workspace_list_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter agents by model IDs.
        :type model_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_agents_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by model IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Agents For A Workspace.

        List all agents for a workspace. Requires workspace_list_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter agents by model IDs.
        :type model_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_agents_for_workspace_serialize(
        self,
        workspace_id,
        sort,
        order,
        name_filter,
        agent_ids,
        model_ids,
        task_ids,
        sub_agent_names,
        tool_names,
        llm_model_names,
        data_source_urls,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_ids': 'multi',
            'model_ids': 'multi',
            'task_ids': 'multi',
            'sub_agent_names': 'multi',
            'tool_names': 'multi',
            'llm_model_names': 'multi',
            'data_source_urls': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if sort is not None:
            
            _query_params.append(('sort', sort.value))
            
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if model_ids is not None:
            
            _query_params.append(('model_ids', model_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if sub_agent_names is not None:
            
            _query_params.append(('sub_agent_names', sub_agent_names))
            
        if tool_names is not None:
            
            _query_params.append(('tool_names', tool_names))
            
        if llm_model_names is not None:
            
            _query_params.append(('llm_model_names', llm_model_names))
            
        if data_source_urls is not None:
            
            _query_params.append(('data_source_urls', data_source_urls))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/registered',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_data_sources_for_workspace(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter data sources by URL.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these llm model names.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListDataSource:
        """List All Registered Agent Data Sources For A Workspace.

        List all data sources for a workspace. Requires workspace_list_agent_data_sources permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter data sources by URL.
        :type name_filter: str
        :param agent_names: Filter data sources by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter data sources by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter data sources by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter data sources on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter data sources on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter data sources on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter data sources on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_data_sources_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListDataSource",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_data_sources_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter data sources by URL.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these llm model names.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListDataSource]:
        """List All Registered Agent Data Sources For A Workspace.

        List all data sources for a workspace. Requires workspace_list_agent_data_sources permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter data sources by URL.
        :type name_filter: str
        :param agent_names: Filter data sources by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter data sources by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter data sources by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter data sources on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter data sources on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter data sources on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter data sources on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_data_sources_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListDataSource",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_data_sources_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter data sources by URL.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter data sources on agents containing any of these llm model names.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Registered Agent Data Sources For A Workspace.

        List all data sources for a workspace. Requires workspace_list_agent_data_sources permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter data sources by URL.
        :type name_filter: str
        :param agent_names: Filter data sources by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter data sources by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter data sources by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter data sources on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter data sources on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter data sources on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter data sources on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_data_sources_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListDataSource",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_data_sources_for_workspace_serialize(
        self,
        workspace_id,
        order,
        name_filter,
        agent_names,
        agent_ids,
        model_ids,
        task_ids,
        tool_names,
        sub_agent_names,
        llm_model_names,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_names': 'multi',
            'agent_ids': 'multi',
            'model_ids': 'multi',
            'task_ids': 'multi',
            'tool_names': 'multi',
            'sub_agent_names': 'multi',
            'llm_model_names': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_names is not None:
            
            _query_params.append(('agent_names', agent_names))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if model_ids is not None:
            
            _query_params.append(('model_ids', model_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if tool_names is not None:
            
            _query_params.append(('tool_names', tool_names))
            
        if sub_agent_names is not None:
            
            _query_params.append(('sub_agent_names', sub_agent_names))
            
        if llm_model_names is not None:
            
            _query_params.append(('llm_model_names', llm_model_names))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/registered/data_sources',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_llm_models_for_workspace(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter llm models by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these sub-agent names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListLLMModel:
        """List All Registered Agent Llm Models For A Workspace.

        List all llm models for a workspace. Requires workspace_list_agent_llm_models permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter llm models by name.
        :type name_filter: str
        :param agent_names: Filter llm models by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter llm models by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter llm models by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter llm models on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter llm models on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter llm models on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param data_source_urls: Filter llm models on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_llm_models_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListLLMModel",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_llm_models_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter llm models by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these sub-agent names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListLLMModel]:
        """List All Registered Agent Llm Models For A Workspace.

        List all llm models for a workspace. Requires workspace_list_agent_llm_models permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter llm models by name.
        :type name_filter: str
        :param agent_names: Filter llm models by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter llm models by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter llm models by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter llm models on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter llm models on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter llm models on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param data_source_urls: Filter llm models on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_llm_models_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListLLMModel",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_llm_models_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter llm models by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on their associated tool names.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these sub-agent names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter llm models on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Registered Agent Llm Models For A Workspace.

        List all llm models for a workspace. Requires workspace_list_agent_llm_models permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter llm models by name.
        :type name_filter: str
        :param agent_names: Filter llm models by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter llm models by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter llm models by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter llm models on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter llm models on their associated tool names.
        :type tool_names: List[str]
        :param sub_agent_names: Filter llm models on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param data_source_urls: Filter llm models on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_llm_models_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            sub_agent_names=sub_agent_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListLLMModel",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_llm_models_for_workspace_serialize(
        self,
        workspace_id,
        order,
        name_filter,
        agent_names,
        agent_ids,
        model_ids,
        task_ids,
        tool_names,
        sub_agent_names,
        data_source_urls,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_names': 'multi',
            'agent_ids': 'multi',
            'model_ids': 'multi',
            'task_ids': 'multi',
            'tool_names': 'multi',
            'sub_agent_names': 'multi',
            'data_source_urls': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_names is not None:
            
            _query_params.append(('agent_names', agent_names))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if model_ids is not None:
            
            _query_params.append(('model_ids', model_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if tool_names is not None:
            
            _query_params.append(('tool_names', tool_names))
            
        if sub_agent_names is not None:
            
            _query_params.append(('sub_agent_names', sub_agent_names))
            
        if data_source_urls is not None:
            
            _query_params.append(('data_source_urls', data_source_urls))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/registered/llm_models',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_sub_agents_for_workspace(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter sub-agents by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListSubAgent:
        """List All Registered Agent Sub-Agents For A Workspace.

        List all sub-agents for a workspace. Requires workspace_list_agent_sub_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter sub-agents by name.
        :type name_filter: str
        :param agent_names: Filter sub-agents by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter sub-agents by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter sub-agents by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter sub-agents on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter sub-agents on their associated tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter sub-agents on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_sub_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListSubAgent",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_sub_agents_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter sub-agents by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListSubAgent]:
        """List All Registered Agent Sub-Agents For A Workspace.

        List all sub-agents for a workspace. Requires workspace_list_agent_sub_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter sub-agents by name.
        :type name_filter: str
        :param agent_names: Filter sub-agents by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter sub-agents by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter sub-agents by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter sub-agents on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter sub-agents on their associated tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter sub-agents on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_sub_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListSubAgent",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_sub_agents_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter sub-agents by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated task IDs.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on their associated tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter sub-agents on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Registered Agent Sub-Agents For A Workspace.

        List all sub-agents for a workspace. Requires workspace_list_agent_sub_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter sub-agents by name.
        :type name_filter: str
        :param agent_names: Filter sub-agents by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter sub-agents by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter sub-agents by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter sub-agents on their associated task IDs.
        :type task_ids: List[str]
        :param tool_names: Filter sub-agents on their associated tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter sub-agents on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_sub_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListSubAgent",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_sub_agents_for_workspace_serialize(
        self,
        workspace_id,
        order,
        name_filter,
        agent_names,
        agent_ids,
        model_ids,
        task_ids,
        tool_names,
        llm_model_names,
        data_source_urls,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_names': 'multi',
            'agent_ids': 'multi',
            'model_ids': 'multi',
            'task_ids': 'multi',
            'tool_names': 'multi',
            'llm_model_names': 'multi',
            'data_source_urls': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_names is not None:
            
            _query_params.append(('agent_names', agent_names))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if model_ids is not None:
            
            _query_params.append(('model_ids', model_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if tool_names is not None:
            
            _query_params.append(('tool_names', tool_names))
            
        if llm_model_names is not None:
            
            _query_params.append(('llm_model_names', llm_model_names))
            
        if data_source_urls is not None:
            
            _query_params.append(('data_source_urls', data_source_urls))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/registered/subagents',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_tools_for_workspace(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter tools by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on their associated task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListTool:
        """List All Registered Agent Tools For A Workspace.

        List all tools for a workspace. Requires workspace_list_agent_tools permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter tools by name.
        :type name_filter: str
        :param agent_names: Filter tools by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter tools by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter tools by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter tools on their associated task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter tools on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter tools on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_tools_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListTool",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_tools_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter tools by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on their associated task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListTool]:
        """List All Registered Agent Tools For A Workspace.

        List all tools for a workspace. Requires workspace_list_agent_tools permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter tools by name.
        :type name_filter: str
        :param agent_names: Filter tools by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter tools by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter tools by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter tools on their associated task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter tools on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter tools on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_tools_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListTool",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_tools_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter tools by name.")] = None,
        agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent names.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by their associated agent IDs.")] = None,
        model_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools by any model IDs their associated agents are attached to.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on their associated task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these sub-agent names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter tools on agents containing any of these data source URLs.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Registered Agent Tools For A Workspace.

        List all tools for a workspace. Requires workspace_list_agent_tools permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter tools by name.
        :type name_filter: str
        :param agent_names: Filter tools by their associated agent names.
        :type agent_names: List[str]
        :param agent_ids: Filter tools by their associated agent IDs.
        :type agent_ids: List[str]
        :param model_ids: Filter tools by any model IDs their associated agents are attached to.
        :type model_ids: List[str]
        :param task_ids: Filter tools on their associated task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter tools on agents containing any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param llm_model_names: Filter tools on agents containing any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter tools on agents containing any of these data source URLs.
        :type data_source_urls: List[str]
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_tools_for_workspace_serialize(
            workspace_id=workspace_id,
            order=order,
            name_filter=name_filter,
            agent_names=agent_names,
            agent_ids=agent_ids,
            model_ids=model_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListTool",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_tools_for_workspace_serialize(
        self,
        workspace_id,
        order,
        name_filter,
        agent_names,
        agent_ids,
        model_ids,
        task_ids,
        sub_agent_names,
        llm_model_names,
        data_source_urls,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_names': 'multi',
            'agent_ids': 'multi',
            'model_ids': 'multi',
            'task_ids': 'multi',
            'sub_agent_names': 'multi',
            'llm_model_names': 'multi',
            'data_source_urls': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_names is not None:
            
            _query_params.append(('agent_names', agent_names))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if model_ids is not None:
            
            _query_params.append(('model_ids', model_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if sub_agent_names is not None:
            
            _query_params.append(('sub_agent_names', sub_agent_names))
            
        if llm_model_names is not None:
            
            _query_params.append(('llm_model_names', llm_model_names))
            
        if data_source_urls is not None:
            
            _query_params.append(('data_source_urls', data_source_urls))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/registered/tools',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_unregistered_agents_for_workspace(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        show_muted: Annotated[Optional[StrictBool], Field(description="Filter agents that are muted.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ResourceListAgentResponse:
        """List All Unregistered Agents For A Workspace.

        List all unregistered agents for a workspace. Requires workspace_list_unregistered_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param show_muted: Filter agents that are muted.
        :type show_muted: bool
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_unregistered_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            show_muted=show_muted,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_unregistered_agents_for_workspace_with_http_info(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        show_muted: Annotated[Optional[StrictBool], Field(description="Filter agents that are muted.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ResourceListAgentResponse]:
        """List All Unregistered Agents For A Workspace.

        List all unregistered agents for a workspace. Requires workspace_list_unregistered_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param show_muted: Filter agents that are muted.
        :type show_muted: bool
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_unregistered_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            show_muted=show_muted,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_unregistered_agents_for_workspace_without_preload_content(
        self,
        workspace_id: StrictStr,
        sort: Annotated[Optional[AgentSort], Field(description="The field to sort the agents by.")] = None,
        order: Annotated[Optional[SortOrder], Field(description="The order to sort the agents by.")] = None,
        name_filter: Annotated[Optional[StrictStr], Field(description="Filter agents by name.")] = None,
        agent_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by agent IDs.")] = None,
        task_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter agents by task IDs.")] = None,
        sub_agent_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these sub-agent names.")] = None,
        tool_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these tool names.")] = None,
        llm_model_names: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these llm model names.")] = None,
        data_source_urls: Annotated[Optional[List[StrictStr]], Field(description="Filter agents that use any of these data source URLs.")] = None,
        show_muted: Annotated[Optional[StrictBool], Field(description="Filter agents that are muted.")] = None,
        page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page to return starting from 1 up to total_pages.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records per page. The max is 1000.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List All Unregistered Agents For A Workspace.

        List all unregistered agents for a workspace. Requires workspace_list_unregistered_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param sort: The field to sort the agents by.
        :type sort: AgentSort
        :param order: The order to sort the agents by.
        :type order: SortOrder
        :param name_filter: Filter agents by name.
        :type name_filter: str
        :param agent_ids: Filter agents by agent IDs.
        :type agent_ids: List[str]
        :param task_ids: Filter agents by task IDs.
        :type task_ids: List[str]
        :param sub_agent_names: Filter agents that use any of these sub-agent names.
        :type sub_agent_names: List[str]
        :param tool_names: Filter agents that use any of these tool names.
        :type tool_names: List[str]
        :param llm_model_names: Filter agents that use any of these llm model names.
        :type llm_model_names: List[str]
        :param data_source_urls: Filter agents that use any of these data source URLs.
        :type data_source_urls: List[str]
        :param show_muted: Filter agents that are muted.
        :type show_muted: bool
        :param page: The page to return starting from 1 up to total_pages.
        :type page: int
        :param page_size: The number of records per page. The max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_unregistered_agents_for_workspace_serialize(
            workspace_id=workspace_id,
            sort=sort,
            order=order,
            name_filter=name_filter,
            agent_ids=agent_ids,
            task_ids=task_ids,
            sub_agent_names=sub_agent_names,
            tool_names=tool_names,
            llm_model_names=llm_model_names,
            data_source_urls=data_source_urls,
            show_muted=show_muted,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ResourceListAgentResponse",
            '500': "InternalServerError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_unregistered_agents_for_workspace_serialize(
        self,
        workspace_id,
        sort,
        order,
        name_filter,
        agent_ids,
        task_ids,
        sub_agent_names,
        tool_names,
        llm_model_names,
        data_source_urls,
        show_muted,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'agent_ids': 'multi',
            'task_ids': 'multi',
            'sub_agent_names': 'multi',
            'tool_names': 'multi',
            'llm_model_names': 'multi',
            'data_source_urls': 'multi',
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        if sort is not None:
            
            _query_params.append(('sort', sort.value))
            
        if order is not None:
            
            _query_params.append(('order', order.value))
            
        if name_filter is not None:
            
            _query_params.append(('name_filter', name_filter))
            
        if agent_ids is not None:
            
            _query_params.append(('agent_ids', agent_ids))
            
        if task_ids is not None:
            
            _query_params.append(('task_ids', task_ids))
            
        if sub_agent_names is not None:
            
            _query_params.append(('sub_agent_names', sub_agent_names))
            
        if tool_names is not None:
            
            _query_params.append(('tool_names', tool_names))
            
        if llm_model_names is not None:
            
            _query_params.append(('llm_model_names', llm_model_names))
            
        if data_source_urls is not None:
            
            _query_params.append(('data_source_urls', data_source_urls))
            
        if show_muted is not None:
            
            _query_params.append(('show_muted', show_muted))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/workspaces/{workspace_id}/agents/unregistered',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def put_agents(
        self,
        workspace_id: StrictStr,
        put_agents: PutAgents,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PutAgentsResponse:
        """Upsert Agents.

        Create or update agents in the workspace. Deduplicates by (workspace_id, data_plane_id, task_id). Performs full replacement on match. Requires workspace_upsert_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param put_agents: (required)
        :type put_agents: PutAgents
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_agents_serialize(
            workspace_id=workspace_id,
            put_agents=put_agents,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutAgentsResponse",
            '500': "InternalServerError",
            '400': "BadRequestError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def put_agents_with_http_info(
        self,
        workspace_id: StrictStr,
        put_agents: PutAgents,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PutAgentsResponse]:
        """Upsert Agents.

        Create or update agents in the workspace. Deduplicates by (workspace_id, data_plane_id, task_id). Performs full replacement on match. Requires workspace_upsert_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param put_agents: (required)
        :type put_agents: PutAgents
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_agents_serialize(
            workspace_id=workspace_id,
            put_agents=put_agents,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutAgentsResponse",
            '500': "InternalServerError",
            '400': "BadRequestError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def put_agents_without_preload_content(
        self,
        workspace_id: StrictStr,
        put_agents: PutAgents,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Upsert Agents.

        Create or update agents in the workspace. Deduplicates by (workspace_id, data_plane_id, task_id). Performs full replacement on match. Requires workspace_upsert_agents permission.

        :param workspace_id: (required)
        :type workspace_id: str
        :param put_agents: (required)
        :type put_agents: PutAgents
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_agents_serialize(
            workspace_id=workspace_id,
            put_agents=put_agents,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutAgentsResponse",
            '500': "InternalServerError",
            '400': "BadRequestError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _put_agents_serialize(
        self,
        workspace_id,
        put_agents,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if workspace_id is not None:
            _path_params['workspace_id'] = workspace_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if put_agents is not None:
            _body_params = put_agents


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/api/v1/workspaces/{workspace_id}/agents',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def update_unregistered_agent(
        self,
        agent_id: StrictStr,
        patch_unregistered_agent_request: PatchUnregisteredAgentRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> AgentResponse:
        """Update An Unregistered Agent.

        Update an unregistered agent. Requires unregistered_agent_patch permission.

        :param agent_id: (required)
        :type agent_id: str
        :param patch_unregistered_agent_request: (required)
        :type patch_unregistered_agent_request: PatchUnregisteredAgentRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_unregistered_agent_serialize(
            agent_id=agent_id,
            patch_unregistered_agent_request=patch_unregistered_agent_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def update_unregistered_agent_with_http_info(
        self,
        agent_id: StrictStr,
        patch_unregistered_agent_request: PatchUnregisteredAgentRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[AgentResponse]:
        """Update An Unregistered Agent.

        Update an unregistered agent. Requires unregistered_agent_patch permission.

        :param agent_id: (required)
        :type agent_id: str
        :param patch_unregistered_agent_request: (required)
        :type patch_unregistered_agent_request: PatchUnregisteredAgentRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_unregistered_agent_serialize(
            agent_id=agent_id,
            patch_unregistered_agent_request=patch_unregistered_agent_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def update_unregistered_agent_without_preload_content(
        self,
        agent_id: StrictStr,
        patch_unregistered_agent_request: PatchUnregisteredAgentRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Update An Unregistered Agent.

        Update an unregistered agent. Requires unregistered_agent_patch permission.

        :param agent_id: (required)
        :type agent_id: str
        :param patch_unregistered_agent_request: (required)
        :type patch_unregistered_agent_request: PatchUnregisteredAgentRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_unregistered_agent_serialize(
            agent_id=agent_id,
            patch_unregistered_agent_request=patch_unregistered_agent_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AgentResponse",
            '500': "InternalServerError",
            '404': "NotFoundError",
            '422': "HTTPValidationError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _update_unregistered_agent_serialize(
        self,
        agent_id,
        patch_unregistered_agent_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if agent_id is not None:
            _path_params['agent_id'] = agent_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if patch_unregistered_agent_request is not None:
            _body_params = patch_unregistered_agent_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'OAuth2AuthorizationCode'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/api/v1/agents/unregistered/{agent_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


