Skip to main content
PATCH
Replace an instruction in an agent
number
required
Workspace ID. Use the workspace that owns the agent.
number
required
Numeric agent ID.
string
required
Revision returned by the read operation.
string
required
Exact passage from the saved instructions. It must occur once.
string
required
Replacement text. Use an empty string to remove the passage.
Send the revision returned by the read, the exact passage as old_text and the replacement as new_text. Send an empty new_text to remove the passage. The server returns HTTP 409 if the prompt changed or the passage does not occur exactly once. Use this operation for corrections or removals. Use append_to_prompt in Update an agent when the request is to add a new instruction.