The locals block defines build-time constants.
The locals block defines named constants that are resolved once at build time and can be referenced
elsewhere in the manifest. Use locals for values that appear in multiple places or that you want to
give a meaningful name.
locals {
version = "1.0.0"
region = "us-east-1"
}
agent "my_agent" {
graph {
type = "react"
}
version = locals.version
description = "Deployed in ${locals.region}."
}Locals hold strings that can be reused in manifest string values. Write ${locals.name} inside a string to substitute a local when the manifest is resolved. Use locals.name where a field accepts a direct local reference.
In string fields, you can use ${locals.name} for inline interpolation:
description = "Version ${locals.version} running in ${locals.region}."Only a local's constant value or its runtime() default is available when compiling the manifest. A runtime environment variable is not read to substitute another field. A missing local reference is an error. Use $${locals.name} when the final string should contain ${locals.name} literally.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0