---
title: "Refine Agent Instructions"
method: POST
path: "/api/v1/agents/{agent_id}/refine"
tags: ["agents"]
---

# Refine Agent Instructions

`POST /api/v1/agents/{agent_id}/refine`

Suggest ONE new instruction line, with verbatim receipts. Never a rewrite.

Two callers: an 'Every draft' scoped founder note (body.note set — a declared
command, converted directly), or the editor's 'Suggest an improvement' button
(empty body — reads the recent feedback ledger for the current instructions
version). The write itself always happens via the versioned agent update.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `authorization` string, nullable — Bearer <token>

## Request body

- AgentRefineRequest — Minimal-edit refine (docs/refine-flow-redesign.md). Two callers: an 'Every draft' scoped note (note set), or the editor's 'Suggest an improvement' button (empty body — the endpoint reads the feedback ledger).
  - `note` string, nullable

## Response `200`

Successful Response

- EnvelopeAgentRefineResponse
  - `data` AgentRefineResponse, required
    - `suggested_addition` string, required
    - `rationale` string, required
    - `receipts` RefineReceipt[]
      - `quote` string, required
      - `kind` string, required
      - `created_at` string, date-time, nullable
      - `draft_id` string, uuid, nullable
      - `actor` string, nullable
    - `instructions_version` integer, required
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time
    - `total` integer, nullable
    - `truncated` boolean, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-02** `6bd3ca9033ae` — 2 info
  - the `meta` response's property default value changed from `{"request_id":"","timestamp":"2026-09-01T18:59:27.102736"}` to `{"request_id":"","timestamp":"2026-09-02T16:58:28.431377"}` for the status `200`
  - the `timestamp` response's property default value changed from `2026-09-01T18:59:27.102736` to `2026-09-02T16:58:28.431377` for the status `200`

[Change history](https://skmtc.dev/minro/apis/minro-cs-platform/changes/api/v1/agents/:agent_id/refine/post.md)

---

[API](https://skmtc.dev/minro/apis/minro-cs-platform.md) · [All operations](https://skmtc.dev/minro/apis/minro-cs-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/minro/minro-cs-platform/revisions/6bd3ca9033ae/schema)
