---
title: "UpdateAgent"
method: POST
path: "/gitpod.v1.AgentService/UpdateAgent"
tags: ["gitpod.v1.AgentService"]
---

# UpdateAgent

`POST /gitpod.v1.AgentService/UpdateAgent`

Updates an existing agent.

 Use this method to:
 - Modify agent configuration
 - Update prompts or required tools

## Request body

- GitpodV1UpdateAgentRequest
  - `agentId` string, uuid — The ID of the agent to update
  - `metadata` GitpodV1UpdateAgentRequestMetadata
    - `description` string, nullable — A description of what the agent does
    - `name` string, nullable — The name of the agent
  - `spec` GitpodV1UpdateAgentRequestSpec
    - `prompts` GitpodV1RunnerSideAgentSpecPrompts[] — The prompts configuration for each supported model. Setting the system prompt of a model to the empty value will remove the system prompt for that model. Adding a prompt for a model that already has a prompt will replace the existing prompt for that model. Adding a prompt for a model that does not exist adds a new prompt for that model.
      - `improvePrompt` string — The prompt used to improve the agent's prompt
      - `initialMessage` string — The initial message sent to the user. If empty, the agent will start in WAITING_FOR_INPUT state
      - `judgementPrompt` string — The prompt used to evaluate agent's performance and provide final assessment
      - `model` 'SUPPORTED_MODEL_UNSPECIFIED' | 'SUPPORTED_MODEL_SONNET_3_5' | 'SUPPORTED_MODEL_SONNET_3_7' | 'SUPPORTED_MODEL_SONNET_3_7_EXTENDED' | 'SUPPORTED_MODEL_SONNET_4' | 'SUPPORTED_MODEL_SONNET_4_EXTENDED' | 'SUPPORTED_MODEL_SONNET_4_5' | 'SUPPORTED_MODEL_SONNET_4_5_EXTENDED' | 'SUPPORTED_MODEL_SONNET_4_6' | 'SUPPORTED_MODEL_SONNET_4_6_EXTENDED' | 'SUPPORTED_MODEL_SONNET_5' | 'SUPPORTED_MODEL_OPUS_4' | 'SUPPORTED_MODEL_OPUS_4_EXTENDED' | 'SUPPORTED_MODEL_OPUS_4_5' | 'SUPPORTED_MODEL_OPUS_4_5_EXTENDED' | 'SUPPORTED_MODEL_OPUS_4_6' | 'SUPPORTED_MODEL_OPUS_4_6_EXTENDED' | 'SUPPORTED_MODEL_OPUS_4_7' | 'SUPPORTED_MODEL_OPUS_4_8' | 'SUPPORTED_MODEL_HAIKU_4_5' | 'SUPPORTED_MODEL_OPENAI_4O' | 'SUPPORTED_MODEL_OPENAI_4O_MINI' | 'SUPPORTED_MODEL_OPENAI_O1' | 'SUPPORTED_MODEL_OPENAI_O1_MINI' | 'SUPPORTED_MODEL_OPENAI_AUTO' — SupportedModel enumerates the LLM models available for agent executions
      - `systemPrompt` string — The system prompt that defines the agent's role and capabilities
    - `requiredTools` string[] — The list of tools required by this agent to function. Providing a value here will replace the existing list of required tools.

## Response `200`

Success

- GitpodV1UpdateAgentResponse — unresolved $ref

## Other responses

- `default` — Error

## Changes

- **2026-07-30** `44d50c2ac284` — 1 breaking, 21 warning, 7 info
  - added `subschema #1, subschema #2` to the `agent/inEnvironment/service/runsOn` response property `oneOf` list for the response status `200`
  - removed the optional property `agent/inEnvironment/service/runsOn/terminal` from the response with the `200` status
  - added the new `SUPPORTED_MODEL_OPENAI_AUTO` enum value to the `agent/inEnvironment/requiredModels/items/` response property for the response status `200`
  - added the new `SUPPORTED_MODEL_OPENAI_AUTO` enum value to the `agent/runnerSide/preferredModels/items/` response property for the response status `200`
  - …25 more
- **2026-04-02** `dabc0ff98cd7` — 1 breaking, 9 warning, 7 info
  - added `subschema #1, subschema #2, subschema #3` to the `agent/inEnvironment/service/runsOn` response property `oneOf` list for the response status `200`
  - added the new `SUPPORTED_MODEL_HAIKU_4_5` enum value to the `agent/inEnvironment/requiredModels/items/` response property for the response status `200`
  - added the new `SUPPORTED_MODEL_HAIKU_4_5` enum value to the `agent/runnerSide/prompts/items/model` response property for the response status `200`
  - added the new `SUPPORTED_MODEL_HAIKU_4_5` enum value to the `agent/spec/prompts/items/model` response property for the response status `200`
  - …13 more
- …earlier changes not shown

[Full history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.AgentService/UpdateAgent/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
