---
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_OPUS_4' | 'SUPPORTED_MODEL_OPUS_4_EXTENDED' | 'SUPPORTED_MODEL_OPUS_4_5' | 'SUPPORTED_MODEL_OPUS_4_5_EXTENDED' | 'SUPPORTED_MODEL_OPENAI_4O' | 'SUPPORTED_MODEL_OPENAI_4O_MINI' | 'SUPPORTED_MODEL_OPENAI_O1' | 'SUPPORTED_MODEL_OPENAI_O1_MINI'
      - `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

- **2025-12-15** `d62ef4b9187c` — 1 breaking, 4 warning, 7 info
  - added `subschema #1, subschema #2` to the `agent` response property `oneOf` list for the response status `200`
  - added the new `SUPPORTED_MODEL_OPUS_4_5` enum value to the `agent/spec/prompts/items/model` response property for the response status `200`
  - added the new `SUPPORTED_MODEL_OPUS_4_5_EXTENDED` enum value to the `agent/spec/prompts/items/model` response property for the response status `200`
  - added the new `SUPPORTED_MODEL_SONNET_4_5` enum value to the `agent/spec/prompts/items/model` response property for the response status `200`
  - …8 more
- **2025-06-10** `ca9a49ac7fbb` — 1 info
  - endpoint added

[Change 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/3935e467f9c1/schema)
