## DeleteAgentExecution `client.Agents.DeleteExecution(ctx, body) (*AgentDeleteExecutionResponse, error)` **post** `/gitpod.v1.AgentService/DeleteAgentExecution` Deletes an agent run. Use this method to: - Clean up agent runs that are no longer needed ### Examples - Delete an agent run by ID: ```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ``` ### Parameters - `body AgentDeleteExecutionParams` - `AgentExecutionID param.Field[string]` ### Returns - `type AgentDeleteExecutionResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.Agents.DeleteExecution(context.TODO(), gitpod.AgentDeleteExecutionParams{ AgentExecutionID: gitpod.F("6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json {} ```