Problem
Haystack pipelines lack transaction guarantees. When a step fails mid-execution, there's no standard way to:
- Know exactly what completed and what didn't
- Resume from failure point (idempotency)
- Roll back partial work (compensation)
For production deployments in regulated environments, this is a hard requirement.
Proposed Solution
Transaction Protocol (L7) from Works With Agents (CC BY 4.0): idempotency, rollback, and immutable audit trails.
from haystack import Pipeline
from works_with_agents import TransactionProtocol
pipeline = Pipeline()
pipeline.add_component(embedder, ...)
pipeline.add_component(retriever, ...)
pipeline.add_component(generator, ...)
tx = TransactionProtocol.begin("doc-qna-pipeline")
try:
result = pipeline.run({"query": "What is GDP?"})
tx.commit(result) # Signed, hashed, timestamped
except PipelineError:
tx.rollback() # Compensation per component
Provides: idempotency tokens, step-level audit trail, compensation actions, cryptographic signatures for tamper-proof evidence.
Why Haystack: pipeline architecture = natural transaction boundaries. Production users need this. Zero breaking changes — wrapper pattern.
Spec: https://workswithagents.dev/specs/transaction.md
SDK: pip install works-with-agents
Would a PR adding Transaction Protocol support to Haystack be welcome?
Problem
Haystack pipelines lack transaction guarantees. When a step fails mid-execution, there's no standard way to:
For production deployments in regulated environments, this is a hard requirement.
Proposed Solution
Transaction Protocol (L7) from Works With Agents (CC BY 4.0): idempotency, rollback, and immutable audit trails.
Provides: idempotency tokens, step-level audit trail, compensation actions, cryptographic signatures for tamper-proof evidence.
Why Haystack: pipeline architecture = natural transaction boundaries. Production users need this. Zero breaking changes — wrapper pattern.
Spec: https://workswithagents.dev/specs/transaction.md
SDK: pip install works-with-agents
Would a PR adding Transaction Protocol support to Haystack be welcome?