The agent block defines the agent's identity, graph, model, prompt, and capabilities.
The agent block is where you define the agent itself: its name, graph, model, system prompt, and
what it is allowed to do. A manifest contains one agent block.
agent "my_agent" {
graph {
type = "react"
}
version = "1.0.0"
description = "A helpful assistant."
prompt = "You are a helpful assistant. Your name is {{ agent_name }}."
capabilities = ["math", "filesystem"]
capability_policy = "locked"
model {
provider = "anthropic"
name = "claude-haiku-4-5"
}
}| Field | Type | Required | runtime() | Description |
|---|---|---|---|---|
graph | block | yes | Graph selection. See below. | |
version | string | no | no | Semver version string embedded in the binary. Defaults to "0.1.0". |
description | string | no | no | Human-readable description of the agent. |
prompt | string, list, or source object | no | no | System prompt. Supports Jinja2 templates. |
capabilities | list of strings | no | yes | Capability tags the agent is allowed to use. |
capability_policy | string | no | yes | How capabilities are enforced. See below. |
model | block | yes | Model configuration. |
The graph block selects which graph implementation drives the agent. Graph selection is required
and currently the only shipped value is react.
graph {
type = "react"
}| Field | Type | Required | runtime() | Description |
|---|---|---|---|---|
type | string | yes | no | Graph name. Must be react in this distribution. |
See graph for the block reference and ReAct for the shipped graph's behavior.
The prompt field sets the agent's prompt. It accepts a plain string, a list of role/content
objects for multi-turn prompts, or a configured prompt source.
# Plain string
prompt = "You are a helpful assistant."
# Multi-turn
prompt = [
{ role = "system", content = "You are a helpful assistant." },
{ role = "user", content = "Always be concise." }
]The prompt supports Jinja2 template syntax. Variables are injected at runtime before each run. The set of available variables is graph-dependent; see ReAct prompt templates for the list the ReAct graph provides, and Write templated prompts for how to use them.
Use a Langfuse source object to retrieve the prompt from Langfuse Prompt Management at runtime:
prompt = {
source = "langfuse"
prompt_name = "support/assistant"
public_key = runtime("LANGFUSE_PUBLIC_KEY")
secret_key = secret(runtime("LANGFUSE_SECRET_KEY"))
label = runtime("LANGFUSE_PROMPT_LABEL", "staging")
cache_ttl_seconds = runtime("LANGFUSE_CACHE_TTL_SECONDS", 60)
fetch_timeout_seconds = runtime("LANGFUSE_FETCH_TIMEOUT_SECONDS", 5)
max_retries = runtime("LANGFUSE_MAX_RETRIES", 2)
}| Field | Type | Required | runtime() | Default | Description |
|---|---|---|---|---|---|
source | string | yes | no | Must be langfuse. | |
prompt_name | string | yes | yes | Langfuse prompt name, including any folder path. | |
public_key | string | yes | yes | Langfuse project public key. | |
secret_key | string | yes | yes | Langfuse project secret key. Normally wrapped in secret(runtime(...)). | |
base_url | string | no | yes | https://cloud.langfuse.com | Langfuse Cloud or self-hosted base URL. |
label | string | no | yes | Movable label used to select a prompt version. | |
version | number | no | yes | Immutable numeric prompt version. | |
cache_ttl_seconds | number | no | yes | 60 | Local cache lifetime. Set to 0 to disable caching. |
fetch_timeout_seconds | number | no | yes | 5 | Fetch timeout for each request attempt. |
max_retries | number | no | yes | 2 | Additional attempts for transient fetch failures. |
label and version are mutually exclusive. When both are omitted, Langfuse applies its default
production selection.
See Manage prompts with Langfuse for credential setup, selection strategies, caching behavior, and prompt conversion.
Capabilities are tags that control which tools the agent can invoke at runtime. Each tool can declare
a set of capability tags. The agent's capabilities list declares which tags the agent is allowed to
use.
When capability_policy is set to "locked", the agent can only invoke tools whose capability tags
are a subset of its declared capabilities. Tools with no declared capabilities are always available.
agent "my_agent" {
graph {
type = "react"
}
capabilities = ["math", "filesystem::read"]
capability_policy = "locked"
...
}See Tools and capabilities for how capabilities work with tools and Control tool access with capabilities for the recipe.
The model block selects the LLM the agent uses.
| Field | Type | Required | runtime() | Description |
|---|---|---|---|---|
provider | string | yes | yes | Provider name. Must match a key in the providers block. |
name | string | yes | yes | Model identifier as recognised by the provider. |
Inference parameters such as temperature, max_tokens, and top_p are declared in the
providers block, not here. Provider-level defaults apply to every model request, and individual
models can override them with their own params block. See
Configure a model provider and the
providers reference for details.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0Search the agentc documentation