tine import
tine import materializes a foreign trace as an ordinary opentine run. It uses the same importers as the Python API and writes a portable v2.tine artifact, advances a ref in an existing v3 repository, or does both in one invocation.
# Complete OTLP/JSON document -> priced portable v2 artifact
tine import trace.otlp.json --format otel-json --price --save run.tine
# GenAI spans from stdin -> existing v3 repository
tine import - --format otel-spans --repo . --ref heads/imported
# A serialized framework log -> both destinations
tine import agent.log --format langchain --save run.tine --repo .
# Replace only the --save destination
tine import trace.jsonl --format jsonl --save run.tine --forceAccepted formats
--format defaults to auto, recognizing supported spans, logs, and session files by shape.
otel-logs: supported Claude Code, Codex, Gemini CLI, and GenAI inference log events.claude-code-transcript,codex-session,gemini-session, andqwen-session: agent CLI session logs.otel-json: a complete OTLP/JSON document, a{"spans": [...]}wrapper, or one OpenTelemetry span object.otel-spans: a JSON array of OpenTelemetry GenAI spans or one span object per line.jsonl: OpenTineTraceEventobjects, one per line.langchain,llamaindex,autogen,crewai, andopenai-agents: serialized framework records as a JSON array or JSONL.
Framework formats are best-effort because upstream log shapes can change. CrewAI remains a post-hoc import path; opentine does not provide a live CrewAI adapter.
Destination rules
- Pass at least one of
--save PATHor--repo PATH. --savewrites a portable v2 artifact and refuses an existing file unless--forceis present.--repoopens an existing v3 repository. Initialize it first withtine repo init.--refapplies only with--repoand defaults toheads/main.- Use
-as the source to read from standard input.
Optional post-hoc pricing pass
--priceresolves each imported model event's recorded(provider, model, usage) tuple against the pricing catalog before any event is written. Source cost is retained only as the unsummed attributeopentine.source_reported_cost; source billing blocks are dropped. A step with no matching rate card, no provider, or no usage is recorded as unknown, never as a fabricated $0.
Without the flag, imported model calls carry unknown billing. You can calculate a read-only view later with tine price instead of changing the stored run.
Provenance boundary
Session files are agent-writable evidence. Imports record metadata.capture.agent_writable = true, rather than implying independent attestation. Claude Code subagent transcripts are imported with their parent session under bounded file, byte, and event limits.
# List recent sessions across the supported CLIs
tine import --from-default-location
# Import the latest, or replace latest with a session-id prefix
tine import latest --from-default-location --price --save session.tineImport does not capture the importing machine's code or environment. Those details belong to the system that produced the trace, not the machine converting it. Imported content remains untrusted input and may include prompts, outputs, or tool results that require review before sharing.
The command prints the resulting run ID in the normal human rendering. With--json, it emits one machine-readable import receipt for the completed destinations. A failure that prevents the import remains human-readable and exits nonzero.
See OpenTelemetry interoperability for supported message shapes and export behavior, or live LangChain and LangGraph capture.