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
JavaScriptlangsmith_openapi_clientresourcesThreads
Class●Since v0.10

Threads

Copy
class Threads

Bases

APIResource

Constructors

Properties

Methods

View source on GitHub
constructor
constructor→ Threads
property
_client: Langsmith
method
listTraces→ PagePromise<ThreadTracesItemsCursorGetPagination, ThreadTrace>
method
query→ PagePromise<ThreadsItemsCursorPostPagination, Thread>
method
stats→ APIPromise<ThreadStats>

Retrieve all traces belonging to a specific thread within a project.

Self-hosted deployments require LangSmith v0.16 or later.

Query threads within a project (session), with cursor-based pagination. Returns threads matching the given time range and optional filters.

Self-hosted deployments require LangSmith v0.16 or later.

Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a project.

Self-hosted deployments require LangSmith v0.16 or later.