agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
Manifest
›build›locals›runtime›filesystem›network
providers
›agent›graph›tool›skill›http_server
Runtime
›Observability

locals

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.

agent.acl
locals {
  version = "1.0.0"
  region  = "us-east-1"
}

agent "my_agent" {
  graph {
    type = "react"
  }

  version     = locals.version
  description = "Deployed in ${locals.region}."
}

Referencing locals

Locals are referenced with locals.<name> syntax. They can be used anywhere in the manifest that accepts a constant value.

In string fields, you can use ${locals.name} for inline interpolation:

description = "Version ${locals.version} running in ${locals.region}."

Constraints

Locals are always build-time constants. They cannot contain runtime() or secret() expressions. If you need a value to be configurable at deployment, use runtime() directly in the field instead.

# This does not work. locals cannot use runtime().
locals {
  port = runtime("PORT", 8080)  # invalid
}

# Do this instead.
http_server {
  port = runtime("PORT", 8080)
}
← PreviousbuildNext →runtime

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageReferencing localsConstraints

Search docs

Search the agentc documentation