Repository navigation
v0.2.0 - Capture adapters + LangGraph integration
Highlights
- LangGraph capture adapter —
CasualityCallbackHandlerrecords chain/tool/LLM/retriever callbacks as causal events: one root run = one agent, unknown causal parents are dropped (no invented edges), frontier chaining orders siblings, and file read-after-write edges link readers to their last writer. Fail-open by design (handler.errors, never raises into your agent). Install withagent-casuality[langgraph]. - Capture adapters package — OpenCode capture moved from
opencode_adapter/toadapters/opencode/(git history preserved; thecasuality-opencode-ingestentry point is unchanged). Breaking (pre-1.0): direct imports ofopencode_adaptermust move toadapters.opencode. - Replit incident case study — deterministic replay of the documented July 2025 Replit incident (
examples/replit_incident.py, no API key): the destructive delete sits in the freeze's causal slice with zero approval events, the fabricated write is a direct causal parent of the "verification" read, and the false rollback claim lands two events after it. Write-up:docs/case-study-replit.md. - Visual DAG Explorer — node labels now fall back to callback names, so LangGraph captures render
tool_call · write_sqlinstead of repeating the event type; failure/diagnosis/evidence endpoints all work on LangGraph traces.
Also in this release
- Shared deep-redaction helper for adapters; sensitive-key regex tightened (
token_usageno longer redacted,access_token-style keys still are). - Deterministic, idempotent event IDs and JSON-safe payload truncation (4000 chars).
- Root
.opencode/is git-ignored — it's an installed copy of the canonical plugin atpackages/opencode-agent-casuality/src/index.ts; the plugin-compat script installs it automatically. - Docs: new
docs/langgraph.md; README (PyPI + npm copies) re-synced.
Full changelog: https://github.com/Psionic-labs/Agent-Casuality/blob/main/CHANGELOG.md
Install: pip install agent-casuality==0.2.0 or uv add agent-casuality