ai-agents
agents
contexts

Criar contexto do agente

Cria um contexto do agente. Sem order, ele entra no fim da lista. Para type: "text" envie o texto em content; para type: "file" envie a requisição como multipart/form-data com o arquivo no campo file (imagem ou PDF, até 10 MB) — nesse caso o content passa a apontar para o arquivo armazenado.

post/api/management/ai/agents/{agentId}/contexts

Request body

type'text' | 'file' required

Tipo do contexto.

contentstring nullable

Texto do contexto. Obrigatório quando nenhum arquivo é enviado.

filestring binary

Arquivo do contexto: imagem ou PDF de até 10 MB. Obrigatório quando type é file e só pode ser enviado em requisição multipart/form-data.

orderinteger

Posição do contexto na sequência. Omita o campo para acrescentar o contexto ao fim da lista.

is_activeboolean

Define se o contexto é aplicado ao prompt. Quando omitido, o contexto nasce ativo.

Response

Sucesso

type'text' | 'file'

Tipo do contexto.

contentstring nullable

Texto do contexto ou endereço do arquivo armazenado.

mime_typestring

Tipo do arquivo enviado; presente apenas em contextos do tipo file.

orderinteger

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

is_activeboolean

Indica se o contexto é aplicado ao prompt do agente.

ai_agent_idstring uuid

ID (UUID) do agente dono do contexto.

updated_atstring date-time

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

created_atstring date-time

Data e hora de criação do contexto.

idstring uuid

ID (UUID) do contexto.

Changes

Changed in 2 of the 98 revisions of this API.4410

  • d71b18b1685d346See the full diff
    • ▲

      request property was restricted to a list of enum values

      request-property-became-enum

    • ▲

      the request property became required

      request-property-became-required

    • ▲

      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

    • ●

      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

    • ○

      the request property became nullable

      request-property-became-nullable

    • ○

      added the new file enum value to the request property

      request-property-enum-value-added

    • ○

      added the new text enum value to the request property

      request-property-enum-value-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

  • 46806361195014See the full diff
    • ▲

      removed the success response with the status

      response-success-status-removed

    • ○

      added optional request body

      request-body-added-optional

    • ○

      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

    • ○

      added the success response with the status

      response-success-status-added