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

# Update a procedural agent

> Updates the target procedural agent (latest version by default, or specific version if provided) with the supplied data. These changes are saved to either a new draft or update an existing draft. Returns the version ID of the draft.

<Note>The new version of the procedural agent will not be used by default until it is [released](./release-a-procedural-agent).</Note>



## OpenAPI

````yaml api-reference/openapi3.json put /procedural_agents/{id}
openapi: 3.0.0
info:
  title: Operator API
  version: '2025-06-19'
  description: API for Operator
servers:
  - url: https://api.operator.xyz
security: []
paths:
  /procedural_agents/{id}:
    put:
      tags:
        - Procedural agents
      summary: Update a procedural agent
      description: >-
        Updates the target procedural agent (latest version by default, or
        specific version if provided) with the supplied data. These changes are
        saved to either a new draft or update an existing draft. Returns the
        version ID of the draft.


        <Note>The new version of the procedural agent will not be used by
        default until it is [released](./release-a-procedural-agent).</Note>
      parameters:
        - name: Operator-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2025-06-19'
          description: The API version to use.
          example: '2025-06-19'
        - name: id
          in: path
          required: true
          schema:
            description: >-
              The ID of the procedural agent to update. Use `pa_8qm9JBCiTe7` for
              the latest version, or `pa_8qm9JBCiTe7@v2` for a specific version.
            type: string
          description: >-
            The ID of the procedural agent to update. Use `pa_8qm9JBCiTe7` for
            the latest version, or `pa_8qm9JBCiTe7@v2` for a specific version.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                name:
                  type: string
                  default: null
                  description: Human-readable name for the procedural agent.
                description:
                  type: string
                  default: null
                  description: Description of the procedural agent.
                config:
                  $ref: '#/components/schemas/ProceduralAgentConfig'
                  title: procedural.agent.config
                  default: null
                  description: >-
                    Full configuration for the procedural agent (e.g. runtime,
                    tools, output).
              type: object
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                properties:
                  id:
                    description: >-
                      Unique identifier for the procedural agent, e.g.
                      `pa_8qm9JBCiTe7`
                    type: string
                  version_id:
                    description: >-
                      Version-specific identifier for the draft representing the
                      new procedural agent instance, e.g. `pa_8qm9JBCiTe7@v1`.
                      Can be further passed to the release API endpoint.
                    type: string
                required:
                  - id
                  - version_id
                type: object
        '400':
          description: The procedural agent configuration is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  data: {}
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  data: {}
      security:
        - BearerAuth: []
components:
  schemas:
    ProceduralAgentConfig:
      description: Complete configuration for a procedural agent.
      properties:
        filter_statuses:
          description: List of statuses to filter for.
          items:
            enum:
              - completed
              - voicemail
              - failed
              - busy
              - no-answer
            type: string
          type: array
        filter_condition:
          type: string
          default: null
          description: >-
            Optional filter condition to determine if agent should run. This is
            the successor to filter_statuses. Should contain logic to evaluate
            the procedure input and return true/false.
        runtime:
          $ref: '#/components/schemas/ProceduralRuntimeConfig'
          description: Runtime configuration for the agent.
          title: procedural.runtime.config
        tool:
          $ref: '#/components/schemas/ProceduralToolConfig'
          description: Tool configuration for the agent.
          title: procedural.tool.config
        output:
          $ref: '#/components/schemas/OutputConfig'
          description: Output configuration for the agent.
          title: output.config
      required:
        - filter_statuses
        - runtime
        - tool
        - output
      type: object
    ProceduralRuntimeConfig:
      description: Runtime configuration for a procedural agent.
      properties:
        model:
          description: The language model to use for the agent.
          enum:
            - openai/gpt-4o
            - openai/gpt-4.1
            - openai/gpt-4.1-mini
            - openai/gpt-5
            - openai/gpt-5-mini
          type: string
        reasoning_effort:
          default: medium
          description: The reasoning effort to use for the agent.
          enum:
            - low
            - medium
            - high
          type: string
        prompt:
          description: The prompt configuration for the agent.
          discriminator:
            mapping:
              fixed: '#/components/schemas/FixedPrompt'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/FixedPrompt'
              title: fixed.prompt
      required:
        - model
        - prompt
      type: object
    ProceduralToolConfig:
      description: Tool configuration for a procedural agent.
      properties:
        tools:
          description: List of tools the agent can use.
          items:
            discriminator:
              mapping:
                crm: '#/components/schemas/SyscallToolID'
                extapi: '#/components/schemas/ApiToolID'
                procedural: '#/components/schemas/ProceduralAgentToolID'
                syscall: '#/components/schemas/SyscallToolID'
                thirdparty: '#/components/schemas/ThirdPartyToolID'
              propertyName: ns
            oneOf:
              - $ref: '#/components/schemas/SyscallToolID'
                title: syscall.tool.id
              - $ref: '#/components/schemas/ApiToolID'
                title: api.tool.id
              - $ref: '#/components/schemas/ProceduralAgentToolID'
                title: procedural.agent.tool.id
              - $ref: '#/components/schemas/ThirdPartyToolID'
                title: third.party.tool.id
          type: array
      required:
        - tools
      type: object
    OutputConfig:
      description: Output configuration for a procedural agent.
      properties:
        slack_channel:
          type: string
          default: null
          description: Slack channel ID for the output.
        output_schema:
          description: OpenAPI-based schema of the structured output.
          default: null
          type: object
        post_url:
          type: string
          default: null
          description: HTTP POST endpoint for sending procedure output.
      type: object
    FixedPrompt:
      description: >-
        Prompt configuration for a conversational agent with a single static
        prompt.
      properties:
        text:
          description: The system prompt that guides the agent's behavior.
          type: string
        type:
          default: fixed
          description: Type of prompt. Set to 'fixed' for a static prompt.
          type: string
          enum:
            - fixed
      required:
        - text
      type: object
    SyscallToolID:
      description: Identifier for a System tool.
      properties:
        ns:
          enum:
            - syscall
            - crm
          type: string
        name:
          description: Name of the tool.
          type: string
      required:
        - ns
        - name
      type: object
    ApiToolID:
      description: Identifier for an API tool.
      properties:
        ns:
          default: extapi
          type: string
          enum:
            - extapi
        entity_id:
          description: Unique identifier for the API tool.
          type: string
      required:
        - entity_id
      type: object
    ProceduralAgentToolID:
      description: Identifier for a procedural agent as tool.
      properties:
        ns:
          default: procedural
          type: string
          enum:
            - procedural
        entity_id:
          description: Unique identifier of the procedural agent as tool.
          type: string
      required:
        - entity_id
      type: object
    ThirdPartyToolID:
      description: Identifier for a third-party tool.
      properties:
        ns:
          default: thirdparty
          type: string
          enum:
            - thirdparty
        name:
          description: Name of the third-party tool.
          type: string
      required:
        - name
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````