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_clientresourcesthreadsThreadAggregateStatsParams
Interface●Since v0.14

ThreadAggregateStatsParams

Copy
interface ThreadAggregateStatsParams

Properties

View source on GitHub
property
filter: string
property
max_start_time: string
property
min_start_time: string
property
project_id: string
property
select: "TOTAL_TOKENS" | "PROMPT_TOKENS" | "COMPLETION_TOKENS" | "TOTAL_COST" | "PROMPT_COST" | "COMPLETION_COST" | "PROMPT_TOKEN_DETAILS" | "COMPLETION_TOKEN_DETAILS" | "PROMPT_COST_DETAILS" | "COMPLETION_COST_DETAILS" | "THREAD_COUNT" | "TRACE_COUNT" | "ERROR_RATE" | "STREAMING_RATE" | "LATENCY_P50" | "LATENCY_P99" | "MEDIAN_TOKENS" | "FIRST_TOKEN_P50" | "FIRST_TOKEN_P99" | "THREAD_FEEDBACK_STATS"[]
property
thread_filter: string
property
trace_filter: string
property
tree_filter: string

filter is a deprecated, unscoped LangSmith filter expression evaluated against trace root runs. Kept for compatibility with deployments that serve this endpoint via the legacy ClickHouse backend (no SmithDB query service configured); prefer trace_filter, tree_filter, or thread_filter otherwise, since those require SmithDB.

max_start_time is the exclusive upper bound on thread activity (RFC3339 date-time). Defaults to now (UTC) when omitted.

min_start_time is the inclusive lower bound on thread activity (RFC3339 date-time). Defaults to 1 day before now (UTC) when omitted.

project_id is the tracing project UUID.

select lists the aggregate statistics to compute and return. At least one value is required.

thread_filter narrows eligible threads using a LangSmith filter expression evaluated against the complete thread summary.

trace_filter narrows eligible threads to those containing a trace whose root run matches this LangSmith filter expression.

tree_filter narrows eligible threads to those containing a matching run anywhere in a trace tree.