Skip to main content
Hardwave graphs are serializable. Save an assembled graph to disk or the Hardwave cloud so it can be reloaded without re-running setup code. That is useful for sharing with teammates or inspecting in the dashboard.

Serialize to JSON

Example output:
Composite components store only their external interface. Internal sub-graph wiring is defined by the composite’s build() method.

Reload from JSON

from_dict() looks up each class_name in ComponentRegistry, instantiates the component with stored parameters, and reconnects all edges.
Every component class referenced in a saved graph must be registered in ComponentRegistry before calling from_dict(). Import hardwave.stdlib and register any custom components first.

Simulation results

Simulation results are also serializable via result.to_dict():
For transient runs, export to pandas:

Embedding a snapshot in saved graph data

When saving to the cloud (see below), you can attach a simulation snapshot so the Hardwave dashboard can display outputs and diagnostics without re-running the engine. The snapshot is stored inside graph_data under simulation_snapshot: no separate database field is required.
Snapshot shape:
SimulationGraph.from_dict() ignores simulation_snapshot when reloading. Only components and connections are used to reconstruct the graph. Re-saving from Python without passing result= clears any existing snapshot in the cloud copy.

Schema version

The current schema version is exposed as hardwave.SCHEMA_VERSION (currently "0.1.0"). Hardwave raises DeserializationError if a saved graph uses an incompatible schema version.

Roundtrip verification

Save to the cloud

On Builder and Crew plans you can save graphs directly from Python. Configure your organisation credentials once (the same setup used for premium components), then call save():
Pass inputs= without result= to run the engine and snapshot the outcome in one step:
To update an existing saved graph, pass its ID:
You can also call hardwave.premium.save_graph() / update_graph() directly, or embed simulation_snapshot manually in graph.to_dict() before upload. Saved graphs appear in your organisation’s Graphs dashboard. When a snapshot is attached, the RESULTS tab shows diagnostics, run context (inputs and config), scalar outputs, and time-series charts for transient runs. Authentication uses the same RSA-signed requests as premium component API calls. Your private key never leaves your machine.