Live LangChain + LangGraph capture
One optional callback handler records chains, graph nodes, models, tools, retrievers, usage, and errors into a finalized v3 run as the invocation happens.
pip install "opentine[langchain]==0.5.0"Capture native runs, framework callbacks, or existing traces as portable artifacts and verified repositories you can inspect, fork, attest, exchange, and synchronize.
The problem
Your agent ran 47 tool calls over 10 minutes. Something went wrong at step 23, but a flat transcript does not preserve a branchable execution state.
The first 22 steps were useful. Without a reusable prefix, repairing the failure can mean repeating the same calls, tokens, and elapsed time.
A screenshot shows terminal output, not the exact graph, inputs, policy, usage, and provenance a teammate needs to inspect the same state.
The solution
Every step content-addressed. Every branch explicit. Every artifact portable, verifiable, and ready for supported replay or scoped resumption.
1from opentine import Agent
2from opentine.models.anthropic import Anthropic
3from opentine.tools.search import search
4from opentine.tools.web import fetch
5
6agent = Agent(model=Anthropic("claude-sonnet-5"), tools=[search, fetch])
7run = agent.run_sync("Research quantum error correction")
8run.save("research.tine")
Run Graph
Current release · v0.5.0 · Ecosystem Release
Export verified runs as OpenTelemetry GenAI spans, import framework and telemetry traces from the CLI, and capture LangChain or LangGraph live without changing the artifact formats. Existing v0.3 and v0.4 data stays readable: .tine files remain format v2 and repository objects remain v3.
One optional callback handler records chains, graph nodes, models, tools, retrievers, usage, and errors into a finalized v3 run as the invocation happens.
pip install "opentine[langchain]==0.5.0"Render a portable run, repository run, or TraceEvents as GenAI spans or a complete OTLP/JSON document in the same shape opentine imports.
to_otel_genai_document(run, service_name="agent")Bring OTel, OpenTine JSONL, LangChain, LlamaIndex, AutoGen, CrewAI, or OpenAI Agents logs into a portable artifact, a repository ref, or both.
tine import trace.json --format otel-json --save run.tineShow, verify, list, search, and cost commands can emit one documented JSON object while the human-readable output remains the default.
tine verify run.tine --jsonThe OTel importer now understands span events, log records, structured message attributes, and common OpenLLMetry and OpenInference shapes.
tine import spans.json --format otel-spans --repo .Golden fixtures prove that v0.3 and v0.4 artifacts and repositories still load and verify. The package also ships py.typed for downstream type checkers.
tine verify legacy-v0.4.tineThe debugging loop
Inspect the failure, preserve the trusted prefix, then compare the branch field by field. Live reruns remain explicit through a native runtime or harness.
Inspect the recorded failure
Fork the known-good prefix
Diff the attempted repair
Model + runtime coverage
Native adapters, provider-scoped compatible transports, and local-runtime presets share one agent surface. Model IDs pass through; exact billing is attached only when a signed catalog card matches.
# Swap models with one line. Same agent, same tools.
from opentine.models.anthropic import Anthropic
from opentine.models.openai import OpenAI
from opentine.models.google import Google
from opentine.models.ollama import Ollama
agent = Agent(model=OpenAI("gpt-5.6"), tools=tools)
agent = Agent(model=Anthropic("claude-sonnet-5"), tools=tools)
agent = Agent(model=Google("gemini-3.5-flash"), tools=tools)
agent = Agent(model=Ollama("qwen3"), tools=tools)Local presets include LM Studio, vLLM, Unsloth, llama.cpp, LocalAI, Jan, SGLang, TGI, MLX-LM, NVIDIA NIM, TensorRT-LLM, KoboldCpp, and LiteLLM. Tool calling, reasoning, multimodal input, and usage reporting still depend on the loaded model and server configuration.
Where opentine fits
LangChain, LangGraph, CrewAI, provider SDKs, and custom agents decide how work runs. OpenTelemetry and dashboards help operate it. opentine records the portable, verifiable history between them—capturing live where supported, importing existing traces, and exporting verified runs back to OpenTelemetry.
Meet the run where it happens.
Record natively, attach the LangChain/LangGraph callback, wrap a CLI agent, or import a supported trace after the fact.
Recorder · live callbacks · harnesses · trace import
Keep evidence outside the runtime.
Store portable .tine v2 artifacts or verified v3 repository history with lineage, usage, cost, and integrity evidence.
.tine v2 · repository v3 · signatures · refs
Use the history, then send it on.
Verify, fork, diff, replay, automate with JSON, or export OpenTelemetry GenAI spans to the observability stack you already run.
verify · fork · diff · --json · OTel export
Cross-cutting provenance · opentine
LangChain and LangGraph can be captured live. CrewAI and the other supported framework formats import after the fact in v0.5. Verified runs can flow back out as OpenTelemetry GenAI without turning opentine into another orchestrator or hosted dashboard.
your runtime → durable provenance → your observability backend
Enterprise foundation
Typed SHA-256 identities, immutable envelopes, causal links, and deep fsck make repository corruption visible.
Reader, writer, and admin roles sit behind static development tokens or pluggable OIDC/JWKS verification.
The reference remote encrypts stored objects, supports KMS seams, and records a hash-chained audit trail.
Storage, indexing, identity, authorization, keys, audit, retention, and admission policies have explicit interfaces.
The repository and extension seams are the enterprise foundation. The bundled WSGI server is a bounded reference deployment for development and small self-hosted installations—not a turnkey HA service or hosted control plane.