Skip to main content
Version: 2.0

Update Instruction API Definition

The Update Instruction API enables you to modify an existing behavioral instruction. This allows you to iterate on agent behavior, update guidelines, and refine the tone and personality of your AI agents over time.

Update Instruction Request and Response

To update an instruction, send a PATCH request to /v2/instructions/{instruction_id}. You include the parameters you wish to update in the request body. Any omitted fields will remain unchanged.

Supported fields:

  • name (string, optional): New human-readable name for the instruction.
  • description (string, optional): Updated description of the instruction's purpose.
  • template (string, optional): The new instruction content in Apache Velocity Template Language.
  • enabled (boolean, optional): Toggle instruction availability.
  • metadata (object, optional): Replaces the current metadata.

The response returns the updated instruction configuration.

Example Request

EXAMPLE REQUEST
1

Example Response

EXAMPLE RESPONSE
1

Error Responses

The API returns standard HTTP error codes with detailed error information:

HTTP CodeError CodeDescription
400invalid_requestInvalid instruction_id format or malformed request body
401unauthorizedInvalid or missing API key
403forbiddenInsufficient permissions for updating this instruction
404not_foundInstruction with the specified ID does not exist
429rate_limit_exceededRequest rate limit exceeded