Document system-prompt template variables#104
Merged
JakeSCahill merged 1 commit intoJun 18, 2026
Conversation
Add a Template variables section to the system prompts page covering the .Now date fields (.Date/.Weekday/.Month/.Year), the raw .Now.Time, and .User.Email. Notes that times are UTC, that day-granular fields keep the upstream prompt cache warm while sub-day .Now.Time formatting does not, and that a malformed template fails at agent startup. Documents the feature added in the ai-agent system prompt provider.
👷 Deploy request for redpanda-agentic-data-plane pending review.Visit the deploys page to approve it
|
Contributor
Author
|
Opened from a fork, so I couldn't request reviewers directly. @JakeSCahill @kbatuigas - could one of you take this, or assign the docs team? Documents the system-prompt template variables shipped in redpanda-data/cloudv2#27240. |
JakeSCahill
approved these changes
Jun 18, 2026
Contributor
|
Lovely. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a Template variables section to the agent system prompts page (
modules/connect/pages/system-prompts.adoc) documenting the variables an agent injects into its system prompt at render time: the.Nowdate fields (.Date,.Weekday,.Month,.Year), the raw.Now.Time, and.User.Email.Why
The agent system prompt supports Go-template interpolation, but the feature was undocumented. Agents commonly need the current date for temporal grounding and the caller's email for per-user scoping. Without docs, builders can't discover the variables or the behavior that bites: times are UTC, sub-day formatting hurts prompt caching, and a malformed template fails the agent at startup.
Implementation details
One new
== Template variablessection: a variable reference table with example output, a worked example prompt, a cache-stability note, and a validation note. It states that all times are UTC, that the day-granular date fields keep the upstream model prompt cache warm while sub-day formatting of.Now.Timedefeats it, and that a broken template stops the agent from starting rather than failing per request. The same variables apply to agent and subagent prompts.Grounded in the ai-agent system prompt provider and verified against the shipped behavior.
References
Implements docs for redpanda-data/cloudv2#27240.