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
Pythonlangsmithasync_client
Module●Since v0.3

async_client

The Async LangSmith Client.

Attributes

attribute
async_prompt_cache_singleton
attribute
logger

Classes

class
AsyncRunsResource
class
AsyncPromptCache

Thread-safe LRU cache with asyncio task refresh.

For use with the asynchronous AsyncClient.

Features:

  • In-memory LRU cache with configurable max size
  • Asyncio task for refreshing stale entries
  • Stale-while-revalidate: returns stale data while refresh happens
  • Thread-safe for concurrent access
class
AsyncAnnotationQueuesResource
class
AsyncDatasetsResource
class
AsyncEvaluatorsResource
class
AsyncPublicResource
class
AsyncSandboxesResource
class
AsyncThreadsResource
class
AsyncTracesResource
class
AsyncClient

Async Client for interacting with the LangSmith API.

Type Aliases

typeAlias
ID_TYPE

Modules

module
langsmith

LangSmith Client.

module
ls_client

Client for interacting with the LangSmith API.

Use the client to customize API keys / workspace connections, SSL certs, etc. for tracing.

Also used to create, read, update, and delete LangSmith resources such as runs (~trace spans), datasets, examples (~records), feedback (~metrics), projects (tracer sessions/groups), etc.

For detailed API documentation, visit the LangSmith docs.

module
ls_schemas

Schemas for the LangSmith API.

module
ls_utils

Generic utility functions.

View source on GitHub