ai-agents
agents
contexts

Atualizar contexto do agente

Atualiza um contexto do agente; o tipo não pode ser trocado. Em um contexto de texto, content é obrigatório. Em um contexto de arquivo, envie a requisição como multipart/form-data com um novo file, e o arquivo anterior é apagado.

put/api/management/ai/agents/{agentId}/contexts/{contextId}

Request body

contentstring

Novo texto do contexto. Obrigatório em contextos do tipo text e ignorado em contextos do tipo file.

filestring binary

Novo arquivo do contexto, de até 10 MB. Aceito apenas em contextos do tipo file e apenas em requisição multipart/form-data; substitui e apaga o arquivo anterior.

orderinteger

Nova posição do contexto na sequência aplicada ao prompt.

is_activeboolean

Define se o contexto é aplicado ao prompt.

Response

Sucesso

idstring uuid

ID (UUID) do contexto.

ai_agent_idstring uuid

ID (UUID) do agente dono do contexto.

type'text' | 'file'

Tipo do contexto: text para texto escrito à mão, file para arquivo enviado.

contentstring nullable

Texto do contexto quando o tipo é text; endereço temporário para baixar o arquivo quando o tipo é file.

mime_typestring nullable

Tipo do arquivo enviado; nulo em contextos de texto.

orderinteger

Posição do contexto na sequência aplicada ao prompt, começando em zero.

is_activeboolean

Indica se o contexto é aplicado ao prompt do agente.

created_atstring date-time

Data e hora de criação do contexto.

updated_atstring date-time

Data e hora da última alteração do contexto.

deleted_atstring date-time nullable

Data e hora da exclusão lógica; nulo enquanto o contexto está ativo.

Changes

Changed in 3 of the 98 revisions of this API.158

  • d71b18b1685d134See the full diff
    • ▲

      the response property became nullable for the status

      response-property-became-nullable

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ●

      added the new file enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new text enum value to the response property for the response status

      response-property-enum-value-added

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ●

      removed the optional property from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property from the response with the status

      response-optional-property-removed

    • ○

      added optional request body

      request-body-added-optional

    • ○

      added the media type application/json for the response with the status

      response-media-type-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      added the non-success response with the status

      response-non-success-status-added