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
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithclientClientlist_runs
Method●Since v0.0

list_runs

List runs from the LangSmith API.

Copy
list_runs(
  self,
  *,
  project_id: Optional[Union[ID_TYPE, Sequence[ID_TYPE]]] = None,
  project_name: Optional[Union[str, Sequence[str]]] = None,
  run_type: Optional[str] = None,
  trace_id: Optional[ID_TYPE] = None,
  reference_example_id: Optional[ID_TYPE] = None,
  query: Optional[str] = None,
  filter: Optional[str] = None,
  trace_filter: Optional[str] = None,
  tree_filter: Optional[str] = None,
  is_root: Optional[bool] = None,
  parent_run_id: Optional[ID_TYPE] = None,
  start_time: Optional[datetime.datetime] = None,
  error: Optional[bool] = None,
  run_ids: Optional[Sequence[ID_TYPE]] = None,
  select: Optional[Sequence[str]] = None,
  limit: Optional[int] = None,
  **kwargs: Any = {}
) -> Iterator[ls_schemas.Run]

Parameters

NameTypeDescription
project_idOptional[Union[ID_TYPE, Sequence[ID_TYPE]]]
Default:None

The ID(s) of the project to filter by.

project_nameOptional[Union[str, Sequence[str]]]
Default:None

The name(s) of the project to filter by.

run_typeOptional[str]
Default:None

The type of the runs to filter by.

trace_idOptional[ID_TYPE]
Default:None

The ID of the trace to filter by.

reference_example_idOptional[ID_TYPE]
Default:None

The ID of the reference example to filter by.

queryOptional[str]
Default:None

The query string to filter by.

filterOptional[str]
Default:None

The filter string to filter by.

trace_filterOptional[str]
Default:None

Filter to apply to the ROOT run in the trace tree.

This is meant to be used in conjunction with the regular filter parameter to let you filter runs by attributes of the root run within a trace.

tree_filterOptional[str]
Default:None

Filter to apply to OTHER runs in the trace tree, including sibling and child runs.

This is meant to be used in conjunction with the regular filter parameter to let you filter runs by attributes of any run within a trace.

is_rootOptional[bool]
Default:None

Whether to filter by root runs.

parent_run_idOptional[ID_TYPE]
Default:None

The ID of the parent run to filter by.

start_timeOptional[datetime.datetime]
Default:None

The start time to filter by.

errorOptional[bool]
Default:None

Whether to filter by error status.

run_idsOptional[Sequence[ID_TYPE]]
Default:None

The IDs of the runs to filter by.

selectOptional[Sequence[str]]
Default:None

The fields to select.

limitOptional[int]
Default:None

The maximum number of runs to return.

**kwargsAny
Default:{}

Additional keyword arguments.

View source on GitHub