Introduction
Acoral-agent.toml contains all the information that the Coral server needs to orchestrate a Coral agent. You cannot have a Coral agent without a coral-agent.toml file; similar to a package.json file for a Node project.
TOML is the syntax used in this configuration file.
Example
File format reference
edition
The current latest edition is
2If
edition is not set, it will default to 1 for backwards compatibility. This will issue a warningcoral-agent.toml file.
Second edition
The second edition, or (edition = 2) is the current edition of Coral agent definitions.
Changelog compared to first edition agent definitions:
- Top level changes:
- Added the edition field
- Option changes:
- Added Numeric types
- The
numbertype remains for backwards compatibility. It is now mapped to thef64type.
- The
- Added the
blobtype - Added the
booltype - Added list types
- Added the validation table
- Added the display table
- Moved
descriptiontodisplay.descriptionfor options
- Moved
- Added the
base64andsecretfor string types- The
secrettype remains for backwards compatibility and will settype = "string"andhidden = true
- The
- Added filesystem option value transport via the transport field
- Added Numeric types
First edition
First edition, or (edition = 1) agents can still be used by the Coral server but will generate warnings. Versions of the Coral server that support only first edition agents cannot load second edition agents.
Any agent that is still using first edition agent definitions should be updated as soon as possible.
In the future, first edition agents will not be valid in a Coral server registry.
Migration steps
Migration steps
- Set
edition = 2at the top of the agent definition - Change all types of
secretto string and add thehidden = truefield - Change all types of
numbertof64. Or, use a new more fitting numeric type - Rename
descriptionon options todisplay.description
- Consider adding the validation table
- Consider adding the full display table
- Choose a new type for your options that better fits it’s use case
- Use the file system transport for options that take can take a large input value (e.g images or other large files)
agent
name
- lowercase characters:
a-z - uppercase characters:
A-Z - numbers:
0-9 - special characters:
_and-
version
[0-9]+\.[0-9]+\.[0-9]+. See also version recommendations for the marketplace.
description
capabilities
resources- The agent supports MCP resources fully. Fully supporting MCP resources requires that any given MCP resource is fetched per agent iteration
tool_refreshing- The agent will check for new tools per iteration
runtimes
executable and docker.
docker
docker is the preferred runtime for an agent. The docker runtime is required for agents on the marketplace and ensures that the agent is portable.
The following example will request myuser/myimage:1.0.0 from Dockerhub:
executable
coral-agent.toml file, taking the following directory for example:
executable runtime could be:
options
- Provide API keys for services the agent needs access to
- Configure LLM parameters, for example:
- The model provider (OpenAI, Anthropic, etc)
- The model used (GPT-4, Claude 3.5, etc)
- Maximum tokens
- Hyperparameters
type
An option type controls valid values for an option and how the option will be encoded. The type will be verified by the server. The server will never orchestrate an agent with a value for an option that is of the wrong type.Numeric types
| type | value | transport = "env" | transport = "fs" |
|---|---|---|---|
| i8 | 127 | 127 | 0x7F |
| i16 | -15234 | -15234 | 0xC47E |
| i32 | 1589473628 | 1589473628 | 0x5EB8E15C |
| i64 | 7234567890123456789 | 7234567890123456789 | 0x6451780B5FE68D15 |
| u8 | 203 | 203 | 0xCB |
| u16 | 5432 | 54321 | 0xD431 |
| u32 | 3141592653 | 3141592653 | 0xBB40E64D |
| u64 | 12345678901234567890 | "12345678901234567890" | 0xAB54A98CEB1F0AD2 |
| f32 | 3.14159274 | 3.14159274 | 0x40490FDB |
| f64 | 2.718281828459045 | 2.718281828459045 | 0x4005BF0A8B145769 |
When
transport = "fs" all numeric types are written in big-endian byte order.Other types
| type | value | transport = "env" | transport = "fs" |
|---|---|---|---|
| bool | true | 1 | 0x01 |
| string | Hello World! | Hello World! | Hello World! (utf8) |
| blob | [164, 145, 163, 164] | dGVzdA== (base64) | 0x74657374 (raw bytes) |
When
transport = "fs":- Bool values be written as u8 byte;
1for true and0for false. - A string’s
base64setting will be ignored. The string will always be written in a UTF-8 encoding
When
transport = "env":- Bool values will be
1for true and0for false. - String values can be passed with base64 encoding if
base64 = trueis set - Blob values will always be passed as base64
List types
All types except for the bool type have a matching list type, for example:list[i32]list[string]list[blob]
When Windows environment:Unix environment:File content (identical on Windows and Unix):
transport = "fs":An environment variable will be set for this option containing a list of files, one file for every value specified.The list of paths will be separated using the operating-system-dependant path separator:;on Windows:on Unix-like operating systems
When
transport = "env":The values will be sent as a comma-separated list. If you expect a large value (that your OS might not fit into an environment variable) consider using the transport = "fs" transport instead.If you’re using a type = list[string] and expect commas to exist in the strings, it is recommended to use base64 = true or transport = "fs".Edition 1 types
| Type | Description | Notes |
|---|---|---|
number | Previously used for numbers | converted to a f64 type |
secret | Previously used hidden strings | converted to a string type with hidden = true |
transport
The default value of
transport is envenv or fs. The env transport should be used in 90% of cases. The fs transport exists mostly to support potentially large (strings, string lists, blob or blob list) options.
Encoding varies by type. See the type section for examples of how different types are encoded with different transports.
required
The default value of
required is falserequired = true must be specified to the server. The server will not orchestrate an agent with an unspecified required value. This should be used for options that the agent cannot run without.
secret
The default value of
secret is falsesecret = true will be censored in logs and input fields in the UI. This should be used for options with sensitive input, like API keys.
base64
The default value of
base64 is falsetype = "string" or type = "list[string]") in base64. No effect on options with transport = "fs".
It is recommended to set base64 = true on list of strings that may contain commas.
default
display
The optionaldisplay table contains fields that are used to customize how this option is displayed in user interfaces, such as Coral studio.
label
The default value of
display.label is the key given for the option in the options tabledescription
In first edition agents, the description field was placed top level in the option:This syntax is not valid in second edition agents.
group
multiline
The default value of
display.multiline is falsedisplay.multiline = true has no effect on type = "bool" optionsdisplay.multiline = true then the user input dialog for this field will span multiple lines. Useful for options that contain LLM prompts or partial prompts.
validation
The optionalvalidation table contains fields that are used to validate the potential value given for this option by an agent consumer. The server will reject requests for agents that contain invalid values for options.
variants
min
min must be the same numeric type of the option, this means you cannot specify a negative min value for an unsigned numeric type.
max
max must be the same numeric type of the option, this means you cannot specify a value of 500 for a type = "u8" option.
min_len
max_len
regex
min_size
| Unit | Name | Size in Bytes |
|---|---|---|
| b | BYTE | 1 |
| KiB | KIBIBYTE | 1,024 |
| MiB | MEBIBYTE | 1,048,576 |
| GiB | GIBIBYTE | 1,073,741,824 |
| TiB | TEBIBYTE | 1,099,511,627,776 |
| kB | KILOBYTE | 1,000 |
| MB | MEGABYTE | 1,000,000 |
| GB | GIGABYTE | 1,000,000,000 |
| TB | TERABYTE | 1,000,000,000,000 |
max_size
| Unit | Name | Size in Bytes |
|---|---|---|
| b | BYTE | 1 |
| KiB | KIBIBYTE | 1,024 |
| MiB | MEBIBYTE | 1,048,576 |
| GiB | GIBIBYTE | 1,073,741,824 |
| TiB | TEBIBYTE | 1,099,511,627,776 |
| kB | KILOBYTE | 1,000 |
| MB | MEGABYTE | 1,000,000 |
| GB | GIGABYTE | 1,000,000,000 |
| TB | TERABYTE | 1,000,000,000,000 |