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

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithaddressresolve_destination
Function●Since v0.14

resolve_destination

Copy
resolve_destination(
  project_name: Optional[str] = None,
  address: Optional[Any]
View source on GitHub
=
None
)
->
tuple
[
Optional
[
str
]
,
Optional
[
AgentAddress
]
]

Parameters

NameTypeDescription
project_nameOptional[str]
Default:None
addressOptional[Any]
Default:None

Settle where a run is traced, as (project_name, address).

Exactly one of the two is set. A destination passed here beats the env vars; with neither, LANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT decide, else the project from LANGSMITH_PROJECT (or default). This is the rule the SDK applies to a root run, for servers and apps that need to know a run's destination themselves.

A project named by the caller.

An AgentAddress named by the caller, as returned by agent_address.