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
PythonlangsmithclientClientlist_threads
Methodā—Since v0.7

list_threads

Copy
list_threads(
  self,
  *,
  project_id: Optional[ID_TYPE] = None,
  project_name: Optional
View source on GitHub
[
str
]
=
None
,
limit
:
Optional
[
int
]
=
None
,
offset
:
int
=
0
,
filter
:
Optional
[
str
]
=
None
,
start_time
:
Optional
[
datetime
.
datetime
]
=
None
)
->
list
[
ListThreadsItem
]

Parameters

NameTypeDescription
project_idOptional[ID_TYPE]
Default:None

The project (session) id.

project_nameOptional[str]
Default:None

The project name (alternative to project_id).

limitOptional[int]
Default:None
offsetint
Default:0
filterOptional[str]
Default:None
start_timeOptional[datetime.datetime]
Default:None

List threads and fetch the runs for each thread.

Maximum number of threads to return. Default None (no limit).

Pagination offset for threads. Default 0.

Optional filter for threads and runs.

Only include runs from this time. Default: 1 day ago.