File-Backed State
Every loop phase persists to disk. Agent context, decisions, and results are stored as plain JSON — inspectable, recoverable, and portable across sessions.
HexClamp is an inspectable autonomous agent loop scaffold designed for transparency and reliability. Unlike black-box agents that hide their reasoning, HexClamp exposes every step of the agent loop — so you can understand, debug, and recover from failures.
The loop follows a six-phase cycle: Observe → Condense → Plan → Execute → Verify → Persist. Each phase writes state to disk, making every decision auditable and every failure recoverable.
Every loop phase persists to disk. Agent context, decisions, and results are stored as plain JSON — inspectable, recoverable, and portable across sessions.
Built-in metrics for cycle count, latency, success rate, and verification results. Track agent performance over time without external observability tools.
Get notified on agent events — task completion, verification failures, or circuit breaker triggers. Stay informed without polling logs.
Adaptive verification that learns from past results. Improve quality gates over time based on actual outcomes and manual corrections.
Automatic halts on repeated failures or quality threshold breaches. Prevent runaway agent loops and ensure human-in-the-loop oversight.
Configurable checkpoints between phases. Define pass/fail criteria that must be met before the agent proceeds to the next phase.
pip install hexclamp
Or for development:
git clone https://github.com/sidonsoft/HexClamp cd HexClamp pip install -e ".[dev]"
from hexclamp.loop import HexClampLoop
from hexclamp.agent import CLIAgent
from pathlib import Path
# Create agent and loop
agent = CLIAgent(workspace="/path/to/workspace")
loop = HexClampLoop(Path("/path/to/workspace"), agent)
# Enqueue a task
loop.enqueue("Read the README file")
# Run cycle
loop.run_cycle()
# Initialize workspace hexclamp init # Enqueue a task hexclamp enqueue "Fix the login bug" # Run cycle hexclamp run # Check status hexclamp status