LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithrun_treesWriteReplicaclient
Attribute●Since v0.7

client

Copy
client: Optional[Client]
View source on GitHub

Optional dedicated :class:~langsmith.Client for this replica.

When set, the replica's runs are enqueued on this client's tracing queue (and dispatched by its background thread) instead of the RunTree's default client. This lets each replica use a different tracing mode — for example, one replica with Client(tracing_mode="otel") and another with the default LangSmith-only client.

The field is not propagated in distributed-tracing baggage (each service must construct its own clients).