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
Pythonlangsmithasync_clientAsyncClientlist_runs
Method●Since v0.1

list_runs

Copy
list_runs(
  self,
  *,
  project_id: Optional[Union[ls_client.
View source on GitHub
ID_TYPE
,
Sequence
[
ls_client
.
ID_TYPE
]
]
]
=
None
,
project_name
:
Optional
[
Union
[
str
,
Sequence
[
str
]
]
]
=
None
,
run_type
:
Optional
[
str
]
=
None
,
trace_id
:
Optional
[
ls_client
.
ID_TYPE
]
=
None
,
reference_example_id
:
Optional
[
ls_client
.
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
[
ls_client
.
ID_TYPE
]
=
None
,
start_time
:
Optional
[
datetime
.
datetime
]
=
None
,
error
:
Optional
[
bool
]
=
None
,
run_ids
:
Optional
[
Sequence
[
ls_client
.
ID_TYPE
]
]
=
None
,
select
:
Optional
[
Sequence
[
str
]
]
=
None
,
limit
:
Optional
[
int
]
=
None
,
**
kwargs
:
Any
=
{
}
)
->
AsyncIterator
[
ls_schemas
.
Run
]

Parameters

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

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

project_nameOptional[Union[str, Sequence[str]]]
Default:None
run_typeOptional[str]
Default:None
trace_idOptional[ls_client.ID_TYPE]
Default:None
reference_example_idOptional[ls_client.ID_TYPE]
Default:None
queryOptional[str]
Default:None
filterOptional[str]
Default:None
trace_filterOptional[str]
Default:None
tree_filterOptional[str]
Default:None
is_rootOptional[bool]
Default:None
parent_run_idOptional[ls_client.ID_TYPE]
Default:None
start_timeOptional[datetime.datetime]
Default:None
errorOptional[bool]
Default:None
run_idsOptional[Sequence[ls_client.ID_TYPE]]
Default:None
selectOptional[Sequence[str]]
Default:None
limitOptional[int]
Default:None
**kwargsAny
Default:{}

List runs from the LangSmith API.

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

The type of the runs to filter by.

The ID of the trace to filter by.

The ID of the reference example to filter by.

The query string to filter by.

The filter string to filter by.

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.

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.

Whether to filter by root runs.

The ID of the parent run to filter by.

The start time to filter by.

Whether to filter by error status.

The IDs of the runs to filter by.

The fields to select.

The maximum number of runs to return.

Additional keyword arguments.