Skip to content
Ona Docs

StopAgentExecution

client.agents.stopExecution(AgentStopExecutionParams { agentExecutionId } body, RequestOptionsoptions?): AgentStopExecutionResponse
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
body: AgentStopExecutionParams { agentExecutionId }
agentExecutionId?: string
formatuuid
ReturnsExpand Collapse
AgentStopExecutionResponse = unknown

StopAgentExecution

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.stopExecution({
  agentExecutionId: '6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35',
});

console.log(response);
{}
Returns Examples
{}