Current collected state Current
Observed since 20 Oct, 16:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
a2a-mermaid-tracer
CLI tool to generate Mermaid sequence diagrams from A2A protocol traces
CLI tool to generate Mermaid.js sequence diagrams from A2A (Agent2Agent) protocol communication traces.
Visualize multi-agent interactions at a glance.

--group-by-task for rect blocks).md with code block, or raw .mmd)--input -) for pipeline usage--strict) to fail on malformed entriespip install a2a-mermaid-tracer
Or for development:
git clone https://github.com/matthieu-music/a2a-mermaid-tracer.git
cd a2a-mermaid-tracer
pip install -e ".[dev]"
# From a file
a2a-mermaid-tracer generate --input traces.json --output diagram.md
# From stdin
cat traces.json | a2a-mermaid-tracer generate --input - --title "My Agents"
# With task grouping
a2a-mermaid-tracer generate --input traces.json --group-by-task
# Strict mode (fail on bad entries)
a2a-mermaid-tracer generate --input traces.json --strict
sequenceDiagram
participant OrchestratorAgent as OrchestratorAgent
participant ResearchAgent as ResearchAgent
participant AnalystAgent as AnalystAgent
participant WriterAgent as WriterAgent
OrchestratorAgent ->> ResearchAgent: "Find Q1 2025 earnings for AAPL"
Note right of OrchestratorAgent: 10:30:00
ResearchAgent -->> OrchestratorAgent: "AAPL Q1 2025: Revenue $124.3B, EPS $2.40"
OrchestratorAgent ->> AnalystAgent: "Analyze AAPL earnings vs Q1 2024"
Note right of OrchestratorAgent: 10:30:04
AnalystAgent --x OrchestratorAgent: ERROR: Missing Q1 2024 data for comparison
OrchestratorAgent ->> ResearchAgent: "Find Q1 2024 earnings for AAPL"
Note right of OrchestratorAgent: 10:30:09
ResearchAgent -->> OrchestratorAgent: "AAPL Q1 2024: Revenue $119.6B, EPS $2.18"
OrchestratorAgent ->> AnalystAgent: "Analyze AAPL Q1 2025 vs Q1 2024"
Note right of OrchestratorAgent: 10:30:12
AnalystAgent -->> OrchestratorAgent: "Revenue +3.9% YoY, EPS +10.1% YoY"
OrchestratorAgent ->> WriterAgent: "Write a brief earnings report for AAPL"
Note right of OrchestratorAgent: 10:30:17
WriterAgent -->> OrchestratorAgent: "AAPL Q1 2025 Report: Strong growth with"
Usage: a2a-mermaid-tracer generate [OPTIONS]
Options:
-i, --input PATH Path to trace file (JSON array or NDJSON). Use '-' for stdin. [required]
-o, --output PATH Path to write the Mermaid diagram (default: stdout)
-t, --title TEXT Optional title for the diagram
--strict Fail on malformed entries instead of skipping them
--group-by-task Group interactions by task ID in rect blocks
--help Show this message and exit.
The input file should contain JSON-RPC 2.0 messages with sender/receiver metadata:
[
{
"sender": "AgentA",
"receiver": "AgentB",
"timestamp": "2025-06-15T10:30:00Z",
"message": {
"jsonrpc": "2.0",
"id": "req-001",
"method": "message/send",
"params": { ... }
}
}
]
NDJSON (one JSON object per line) is also supported — see examples/sample_traces.ndjson.
pip install -e ".[dev]"
ruff check src/ tests/
ruff format src/ tests/
pytest
MIT
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
typerEnvironment{
"extras": "all",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | typer[all]>=0.9.0 | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest; extra == "dev" | runtime |
ruffEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | ruff; extra == "dev" | runtime |
bdist_wheel · 10.21 KB · Python py3
sdist · 102.2 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 16:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:fee7642c6653bb96ca3f1449bc98b2c5e75f8e1e4fcfd30efdc22dd89e43b7b4