App settings files
An app’s settings: the optional .mtr file beside an app’s Cogniscript (.mtc) code. The app’s inputs come from the parameters of its main function, not from this file.
What app settings are for, and how to use them: Apps.
Where the file goes
Section titled “Where the file goes”apps/<name>/: Each sub-folder of apps/ is one app, named after the folder; the .mtr file in it may have any name. A folder holds at most one .mtr file.
A resource’s name is its file name without .mtr (an app’s is its folder’s name). Use letters, digits, _, - and . (but not ..), at most 128 characters. Two files of the same kind may not have the same name, even in different sub-folders or with different capitals.
Properties
Section titled “Properties”Every property is optional.
functions.openApi
Section titled “functions.openApi”Optional. List of blocks.
Tools the app’s code calls with ExtOpInvoke. Listing a tool here pins the version it had when the app was deployed; a tool that is not listed is called at its latest version.
duration.max
Section titled “duration.max”Optional. Duration, "hh:mm:ss".
The longest a run of the app may take, as "hh:mm:ss". The run is stopped when it is reached.
duration.max = "00:05:00"credentialStack
Section titled “credentialStack”Optional. Text.
The credential stack the app’s runs use, by name, when their start doesn’t name one, and every interaction and code pipeline they start. Its credentials serve every model call, and Maitento’s own keys never do. Leave it out to use the namespace’s default stack, then your tenant’s.
credentialStack = "..."Each item of functions.openApi
Section titled “Each item of functions.openApi”A tool made available in one place (to a whole interaction, to one participant, or to an app), with any values and credentials that apply there: { ref = @ref("search-handbook") }. What is set here overrides the tool’s own settings.
functions.openApi › ref
Section titled “functions.openApi › ref”Required. Reference to a tool.
The tool.
ref = @ref("search-handbook")functions.openApi › bindings.path
Section titled “functions.openApi › bindings.path”Optional. Map of text, one line per entry: bindings.path:<key> = "value".
Fixed values for the connector’s path parameters, one line each: bindings.path:orderId = "A-1001".
bindings.path:orderId = "A-1001"functions.openApi › bindings.query
Section titled “functions.openApi › bindings.query”Optional. Map of text, one line per entry: bindings.query:<key> = "value".
Fixed values for the connector’s query parameters, one line each: bindings.query:units = "metric".
bindings.query:units = "metric"functions.openApi › name
Section titled “functions.openApi › name”Optional. Text.
The name the model calls the tool by here. The tool’s own name when not set.
name = "search-handbook"functions.openApi › bindings.request
Section titled “functions.openApi › bindings.request”Optional. Map of text, one line per entry: bindings.request:<key> = "value".
Fixed values for fields of the request body, which the model never sees or chooses, one line each: bindings.request:field = "value". Separate the names of a nested field with / (bindings.request:customer/id). A value is read as the type the request schema gives the field.
bindings.request:customer/id = "C-42"functions.openApi › auth
Section titled “functions.openApi › auth”Optional. Block.
A credential to send with every call made here, instead of the tool’s own.
functions.openApi › guidance
Section titled “functions.openApi › guidance”Optional. Text.
When and how to use the tool here, instead of the tool’s own guidance. The model reads it.
guidance = "Use it when the customer asks about an order."functions.openApi › terminal
Section titled “functions.openApi › terminal”Optional. true or false. Default: false.
A successful call ends the agent’s turn: the result is recorded, and the model is not asked to continue. Use it for a “finish” tool that is meant to be the last thing an agent does in a turn.
terminal = trueThe functions.openApi › auth block
Section titled “The functions.openApi › auth block”A credential sent with every call of a tool: auth = { header = "X-Api-Key" secret = @ref("orders-api-key") }. The tool’s connector needs auth = "Header".
auth › header
Section titled “auth › header”Required. Text.
The HTTP header the secret’s value is sent in. For Authorization, a value without a space is sent as Bearer <value>.
header = "X-Api-Key"auth › secret
Section titled “auth › secret”Required. Reference to a secret.
The secret whose value is sent. Create the secret before you deploy.
Secrets are not part of a project: create them in the portal, with the SDK or with mt secret-create before you deploy.
secret = @ref("orders-api-key")A complete example
Section titled “A complete example”From the 16-apps example project:
// Optional settings for the app. Stop it if it runs for more than five minutes.duration.max = "00:05:00"