---
title: "Edit a saved agent."
method: PATCH
path: "/o/{org}/agents/{agent}"
tags: ["Saved agents"]
---

# Edit a saved agent.

`PATCH /o/{org}/agents/{agent}`

## Request

- Base URL: `https://api.prix.dev`
- URL: `https://api.prix.dev/o/{org}/agents/{agent}`
- Auth: HTTP bearer

Send only what changes; the rest is kept, and the result is checked against today's
catalog. `harness` cannot change. Only the creator can edit. Send `visibility` alone to
change who can use the agent. 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; anything else is `422 TEMPLATE_FIELDS`.

## Request body

- SavedAgentUpdate: Any field of `SavedAgentCreate` but `harness`, or a separate visibility change. Only the creator can edit; a visible non-creator receives 403 FORBIDDEN.
  - `visibility` 'private' | 'org': Creator only; send alone as a separate sharing change.
  - `name` string
  - `description` string
  - `model` string
  - `effort` string
  - `instructions` string
  - `skills` SkillUrl[]
    - union: A skill by public URL, as a string or `{url}`.
      - string, uri
      - object
        - `url` string, uri, required
  - `connections` string[]
  - `capabilities` object
    - `browser` boolean
    - `computer` boolean

## Response `200`

The agent as edited.

- SavedAgent: A saved agent. A field appears only when it has a value.
  - `visibility` 'private' | 'org': Private by default; org makes the agent usable by current org members.
  - `id` string, uuid, required
  - `template` string, uuid: Present on an agent made from a template; everything but its name and description is the template's.
  - `name` string, required
  - `description` string
  - `harness` 'claude' | 'codex' | 'opencode', required: Launch-boundary managed harnesses.
  - `model` string, required
  - `effort` string
  - `instructions` string
  - `skills` object[]
    - `url` string, uri, required
    - `name` string, required
  - `connections` object[]: The agent's connections from `GET /me/connections`, each with the name a run's `connections` takes. A deleted connection has no `name`. On an agent made from a template, one entry per connection the template names: `id` is the agent's own account of that app, absent until connected.
    - `id` string
    - `name` string
  - `capabilities` object: Present when browser or computer use is on.
    - `browser` boolean
    - `computer` boolean
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: An unknown or removed field, as on create.
- `401`: No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
- `403`: A visible agent belongs to another creator (`FORBIDDEN`).
- `404`: No such agent visible to you (`NOT_FOUND`).
- `412`: A concurrent edit won (`STALE_ETAG`); read the agent and send the edit again.
- `422`: `IMMUTABLE_FIELD` (`harness` sent), `TEMPLATE_FIELDS` (a field an agent's template sets), or any create-time code.

## Changes

- **2026-10-20** `e351f947926b`: 1 breaking, 1 info
  - the response property `connections/items/id` became optional for the status `200`
  - added the optional property `template` to the response with the `200` status

[Operation history](https://skmtc.dev/getrush/apis/rush-api/changes/o/:org/agents/:agent/patch.md)

---

[API](https://skmtc.dev/getrush/apis/rush-api.md) · [All operations](https://skmtc.dev/getrush/apis/rush-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getrush/apis/rush-api/revisions/e351f947926b?raw)
