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

list_prompts

Copy
list_prompts(
  self,
  *,
  limit: int = 100,
  offset: int = 0,
View source on GitHub
is_public
:
Optional
[
bool
]
=
None
,
is_archived
:
Optional
[
bool
]
=
False
,
sort_field
:
ls_schemas
.
PromptSortField
=
ls_schemas
.
PromptSortField
.
updated_at
,
sort_direction
:
Literal
[
'desc'
,
'asc'
]
=
'desc'
,
query
:
Optional
[
str
]
=
None
)
->
ls_schemas
.
ListPromptsResponse

Parameters

NameTypeDescription
limitint
Default:100

The maximum number of prompts to return.

offsetint
Default:0

The number of prompts to skip.

is_publicOptional[bool]
Default:None
is_archivedOptional[bool]
Default:False
sort_fieldPromptSortField
Default:ls_schemas.PromptSortField.updated_at
sort_directionLiteral['desc', 'asc']
Default:'desc'
queryOptional[str]
Default:None

List prompts with pagination.

Filter prompts by if they are public.

Filter prompts by if they are archived.

The field to sort by.

Defaults to 'updated_at'.

The order to sort by.

Filter prompts by a search query.