ai-agents
agents
execute

Executar agente

Dispara uma execução do agente: o prompt passa pelo motor de templates e a execução entra na fila de processamento. A resposta devolve o registro recém-criado, ainda sem resultado — o texto gerado, os tokens, os créditos consumidos e os passos aparecem depois no detalhe da execução. model e provider são opcionais e, quando enviados, substituem os padrões do agente apenas nesta execução.

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

Request body

promptstring required

Instrução enviada ao agente. Passa pelo motor de templates antes de chegar ao modelo.

modelstring nullable

Modelo a usar apenas nesta execução; quando ausente ou nulo vale o modelo padrão do agente.

provider'openrouter' | 'google' | 'openai' | 'anthropic' | 'null' nullable

Provedor a usar apenas nesta execução; quando ausente ou nulo vale o provedor padrão do agente.

Response

Sucesso

responseboolean

Indicador de sucesso da requisição; sempre verdadeiro nesta resposta.

Changes

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

  • d71b18b1685d462See the full diff
    • ▲

      the request property became required

      request-property-became-required

    • ▲

      the response property / became nullable for the status

      response-property-became-nullable

    • ▲

      the response property / became nullable for the status

      response-property-became-nullable

    • ▲

      the response's property type changed from integer to number for status

      response-property-type-changed

    • ●

      added the new anthropic enum value to the / response property for the response status

      response-property-enum-value-added

    • ●

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

      response-property-enum-value-added

    • ●

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

      response-property-enum-value-added

    • ●

      added the new google enum value to the / response property for the response status

      response-property-enum-value-added

    • ●

      added the new openai enum value to the / response property for the response status

      response-property-enum-value-added

    • ●

      added the new openrouter 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

    • ●

      removed the request property

      request-property-removed

    • ●

      removed the request property

      request-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