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

List prompts with pagination.

Copy
list_prompts( self, *, limit: int = 100, offset: int = 0, 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

Filter prompts by if they are public.

is_archivedOptional[bool]
Default:False

Filter prompts by if they are archived.

sort_fieldPromptSortField
Default:ls_schemas.PromptSortField.updated_at

The field to sort by.

Defaults to 'updated_at'.

sort_directionLiteral['desc', 'asc']
Default:'desc'

The order to sort by.

queryOptional[str]
Default:None

Filter prompts by a search query.

View source on GitHub