langgoap.render_mermaid#
- render_mermaid(plan, *, show_resources=True, show_schedule=True)[source]#
Render a Plan as a Mermaid
flowchart TDdiagram.Nodes are actions; edges are effect→precondition dependencies from
langgoap.planner.csp.build_dependency_graph(). Whenplan.metadata.cspcarries a schedule, actions at the same start time are grouped intosubgraphblocks to highlight parallelism. Resource totals are appended as a Mermaid comment block at the bottom whenshow_resourcesis True.- Parameters:
plan (Plan) – Plan to render.
show_resources (bool) – If True, append resource usage summary.
show_schedule (bool) – If True, group parallel actions into subgraphs and highlight the critical path.
- Returns:
Mermaid source code as a plain string.
- Return type:
str