Secure, recoverable, and traceable runtime control for high-privilege AI agents.
ClawChain turns opaque agent sessions into monitored execution flows with controlled handoff, snapshot-backed recovery, readable proof export, and EVM-verifiable evidence.
The dashboard is the main operator surface for session discovery, Join Monitor, dangerous-operation review, restore, proof export, and chain inspection.
ClawChain is a runtime safety layer for AI coding agents that can execute real commands on real machines.
It is designed to solve four practical failures that appear when a high-privilege agent is allowed to operate directly in a terminal:
- execution is opaque while the session is running
- evidence is easy to lose after destructive actions
- recovery is incomplete when important files disappear
- post-incident tracing is difficult and fragmented
ClawChain turns those sessions into a controlled runtime with:
- monitored onboarding and controlled handoff
- dangerous-operation capture
- snapshot-backed recovery
- readable proof export
- optional EVM anchoring and verification
This is not a generic blockchain demo. The chain backend is used to strengthen proof integrity for risky agent actions. The product itself is the control plane around monitoring, recovery, evidence, and verification.
- Codex End-to-end monitored workflow with restore, proof export, and chain verification.
- Claude Code Real session detection, controlled relaunch, monitored restore flow, proof export, and EVM verification.
The runtime is structured to support additional shell-style agent integrations through a shared adapter layer. Future agents can be added by extending the profile model instead of cloning launcher logic.
- discover a live agent session
- bring that session into a monitored control path
- detect destructive operations before loss becomes permanent
- preserve snapshot-backed recovery material
- restore affected files or directories
- export readable proof logs per monitored session
- verify proof fields locally and on an EVM backend
- inspect sessions, activity, restore actions, proof state, and chain status in one UI
- Linux
- Windows
- macOS setup path via the Unix shell flow
Linux and Windows have both been validated on the main monitored workflow, including setup, service, UI, recovery, proof export, and local EVM bootstrap.
clawchain/Runtime, monitoring, recovery, proof, UI, chain integration, and agent adapter logic.assets/GitHub-facing logo, diagrams, and dashboard screenshots.contracts/CommitmentAnchor.soland ABI used by local EVM anchoring.scripts/Platform smoke scripts, EVM smoke, and adapter validation helpers.setup_clawchain.cmdOne-click Windows setup entrypoint.setup_clawchain.shOne-click Linux/macOS setup entrypoint.DEVELOPER.mdDetailed architecture, implementation notes, and test guide.
- Python 3.12
pip- Git
- For local chain bootstrap:
- preferred: Foundry (
anvil,forge) - optional fallback: Docker where available
- preferred: Foundry (
conda create -y -n ClawChain python=3.12 pip
conda activate ClawChain
cd <repo-root>
pip install -r requirements.txt
pip install -e .setup_clawchain.cmd 8888bash setup_clawchain.sh 8888The setup flow does the following:
- stops an old ClawChain service for the selected account if it exists
- creates or refreshes the account configuration
- bootstraps local EVM when available
- starts the background service
- verifies service status
- launches the UI
If you want setup to fail unless local chain bootstrap succeeds:
set CLAWCHAIN_REQUIRE_CHAIN=1
setup_clawchain.cmd 8888CLAWCHAIN_REQUIRE_CHAIN=1 bash setup_clawchain.sh 8888http://127.0.0.1:8888
If setup is launched from an SSH session, run_clawchain_ui.sh automatically switches to a remote-friendly bind and prints the correct browser URL.
- Start a fresh agent session.
- Open the ClawChain UI.
- Click
Join Monitor. - Continue only in the ClawChain-managed terminal.
- Perform a delete-style destructive action.
- Confirm the operation appears in history.
- Run
Restore. - Export the proof log.
- Confirm the exported proof shows EVM fields when local chain bootstrap is enabled.
For a successfully anchored proof, you should typically see:
anchor_backend: "evm:31337"anchor_mode: "evm-anchored"anchor_status: "confirmed"anchor_lookup_found: trueanchor_field_checks.session_id = trueanchor_field_checks.batch_seq_no = trueanchor_field_checks.merkle_root = true
python -m clawchain.agent_proxy_cli ui --host 127.0.0.1 --port 8888python -m clawchain.agent_proxy_cli chain-connect local-operator --bootstrap-local-evmpython -m clawchain.agent_proxy_cli chain-status local-operatorpython scripts/smoke_claude_adapter.pybash scripts/run_linux_smoke.sh
bash scripts/run_linux_smoke.sh --bootstrap-local-evmpowershell -ExecutionPolicy Bypass -File scripts/run_windows_smoke.ps1
powershell -ExecutionPolicy Bypass -File scripts/run_windows_smoke.ps1 --bootstrap-local-evmbash scripts/run_evm_smoke.shClawChain prefers local Foundry on all platforms.
Bootstrap order:
- explicit
anvilandforgepaths - managed toolchain under the account-local Foundry directory
- automatic Foundry download from official releases
- optional Docker fallback where available
If Foundry auto-download does not succeed on Windows, install it manually and rerun chain bootstrap.
Open the latest Foundry release page:
Download the Windows asset named like:
foundry_v<version>_win32_amd64.zip
Extract anvil.exe and forge.exe, then either:
- place them on your
PATH, or - copy them into the ClawChain-managed toolchain directory for the current account
Default managed directory:
%USERPROFILE%\.clawchain-agent\local-operator\_internal\chain\toolchains\foundry\bin
set CLAWCHAIN_ANVIL_PATH=C:\path\to\anvil.exe
set CLAWCHAIN_FORGE_PATH=C:\path\to\forge.exe
python -m clawchain.agent_proxy_cli chain-connect local-operator --bootstrap-local-evmIf bootstrap still fails, run:
python -m clawchain.agent_proxy_cli chain-connect local-operator --bootstrap-local-evmThen inspect the diagnostics fields in the JSON output:
bootstrap_diagnostics.anvil_pathbootstrap_diagnostics.forge_pathbootstrap_diagnostics.managed_foundry_bin_dirbootstrap_diagnostics.managed_foundry_bin_contentsbootstrap_diagnostics.managed_foundry_install_error
For a newly anchored session proof:
format = clawchain-proof-log.v2exported_atis a full ISO 8601 timestampsession.status = monitored- snapshot locations point into
recovery-vault/recovery-snapshots - restored operations show
restored = true proof_cards[].anchor_backend = evm:31337proof_cards[].anchor_mode = evm-anchoredproof_cards[].anchor_status = confirmed
