@@ -2881,7 +2881,7 @@ def list_agents(self, *, max_results: Optional[int] = None, next_token: Optional
28812881 return self ._make_request (requests .get , '/agents' , params = params )
28822882
28832883 def create_agent_run (self , agent_id : str , * , variables : dict = None ) -> Dict :
2884- """Get agent, calls the POST /agents/{agentId}/runs endpoint.
2884+ """Create agent run , calls the POST /agents/{agentId}/runs endpoint.
28852885
28862886 :param agent_id: Id of the agent
28872887 :type agent_id: str
@@ -2905,7 +2905,7 @@ def list_agent_runs(
29052905 max_results : Optional [int ] = None ,
29062906 next_token : Optional [str ] = None ,
29072907 ) -> Dict :
2908- """List agents available, calls the GET /agents/{agentId}/runs endpoint.
2908+ """List agent runs available, calls the GET /agents/{agentId}/runs endpoint.
29092909
29102910 :param agent_id: Id of the agent
29112911 :type agent_id: str
@@ -2927,7 +2927,7 @@ def list_agent_runs(
29272927 return self ._make_request (requests .get , f'/agents/{ agent_id } /runs' , params = params )
29282928
29292929 def get_agent_run (self , agent_id : str , run_id : str , * , get_variables : bool = False ) -> Dict :
2930- """Get agent, calls the GET /agents/{agentId}/runs/{runId} endpoint.
2930+ """Get agent run , calls the GET /agents/{agentId}/runs/{runId} endpoint.
29312931
29322932 :param agent_id: Id of the agent
29332933 :type agent_id: str
@@ -2948,6 +2948,21 @@ def get_agent_run(self, agent_id: str, run_id: str, *, get_variables: bool = Fal
29482948 ).decode ())
29492949 return agent_run
29502950
2951+ def delete_agent_run (self , agent_id : str , run_id : str ) -> Dict :
2952+ """Delete agent run, calls the DELETE /agents/{agentId}/runs/{runId} endpoint.
2953+
2954+ :param agent_id: Id of the agent
2955+ :type agent_id: str
2956+ :param run_id: Id of the run
2957+ :type run_id: str
2958+ :return: Agent response from REST API
2959+ :rtype: dict
2960+
2961+ :raises: :py:class:`~cradl.InvalidCredentialsException`, :py:class:`~cradl.TooManyRequestsException`,\
2962+ :py:class:`~cradl.LimitExceededException`, :py:class:`requests.exception.RequestException`
2963+ """
2964+ return self ._make_request (requests .delete , f'/agents/{ agent_id } /runs/{ run_id } ' )
2965+
29512966 def list_hooks (self , * , max_results : Optional [int ] = None , next_token : Optional [str ] = None ) -> Dict :
29522967 """List hooks available, calls the GET /hooks endpoint.
29532968
0 commit comments