Skip to main content

Module session

Module session 

Source
Expand description

Session persistence — save/load colony graph state.

Serializes the knowledge graph (nodes + edges) to JSON for persistence across sessions. Agent state is not serialized (agents are reconstructed from config on load).

Structs§

GraphState
Serializable snapshot of the knowledge graph.
SerializedEdge
Serializable edge.
SerializedNode
Serializable node.
SessionMetadata
Session metadata.

Functions§

load_session
Load a saved session from JSON.
restore_into_colony
Restore a graph state into a colony. Adds all nodes and edges from the saved state.
save_session
Save the colony’s knowledge graph to a JSON file.
verify_fidelity
Check if save/load preserves node and edge counts.