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

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
Default:100

The maximum number of prompts to return. Defaults to 100.

offsetint, default=0
Default:0

The number of prompts to skip. Defaults to 0.

is_publicOptional[bool]
Default:None
is_archivedOptional[bool]
Default:False
sort_fieldPromptSortField
Default:ls_schemas.PromptSortField.updated_at
sort_directionLiteral["desc", "asc"], default="desc"
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. Defaults to "desc".

Filter prompts by a search query.