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
  • Traceable
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerTraceableJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithlangchaingetLangchainCallbacks
Function●Since v0.1

getLangchainCallbacks

Converts the current run tree active within a traceable-wrapped function into a LangChain compatible callback manager. This is useful to handoff tracing from LangSmith to LangChain Runnables and LLMs.

Copy
getLangchainCallbacks(currentRunTree: RunTree): Promise<any>

Used in Docs

  • Trace LangChain applications (Python and JS/TS)

Parameters

NameTypeDescription
currentRunTreeRunTree

Current RunTree from within a traceable-wrapped function. If not provided, the current run tree will be inferred from AsyncLocalStorage.

View source on GitHub