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
JavaScriptlangsmithindex
Module●Since v0.0

index

Copy
import { ... } from "langsmith";

Functions

function
getDefaultProjectName→ string
function
overrideFetchImplementation

Overrides the fetch implementation used for LangSmith calls. You should use this if you need to use an implementation of fetch other than the default global (e.g. for dealing with proxies).

function
uuid7FromTime→ string

Generate a UUID v7 from a timestamp.

function
configureGlobalPromptCache

Configure the global prompt cache.

This should be called before any cache instances are created.

function
uuid7→ string

Generate a random UUID v7 string.

Classes

class
Client
class
PromptCache

LRU cache with background refresh for prompts.

Features:

  • In-memory LRU cache with configurable max size
  • Background refresh using setInterval
  • Stale-while-revalidate: returns stale data while refresh happens
  • Uses the most recently used client for a key for refreshes
  • JSON dump/load for offline use
class
RunTree

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

deprecatedclass
Cache

Interfaces

interface
CacheConfig

Configuration options for Cache.

interface
CacheMetrics

Cache performance metrics.

interface
ClientConfig
interface
Dataset
interface
Example
interface
Feedback
interface
FeedbackConfigSchema
interface
LangSmithTracingClientInterface
interface
Run

Describes properties of a run when loaded from the database. Extends the BaseRun interface.

interface
RunTreeConfig
interface
TracerSession

Type Aliases

typeAlias
RetrieverOutput: __type[]

Represents the expected output schema returned by traceable or by run tree output for LangSmith to correctly display documents in the UI

Variables

variable
__version__: "0.7.2"
variable
promptCacheSingleton: PromptCache

Global singleton instance of PromptCache. Use configureGlobalPromptCache(), enableGlobalPromptCache(), or disableGlobalPromptCache() instead.

View source on GitHub