LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithclientClientlistPrompts
Method●Since v0.1

listPrompts

List prompts by filter.

Copy
listPrompts(options: __type): AsyncIterableIterator<Prompt>

Parameters

NameTypeDescription
options__type

Optional filters for listing prompts

Example

Copy
// List all prompts
for await (const prompt of client.listPrompts()) {
  console.log(prompt);
}

// List only public prompts
for await (const prompt of client.listPrompts({ isPublic: true })) {
  console.log(prompt);
}

// Search for prompts
for await (const prompt of client.listPrompts({ query: "translation" })) {
  console.log(prompt);
}
View source on GitHub