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

RunQueryV2Params

Copy
RunQueryV2Params()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
ai_searchstr
cursorstr
filterstr
has_errorbool
idsSequenceNotStr[str]
is_rootbool
max_feedback_modified_atAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
max_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
min_feedback_modified_atAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
min_start_timeAnnotated[Union[str, datetime], PropertyInfo(format='iso8601')]
page_sizeint
project_idsSequenceNotStr[str]
reference_dataset_idstr
reference_examplesSequenceNotStr[str]
run_typeRunType
selectsList[RunSelectField]
trace_filterstr
trace_idstr
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 run. AND-ed with the ordinary filters. Requires semantic filtering enabled for the deployment. Must contain nonempty text of at most 2000 UTF-8 bytes. Not supported on public dataset queries.

attribute
cursor: str

cursor is the opaque string from a previous response's next_cursor.

Treat it as opaque and pass it back unmodified.

attribute
filter: str

filter narrows results to runs matching this LangSmith filter expression, evaluated against each individual run. For example: and(eq(run_type, "llm"), gt(latency, 5)) or eq(status, "error"). See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

attribute
has_error: bool

has_error filters to runs that errored (true) or completed without error (false).

attribute
ids: SequenceNotStr[str]

ids optionally limits the request to these run UUIDs.

attribute
is_root: bool

is_root returns only root runs (true) or only non-root runs (false).

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

max_feedback_modified_at is the exclusive upper bound (RFC3339) on feedback modified_at, applied to the feedback conditions in filter, trace_filter, or tree_filter (for example eq(feedback_key, "correctness")). Requires at least one feedback condition. Runs must still fall within the start_time window.

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

max_start_time is the upper bound for run start_time (RFC3339).

Defaults to now.

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

min_feedback_modified_at is the inclusive lower bound (RFC3339) on feedback modified_at, applied to the feedback conditions in filter, trace_filter, or tree_filter (for example eq(feedback_key, "correctness")). Requires at least one feedback condition. Runs must still fall within the start_time window.

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

min_start_time is the lower bound for run start_time (RFC3339).

Defaults to 1 day ago.

attribute
page_size: int

page_size is the maximum number of runs to return in this response.

Defaults to 100 when omitted; must be between 1 and 1000 inclusive when set.

attribute
project_ids: SequenceNotStr[str]

project_ids lists tracing project UUIDs to query. Required unless reference_dataset_id is set. Mutually exclusive with reference_dataset_id — set exactly one of them.

attribute
reference_dataset_id: str

reference_dataset_id resolves session IDs server-side from the dataset. Required unless project_ids is set. Mutually exclusive with project_ids — set exactly one of them. When provided and min_start_time is omitted, the server derives it from the earliest session creation date.

attribute
reference_examples: SequenceNotStr[str]

reference_examples optionally limits to runs linked to these dataset example UUIDs.

attribute
run_type: RunType

run_type, when set, restricts results to runs whose run_type equals this value.

attribute
selects: List[RunSelectField]

selects lists which properties to include on each returned run.

If omitted, only id is returned. Properties not listed are omitted from each run object.

attribute
trace_filter: str

trace_filter narrows results to runs whose root trace matches this LangSmith filter expression. Use this to filter by properties of the trace's root run — for example eq(status, "success") to include only traces that completed without error. See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

attribute
trace_id: str

trace_id optionally limits results to runs belonging to this trace UUID.

attribute
tree_filter: str

tree_filter narrows results to runs that belong to a trace containing at least one run matching this LangSmith filter expression anywhere in the run tree (not just the root). Use this to find runs inside traces that involved a specific tool, tag, or model — for example has(tags, "production") or eq(name, "my_tool"). See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

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