Skip to main content
State inspection lets a test verify what an agent actually changed without teaching the agent that it is inside Archal.

Capture the before state

The state endpoint wraps the provider state in a response envelope. Extract the state value when using it as the explicit before file expected by the CLI.

Run the provider mutation

Call the provider-shaped API or MCP tool through the connection returned for the environment. The agent under test does not receive state-management tools.

Compare the result

The result contains before and after hashes, changed paths, and truncation metadata. It compares with the file you supplied, not with a hidden snapshot.

Reset

Reset one environment through the API, or reset every environment with the CLI:
Reset restores the current baseline. Initial state establishes the first baseline. A later state load replaces it. Reset overwrites live state. In an interactive or shared sandbox, name the target and get explicit approval first. A disposable CI sandbox can reset non-interactively when the workflow was configured to do so and guarantees cleanup.