A data-analysis agent where every unit of work is a transaction: explore → decide → generate+execute → validate → commit-or-rollback. Only validated work reaches the workspace; failed attempts are rolled back and leave zero trace.
Implementation of "Agentic Transactions: Towards ACID-Compliant Agent Systems" (Sun, Wang, Li).
Task ──► supervisor (≤20 units)
│ per unit:
│ explore (read-only, bounded)
│ extract decisions
│ write & run the unit script
│ VALIDATION GATE: execution + LLM reflection
│ + confidence-divergence probes (Qwen3-0.6B, local)
│ pass → git commit
│ fail → rollback → retry with feedback (≤2)
▼
final answer + full provenance (JSONL trace + Postgres)
The gate rejects code that contradicts the evidence gathered during exploration (token-level log-probability comparison, with vs without evidence), not just code that crashes.
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[confidence]" # core + local scorer
docker compose up -d # Postgres + pgvector
python scripts/setup_confidence.py # download Qwen3-0.6B
opencode auth login # backbone (Qwen family)# one task
python scripts/acid_cli.py run-task "<question>" --agent acid --data-dir path/to/csvs
# A/B evaluation
python scripts/acid_cli.py eval --agent acid --domain biomedical --runs 3
python scripts/acid_cli.py eval --agent baseline --domain biomedical --runs 3acid = full transaction machinery. baseline = same model, one raw session, no machinery.
Scores and consistency (sqrt(mean per-task variance)) land in results/*.json.
acid_agent/graphs/— supervisor + transaction unit (LangGraph)acid_agent/validation.py— the gateacid_agent/confidence.py— log-probability probesacid_agent/workspace.py— git-backed atomicity (rollback)acid_agent/eval/— KramaBench tasks + gradersdb/schema.sql— runs / units / validations / events