Skip to content
Ona Docs

StopAgentExecution

agents.stop_execution(AgentStopExecutionParams**kwargs) -> object
POST/gitpod.v1.AgentService/StopAgentExecution

Stops an active agent execution.

Use this method to:

  • Stop an agent that is currently running
  • Prevent further processing or resource usage

Examples

  • Stop an agent execution by ID:

    agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
ParametersExpand Collapse
agent_execution_id: Optional[str]
formatuuid
ReturnsExpand Collapse
object

StopAgentExecution

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.stop_execution(
    agent_execution_id="6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35",
)
print(response)
{}
Returns Examples
{}