Skip to content

fix(resources): correct the invalid flow on agent-observability - #5484

Open
vfanucci wants to merge 1 commit into
mainfrom
fix/agent-observability-flow
Open

fix(resources): correct the invalid flow on agent-observability#5484
vfanucci wants to merge 1 commit into
mainfrom
fix/agent-observability-flow

Conversation

@vfanucci

@vfanucci vfanucci commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Why

The Kestra flow published on /resources/ai/agent-observability cannot run. Every property was checked against the live schema through the Kestra MCP server. Six defects:

what the page shows reality
model: "openai/gpt-4o" on AIAgent not a property. AIAgent is required: ["prompt", "provider"]
temperature, maxTokens on AIAgent not properties of the task
no provider block provider is required — the flow is rejected without it
outputs['analyze-ticket'].content the real outputs are textOutput / jsonOutput
fetchOne: true on postgresql.Query $deprecatedfetchType: FETCH_ONE. And url, which is required, was missing
SlackExecution + message: in an errors block the class is $deprecated, has no message property, and its own docs say "Don't use this notification task in errors tasks"

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

  • provider declared once in pluginDefaults (GoogleGemini), inherited by both agents — idiomatic and keeps the example readable.
  • Structured output via configuration.responseFormat with a JSON schema, instead of asking the model in prose to "respond with a JSON object".
  • A real database query: url, username, password, a parameterised sql using parameters, and fetchType: FETCH. The previous task was disabled: true with a mock SELECT, so it taught nothing.
  • SlackIncomingWebhook + messageText in the errors block — the class its own documentation points to for this position.
  • A Webhook trigger, and trigger.body instead of the non-existent trigger.data.

Two additions, so the example demonstrates the page's 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 delivers it.
  • A task logging tokenUsage and finishReason. The prose previously said "While not explicit, logs from the AIAgent task 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 SlackIncomingWebhook rather than SlackExecution.

Verified

  • The YAML parses
  • Every type: resolved against a live schema via the Kestra MCP
  • 24 internal links, no duplicate destinations, code fences balanced
  • Front-matter untouched. The publication date is unchanged (2026-08-27) — this is a correction, not a new page

Note for the pipeline

Two classes used here — io.kestra.plugin.ai.provider.GoogleGemini and io.kestra.plugin.ai.domain.LangfuseObservability — are absent from context/plugin-classes.txt in the SEO pipeline, which only lists task-level classes. The pipeline's FQCN check matches every type: including nested ones, so it would have rejected this correct flow as an invented class. That is very likely why the original draft invented model: instead of writing a provider: block. Tracked separately.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

☁️ Cloudflare Worker Preview Deployed!

🔗 https://ks-fix-agent-observability-flow-docs.kestra-io.workers.dev
🔗 https://122eb710-docs.kestra-io.workers.dev

🔦 Lighthouse Benchmark

Tested: http://localhost:8787 on 2026-09-03 09:23 UTC
Compared against main baseline from 2026-09-03

Scores (0–100, higher is better)

Page Performance Accessibility Best Practices SEO
Home 64 84 73 🟢 +19 85
Get Started 62 83 73 🟢 +19 100
Pricing 98 92 73 🟢 +19 100
Enterprise 98 83 73 🟢 +19 100
Cloud 91 80 73 🟢 +19 100
About Us 98 🟢 +14 91 73 🟢 +19 100
Docs Landing 93 88 73 🟢 +19 92
Contribute to Kestra (simple docs) 98 88 73 🟢 +19 92
Flow (full featured docs) 91 90 73 🟢 +19 92
Blog Index 75 91 73 🟢 +19 100
Blog Post (sample) 89 88 73 🟢 +19 100
VS Page (sample) 98 88 73 🟢 +19 100
Plugins Landing 93 81 73 🟢 +19 92
Plugin Page (sample) 95 88 73 🟢 +19 100
Plugin Debug Page (sample) 96 88 73 🟢 +19 100
Plugin Debug Return Page (sample) 95 88 77 🟢 +19 100
Blueprints Landing 82 91 73 🟢 +19 100
Blueprint Audit Logs CSV Export 0 0 0 0

Core Web Vitals (lower is better)

Page LCP FCP TBT CLS Speed Index
Home 1.32 s 0.78 s 831 ms 🔻 0.000 🟢 2.25 s
Get Started 2.06 s 0.58 s 830 ms 0.000 1.13 s
Pricing 1.02 s 0.60 s 37 ms 0.000 0.87 s
Enterprise 1.15 s 0.60 s 27 ms 0.014 🔻 0.81 s
Cloud 1.98 s 0.60 s 51 ms 0.001 0.87 s
About Us 1.03 s 🟢 0.63 s 83 ms 🔻 0.000 0.74 s
Docs Landing 1.55 s 🟢 0.48 s 123 ms 0.000 0.84 s
Contribute to Kestra (simple docs) 1.11 s 0.58 s 54 ms 🔻 0.003 0.73 s
Flow (full featured docs) 1.73 s 0.62 s 116 ms 0.000 1.14 s
Blog Index 8.23 s 0.55 s 44 ms 🔻 0.001 0.91 s 🟢
Blog Post (sample) 2.17 s 🔻 0.56 s 29 ms 0.000 0.70 s
VS Page (sample) 1.08 s 0.58 s 43 ms 0.000 0.75 s
Plugins Landing 0.97 s 0.61 s 52 ms 🔻 0.000 2.36 s
Plugin Page (sample) 0.95 s 0.61 s 91 ms 🔻 0.000 1.76 s
Plugin Debug Page (sample) 0.85 s 0.56 s 41 ms 🟢 0.000 1.86 s
Plugin Debug Return Page (sample) 1.01 s 0.65 s 67 ms 0.000 1.86 s
Blueprints Landing 2.05 s 0.87 s 48 ms 0.000 🟢 3.04 s
Blueprint Audit Logs CSV Export 0.00 s 0.00 s 0 ms 0.000 0.00 s
Legend

🟢 improved  ·  🔻 regressed  ·  (blank) no significant change
Score threshold: ±10 pts  ·  Metric threshold: ±30% of baseline

View full Lighthouse HTML report for a page

Full per-page Lighthouse Results (LHR) are attached as the lhr-reports artifact on this run. Download and unzip it, then open https://googlechrome.github.io/lighthouse/viewer/ and drop the <page>-lhr.json file into the page to see every audit, opportunity, and diagnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

1 participant