Retrieve LangWatch Prompt icon

Retrieve LangWatch Prompt

Retrieve and compile a prompt from the LangWatch Prompt Manager using the TypeScript SDK

Retrieve LangWatch Prompt

AI-generated

Summary

Retrieve and optionally compile a LangWatch prompt via the LangWatch Prompt Manager API.

Inputs

None.

Output shape

single item with json field

When compile is false returns {prompt: ...}. When compile is true returns {prompt: ..., compiledPrompt: ...}. Always one main output connector.

Examples

Example 1: Manual prompt selection, latest version, no compilation

promptSelectionMethod: manual, handleOrId: 'my-prompt', versionSelection: latest, compile: false

Example 2: Dropdown selection, specific version, compiled with manual variables

promptSelectionMethod: dropdown, promptId: '123', versionSelection: specific, version: 'v2.0', compile: true, variableSource: manual, variables: [{name: 'user_name', value: 'John Doe'}], strict: true

Discussion