> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octavehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent

> Update an existing agent



## OpenAPI

````yaml post /api/v2/agents/update
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/agents/update:
    post:
      tags:
        - Agents
      summary: Update Agent
      description: Update an existing agent
      operationId: updateAgent
      requestBody:
        description: Agent update input
        content:
          application/json:
            schema:
              type: object
              properties:
                oId:
                  type: string
                  minLength: 1
                  description: The OId of the agent to update
                  example: agent_123
                name:
                  type: string
                  description: The name of the agent
                description:
                  type: string
                  description: The description of the agent
                model:
                  type: string
                  enum:
                    - NOTE
                    - PULSE
                    - ECHO
                    - HARMONY
                    - CHORUS
                    - SYMPHONY
                  description: The model to use for the agent
                productOId:
                  type: string
                  description: The OId of the product/offering to associate with the agent
                serviceOId:
                  type: string
                  description: >-
                    Alias for productOId — use either field, not both. Maps to
                    the same internal product/offering.
                playbookOId:
                  type: string
                  description: The OId of the playbook to associate with the agent
                personaOIds:
                  type: array
                  items:
                    type: string
                  description: The OIds of the personas to associate with the agent
                useCaseOIds:
                  type: array
                  items:
                    type: string
                  description: The OIds of the use cases to associate with the agent
                segmentOIds:
                  type: array
                  items:
                    type: string
                  description: The OIds of the segments to associate with the agent
                competitorOIds:
                  type: array
                  items:
                    type: string
                  description: The OIds of the competitors to associate with the agent
                referenceOIds:
                  type: array
                  items:
                    type: string
                  description: >-
                    The OIds of the reference customers to associate with the
                    agent
                proofPointOIds:
                  type: array
                  items:
                    type: string
                  description: The OIds of the proof points to associate with the agent
                enableBrandVoice:
                  type: boolean
                  description: Whether to enable brand voice for the agent
                enableWebSearch:
                  type: boolean
                  description: >-
                    Whether to enable web search. Only enable when explicitly
                    requested
                webSearchInstructions:
                  type: string
                  description: Custom instructions for the web search tool
                enableCrmActivity:
                  type: boolean
                  description: Whether to enable CRM activity for the agent
                crmActivityInstructions:
                  type: string
                  description: Custom instructions for the CRM activity tool
                enableHighEffortMode:
                  type: boolean
                  description: Whether to enable high-effort mode for the agent
                sequenceSettings:
                  type: object
                  properties:
                    sequenceType:
                      type: string
                      enum:
                        - COLD_OUTBOUND
                        - WARM_OUTBOUND
                        - INBOUND
                        - CUSTOM
                        - CVI_WHY_CHANGE
                        - BARE_METAL
                      description: >-
                        Sequence type (e.g. COLD_OUTBOUND, WARM_OUTBOUND).
                        Changing this does not reset step-level configs.
                    numEmails:
                      type: number
                      nullable: true
                      description: Number of emails in the sequence (default 4)
                    sequenceTypeCustomInstructions:
                      type: string
                      nullable: true
                      description: >-
                        Custom instructions specific to the sequence type (e.g.
                        context about the cold outbound campaign)
                    sequenceCustomInstructions:
                      type: string
                      nullable: true
                      description: >-
                        General custom instructions applied across the entire
                        sequence
                    writingStyleOId:
                      type: string
                      nullable: true
                      description: OId of a saved writing style to apply to the sequence
                    generateUniqueSubjectLines:
                      type: boolean
                      nullable: true
                      description: >-
                        If true, generate a unique subject line per email
                        instead of reusing one
                    tone:
                      type: string
                      enum:
                        - Casual
                        - Neutral
                        - Formal
                      description: >-
                        Writing tone applied to all emails (e.g. Casual,
                        Professional, Formal)
                    readingLevel:
                      type: string
                      enum:
                        - 8th Grade
                        - High School
                        - College
                        - Professional
                      description: >-
                        Reading level for generated text (e.g. High School,
                        College, PhD)
                    applyCtaToAllEmails:
                      type: boolean
                      description: >-
                        If true, apply the same CTA config to every email in the
                        sequence
                    applySubjectToAllEmails:
                      type: boolean
                      description: >-
                        If true, apply the same subject config to every email in
                        the sequence
                  description: >-
                    EMAIL agents only: sequence-level settings (type, numEmails,
                    tone, reading level, instructions, writingStyleOId, etc.)
                stepPatches:
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      methodology:
                        type: string
                        enum:
                          - Octave
                          - Octave + Custom
                          - Custom
                        description: >-
                          Sales methodology for this step. Set to Custom or
                          Octave + Custom when providing customInstructions.
                      focus:
                        type: string
                        nullable: true
                        enum:
                          - Pain
                          - Neutral
                          - Benefits
                        description: >-
                          Email focus area for this step (e.g. PAIN_POINT,
                          PRODUCT)
                      customInstructions:
                        type: string
                        description: >-
                          Custom instructions for this step. Only applied when
                          methodology is Custom or Octave + Custom.
                      length:
                        type: object
                        properties:
                          wordCountPreset:
                            type: string
                            enum:
                              - EXTRA_SHORT
                              - SHORT
                              - MEDIUM
                              - LONG
                              - EXTRA_LONG
                              - CUSTOM
                          wordCount:
                            type: object
                            properties:
                              min:
                                type: number
                              max:
                                type: number
                            required:
                              - min
                              - max
                          numSentences:
                            type: number
                          numParagraphs:
                            type: number
                        description: >-
                          Length controls: wordCountPreset (SHORT, MEDIUM, LONG,
                          EXTRA_SHORT) or custom wordCount min/max,
                          numSentences, numParagraphs
                      subject:
                        type: object
                        properties:
                          includePersonName:
                            type: boolean
                            default: false
                          includeCompanyName:
                            type: boolean
                            default: false
                          allLowercase:
                            type: boolean
                            default: false
                          length:
                            type: object
                            properties:
                              minWords:
                                type: number
                                default: 3
                              maxWords:
                                type: number
                                default: 5
                            default:
                              minWords: 3
                              maxWords: 5
                          customInstructions:
                            type: string
                          examples:
                            type: array
                            items:
                              type: string
                        description: Subject line configuration for this step
                      cta:
                        type: object
                        properties:
                          type:
                            anyOf:
                              - type: string
                                enum:
                                  - INITIATE_CONVERSATION
                                  - SCHEDULE_MEETING
                                  - REQUEST_INTRODUCTION
                                  - ASK_FOR_FEEDBACK
                                  - FIND_TIME_TO_CONNECT
                                  - POLITELY_DISENGAGE
                                  - SMART_CTA
                              - type: string
                                enum:
                                  - CUSTOM
                            description: >-
                              CTA preset or CUSTOM for free-form CTA
                              instructions
                          customInstructions:
                            type: string
                            description: >-
                              Custom CTA instructions (only used when type is
                              CUSTOM)
                          smartCtaConfig:
                            type: object
                            properties:
                              mode:
                                type: string
                                enum:
                                  - NONE
                                  - AUTO
                                  - SPECIFIC
                                description: >-
                                  Smart CTA mode controlling how CTAs are
                                  generated
                              ctaOIds:
                                type: array
                                items:
                                  type: string
                                description: OIds of smart CTA entities to use
                            description: Smart CTA configuration for AI-generated CTAs
                        description: Call-to-action configuration for this step
                      trainingExamples:
                        type: object
                        properties:
                          mode:
                            type: string
                            enum:
                              - paste
                              - updatePaste
                              - remove
                            description: >-
                              paste: create a new training example; updatePaste:
                              update an existing one in place; remove: delete a
                              training example from the step
                          bodyText:
                            type: string
                            minLength: 1
                            description: >-
                              The example email body text. Required for paste
                              and updatePaste modes; ignored for remove.
                          flexibility:
                            type: string
                            nullable: true
                            enum:
                              - STRICT
                              - LOOSE
                            description: >-
                              How closely the generated email should follow this
                              example (e.g. STRICT, FLEXIBLE)
                          targetTrainingIndex:
                            type: integer
                            minimum: 1
                            description: >-
                              For updatePaste/remove: 1-based index into this
                              step's training examples (first example is 1).
                              Omitted means 1. Ignored for paste.
                        required:
                          - mode
                        description: >-
                          Training example management: paste new examples,
                          update existing ones, or remove them
                      skipReferenceCustomer:
                        type: boolean
                        description: If true, skip reference customer mentions in this step
                      skipProofPoint:
                        type: boolean
                        description: If true, skip proof point mentions in this step
                      stepCustomPrompt:
                        type: string
                        description: >-
                          Custom prompt appended to this step's generation
                          instructions
                  description: >-
                    EMAIL agents only: map of 1-based step index to partial
                    email builder config (same numbering as sequence run
                    runtimeContext keys). Deep-merged into
                    writingStyle.emails[i] after update.
                    trainingExamples.targetTrainingIndex is 1-based (default 1).
                callPrepMethodology:
                  type: string
                  enum:
                    - BANT
                    - SPIN
                    - CHAMP
                    - MEDDIC
                    - SANDLER
                    - CHALLENGER
                    - AIDA
                    - NEAT
                    - SPICED
                    - WHY_CHANGE
                  description: >-
                    Call prep methodology (CALL_PREP agents only). Controls
                    discovery questions and call script framing.
                instructions:
                  type: string
                  description: Instructions for content generation (CONTENT agents only)
                examples:
                  type: array
                  items:
                    type: string
                  description: Example outputs for content generation (CONTENT agents only)
                outputFormat:
                  type: string
                  enum:
                    - JSON
                    - TEXT
                    - HTML
                    - MARKDOWN
                  description: >-
                    The output format for content generation (CONTENT agents
                    only)
                jsonSchemaInstructions:
                  type: string
                  description: >-
                    JSON schema instructions for content generation (CONTENT
                    agents only, used with JSON output format)
                data:
                  type: object
                  additionalProperties:
                    nullable: true
                  description: >-
                    Full agent configuration data passthrough. When provided,
                    this will be merged with the simplified fields above, with
                    simplified fields taking precedence.
              required:
                - oId
      responses:
        '200':
          description: Agent updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: object
                    properties:
                      oId:
                        type: string
                        description: The OId of the agent
                      name:
                        type: string
                        description: The name of the agent
                      description:
                        type: string
                        description: The description of the agent
                      type:
                        type: string
                        enum:
                          - PROSPECTOR
                          - CONTENT
                          - EMAIL
                          - ENRICH_PERSON
                          - ENRICH_COMPANY
                          - QUALIFY_PERSON
                          - QUALIFY_COMPANY
                          - CALL_PREP
                          - CONTEXT
                        description: The type of the agent
                      data:
                        nullable: true
                        description: The full agent configuration data
                      createdAt:
                        type: string
                        nullable: true
                        description: The creation date of the agent
                      updatedAt:
                        type: string
                        nullable: true
                        description: The last updated date of the agent
                      costToRun:
                        type: number
                        description: The cost to run the agent
                      warnings:
                        type: array
                        items:
                          type: string
                        description: >-
                          Warnings about type-mismatched fields that were
                          provided but ignored
                    required:
                      - oId
                      - name
                      - description
                      - type
                      - createdAt
                      - updatedAt
                      - costToRun
                required:
                  - _metadata
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          description: API usage
          example: 0
        requestId:
          type: string
          description: Request ID
          example: requestId
        message:
          type: string
          description: Message
          example: message
        timestamp:
          type: string
          description: Timestamp
          example: '2021-01-01T00:00:00.000Z'
      required:
        - requestId
        - timestamp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````