Redouble AI Nucleo documentation
Part 2 · Writing an agent

Prompt sources

ai.redouble.nucleo.prompt.sources · nucleo-core

Prompts showed how a deployment substitutes what a key produces with Prompts.replace(key, source) or puts one source behind every key with Prompts.setGlobalBackend(source). Either way it needs a PromptSource, and the usual needs are the same everywhere: text from a database, text from a server, an experiment between two wordings. This package ships those, so a deployment plugs one in instead of writing a source class of its own.

StaticTextSource carries the StaticPromptSource marker, so a prompt produced from it is kept after its first check. The other three answer per call, since their content can change under the key; the guardrail verdicts are remembered by content, so a check repeats only when the content actually changed.

^