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_clientLangsmithThreadStatsResponse
Interfaceā—Since v0.10

ThreadStatsResponse

Copy
interface ThreadStatsResponse

Properties

View source on GitHub
property
completion_cost: number
property
completion_cost_details: CompletionCostDetails
property
completion_token_details: CompletionTokenDetails
property
completion_tokens: number
property
feedback_stats: __type
property
first_start_time: string
property
last_end_time: string
property
last_start_time: string
property
latency_p50_seconds: number
property
latency_p99_seconds: number
property
prompt_cost: number
property
prompt_cost_details: PromptCostDetails
property
prompt_token_details: PromptTokenDetails
property
prompt_tokens: number
property
total_cost: number
property
total_tokens: number
property
turns: number

completion_cost is estimated USD cost for the completion.

completion_cost_details is the per-category USD breakdown of completion_cost. Categories mirror completion_token_details. Returned only when the COMPLETION_COST_DETAILS field is requested.

completion_token_details is the per-category breakdown of completion_tokens. Category names are model-specific (for example reasoning, audio). Returned only when the COMPLETION_TOKEN_DETAILS field is requested.

completion_tokens is the completion-side token count.

feedback_stats aggregates feedback scores keyed by feedback key.

first_start_time is the earliest trace start time in the thread (RFC3339). Populated when FIRST_START_TIME is selected.

last_end_time is the latest trace end time in the thread (RFC3339). Populated when LAST_END_TIME is selected.

last_start_time is the latest trace start time in the thread (RFC3339). Populated when LAST_START_TIME is selected.

latency_p50_seconds is the approximate p50 of trace latency across the thread, in seconds. Populated when LATENCY_P50 is selected.

latency_p99_seconds is the approximate p99 of trace latency across the thread, in seconds. Populated when LATENCY_P99 is selected.

prompt_cost is estimated USD cost for the prompt.

prompt_cost_details is the per-category USD breakdown of prompt_cost. Categories mirror prompt_token_details. Returned only when the PROMPT_COST_DETAILS field is requested.

prompt_token_details is the per-category breakdown of prompt_tokens. Category names are model-specific (for example cache_read, cache_write). Returned only when the PROMPT_TOKEN_DETAILS field is requested.

prompt_tokens is the prompt-side token count.

total_cost is total estimated USD cost (prompt plus completion).

total_tokens is prompt plus completion tokens.

turns is the number of distinct traces (turns) in the thread. Populated when TURNS is selected.