Inspect

Update agent

Partially update a custom agent. The API key user must be the creator, a contributor, or an Inspect admin. Only provided fields are changed.

Base URL
PATCH
/api/v2/agents/{agent_id}

Partially update a custom agent. The API key user must be the creator, a contributor, or an Inspect admin. Only provided fields are changed.

Authorization

bearerAuth agents:write
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: agents:write

Path Parameters

agent_id*string

Agent ID

Request Body

application/json
  1. body

At least one field must be provided.

Properties1 <= properties
name?string

Display name of the agent.

Length1 <= length <= 100
description?string

Description of what this agent does

prompt?|

System prompt, or null to clear it

Lengthlength <= 100000
model?|

Preferred model, or null to use the default. Any string up to 200 characters is stored; it is not checked against the model list.

Lengthlength <= 200
skills?array<>|

Configured skill names, or null for no explicit skill list

capabilities?|Deprecated

Deprecated.

prompt_context_mode?Agents.PromptContextMode

Whether the custom prompt appends to or replaces the base system prompt

Value in"append""replace"
repositories?array<>|

Repository allowlist containing configured repository IDs; null means unrestricted

repository_hint?|

Optional default repository hint

Lengthlength <= 500

Response Body

Custom agent updated

application/json
  1. response
data*

Full agent configuration for a single ID. Includes fields not present on the list-agents response.

Example Request
curl -X PATCH 'https://app.inspect.com/api/v2/agents/r4t8w2n6b9qe' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "prompt": "You are the release captain for acme/web. Summarize merged pull requests since the last tag, flag risky migrations, and draft release notes.",    "created_by": "Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR",    "skills": [      "deslop",      "release-notes"    ],    "capabilities": {      "edit": true,      "git_write": false,      "browser": true,      "user_skills": null,      "repository_skills": null,      "datadog": null,      "customer_data_access": null,      "notion": null,      "inspect_sessions": null,      "web_search": true,      "artifacts": null,      "tools": {        "web_fetch": false      }    },    "prompt_context_mode": "append",    "repositories": [      "web"    ],    "repository_hint": "acme/web",    "id": "r4t8w2n6b9qe",    "name": "Release Captain",    "description": "Drafts release notes and checks deploy readiness for acme/web.",    "model": "claude-opus-5-5",    "builtin": false,    "created_at": "2026-10-28T15:42:11.204Z"  }}