Audifact Beta
ENTERPRISE

LCEL chains & agents
with a hash-chained trail

Wrap LangChain runnables and tool agents with one tracer. Every chain run and agent step becomes a linked decision → outcome on an append-only ledger — with public labels you control for the explorer and proof pages.

Agent langchain-demo · id 8a6bf753…510f · live on the public ledger · no credit card required

LIVE LEDGER

This example is already on the public chain

Same script as below, pointed at production. Open these logged-out — no account required.

Also: chain decision · chain outcome (contract-summary-chain pair).

THE PROBLEM

Agents ran — but can you prove what they chose?

🔗

Traces ≠ commitments

Observability tools show logs. Audifact seals decision-time context into a hash-linked, publicly verifiable trail.

🛡️

Public vs private

Share short public_decision_label / public_outcome_label on proof pages; keep full payloads under your org.

One .wrap()

LCEL chains and tool agents — same tracer, linked decision/outcome pairs, works with mocks or real models.

RUNNABLE EXAMPLE

LangChain tracer — chain + agent

Duck-typed mocks so you can demo without an LLM. Set an API key to write real signed events.

from audifact.langchain import AudifactLangChainTracer

tracer = AudifactLangChainTracer(
    api_key="af_YOUR_API_KEY",
    base_url="http://localhost",  # or https://api.audifact.io
    agent_name="langchain-demo",
    include_context=True,
)

traced = tracer.wrap(chain)
traced.invoke({"input": "What is the liability cap?"})

Run the full example

pip install "git+https://github.com/audifact/audifact-sdk.git"
# monorepo: pip install -e "./sdk[langchain]"

export AUDIFACT_API_KEY=af_...
export AUDIFACT_BASE_URL=https://api.audifact.io   # local: http://localhost
export AUDIFACT_PUBLIC_BASE_URL=https://audifact.io
python sdk/examples/frameworks/langchain_basic_and_agent.py

Full source on GitHub → · Live proofs on this page ↑

Browser preview only — use the script above to write the ledger.

WHAT GETS RECORDED

Readable pairs in the explorer

decision_type
chain_execution

public_decision_label: Chain run · {name} · {preview}

outcome_type
chain_response

public_outcome_label: Chain result: {summary}

decision_type
agent_execution

public_decision_label: Agent run · {name} · {task}

outcome_type
agent_response

public_outcome_label: Agent result: {answer} · tools in public_output_json

Public proofs show short Context/Output previews only; full tool payloads stay private when include_context=True. See live proofs above or the explorer (agent id filter).

NEXT

From LCEL to graphs

Need multi-node graphs and routes? LangGraph guide → Same ledger, different orchestration story.

Get API key