LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithrun_treesRunTree
Class●Since v0.0

RunTree

A run can represent either a trace (root run) or a child run (~span).

Copy
class RunTree

Used in Docs

  • Custom instrumentation
  • Implement distributed tracing
  • Log LLM calls
  • Log traces to a specific project
  • Messages view integrations

Constructors

Properties

Methods

View source on GitHub
constructor
constructor
property
attachments: Attachments
property
child_execution_order: number
property
child_runs: RunTree[]
property
client: Client
property
distributedParentId: string
property
dotted_order: string
property
end_time: number
property
error: string
property
events: KVMap[]
property
execution_order: number
property
extra: KVMap
property
id: string
property
inputs: KVMap
property
name: string
property
outputs: KVMap
property
parent_run: RunTree
property
parent_run_id: string
property
project_name: string
property
reference_example_id: string
property
replicas: WriteReplica[]
property
run_type: string
property
serialized: object
property
start_time: number
property
tags: string[]
property
trace_id: string
property
tracingEnabled: boolean
property
metadata: __type | null
method
addEvent
method
createChild→ RunTree
method
end→ Promise<void>
method
patchRun→ Promise<void>
method
postRun→ Promise<void>
method
toHeaders→ __type
method
toJSON→ RunCreate & __type
method
fromDottedOrder→ RunTree | undefined
method
fromHeaders→ RunTree | undefined
method
fromRunnableConfig→ RunTree
method
getSharedClient→ Client

attachments maps each attachment file name to a pre-signed HTTPS download URL.

The LangSmith client to use.

dotted_order is the hierarchical ordering key for trace trees.

JSON body of the response that caused the error

events is the ordered list of run events (for example streaming tokens).

inputs is the example input payload (arbitrary JSON object).

outputs is the example reference-output payload (arbitrary JSON object).

reference_example_id is the dataset example UUID this run was compared against, if any.

Projects to replicate this run to with optional updates.

run_type identifies what kind of operation this run represents (for example an LLM call, a tool invocation, or a chain step). See the RunType enum for allowed values.

trace_id is the root trace UUID; for a root run it matches id.

Whether to enable tracing.

Add an event to the run tree.