The LumiqTrace prompt library stores versioned prompts that your application fetches at runtime. This lets you update prompts without redeploying code, experiment with variants using labels, and track which prompt version produced which LLM output. TheDocumentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
PromptClient is the SDK interface to this library.
Getting a PromptClient
The PromptClient is available two ways: from the initialized lumiqtrace singleton, or by constructing it directly.
Fetching a prompt
client.get(name, options?) fetches a prompt by name. By default it returns the latest version. Results are cached locally for 5 minutes.
The name of the prompt to fetch.
Fetch a specific version number. Mutually exclusive with
label.Fetch the version currently associated with this label (e.g.
"production", "staging", "canary"). Mutually exclusive with version.When
true, the result is cached locally for 5 minutes. Set to false to bypass the cache for this call.Compiling prompts with variables
client.compile(prompt, variables) substitutes {{variable}} placeholders in a text-type prompt with the values you provide.
chat-type prompts, compile returns a JSON string of the messages array. Parse it before using:
Listing prompts
client.list(nameFilter?) returns all prompts in your project. Optionally filter by a name substring.
Creating a new prompt version
client.create(params) creates a new prompt version. Each call creates a new version number — existing versions are never modified.
The prompt name. Must match the name of an existing prompt to add a version, or creates a new prompt if it does not exist.
"text" for a plain string prompt with {{variable}} placeholders, or "chat" for an array of messages.The prompt content. A string for
text type; an array of message objects for chat type.Suggested model configuration (model, temperature, max_tokens). Stored with the prompt for reference but not enforced by the SDK.
Labels to apply to this version immediately on creation (e.g.
["staging"]).Searchable tags for organizing prompts in the dashboard.
Human-readable description of what changed in this version. Appears in the version history view.
Updating labels
client.updateLabels(name, version, labels) replaces all labels on a specific version. Use this to promote a version from staging to production.
Labels are not exclusive by default. The same label (e.g.
"production") can exist on multiple versions simultaneously. If you want a single canonical production version, update the old version’s labels to remove "production" before applying it to the new version.Clearing the cache
The local cache has a 5-minute TTL. Callclient.clearCache() to invalidate it manually — useful after creating a new version or updating labels in the same process.