Visualization & CLI¶
reactifact.viz renders the system as Mermaid strings. There is no execution
graph to draw — the runtime derives execution from state changes — so the two
honest diagrams are the static map and the dynamic state:
| Function | What it draws |
|---|---|
blueprint(agents) |
static map: artifact types = nodes, agents = edges (Consume / creates / lifecycle) |
context_to_mermaid(context) |
live provenance graph: artifacts grouped by type, patch.link relations |
trace_to_mermaid(trace) |
one run as a sequenceDiagram: spans over time, writes/reads, LLM calls |
trace_provenance_to_mermaid(trace) |
one run's evidence graph: written artifacts as nodes, patch.link edges (§34, §54) |
All three are pure string functions — no dependencies, paste the output into GitHub, Notion, or mermaid.live.
CLI¶
python -m reactifact graph examples.knowledge.agents # all agents of a module
python -m reactifact graph examples.knowledge.agents:Planner # one agent
python -m reactifact context examples/knowledge/sessions/sessions.sqlite3
python -m reactifact trace traces.db [run_id]
graphinstantiates everyAgentsubclass defined in the module (or a single one viamodule:Attr) and prints the blueprint.contextreads a saved session from a KV backend (file directory or SQLite) and prints its provenance graph;--sessionpicks a session,--limitcaps the number of artifacts.tracereads a run from aTraceStoredb (default: the latest run).
In the dashboard¶
The run page (/traces/<run_id>) renders the trace diagram live via Mermaid,
with a copy button and the source in a collapsible <pre>; if the browser is
offline (no Mermaid JS), it degrades to showing the source text.