Skip to content

Fix root-cause-analysis.md workflow example#6393

Merged
benironside merged 2 commits into
mainfrom
workflows-rca-targeted-fix
May 8, 2026
Merged

Fix root-cause-analysis.md workflow example#6393
benironside merged 2 commits into
mainfrom
workflows-rca-targeted-fix

Conversation

@benironside
Copy link
Copy Markdown
Contributor

Closes #6392

External customer Mirko Bez reported that the published RCA workflow doesn't run when copy-pasted in 9.4. Two underlying bugs, confirmed by engineering (Marco Liberati, Sergi Massaneda):

  1. ai.agent takes 'message:' inside 'with:', not 'prompt:'.
  2. Liquid templating only resolves inside 'with:' for custom steps. Top-level fields (agent-id, connector-id, conversation-id) are passed through literally, so '{{ consts.agent_id }}' was never evaluated.

Applies Tinsae's recommended fix from the Slack thread:

  • Replace 'prompt:' with 'message:' for the three ai.agent invocations (six occurrences across the stepper and full-workflow YAML).
  • Default to a literal 'agent-id: elastic-ai-agent' across the page; drop the 'consts:' block that previously held agent_id and connector_id.
  • Drop 'connector-id:' from the ai.agent examples (the agent already encodes its connector).
  • Move top-level 'conversation-id:' (kebab-case) into 'with:' as 'conversation_id:' (snake_case), matching the ai.agent reference page.
  • Update the SRE agent prerequisite to point at 'elastic-ai-agent' as the generic default.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • [ x] Yes Cursor / Claude 4.7
  • No

External customer Mirko Bez reported that the published RCA workflow
doesn't run when copy-pasted in 9.4. Two underlying bugs, confirmed by
engineering (Marco Liberati, Sergi Massaneda):

1. ai.agent takes 'message:' inside 'with:', not 'prompt:'.
2. Liquid templating only resolves inside 'with:' for custom steps.
   Top-level fields (agent-id, connector-id, conversation-id) are
   passed through literally, so '{{ consts.agent_id }}' was never
   evaluated.

Apply Tinsae's recommended fix from the Slack thread:

- Replace 'prompt:' with 'message:' for the three ai.agent invocations
  (six occurrences across the stepper and full-workflow YAML).
- Default to a literal 'agent-id: elastic-ai-agent' across the page;
  drop the 'consts:' block that previously held agent_id and
  connector_id.
- Drop 'connector-id:' from the ai.agent examples (the agent already
  encodes its connector).
- Move top-level 'conversation-id:' (kebab-case) into 'with:' as
  'conversation_id:' (snake_case), matching the ai.agent reference
  page.
- Update the SRE agent prerequisite to point at 'elastic-ai-agent' as
  the generic default.

Closes #6392. Tracked under #6390 (the broader audit of related
ai.agent / ai.* templating issues, pending engineering review).

Engine-side bug for the templating limitation:
elastic/security-team#17236.

Co-authored-by: Cursor <cursoragent@cursor.com>
@benironside benironside requested review from a team as code owners May 8, 2026 22:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

Comment thread explore-analyze/workflows/use-cases/observability/root-cause-analysis.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🔍 Preview links for changed docs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@benironside benironside changed the title Apply Tinsae's targeted fix to root-cause-analysis.md Fix root-cause-analysis.md workflow example May 8, 2026
Copy link
Copy Markdown
Contributor

@georgewallace georgewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text updates look good. Don't know the yaml format but looks accurate.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflows: targeted fix for ai.agent examples in root-cause-analysis.md

2 participants