Invoke Task
POST/v1/agents/:agent_id/versions/:version_id/invoke-task
Invoke a Task agent with structured inputs validated against the agent's input schema. Unlike RAG/Tool agents that accept messages, Task agents accept key-value inputs that are rendered into the system prompt template. Use latest as the version_id to invoke the most recent version.
Status Codes:
200: Task agent invoked successfully400: Validation error (invalid input, extra/unknown fields, or incompatible agent type)404: Agent or version not found500: Internal server error502: The model's response was cut off because it reached the configured max_tokens limit. IncreaseinferenceConfig.maxTokensand retry.
Request
Responses
- 200
- 400
- 502
Successful Response
Validation Error
Bad Gateway - The model's response was cut off because it reached the configured max_tokens limit