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

read_thread

Copy
read_thread(
  self,
  *,
  thread_id: str,
  project_id: Optional[Union[ID_TYPE
View source on GitHub
,
Sequence
[
ID_TYPE
]
]
]
=
None
,
project_name
:
Optional
[
Union
[
str
,
Sequence
[
str
]
]
]
=
None
,
is_root
:
bool
=
True
,
limit
:
Optional
[
int
]
=
None
,
select
:
Optional
[
Sequence
[
str
]
]
=
None
,
filter
:
Optional
[
str
]
=
None
,
order
:
Literal
[
'asc'
,
'desc'
]
=
'asc'
,
**
kwargs
:
Any
=
{
}
)
->
Iterator
[
ls_schemas
.
Run
]

Parameters

NameTypeDescription
thread_id*str

Thread id (required).

project_idOptional[Union[ID_TYPE, Sequence[ID_TYPE]]]
Default:None
project_nameOptional[Union[str, Sequence[str]]]
Default:None
is_rootbool
Default:True
limitOptional[int]
Default:None
selectOptional[Sequence[str]]
Default:None
filterOptional[str]
Default:None
orderLiteral['asc', 'desc']
Default:'asc'
**kwargsAny
Default:{}

Read runs for a single thread.

Project id(s) (required when not using project_name).

Project name(s) (required when not using project_id).

If True, return only root runs. Default True.

Maximum number of runs to return.

Fields to select.

Additional filter expression.

Sort order for runs (e.g. "asc" for chronological). Default "asc".

Additional arguments passed to the runs query.