KestraTask​Kestra​Task

Call a Kestra runnable task as a tool

This tool exposes a tool for each Kestra task. The name of the tool will be kestra_task_<taskId>.

When you define the tasks:

  • You can set task properties as usual; these will not be overridden by the agent.
  • If you want the agent to fill a mandatory property, set its value to ... and the agent will fill it.
  • Optional properties that are not set may be filled by the agent if it chooses to do so.

WARNING: Since some model providers don't support JSON schema with anyOf, when creating the JSON Schema to call the task, each anyOf will be replaced by one of its sub-schemas. You can view the generated schema in the debug logs.

yaml
type: "io.kestra.plugin.ai.tool.KestraTask"

Call a Kestra runnable task as a tool, letting the agent set the message property for you

yaml
    id: call_a_kestra_task
    namespace: company.ai

    tasks:
      - id: agent
        type: io.kestra.plugin.ai.agent.AIAgent
        provider:
          type: io.kestra.plugin.ai.provider.GoogleGemini
          modelName: gemini-2.5-flash
          apiKey: "{{ kv('GEMINI_API_KEY') }}"
        tools:
          - type: io.kestra.plugin.ai.tool.KestraTask
            tasks:
              - id: log
                type: io.kestra.plugin.core.log.Log
                message: "..." # This is a placeholder; the agent will fill it.
        prompt: "Log the following message: 'Hello World!'"
Properties
SubType

List of Kestra runnable tasks

Format duration
Default RETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
Minimum >= 1
Format duration
Default false
Format duration
Format duration
Default RETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
Minimum >= 1
Format duration
Default false
Format duration
Format duration
Default RETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
Minimum >= 1
Format duration
Default false
Format duration
Possible Values
FAILWAITCANCEL