---
type: Attested Computation
title: graphviz
identifier: diagram/graphviz
description: Render Graphviz DOT source into an SVG, PNG, PDF, or JSON diagram. Choose a layout engine with engine=dot for hierarchies, neato or fdp for spring layouts, circo for cyclic structures, twopi for radial trees, or sfdp for large graphs. Source comes from the dot parameter, a dot_source file, or stdin, so a model can write the graph and this tool renders it deterministically.
pack: diagram
tags:
- media
runtime: fragletc
image: ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522
network: none
stdin: buffer
execution_class: hermetic
procedure_hash: sha256:4df3f83cb2527f6996862702a844088e322ac7f4d98b020411f8eda6fcccc627
parameters:
- name: dot
  type: string
  required: false
  description: Inline DOT source (or pipe stdin)
- name: dot_source
  type: file
  required: false
  description: Host DOT file mounted at /input/dot_source
- name: engine
  type: string
  required: false
  default: dot
  description: Layout engine (dot, neato, fdp, circo, twopi, sfdp, …)
- name: format
  type: string
  required: false
  default: svg
  description: Output format (svg, png, pdf, json, …)
computation: https://tools.ofthemachine.com/diagram/graphviz.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
outputs:
- diagram
---

# graphviz

Render Graphviz DOT source into an SVG, PNG, PDF, or JSON diagram. Choose a layout engine with engine=dot for hierarchies, neato or fdp for spring layouts, circo for cyclic structures, twopi for radial trees, or sfdp for large graphs. Source comes from the dot parameter, a dot_source file, or stdin, so a model can write the graph and this tool renders it deterministically.

Use when the user has Graphviz DOT source, or wants a graph, tree, flowchart, or network drawn from a description that maps to DOT.

# Schema

## Parameters
- `dot` (string, optional) — Inline DOT source (or pipe stdin)
- `dot_source` (file, optional) — Host DOT file mounted at /input/dot_source
- `engine` (string, optional, default `dot`) — Layout engine (dot, neato, fdp, circo, twopi, sfdp, …)
- `format` (string, optional, default `svg`) — Output format (svg, png, pdf, json, …)
- stdin (optional) — piped input is read in full and hashed into the run's receipt

## Outputs
- `diagram` (declared file under /output)

# Execution

The computation is [`diagram/graphviz.py`](https://tools.ofthemachine.com/diagram/graphviz.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `diagram/graphviz.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522` with network `none`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Hermetic: no network, so `memo_key` also fully determines the outputs — a re-run with the same inputs must reproduce them, which makes results from this tool safely memoizable.

Skill: [SKILL.md](https://tools.ofthemachine.com/diagram/SKILL.md)
