Agent diagrams with zero local renderers
An Amplifier agent describes architectures, sequences, and schemas fluently. Describing isn't showing — and no picture appears.
The diagrams tool lets an agent render the diagram it authors — without installing a single renderer.
~1,650 lines of Python: 1,015 in source, 635 in tests. A 35-test suite runs, with 34 passing in a clean environment.
So the mechanism ahead isn't hypothetical — it already runs. Start with what the agent actually feeds it.
Three accepted formats — Mermaid, PlantUML, or D2 — across 8 curated diagram types the tool exposes.
The agent already writes this DSL. The only missing step is turning it into a picture.
Standing up a real renderer traditionally means Java, Node.js, GraphViz, or PlantUML on the machine — exactly what nobody wants on an agent's box.
The module says it plainly: "Zero Dependencies: No Java/Node.js installation required."
The client posts the diagram content to kroki.io over plain HTTP and gets rendered bytes back. Rendering is offloaded, not installed.
One HTTP call resolves the tension — the heavy dependency lives on Kroki, not on the machine.
The client zlib-compresses and base64-encodes the DSL into a single GET URL anyone can open — the agent never holds rendering state.
Whether it's raw bytes or a link, the same idea holds: describe, then offload.
The agent describes; the tool offloads. Only httpx and pydantic sit on the machine — zero Java, Node, or GraphViz.
Describe-and-offload delivers rendered diagrams with zero local rendering dependencies.
Kroki advertises 25+ diagram types; this module exposes 8. Describe-and-offload is a pattern with room to grow.
The idea to keep: offload the heavy dependency, expose a curated surface.
Working single-commit prototypeData as of: 2026-01-21 (single-commit prototype, commit 923ca3b)
Feature status: Working single-commit prototype — full module with Kroki HTTP client (retry + exponential backoff), pydantic models, template loader, two tools, 14 templates, 35-test suite. Not yet iterated beyond the initial drop.
Repository: amplifier-module-tool-diagrams — sole author Sam Schillace. License: MIT.
Commands run:
git ls-files '*.py' | xargs wc -l | tail -1 → 1,650 total (src 1,015 / tests 635)cat src/amplifier_diagrams/models.py (DiagramType enum) + bundle.yaml enum → 8 typescat src/amplifier_diagrams/models.py (DiagramFormat enum) → mermaid, plantuml, d2cat src/amplifier_diagrams/models.py (DiagramOperation enum) → generate, validate, render, get_urlcat src/amplifier_diagrams/kroki_client.py → POST to https://kroki.io; GET URL via zlib + base64grep -nE 'Zero Dependencies|No Java|httpx|pydantic' bundle.yaml → httpx>=0.24.0, pydantic>=2.0git ls-files 'templates/*' | wc -l → 14grep -rn 'def test_' tests/ | wc -l + PYTHONPATH=src pytest -q → 35 tests, 34 passedgit log --all --format='%ad | %an | %s' --date=short; git rev-list --all --count → 1 commitgrep -n '25' README.md (line 7)Gaps: "Natural language to diagram" is story framing only — the tool's content parameter takes DSL text, not free-form English. The single failing test (test_diagram_get_url) is an AsyncMock wiring issue in the test, not a runtime defect. Tests run only with PYTHONPATH=src.
Primary contributor: Sam Schillace (sole author — 100% of the single initial commit).