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
Pythonlangsmithtypesthread_query_paramsThreadQueryParams
Class●Since v0.14

ThreadQueryParams

Copy
ThreadQueryParams()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
ai_searchstr
cursorstr
filterstr
max_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
min_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
page_sizeint
project_idstr
thread_filterstr
trace_filterstr
tree_filterstr
acceptAnnotated[str, PropertyInfo(alias='Accept')]
attribute
ai_search: str

ai_search is a plain-language criterion evaluated against the messages from the agent trajectory scoped to the thread. AND-ed with the ordinary filters. Requires semantic filtering enabled for the deployment. Must contain nonempty text of at most 2000 UTF-8 bytes.

attribute
cursor: str

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.

attribute
filter: str

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.

attribute
max_start_time: Annotated[Union[str, datetime], PropertyInfo(format='iso8601')]

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

attribute
min_start_time: Annotated[Union[str, datetime], PropertyInfo(format='iso8601')]

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

attribute
page_size: int

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.

attribute
project_id: str

project_id is the tracing project UUID.

attribute
thread_filter: str

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.

attribute
trace_filter: str

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.

attribute
tree_filter: str

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.

attribute
accept: Annotated[str, PropertyInfo(alias='Accept')]