fix(resources): correct the invalid flow on agent-observability - #5484
Open
vfanucci wants to merge 1 commit into
Open
fix(resources): correct the invalid flow on agent-observability#5484vfanucci wants to merge 1 commit into
vfanucci wants to merge 1 commit into
Conversation
The published example on /resources/ai/agent-observability could not run.
Every property was checked against the live schema via the Kestra MCP; the
flow had six distinct defects:
- AIAgent: `model`, `temperature` and `maxTokens` are not properties of
io.kestra.plugin.ai.agent.AIAgent, and the REQUIRED `provider` block was
absent entirely. Replaced with a real provider (GoogleGemini) declared once
in `pluginDefaults`.
- AIAgent outputs: the flow read `outputs[...].content`. The real outputs are
`textOutput` and `jsonOutput`.
- postgresql.Query: `url` is required and was missing; `fetchOne` is
deprecated in favour of `fetchType: FETCH_ONE`. The task was also disabled
with a mock SELECT, so the example taught nothing. Now a real parameterised
query using `parameters` and `fetchType: FETCH`.
- errors block: `io.kestra.plugin.notifications.slack.SlackExecution` is
deprecated, has no `message` property, and its own documentation says not to
use it in an `errors` block. Replaced with
io.kestra.plugin.slack.notifications.SlackIncomingWebhook + `messageText`.
- The flow referenced `{{ trigger.data.ticketId }}` while defining no trigger
at all. Added a Webhook trigger and switched to `trigger.body`.
Two additions so the example demonstrates the page's own subject:
- `observability` with LangfuseObservability on the agent, exporting prompts,
outputs and tool calls. A page about agent observability was not using the
one property that provides it.
- a task logging `tokenUsage` and `finishReason`, which the prose previously
described as something readers would have to parse out of logs themselves.
Four prose bullets updated to match. YAML parses; the page keeps its original
publication date since this is a correction, not a new page.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
☁️ Cloudflare Worker Preview Deployed!🔗 https://ks-fix-agent-observability-flow-docs.kestra-io.workers.dev 🔦 Lighthouse Benchmark
Scores (0–100, higher is better)
Core Web Vitals (lower is better)
Legend🟢 improved · 🔻 regressed · (blank) no significant change View full Lighthouse HTML report for a pageFull per-page Lighthouse Results (LHR) are attached as the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Kestra flow published on
/resources/ai/agent-observabilitycannot run. Every property was checked against the live schema through the Kestra MCP server. Six defects:model: "openai/gpt-4o"onAIAgentAIAgentisrequired: ["prompt", "provider"]temperature,maxTokensonAIAgentproviderblockprovideris required — the flow is rejected without itoutputs['analyze-ticket'].contenttextOutput/jsonOutputfetchOne: trueonpostgresql.Query$deprecated→fetchType: FETCH_ONE. Andurl, which is required, was missingSlackExecution+message:in anerrorsblock$deprecated, has nomessageproperty, and its own docs say "Don't use this notification task inerrorstasks"The flow also referenced
{{ trigger.data.ticketId }}while defining no trigger at all.A page teaching Kestra's flagship AI feature was teaching a syntax Kestra refuses.
What changed in the flow
providerdeclared once inpluginDefaults(GoogleGemini), inherited by both agents — idiomatic and keeps the example readable.configuration.responseFormatwith a JSON schema, instead of asking the model in prose to "respond with a JSON object".url,username,password, a parameterisedsqlusingparameters, andfetchType: FETCH. The previous task wasdisabled: truewith a mockSELECT, so it taught nothing.SlackIncomingWebhook+messageTextin theerrorsblock — the class its own documentation points to for this position.trigger.bodyinstead of the non-existenttrigger.data.Two additions, so the example demonstrates the page's subject
observabilitywithLangfuseObservabilityon the agent, exporting prompts, outputs and tool calls. A page about agent observability was not using the one property that delivers it.tokenUsageandfinishReason. The prose previously said "While not explicit, logs from theAIAgenttask can be parsed to extract token usage" — these are first-class outputs, so the flow now records them directly.Prose
Four bullets in "A few things are worth noticing" updated to match the new flow, including why
SlackIncomingWebhookrather thanSlackExecution.Verified
type:resolved against a live schema via the Kestra MCPNote for the pipeline
Two classes used here —
io.kestra.plugin.ai.provider.GoogleGeminiandio.kestra.plugin.ai.domain.LangfuseObservability— are absent fromcontext/plugin-classes.txtin the SEO pipeline, which only lists task-level classes. The pipeline's FQCN check matches everytype:including nested ones, so it would have rejected this correct flow as an invented class. That is very likely why the original draft inventedmodel:instead of writing aprovider:block. Tracked separately.🤖 Generated with Claude Code