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

TraceQueryParams

Copy
TraceQueryParams()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
ai_searchstr
cursorstr
max_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
min_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
page_sizeint
project_idstr
selectsList[RunSelectField]
trace_filterstr
trace_idsSequenceNotStr[str]
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 trace. 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 returned in a previous response's next_cursor.

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

max_start_time is the exclusive upper bound for the root-run start time scan (RFC3339). Defaults to the request time when omitted.

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

min_start_time is the inclusive lower bound for the root-run start time scan (RFC3339). Defaults to 24 hours before the request when omitted.

attribute
page_size: int

page_size is the maximum number of traces to return per page.

Defaults to 20; must be between 1 and 100 when set.

attribute
project_id: str

project_id is the UUID of the tracing project that owns the traces. Required.

attribute
selects: List[RunSelectField]

selects lists which properties to include on each returned trace.

Properties listed here are routed to the appropriate sub-object on each item: total_tokens, total_cost, and first_token_time appear under trace_aggregates; everything else appears under root_run. If omitted, only id is returned on root_run.

attribute
trace_filter: str

trace_filter narrows results to traces whose root run matches this LangSmith filter expression. This filter targets root runs only — is_root = true is implied. See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

attribute
trace_ids: SequenceNotStr[str]

trace_ids is an optional fast-path restriction to a known set of trace UUIDs.

Equivalent in result to including each UUID in a trace_filter, but more efficient at scale.

attribute
tree_filter: str

tree_filter narrows results to traces containing at least one run anywhere in the run tree (root or descendant) that matches this LangSmith filter expression.

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