kestra-io / kestra-io/plugin-ai

KestraFlow tool sends `namespace` and `flowId` to the model with no description and no list of allowed flows

Open
#405 0 comments 0 reactions 0 assignees View on GitHub
area/plugin good first issue
Dominant language
Java
Stars
9
Forks
24
Avg merge
1d 23h
Merged PRs (30d)
15

Description

When `KestraFlow` is used without a `namespace` and a `flowId`, both are asked of the model as tool parameters. Currently the two required parameters are sent as bare strings with no description, while every optional parameter (inputs, labels, revision, schedule date) has one. Nothing tells the model which flows can be executed, so flow names are invented and an execution is attempted for a flow that doesn't exist.

Minimal example:

```yaml
id: kestra_flow_tool_generic
namespace: company.team

tasks:
- id: agent
type: io.kestra.plugin.ai.agent.AIAgent
prompt: Roll back the API gateway
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
modelName: gemini-3.5-flash
apiKey: "{{ secret('GEMINI_API_KEY') }}"
tools:
- type: io.kestra.plugin.ai.tool.KestraFlow
```

`prod.rollbackApiGateway` was invented and an execution was attempted for it.

## To do

- Descriptions should be added for `namespace` and `flowId`, saying that both have to match an existing flow.
- An optional list of allowed flows should be offered on the tool, sent to the model as the permitted values for `namespace` and `flowId`. A flow outside that list should be rejected before an execution is created, so which flows an agent can execute is decided by the flow author instead of the prompt.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the KestraFlow tool entry point and tracing how its parameters are described and how flow executions are created. Then find the existing tests for tool parameters and execution requests; done means namespace and flowId describe existing flows, allowed flows are conveyed to the model, and disallowed flows are rejected before execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.