USE BEHAVIOR_PROFILE: <name>, and the compiler attaches the matching profile IR to that agent.
File contract
Behavior profile files belong inbehavior_profiles/ and should use the .behavior_profile.abl suffix:
behavior_profiles, while layers_included still uses core. Do’nt add behavior_profiles to layers_included.
The manifest entry is a pointer, not the profile definition. Import preview compiles the actual file at behavior_profiles.<name>.path. A package that only lists a profile in project.json but omits the referenced .abl file doesn’t create the profile; agents with USE BEHAVIOR_PROFILE: <name> will fail resolution with a missing profile diagnosis.
Grammar
WHEN evaluation context and timing
Session creation and pre-session policy checks evaluate metadata only:channel, caller, session, interaction, and env.
At runtime, the platform reevaluates profiles at each reasoning turn, agent activation, parent restoration, and cold session restoration boundary. These later evaluations also read the active session’s accepted expression values.
A declared memory INITIAL value can select a profile at the first runtime reevaluation. It does not select a business-state-dependent profile during the metadata-only creation check.
A SET, GATHER answer, or tool result becomes visible when the next existing evaluation boundary runs. It does not trigger an immediate profile reevaluation by itself.
session.is_new belongs to the creation check, while session.turn_count retains its reasoning-invocation count.
The runtime expression values include:
- Declared session memory
- Accepted GATHER fields
- Values saved by authored tool-result mappings
- The stamped current
input - The structured
intentobject, when present
Reference resolution at runtime reevaluation
Every ordinary accepted expression value is available directly and through
context. For example, customer_tier and context.customer_tier resolve to the same value, as do input and context.input.
Top-level channel, caller, and interaction retain profile metadata. Use context.channel, context.caller, and context.interaction for colliding business values.
Nested keys, including a business object’s own context property, remain ordinary accepted state.
Identifier references session_id, project_id, tenant_id, and user_id follow the existing expression projection: an accepted stored value wins, and the corresponding runtime identifier supplies a fallback when that value is absent. Adding an alias does not grant access to another session, project, or agent’s private state.
Conditions read session-visible config/env values. Secret values held exclusively for tool execution remain unavailable to conditions and their context aliases.
Tokenized PII comparisons use the active session’s comparator.
The evaluation map is not persisted or published as profile trace data, model instructions, or responses.
Missing references and invalid conditions skip the affected profile. They do not crash the session or become implicit string literals.
These expression values are comparison data, not authorization grants or proof of tenant/project ownership. Conditions use the accepted values; they do not classify text, synthesize intent, or fall back to older conversation history when input is absent.
Worked example
After an authored GATHER or tool mapping savescustomer_tier as "gold", WHEN: context.customer_tier == "gold" matches at the next runtime reevaluation. When the accepted value is "standard", the profile does not match. A channel predicate such as WHEN: channel.name == "voice" continues to read channel metadata even if a business field is named channel.
After a profile matches, its instruction overlay applies to the main reasoning prompt and reasoning
inside a FLOW step. The step keeps its own goal and constraints. This instruction projection does
not introduce another profile evaluation boundary.
Profile blocks
Beyond the required declarations, a profile can override several aspects of agent behavior. All blocks are optional.CONSTRAINTS
Adds business-rule constraints while the profile is active (a list of strings).RESPONSE
Shapes response rendering.VOICE
Voice (TTS) overrides while the profile is active. Accepts the full voice configuration —instructions, ssml, plain_text, provider, voice_id, speed, pace, temperature, and
auto_tts_language_switch.
TOOLS
HIDE: removes tools from the agent’s tool set; ADD: injects new tool definitions while the
profile is active.
CONVERSATION
CONVERSATION: is also a valid top-level agent section — an agent can declare it directly
(doc.conversation) with the exact same grammar shown here. Use the profile form to apply
conversation overrides conditionally (via the profile’s WHEN), or the top-level form to set an
agent’s baseline conversation behavior.speaking— output style:style,tone,emotion,pace,variety,max_sentences,one_thing_at_a_time,language_policy(interaction_context/agent_default/fixed),fixed_language,tool_lead_in,tool_results,readback,handoffs,phrases_ref,pronunciations_ref.listening— input handling:barge_in,backchannels,on_pause,on_overlap,on_unclear_audio,on_self_correction,use_audio_cues, and the voice sub-blockson_no_input,on_caller_backchannel,on_hold, andbarge_in_continuation(see Voice turn-taking).interaction— dialogue behavior:answer_shape,detail,initiative,grounding,clarification,confirmation,uncertainty,empathy,repair,context,closure,assumption_handling,flow_mode, and more.
Voice turn-taking
For voice/telephony channels, fourlistening sub-blocks control turn-taking behavior:
on_no_input — handle caller silence.
on_caller_backchannel — recognize caller acknowledgements (“uh-huh”, “okay”) without treating them as a turn: enabled, phrases, max_words.
on_hold — handle caller hold requests (“hold on a sec”): enabled, phrases, phrases_by_locale, grace_ms, max_holds, suppress_response. phrases_by_locale is a { <BCP-47 tag>: string[] } map of additional hold phrases selected by the caller’s detected locale; its phrases are unioned with the language-neutral phrases list rather than replacing them. Locale keys are canonicalized at parse time (en_us → en-US).
phrases_by_locale is currently authored only in the .agent.yaml format (CONVERSATION.listening.on_hold.phrases_by_locale); the legacy .agent.abl parser does not yet accept this key.barge_in_continuation — when a caller barges in over the bot and the speech recognizer segments their continuous speech into multiple phrase-finals (for example “change to 2 years” then, without a real pause, “recalculate the EMI”), hold each eligible final briefly and merge a following one into a single turn instead of committing each phrase as its own turn.
barge_in_continuation refines what happens to an already-allowed interruption’s speech segmentation — it’s a sibling of, not a replacement for, the scalar barge_in: allow/disallow policy above, and distinct from the per-output scoped BARGE_IN covered in Scoped barge-in. A project-level default can be overlaid beneath this per-agent block.GATHER
Overrides gather behavior. Top-level keysvalidation_style and confirmation, plus a
FIELD_OVERRIDES: block (note the uppercase keyword) that adjusts individual fields.
FLOW
Overrides the agent’s flow while the profile is active.An inline
BEHAVIOR_PROFILE: declared inside an agent file (rather than as a standalone
document) supports only PRIORITY, WHEN, INSTRUCTIONS, and CONVERSATION. The other blocks
(CONSTRAINTS, RESPONSE, VOICE, TOOLS, GATHER, FLOW) are available only in standalone
profile files.Agent attachment
BEHAVIOR_PROFILE: header, not just the filename. Both
USE BEHAVIOR_PROFILE: (space) and USE_BEHAVIOR_PROFILE: (underscore) forms are accepted.
Compile and import behavior
During import preview, the platform:- Reads
project.jsonandabl.lock. - Categorizes
behavior_profiles/<name>.behavior_profile.ablas part of thecorelayer. - Parses the profile with the canonical ABL parser.
- Compiles profiles before agents.
- Resolves every
USE BEHAVIOR_PROFILEreference against compiled profile names. - Reports missing or malformed profiles as import/compiler issues.