Skip to main content

Inline

An inline value for a PotentialStringReference can be specified as a string literal:
value = "my string value"
Or explicitly with a discriminated table. Example using a discriminated inline table:
value = { type = "string", value = "my string value" }

File

File references may be used to define the value of a PotentialStringReference. File references will be resolved by the Coral server, relative to the coral-agent.toml file. For example, given the following structure:
my-agent
coral-agent.toml
README.MD
The value of README.MD could be used as a value with this syntax:
value = { type = "file", path = "README.MD" }
File references will read the file as a string with the UTF-8 encoding by default. This can be configured by using adding an encoding field to the reference:

encoding

optional
This field is ignored if base64 = true
value.type = "file"
value.path = "README.MD"
value.encoding = "windows-1251"
A list of supported encoding names can be found here.

base64

optional A file reference can also be a Base64 encoded string, which can be useful if the referenced file contains binary data.
value.type = "file"
value.path = "image.png"
value.base64 = true
The default value for base64 is false. Certain usages of the PotentialStringReference type may have a default base64 value of true however, such as with options that have a type = "blob" or type = "list[blob]"

URL

URL references may be used to define the value of a PotentialStringReference. URL references are equivalent to file references in all ways except that a url is given instead of a path.
value = { type = "url", url = "https://my-server.com/my-agent/1.0.0/README.MD" }

encoding

optional Operates identically to file references. See here

base64

optional Operates identically to file references. See here

Constant references

Constant references are a special type of string reference that provides a mechanism for using a Coral server-provided string constant as a value. These are especially useful in prototype runtimes. Constant references can be accessed via name:
value.type = "constant"
value.name = "PROTOTYPE_DEFAULT_SYSTEM_PROMPT"
The following constants are available: PROTOTYPE_DEFAULT_SYSTEM_PROMPT The default value for runtimes.prototype.prompts.system.base PROTOTYPE_DEFAULT_LOOP_INITIAL_BASE_PROMPT The default value for runtimes.prototype.prompts.loop.initial.base PROTOTYPE_DEFAULT_LOOP_FOLLOWUP_PROMPT The default value for runtimes.prototype.prompts.loop.followup CORAL_STATE_RESOURCE_URI The MCP URI for the Coral state resource CORAL_INSTRUCTION_RESOURCE_URI The MCP URI for the Coral instruction resource