---
title: "Edit Instruction"
method: PATCH
path: "/v1/agents/{agent_id}/instructions/edit"
tags: ["Agents"]
---

# Edit Instruction

`PATCH /v1/agents/{agent_id}/instructions/edit`

Replace an existing instruction snippet with a revised version in the
agent's published specs (used by the feedback flow to rewrite an existing
instruction instead of only appending a new one).

## Path parameters

- `agent_id` string, uuid, required

## Request body

- EditInstructionRequest
  - `existingInstruction` string, required
  - `revisedInstruction` string, required
  - `target` 'general' | 'followUp' | 'response', required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/orsay/apis/fastapi.md) · [All operations](https://skmtc.net/orsay/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orsay/fastapi/revisions/23d1ff06d0d0/schema)
