Generate interactive architecture diagrams from a JSON topology definition.
references/schema.md for full spec)bash
python3 scripts/generate.py topology.json -o diagram.html
json
{
"title": "My Agent System",
"theme": "dark",
"viewBox": [1220, 1000],
"zones": {
"center": { "label": "Orchestration" },
"left": { "label": "Content Pipeline" },
"right": { "label": "Infrastructure" }
},
"nodes": [
{
"id": "orchestrator",
"name": "Main Agent",
"type": "orchestrator",
"emoji": "🤖",
"subtitle": "Central Hub",
"position": [610, 480],
"radius": 58
},
{
"id": "tool_agent",
"name": "Tool Agent",
"type": "agent",
"emoji": "🔧",
"subtitle": "Executes tools",
"position": [400, 300],
"radius": 32
}
],
"connections": [
{ "from": "orchestrator", "to": "tool_agent", "type": "core" }
],
"pipelines": ["tool_agent", "processor", "output"]
}
TypeVisualUse fororchestratorLarge glowing circleCentral agent/routeragentMedium teal circleSub-agents, workerssystemMedium muted circleExternal systems (DBs, APIs)pipelineSmall bright circleSequential pipeline stepsopsSmall circleOperational/maintenance agentshumanMedium circleHuman-in-the-loop nodes
TypeStyleUse forhubBright, thickerOrchestrator ↔ systemscoreMedium brightnessOrchestrator ↔ agentscrossSubtleAgent ↔ system (data flow)clusterPipeline styleSequential chain stepssysDashed subtleSystem ↔ system
The pipelines array lists node IDs that form sequential chains. Hovering any pipeline node highlights the full chain transitively (not just direct connections).
Multiple pipelines supported:
json
"pipelines": {
"content": ["feed_hunter", "synthesizer", "writer", "website"],
"deploy": ["builder", "tester", "deployer"]
}
If positions are omitted, the generator auto-places nodes by zone:
json
{
"nodes": [
{ "id": "main", "type": "orchestrator", "zone": "center" },
{ "id": "researcher", "type": "agent", "zone": "top-left" },
{ "id": "db", "type": "system", "zone": "right" }
]
}
Available zones: center, top-left, top-right, left, right, bottom-left, bottom-right, bottom.
json
{
"theme": "dark",
"colors": {
"accent": "#5d9b93",
"background": "#0a0e14",
"text": "#c8d6e0",
"nodeStroke": "rgba(93,155,147,0.4)"
},
"font": "Inter, system-ui, sans-serif"
}
Built-in themes: dark (default), light. Override any color individually.
bash
# Self-contained HTML page (default)
python3 scripts/generate.py topology.json -o diagram.html
# SVG only (for embedding)
python3 scripts/generate.py topology.json -o diagram.svg --format svg
# SVG paths only (for injection into existing page)
python3 scripts/generate.py topology.json --format paths
references/customization.md