Query threads
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.
Body
cursor is the opaque string from a previous response's next_cursor. Omit on the first request; pass the returned cursor to fetch the next page.
filter narrows which threads are returned, using a LangSmith filter expression evaluated against each thread's root run.
For example: has(tags, "production") or eq(status, "error").
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
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.
page_size is the maximum number of threads to return in this response. Defaults to 20 when omitted; must be between 1 and 100 inclusive when set. The response may contain fewer threads than page_size even when next_cursor is non-null.
1 <= x <= 10020
project_id is the tracing project UUID.
"0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328"
thread_filter narrows results using a LangSmith filter expression evaluated against each complete thread summary.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"gte(turn_count, 3)"
trace_filter narrows results to threads containing at least one trace whose root run matches this LangSmith filter expression.
Trace-level aggregate fields are evaluated using the complete trace summary.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"eq(status, \"error\")"
tree_filter narrows results to threads containing at least one trace with a matching run anywhere in its run tree.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"has(tags, \"production\")"

