[Agent Builder] Mermaid diagram case attachment#257708
Closed
patrykkopycinski wants to merge 8 commits into
Closed
[Agent Builder] Mermaid diagram case attachment#257708patrykkopycinski wants to merge 8 commits into
patrykkopycinski wants to merge 8 commits into
Conversation
Adds a new `mermaid` attachment type to the Agent Builder, enabling agents to create and render Mermaid diagrams (flowcharts, sequence diagrams, state machines, ERDs, etc.) inline in conversations. - Common: `AttachmentType.mermaid` enum, `MermaidAttachmentData` interface, zod schema - Server: attachment type definition with syntax validation and LLM formatting - Browser: lazy-loaded mermaid rendering with dark/light theme support, inline + canvas views, copy/expand action buttons - Skill: `create-mermaid-graph` built-in skill with diagram type guidance, syntax reference, and best practices for LLM-generated diagrams - Dependency: `mermaid@11.13.0` added to package.json
Contributor
Author
|
/ci |
Contributor
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Contributor
Author
|
/ci |
1 similar comment
Contributor
Author
|
/ci |
Contributor
Author
|
/ci |
…achment gaps - Register `agentBuilderMermaid` as a unified value attachment type - Add server-side validation and LLM formatting for mermaid attachments - Add MermaidCaseAttachment React component with live diagram rendering - Add "Add to Case" UI picker for mermaid attachments - Add `add_case_attachment` agent tool for programmatic attachment - Fix 15 Cases plugin gaps preventing unified attachments from working end-to-end when `xpack.cases.attachments.enabled` is true
Contributor
Author
|
/ci |
Contributor
⏳ Build in-progress, with failures
Failed CI Steps
Test Failures
History
|
This was referenced Apr 20, 2026
Closed
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.
Summary
Adds the ability to attach Mermaid diagrams to Cases from Agent Builder. This enables both programmatic attachment (via agent tools) and manual UI attachment ("Add to Case" button).
What's included
Server-side (
agent_builder_platform):agentBuilderMermaidunified value attachment type registration withio-tsvalidationadd_case_attachmentagent tool for programmatic attachment of mermaid diagrams to casesClient-side (
agent_builder_platform):MermaidCaseAttachmentReact component — renders mermaid diagrams as SVG using themermaidlibrary (v11.13.0), with a collapsible source code accordionvisVegaicon and "mermaid diagram" labelCases plugin fixes (unified attachment gaps):
xpack.cases.attachments.enabledistrueNew files
common/constants/cases.tsAGENT_BUILDER_MERMAIDattachment type constantserver/cases/register_cases_attachments.tsserver/tools/cases/add_case_attachment.tspublic/cases/register_mermaid_cases_attachment.tsxpublic/cases/mermaid_case_attachment_component.tsxpublic/attachment_types/add_to_case_picker.tsxHow it works
add_case_attachmenttool with a case ID, mermaid content, and titlecases-attachmentsSO type)unifiedAttachmentTypeRegistryin the Activity tab timelineTest plan
xpack.cases.attachments.enabled: trueinkibana.dev.yml