Edit a saved agent.

PATCH/o/{org}/agents/{agent}
View .md

Send only what changes, in the body a create takes; the rest is kept, and the result is checked against today's catalog. A person's edit reads the short body as a key's does, and an unknown field is 400 UNKNOWN_FIELD beside the short body or the console editor's config. harness cannot change. Only the creator can edit. Send visibility alone to change who can use the agent. Once the creator has left the org, an org admin may send {"visibility": "private"} alone, and nothing else, even for an agent they cannot see; the answer is then only {id, visibility} and If-Match is optional. Sessions already started keep what they started with. Editing a template changes the next session of every agent made from it. An agent made from a template takes name and description only, or archive: true alone, which removes it as DELETE does; a field the template owns is 422 TEMPLATE_FIELDS, anything else 422 INVALID_BODY.

Authenticate with a signed-in session token (an API key cannot call this route).

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

agentstringrequired

The saved agent's id, or its exact name (a plain agent or one made from a template). Two agents of that name are 422 INVALID_BODY; send the id. available and community are paths beside this one, so no agent may be named either. An archived agent, and an orphaned agent an org admin cannot see, are reached by id only.

Headers

if-matchstringoptional

The ETag of the revision you read; another revision is 412 STALE_ETAG. A signed-in caller must send it (428 IF_MATCH_REQUIRED); an API key may leave it out.

Request body

Any field of SavedAgentCreate but harness, handle and source, or a separate visibility change. A stale catalog_revision is 422 CATALOG_REFRESH_REQUIRED. Only the creator can edit; a visible non-creator receives 403 FORBIDDEN, except that an org admin may send {"visibility": "private"} alone for an agent whose creator left the org.

visibilitystringoptional

Creator only (or private from an org admin, for an agent whose creator left the org); send alone as a separate sharing change. public submits the agent to Community for review: an org admin, with category, subtitle and triggers. Once Phoenix approves it, the listing is public: anyone reads it at GET /community/agents and on getrush.ai/templates/. private or org withdraws a listing.

One ofprivateorgpublic
categorystringoptional

With visibility public.

One ofEngineeringBusinessMarketingGeneral
subtitlestringoptional

With visibility public; one line.

at most 30 characters
triggersarray of stringoptional

With visibility public: how the agent starts, by kind. request is a run someone starts with the API, an MCP client or the console; the rest are automation trigger kinds. Phoenix reviews them with the revision, and the listing shows them on getrush.ai. Leave it out to keep the last submission's, else the listed ones.

logostring | nulloptional

With visibility public: the listing's square logo as a base64 data: URI of a PNG, JPEG or WebP image, at most 2 MiB. Leave it out to keep the last submission's, else the listed one; null lists none.

coverstring | nulloptional

With visibility public: the listing's wide cover image (shown about 4:1), in the same form as logo.

namestringoptional
at most 80 characters
descriptionstringoptional
at most 500 characters
modelstringoptional
effortstringoptional
instructionsstringoptional
skillsarray of string | object | objectoptional
1 item fields
urlstringrequired
Format uriat most 2048 characters
connectionsarray of string | objectoptional
2 item fields
namestringrequired

The connection's id or name.

accessstringrequired

read: read mail (and Outlook contacts). send: read and send. Absent: all of the app's access, which for Gmail also changes labels and for Outlook is the same as send.

One ofreadsend
capabilitiesobjectoptional
2 fields
browserbooleanoptional
computerbooleanoptional
runtimeSavedAgentRuntimeoptional

{selection: "latest_verified"} (the default) keeps the harness CLI current; {selection: "pinned", id} holds one release. A pin set on a create or an edit must be the harness's cli_version in GET /o/{org}/agents/available, the release its models are checked on; any other is 422 UNSUPPORTED_PROFILE with field code RUNTIME_NOT_VERIFIED. A pin already saved stays through later edits, and an agent customized from another keeps that agent's pin.

2 fields
selectionstringrequired
One oflatest_verifiedpinned
idstringoptional
toolsSavedAgentToolsoptional

{mode: "default"} (the default) runs every native tool; {mode: "selected", ids} only the ids named, from the harness's tools in GET /o/{org}/agents/available (Claude Code only). With skills or a plugin that has skills, ids must include Skill.

2 fields
modestringrequired
One ofdefaultselected
idsarray of stringoptional
networkSavedAgentNetworkoptional

{mode: "public"} (the default). {mode: "allowlist", domains} is 422 UNSUPPORTED_PROFILE (NETWORK_ENFORCEMENT_NOT_QUALIFIED) until a runtime enforces it.

2 fields
modestringrequired
One ofpublicallowlist
domainsarray of stringoptional
pluginsarray of objectoptional

Catalog plugins installed into every run of the agent, by the harness's plugins in GET /o/{org}/agents/available; each is pinned by its digest when saved. One the harness does not list is 422 UNSUPPORTED_PROFILE.

1 item fields
catalog_idstringrequired

Responses

200The agent as edited; for an org admin's unshare of an orphaned agent, only its id and visibility.
400An unknown or removed field, as on create.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
403A visible agent belongs to another creator (FORBIDDEN).
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404No such agent visible to you (NOT_FOUND).
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
412A concurrent edit won (STALE_ETAG); read the agent and send the edit again.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
422IMMUTABLE_FIELD (harness or handle sent), TEMPLATE_FIELDS (a field an agent's template sets), or any create-time code, checked against the merged setup: UNSUPPORTED_PROFILE with fields names each choice the catalog does not support, such as tools.ids SKILL_TOOL_REQUIRED when skills (pinned or from a plugin) meet a tool selection without Skill.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
428A signed-in caller sent no If-Match (IF_MATCH_REQUIRED).
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
429The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED).

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED). The error names the limit. Wait Retry-After seconds.

errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional