Codumentor logo Codumentor

Mermaid Render Plugin

The Mermaid Render plugin gives the agent a render_mermaid tool that turns Mermaid diagram source into an SVG or PNG image file on disk. It drives a headless Chromium-family browser to render the diagram with mermaid.js.

Configuration

plugins:
  - module: codumentor.plugins.mermaid_render
    class: MermaidRenderPlugin
    args:
      enabled: true
      target_agents: "main"
      timeout: 30
      # mermaid_js_url: "file:///opt/mermaid/mermaid.min.js"  # for offline use

Parameters

Tool Reference

ToolDescription
render_mermaidRender Mermaid source to output_path. Optional format (svg/png, defaults from the path's extension), theme, and background. Returns the absolute path plus metadata (format, size, theme). Parent directories are created as needed.

Notes