Skip to content

API Reference parrot.outputs.a2ui.graph.mermaid_c4

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.outputs.a2ui.graph.mermaid_c4

View source

Mermaid C4 dialect codec for GraphSpec(kind="c4") (FEAT-754, spec §3 Module 2).

Dependency-free like :mod:.mermaid. Emits C4Context / C4Container / C4Component / C4Dynamic source; the supported subset and the lossy fields are documented in wiki/outputs/a2ui-v1.md.

Attribute C4_LOSSY_FIELDS

Type: frozenset[str]

Function from_mermaid_c4

Parse Mermaid C4 source into a kind="c4" :class:GraphSpec.

from_mermaid_c4(text: str) -> GraphSpec

Parameter Type Default Description
text str

Returns: GraphSpec

Raises:

  • MermaidCodecError — For source outside the supported C4 subset, always identifying the source line which caused the error.

Function to_mermaid_c4

Emit canonical Mermaid C4 source for a kind="c4" spec (trailing newline included).

to_mermaid_c4(spec: GraphSpec) -> str

Parameter Type Default Description
spec GraphSpec

Returns: str

Raises:

  • ValueError — if spec.kind != "c4".

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally