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

get_run_stats

Copy
get_run_stats(
  self,
  *,
  id: Optional[list[ID_TYPE]] 
View source on GitHub
=
None
,
trace
:
Optional
[
ID_TYPE
]
=
None
,
parent_run
:
Optional
[
ID_TYPE
]
=
None
,
run_type
:
Optional
[
str
]
=
None
,
project_names
:
Optional
[
list
[
str
]
]
=
None
,
project_ids
:
Optional
[
list
[
ID_TYPE
]
]
=
None
,
reference_example_ids
:
Optional
[
list
[
ID_TYPE
]
]
=
None
,
start_time
:
Optional
[
str
]
=
None
,
end_time
:
Optional
[
str
]
=
None
,
error
:
Optional
[
bool
]
=
None
,
query
:
Optional
[
str
]
=
None
,
filter
:
Optional
[
str
]
=
None
,
trace_filter
:
Optional
[
str
]
=
None
,
tree_filter
:
Optional
[
str
]
=
None
,
is_root
:
Optional
[
bool
]
=
None
,
data_source_type
:
Optional
[
str
]
=
None
)
->
dict
[
str
,
Any
]

Parameters

NameTypeDescription
idOptional[List[Union[UUID, str]]]
Default:None

List of run IDs to filter by.

traceOptional[Union[UUID, str]]
Default:None
parent_runOptional[Union[UUID, str]]
Default:None
run_typeOptional[str]
Default:None
project_namesOptional[List[str]]
Default:None
project_idsOptional[List[Union[UUID, str]]]
Default:None
reference_example_idsOptional[List[Union[UUID, str]]]
Default:None
start_timeOptional[str]
Default:None
end_timeOptional[str]
Default:None
errorOptional[bool]
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
data_source_typeOptional[str]
Default:None

Get aggregate statistics over queried runs.

Takes in similar query parameters to list_runs and returns statistics based on the runs that match the query.

Trace ID to filter by.

Parent run ID to filter by.

Run type to filter by.

List of project names to filter by.

List of project IDs to filter by.

List of reference example IDs to filter by.

Start time to filter by.

End time to filter by.

Filter by error status.

Query string to filter by.

Filter string to apply.

Trace filter string to apply.

Tree filter string to apply.

Filter by root run status.

Data source type to filter by.