PROMPT.PUT
PROMPT.PUT name content [META metadata]
- Group
- Prompt registry
- Complexity
- O(1)
- Arity
- -3 (at least 3 words, counting the command name)
- Flags
- write, fast
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- Performance and Scale
- On-Premise
- requires the prompt-registry license feature
The prompt registry stores versioned prompt templates by name, with one version marked active, so you can roll a prompt forward or back without deploying code. PROMPT.PUT stores content as the next version of template
name (starting at 1), creating the template if needed, and makes the new
version active.
A template keeps its most recent versions only, up to max_versions under
[prompt] (64 unless you change it); older versions are removed.
Options
Section titled “Options”| Option | Effect |
|---|---|
META metadata |
Any string to keep with this version, such as JSON describing the change. |
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Version stored | Integer: the new version number | Same |
Errors:
ERR template limit reachedif the template is new and the server already holds its maximum number of templates (max_templatesunder[prompt]).ERR unknown optionif the fourth argument is notMETA.ERR wrong number of arguments for 'prompt.put' commandif the argument count is wrong.NOLICENSE prompt-registry requires a HotKV license. Contact sales@hotkv.comif your license does not include theprompt-registryfeature.
Examples
Section titled “Examples”127.0.0.1:6379> PROMPT.PUT support-agent "You are a helpful support agent."(integer) 1127.0.0.1:6379> PROMPT.PUT support-agent "You are a concise, friendly support agent." META "{\"author\":\"maria\"}"(integer) 2Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”PROMPT.GET, PROMPT.LATEST, PROMPT.SETACTIVE, PROMPT.VERSIONS, PROMPT.DROP, PROMPT.LIST, AI features guide
Was this page helpful?
Thanks for the feedback.